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

Kevin Bullock kbullock+mercurial at ringworld.org
Tue Feb 19 11:18:56 CST 2013


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.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list