[Bug 5567] New: Deleted local tag makes a global one of the same name invisible

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Tue May 16 03:40:37 UTC 2017


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

            Bug ID: 5567
           Summary: Deleted local tag makes a global one of the same name
                    invisible
           Product: Mercurial
           Version: 4.2
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: bug
          Priority: normal
         Component: Mercurial
          Assignee: bugzilla at mercurial-scm.org
          Reporter: matt_harbison at yahoo.com
                CC: mercurial-devel at mercurial-scm.org

$ hg init r1
  $ cd r1

  $ echo c1 > f1
  $ hg ci -Aqm0
  $ hg tag --local 1.0
  $ hg tag --local --remove 1.0
  $ cat .hg/localtags
  40d85e9847f29e3ba286b83893287fdec7ddf8e9 1.0
  40d85e9847f29e3ba286b83893287fdec7ddf8e9 1.0
  0000000000000000000000000000000000000000 1.0

  $ hg tag 1.0
  $ hg log -r 1.0
  abort: unknown revision '1.0'!
  [255]

  $ cat .hgtags
  0000000000000000000000000000000000000000 1.0
  40d85e9847f29e3ba286b83893287fdec7ddf8e9 1.0

  $ cat .hg/cache/tags2
  0 40d85e9847f29e3ba286b83893287fdec7ddf8e9

I'm a bit surprised that the 00..00 line is added for a local tag removal, but
issue4839 has some reasoning there.  This bug looks like it was previously
reported as issue3339, which got a WONTFIX with the justification that
localtags would be deprecated.  Not sure if that's still true 5 years later.

It took awhile to figure out that a local tag was interfering, but if we are
stuck with this behavior, it should probably be documented.  Also, a warning
when creating the global tag would be nice (though that won't help tags that
are pulled in).

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


More information about the Mercurial-devel mailing list