On 05/09/2012 07:47 AM, Carl Meyer wrote:
> On 05/09/2012 08:19 AM, William Lachance wrote:
>> On 12-05-09 04:22 AM, Henrik Skupin wrote:
>>> Hi all,
>>>
>>> Given our current docs I'm missing some information:
>>>
https://wiki.mozilla.org/Auto-tools/Projects/MozBase
>>>
>>> 1. Do we require people to rebase their patches first before merging
>>> them to master?
>>>
>>> I feel that this is pretty important whenever it comes to regression
>>> tests. It makes it obvious kinda hard to track down issues when there
>>> are interim patches for a feature in the commit list which could be
>>> broken and will not allow us to test this specific changeset, e.g.
>>>
https://github.com/mozilla/mozbase/pull/11/files
>>
>> We don't have any policy on this but I think it's a good idea.
>>
>> Rebasing commits that have already been pushed to the main mozbase
>> repository (
http://github.com/mozilla/mozbase) is obviously a big no-no
>> as it can cause data loss, but I think it's a good practice for people
>> to clean things up in their own branches/trees before committing, both
>> to make finding regressions easier as well as to make the commit log
>> make more sense.
>>
>> I know not everyone is comfortable with git rebase. If they aren't, they
>> should ask for help. ;) It's really not as scary as some pundits have
>> made it out to be.
>
> Rebase doesn't need to be scary, but if the goal is to achieve a clean
> mainline history by squashing branch commits, it is kind of overkill.
> You can do it simply by merging in your feature branch using the
> --squash option to the merge command ("git co master; git merge
> --squash myfeature"). You still don't get the direct parent link from
> the final mainline commit to the branch it came from (though you can
> note the source branch in the commit message), but you lose less
> history overall than rebasing does; unlike rebase, a squashed merge is
> not a destructive operation, and there's less opportunity for things
> to go wrong.
>
> FWIW,
>
> Carl
> _______________________________________________
>
Personally, I am not super-convinced that a checkin policy is what
mozbase needs the most of now. That said, I am for a checkin policy if
it is:
1) Easy to do: there shouldn't be a list of instructions I have to cut
and paste or similar. Preferably, this would be one line.
2) Documented. I'm generally of the opinion that policy should be
documented and obvious. I and many other people are turned off by being
yelled at for violating policy that we didn't know existed
A bonus point would be:
*) Fits multiple ways of working. I've often unbitrotted or otherwise
used patches because it was easier than trying to figure out "the right
way of doing things". While I wouldn't necessarily defend this as good
development practice, the end result is a single commit with a pointer
to the bug.
And as long as we're on the subject, I would request that, if possible,
commit messages are in the form:
"Bug 123456: the title of the bug (if applicable);r=whoever"
I don't really care about capitalization or formatting or other nits
(e.g. if there are multiple commits per bug, obviously itd be nice to
differentiate things), but it is nice to be able to find bugs from
commits in the main repo.