![]() hgtags in different heads, it does not use that knowledge when attempting to merge. While Mercurial knows how to handle different. Why? How should I merge them?ĭifferent sets of tags, coming from different branches and heads, can lead to a merge conflict. My tags had a conflict when I was merging. hgtags and the tags stored there are handled the same.Ĥ. The format of this file is identical to the one of. hg/localtags, which will not be distributed or versioned. You can use "hg tag" command with an option -l or -local. Updating a working dir to a particular tag will take that directory back to a point before the tag itself existed.Ĭloning a repo to a particular tag will give you a new repo that does not have that tag.Ĭommon wisdom says that to avoid the confusion of a disappearing tag, you should clone the entire repo and then update the working directory to the tag. The changeset that a tag refers to is always older than the changeset that commits the tag itself.The fact that tags identify changesets and are also parts of changesets has some potentially confusing implications: Thus, as above, the only changesets that can be tagged are ones already committed. Thus tagging a revision must be done as a second step. Note that because tags refer to changeset IDs and the changeset ID is effectively the sum of all the contents of the repository for that change, it is impossible in Mercurial to simultaneously commit and add a tag for the changeset being committed. The hg tag command will do this for you and hg tags will show the currently effective tags. To add a tag to the system, simply add a line to this file and then commit it for it to take effect. ![]() hgtags and consists of a list of changeset IDs and their corresponding tags. Thus Mercurial stores tags as a file in the working dir. allow adding a tag to an already committed changeset.The design attempts to meet the following requirements:īe version controlled and mergeable just like any other file Tags work slightly differently in Mercurial than most revision systems. What if multiple lines with different revisions use the same tag name in.My tags had a conflict when I was merging.What if I want to just keep local tags?.Bookmarks are more convenient for branching than named branches. Update 2: Since Mercurial 1.8 bookmarks have become a core feature of Mercurial. The only thing that could possibly annoy you is that technically the revision graph will still have one more revision without childen. Update: Since Mercurial 1.5 you can close the branch at any time so it will not appear in both hg branches and hg heads anymore. One may combine the last actual commit to the feature branch with this extra commit using -close-branch, but one should know in advance which commit will be the last one. The second one leaves no open heads/branches, but it requires one more auxiliary commit. The first one is simpler, but it leaves an open branch. $ hg ci -m 'Closed branch feature-x' -close-branch One way is to just leave merged feature branches open (and inactive): $ hg up defaultĪnother way is to close a feature branch before merging using an extra commit: $ hg up feature-x
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |