[PATCH] [mq] addchangegroupe finalize mq patches if changeset children are added
Martin Geisler
mg at aragost.com
Mon Mar 14 06:34:22 CDT 2011
Gilles Moris <gilles.moris at free.fr> writes:
> On Monday 14 March 2011 09:09:43 am Martin Geisler wrote:
>
>> The only thing you lose is the patch names. I know some people spend
>> time chosing their patch names and wont like to lose them. But are
>> these the same people who carelessly publish their patches as a
>> repository and subsequently pull from it?
>
> Making a tool take decisions based on supposed workflow is hazardous.
> There's pretty good chances that somebody out there uses a workflow
> you did not even think about. Possibly an insane workflow, possibly
> not.
Here's a new idea: when a patch X is covered by a real changeset after
pull, then we do
$ hg tag --local -r X mq-X
$ hg qfinish X
and so you still have your old names. To complete the round-trip, we
could let qimport use local tags named 'mq-*' as the patch names instead
of the N.diff names it uses today.
The local tags could also be created without a 'mq-' prefix and then
qimport would just use the first local tag it finds as the patch name,
with a fallback to N.diff.
Remember that we're talking about the situation where 'hg pull' brings
in changesets that *descend from your patches*. If we let us inspire by
'thg log' where changesets are round and patches are diamonds, when we
have a before situation where (A) is a changeset and <X> and <Y> are
patches:
... (A) --- <X> --- <Y>
after the pull you would get
... (A) --- <X> --- <Y> --- (Z)
which is illegal. We can solve this by turning X and Y into changesets:
... (A) --- (X) --- (Y) --- (Z)
or we can make Z a patch too (quite controversal in my opinion):
... (A) --- <X> --- <Y> --- <Z>
You can also abort the pull but X, Y, Z are still in the other
repository and so I think you only delay your decision.
--
Martin Geisler
aragost Trifork
Professional Mercurial support
http://aragost.com/en/services/mercurial/blog/
More information about the Mercurial-devel
mailing list