[PATCH 2 of 2 RFCv2] commands: introduce stash command
Gilles Moris
gilles.moris at free.fr
Wed Feb 20 05:00:03 CST 2013
On Wednesday 20 February 2013 11:47:10 am Pierre-Yves David wrote:
> On 20 févr. 2013, at 07:02, Gilles Moris wrote:
> > On Tuesday 19 February 2013 06:18:56 pm Kevin Bullock wrote:
> >> Not necessarily. I often start working on a change e.g. on the stable
> >> branch, then realize that it should really be done on default. 'stash'
> >> is a logical way to move working-directory changes across branches
> >> without having to either (a) really commit, or (b) update to the common
> >> ancestor, then up to the target head.
> >
> > But this is another story: it is because the merge engine cannot handle
> > cross branches merge. I would prefer that the update command be fixed
> > instead. This seems the equivalent of the graft command for the working
> > directory, so possibly the infrastructure for that might be almost in
> > place.
>
> The merge engine can handle that just fine. Its a deliberate User interface
> choice.
So for this particular use case, it would be better to do
$ hg update --crossbranch otherbranch
Than:
$ hg stash wip
$ hg update otherbranch
$ hg stash -p wip
And this would, by the way, work fine with MQ.
Regards.
Gilles.
More information about the Mercurial-devel
mailing list