Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
13133:c1492615cdee | 13134:ea3c93b53fdb |
---|---|
3710 elif not opts.get('force'): | 3710 elif not opts.get('force'): |
3711 for n in names: | 3711 for n in names: |
3712 if n in repo.tags(): | 3712 if n in repo.tags(): |
3713 raise util.Abort(_('tag \'%s\' already exists ' | 3713 raise util.Abort(_('tag \'%s\' already exists ' |
3714 '(use -f to force)') % n) | 3714 '(use -f to force)') % n) |
3715 if not rev_ and repo.dirstate.parents()[1] != nullid: | 3715 if not opts.get('local') and repo.dirstate.parents()[1] != nullid: |
3716 raise util.Abort(_('uncommitted merge - please provide a ' | 3716 raise util.Abort(_('uncommitted merge')) |
3717 'specific revision')) | |
3718 r = repo[rev_].node() | 3717 r = repo[rev_].node() |
3719 | 3718 |
3720 if not message: | 3719 if not message: |
3721 # we don't translate commit messages | 3720 # we don't translate commit messages |
3722 message = ('Added tag %s for changeset %s' % | 3721 message = ('Added tag %s for changeset %s' % |