Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 13134:ea3c93b53fdb stable
tag: fix uncommitted merge check and error message (issue2542)
This patch corrects the check for tagging on an uncommitted merge. We
should never commit a new tag changeset on an uncommitted merge, whether
or not --rev is specified. It also changes the error message from:
abort: cannot partially commit a merge (do not specify files or patterns)
to the much more accurate (and terse):
abort: uncommitted merge
Local tags are ok.
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Tue, 07 Dec 2010 08:02:54 +0100 |
parents | de4a18cbfc98 |
children | 1c1ca9d393f4 |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Dec 13 21:20:30 2010 -0600 +++ b/mercurial/commands.py Tue Dec 07 08:02:54 2010 +0100 @@ -3712,9 +3712,8 @@ if n in repo.tags(): raise util.Abort(_('tag \'%s\' already exists ' '(use -f to force)') % n) - if not rev_ and repo.dirstate.parents()[1] != nullid: - raise util.Abort(_('uncommitted merge - please provide a ' - 'specific revision')) + if not opts.get('local') and repo.dirstate.parents()[1] != nullid: + raise util.Abort(_('uncommitted merge')) r = repo[rev_].node() if not message: