Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • evolve evolve
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 27
    • Merge requests 27
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • mercurial
  • evolveevolve
  • Merge requests
  • !457

topic: invalidate the topic cache when branchcache is invalidated

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Matt Harbison requested to merge topic/stable/invalidate-topic-cache into branch/stable Oct 04, 2022
  • Overview 1
  • Commits 1
  • Pipelines 2
  • Changes 3

The branchmap is cleared in the superclass function, but I didn't see any sign that this is ever cleared.

This fixes an issue in TortoiseHg where stale topic labels appear in certain cases, such as if a commit has a topic and is stripped, and an unrelated commit is pulled in from a remote repo. Additionally, it fixes an issue with the topic display in TortoiseHg and cmdserver when using hg rollback. In the new test, the result of the command that applies topic2 without this fix was:

6 d (topic2)
5 c (topic2)
4 b (topic1)
0 a ()

The tie in was that rev 4 used to be topic1 before the rollback. Also note that without the fix, the final log command printed the following, even though it showed no signs of topic1, and nothing should have changed:

active topic 'topic1' grew its first changeset
(see 'hg help topics' for more information)
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: topic/stable/invalidate-topic-cache