Mercurial > hg > mercurial-crew
changeset 28554:78b9fdb844c1
graft: warn when -r is combined with revisions as positional arguments
The behaviour in this case is undefined. Instead of silently doing something
"random" and surprising, at least issue a warning.
(This should perhaps be considered a "deprecation" and turned into an error in
a future release.)
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Sun, 17 Jan 2016 19:33:02 +0100 |
parents | 2cc44efcb7cf |
children | 27572a5cc409 |
files | mercurial/commands.py tests/test-graft.t |
diffstat | 2 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3889,6 +3889,10 @@ return _dograft(ui, repo, *revs, **opts) def _dograft(ui, repo, *revs, **opts): + if revs and opts['rev']: + ui.warn(_('warning: inconsistent use of --rev might give unexpected ' + 'revision ordering!\n')) + revs = list(revs) revs.extend(opts['rev'])