[darcs-users] Resolving conflicts in a push only repo
Jamie Webb
j at jmawebb.cjb.net
Mon Nov 7 23:45:43 UTC 2005
On Mon, Nov 07, 2005 at 03:34:17PM -0600, Richard A. Smith wrote:
> I have a general usage question on patch names for the conflict
> resolution. Normally I name my patches by what they do so there is very
> little opportunity for namespace collision on patch names.
> When fixing up conflicts however I don't really have that good a
> description for the patch. And I foresee a lot of "sync_with_master"
> patch names. I know that darcs will let you have duplicate patch names
> just fine but actually doing that just seems wrong to me.
>
> What do you guys normally do for a patch name for your conflict fixup
> patches?
Personally, I'm lazy and call them all 'resolve conflicts', with no
ill effects so far, but I can imagine that it would be more useful to
have the name refer to the patches which conflicted.
>
> >If the pull flags up conflicts, you then have the choice of creating a
> >new patch to remedy them, or amend-recording your existing patch
> >(/only/ since you haven't yet pushed it anywhere).
>
> Would one way be preferred over the other? I guess if I did
> amend-record then I would not have to worry about my above naming hangups.
Doing amend-record means you're playing with cronology: claiming that
you actually wrote your patch after pulling the conflicting one, so
that the conflict never happened (just don't kill your father :-). And
I think that's the best approach for minor conflicts during regular
development; it avoids cluttering up the changelog.
Recording a separate patch draws attention to the conflict, which
might be useful, e.g. if you're not sure your resolution is the
correct one and you want it reviewed.
>From a more technical point of view, amend-recording means that your
patch becomes dependent on the other, which is fine for development in
a single branch, however if there is the possibility that the patches
might exist independently in different branches (e.g. your patch is a
bugfix which is likely to accepted into the stable branch more quickly
than the other patch), then it makes more sense to record a separate
resolution so that the dependency is avoided (and the resolution patch
will depend on both).
So, it depends. And all of the above is just my opinion. I don't
recall this topic being discussed on the list before, so others might
disagree.
And of course the best approach is to communicate with the rest of the
team and avoid the conflicts in the first place :-).
-- Jamie Webb
More information about the darcs-users
mailing list