[PATCH shelve-ext] shelve: make --keep option survive user intevention (issue5431)
Mateusz Kwapich
mitrandir at fb.com
Wed Nov 23 14:40:18 EST 2016
One less footgun in unshelve. Nice!
Excerpts from Kostia Balytskyi's message of 2016-11-23 10:51:47 -0800:
> diff --git a/hgext/shelve.py b/hgext/shelve.py
> --- a/hgext/shelve.py
> +++ b/hgext/shelve.py
> @@ -782,6 +787,7 @@ def _dounshelve(ui, repo, *shelved, **op
>
> try:
> state = shelvedstate.load(repo)
> + opts['keep'] = opts.get('keep') or state.keep
> except IOError as err:
> if err.errno != errno.ENOENT:
> raise
Respecting the "hg unshelve --continue --keep" while ignoring the
"hg unshelve --continue --no-keep" seems confusing to me. Either
we should always respoect the options provided to continue or we
should make them invalid.
--
More information about the Mercurial-devel
mailing list