Let's say I have some 50+ feature branches in Mercurial. If I do:
hg tag some-tag
in one of the feature branches, it seems to propagate to all branches. Regardless of which feature branch I am in, hg tags will show all tags. That's all well and good. But if I do hg log, it will tell me that the changeset containing the change to .hgtags occurred in a specific branch:
changeset: 4:ea48c727fbcd
branch: feat1
tag: tip
user: Daniel <[email protected]>
date: Mon Dec 21 20:15:11 2015 +0100
files: .hgtags
description:
Added tag feat-1.0 for changeset 3c81a17d4b31
How does Mercurial keep .hgtags in sync across all branches? I've read Mercurial Tag Design, but it doesn't mention any specifics.
The reason I am asking is that we're using Rhodecode for Mercurial at work and this propagation seems to lag significantly when it is under heavy load.
This lag is really annoying since I can see the latest tag in the .hgtags file, but hg tags doesn't list the latest tag. Doing yet another tag sometimes resolves the issue (and maybe it's a bug in Rhodecode), but I would like to know how this works in order to understand the underlying mechanism better.
Quoting some documentation:
Also:
My guess is the lag is when you have multiple tags in multiple branches that need resolution, Mercurial has to look up each changeset to determine its revision to determine "tipmost". Only the changeset hash and tag name are in
.hgtags.