[Bug 5752] New: tag --remove will add another commit for an already removed tag

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Thu Nov 30 19:28:29 UTC 2017


https://bz.mercurial-scm.org/show_bug.cgi?id=5752

            Bug ID: 5752
           Summary: tag --remove will add another commit for an already
                    removed tag
           Product: Mercurial
           Version: 4.3.2
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at mercurial-scm.org
          Reporter: matt_harbison at yahoo.com
                CC: mercurial-devel at mercurial-scm.org

It _will_ fail if the tag never existed.

$ hg tag foo
$ hg tag --remove foo
$ hg tag --remove foo
$ hg tag --remove foo2
abort: tag 'foo2' does not exist

$ hg log -l 3 -T "{node|short}: {desc}\n"
9661c44a6626: Removed tag foo
e39c1ad2258e: Removed tag foo
986a47dadcf8: Added tag foo for changeset ab5c94ed630d

A coworker applied a tag that matched the branch name and pushed before it was
pointed out to him.  He then tried to remove it, saw the warning that the name
matches the branch, and ran it several times because he wasn't sure if it
worked.  Not sure why he didn't notice the same warning when applying, but
maybe we shouldn't warn on removal?

And maybe reusing the branch name should require a -f.  If that's not an
acceptable BC, maybe a config option to opt in to that behavior?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list