[Bug 6673] New: some tags missing in cache, maybe because of empty branch merge?

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Tue Mar 29 04:46:03 UTC 2022


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

            Bug ID: 6673
           Summary: some tags missing in cache, maybe because of empty
                    branch merge?
           Product: Mercurial
           Version: default branch
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at mercurial-scm.org
          Reporter: yuya at tcha.org
                CC: mercurial-devel at mercurial-scm.org
    Python Version: ---

STR:

  $ hg init testrepo
  $ cd testrepo

  $ touch a
  $ hg ci -Am a
  adding a
  $ hg branch stable
  marked working directory as branch stable
  (branches are permanent and global, did you want a bookmark?)
  $ hg ci -m branch

  $ hg up default
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ hg merge stable
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  (branch merge, don't forget to commit)
  $ hg ci -m merge

add tag to stable branch:

  $ hg up stable
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ echo a >> a
  $ hg ci -m a
  $ hg tag v0
  $ hg log -GT'{rev} {tags}\n'
  @  4 tip
  |
  o  3 v0
  |
  | o  2
  |/|
  o |  1
  |/
  o  0


empty merge to default, resulted in cache corruption:

  $ hg up default
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
  $ hg merge stable
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
  (branch merge, don't forget to commit)
  $ hg ci -m merge
  $ hg log -GT'{rev} {tags}\n'
  @    5 tip
  |\
  | o  4
  | |
  | o  3
  | |
  o |  2
  |\|
  | o  1
  |/
  o  0


remove corrupted tags cache and run log, the tag resurrected:

  $ rm -R .hg/cache
  $ hg log -GT'{rev} {tags}\n'
  @    5 tip
  |\
  | o  4
  | |
  | o  3 v0
  | |
  o |  2
  |\|
  | o  1
  |/
  o  0


recreate cache explicitly, which makes the cache corrupted again:

  $ rm -R .hg/cache
  $ hg debugupdatecaches
  $ hg log -GT'{rev} {tags}\n'
  @    5 tip
  |\
  | o  4
  | |
  | o  3
  | |
  o |  2
  |\|
  | o  1
  |/
  o  0

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


More information about the Mercurial-devel mailing list