# HG changeset patch # User Nathan Goldbaum # Date 1477951952 18000 # Node ID 27addd7e8eca18ab1e7b13e2729b5c7699a297c1 # Parent b4c0f8d5edd2e635d6ad284545779a2fddd3cb95 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. diff -r b4c0f8d5edd2 -r 27addd7e8eca mercurial/commands.py --- a/mercurial/commands.py Tue Nov 01 20:39:37 2016 +0900 +++ b/mercurial/commands.py Mon Oct 31 17:12:32 2016 -0500 @@ -7077,7 +7077,8 @@ raise error.Abort(_('uncommitted merge')) bheads = repo.branchheads() if not opts.get('force') and bheads and p1 not in bheads: - raise error.Abort(_('not at a branch head (use -f to force)')) + raise error.Abort(_('working directory is not at a branch head ' + '(use -f to force)')) r = scmutil.revsingle(repo, rev_).node() if not message: diff -r b4c0f8d5edd2 -r 27addd7e8eca tests/test-tag.t --- a/tests/test-tag.t Tue Nov 01 20:39:37 2016 +0900 +++ b/tests/test-tag.t Mon Oct 31 17:12:32 2016 -0500 @@ -109,7 +109,7 @@ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ hg tag -l localblah $ hg tag "foobar" - abort: not at a branch head (use -f to force) + abort: working directory is not at a branch head (use -f to force) [255] $ hg tag -f "foobar" $ cat .hgtags @@ -339,7 +339,7 @@ $ hg up null 0 files updated, 0 files merged, 2 files removed, 0 files unresolved $ hg tag nullrev - abort: not at a branch head (use -f to force) + abort: working directory is not at a branch head (use -f to force) [255] $ hg init empty