[PATCH 2 of 2 RFCv2] commands: introduce stash command

Idan Kamara idankk86 at gmail.com
Tue Feb 19 14:14:20 CST 2013


On Tue, Feb 19, 2013 at 7:18 PM, Kevin Bullock <
kbullock+mercurial at ringworld.org> wrote:
>
> On Feb 19, 2013, at 4:46 AM, Denis Laxalde wrote:
>
> > Idan Kamara wrote:
> >> Referring to stashes is done either by index (as shown in --list) or
name (if
> >> one was given). If neither is specified, the most recent stash is
chosen.
> >
> > Wouldn't make more sense to use parent relationships to order stashes?
> > E.g., if I pop/apply a stash without specifying its name, I'd rather
want the one that is on top of the closest parent of my current position
than the most recent one that appeared in the repository (which might be in
some unrelated branch or so).
>
> 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.
>
> I think picking the most recent stash is reasonable. Either way,
referring to the changes explicitly by the identifier shown in --list isn't
too hard.

We could also add revset support and then one could do:

$ hg stash -p 'first(.:: and stashed())'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130219/e34d9c44/attachment.html>


More information about the Mercurial-devel mailing list