Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 30247:27addd7e8eca stable
tag: clarify warning about making a tag on a branch head
Currently the warning is ambiguous about whether the new tag (possibly specified
via --rev) is being added on a branch head or whether the working directory is
based on a branch head. Clarify the error message to eliminate this ambiguity.
author | Nathan Goldbaum <ngoldbau@illinois.edu> |
---|---|
date | Mon, 31 Oct 2016 17:12:32 -0500 |
parents | 7b7bd704adbd |
children | ba2c04059317 |
comparison
equal
deleted
inserted
replaced
30246:b4c0f8d5edd2 | 30247:27addd7e8eca |
---|---|
7075 p1, p2 = repo.dirstate.parents() | 7075 p1, p2 = repo.dirstate.parents() |
7076 if p2 != nullid: | 7076 if p2 != nullid: |
7077 raise error.Abort(_('uncommitted merge')) | 7077 raise error.Abort(_('uncommitted merge')) |
7078 bheads = repo.branchheads() | 7078 bheads = repo.branchheads() |
7079 if not opts.get('force') and bheads and p1 not in bheads: | 7079 if not opts.get('force') and bheads and p1 not in bheads: |
7080 raise error.Abort(_('not at a branch head (use -f to force)')) | 7080 raise error.Abort(_('working directory is not at a branch head ' |
7081 '(use -f to force)')) | |
7081 r = scmutil.revsingle(repo, rev_).node() | 7082 r = scmutil.revsingle(repo, rev_).node() |
7082 | 7083 |
7083 if not message: | 7084 if not message: |
7084 # we don't translate commit messages | 7085 # we don't translate commit messages |
7085 message = ('Added tag %s for changeset %s' % | 7086 message = ('Added tag %s for changeset %s' % |