[Buildbot-commits] [Buildbot] #438: Mercurial does not update to the right revision when building a tag from a named branch
Buildbot
nobody at buildbot.net
Mon Oct 10 10:23:13 UTC 2011
#438: Mercurial does not update to the right revision when building a tag from a
named branch
----------------------+------------------------
Reporter: cdevienne | Owner:
Type: defect | Status: reopened
Priority: major | Milestone: undecided
Version: 0.8.5 | Resolution:
Keywords: |
----------------------+------------------------
Comment (by marcusl):
Dustin: It would seem so, for the causal observer. :)
However, due to the (slightly bone-headed, IMO) way tags are handled in
Mercurial, the info about the tag itself is not preserved when cloning
with '--rev', so the tag-info will not exist in the clone, even though the
top revision is the one that was tagged.
Tags are handled by a .hgtags, which is version controlled too, and since
the tags are created in that file in a revision made **after** the
revision being tagged (
Basically:
* Revision A is created
* Revision B adds tag X to revision A
* If "clone --rev = X" is executed, the clone contains rev A, but not B,
so it does not know about tag X, so "update X" fails, as do my scripts for
detecting the current version from vc tags)
There are a few ways to tackle this:
* Always clone everything (easy, but potentially wasteful if a very old
tag is being checked out)
* Detect the revision B where tag was made, clone that one (tricky to
implement, but certainly possible. I've seen code for this on
stackoverflow.com )
* Add tag locally using "hg tag X --local" (potentially dangerous due to
conflicts with later updates, unless tag is removed after build or clone
is not re-used"
This has been discussed in several places, and the root issue has not been
fixed yet. There is some resistance to fixing this in the Mercurial dev
team, obviously for a few good reasons, and maybe because no fully
superior solution is available, yet.
--
Ticket URL: <http://trac.buildbot.net/ticket/438#comment:6>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the Commits
mailing list