Give a name to the anonymous branch

I had an anonymous branch (a branch without naming, in a red rectangle) - the result of cloning. alt text

I understand that I can provide a name for an anonymous branch via bookmarking

However, bookmarking not permanent. I was wondering if I can make an anonymous branch a truly named branch? It's too late? Or should I do this at the very beginning of the change 1)Change calendar to dateTime. ?

Thanks.

+4
source share
3 answers

You should have done this when you applied the first set of changes, the one you specify.

The branch name is constantly saved as part of the change set, so in this case, the change set is definitely on the branch, they just are on the default branch.

The only way to retroactively embed a new branch name in a change set is to reinstall the change sets one at a time into the repository that does not have them, then you will have a new chance to get the branch name.

Are you sure you want to name the branch? You cannot get rid of it (without performing the same exercise as it is there) if it is, therefore, if it is temporary, the name does not correspond to reality.

+4
source

You cannot change the branch name in this change set, but you can name the branch by simply adding a new commit with the desired branch name. From now on, “hg clone -r branchname” and “hg diff -r branchname” and the like will refer to the last tip of this thread.

You were in another place that we advised both Lasse and me that the named branches are a great idea for functions that are better suited for long-lasting things, such as development branches (for example: stable, experimental, etc.), but so long since you understand the persistence of named branches regarding bookmarks and anonymous branches, you can make any decision that you like for your decision to branch functions (personally, I prefer anonymous branches to named clones).

+2
source

You can use the Expand extension .

  • Update working copy to tag update version
  • Create a new branch, for example, a "new branch" (branch branch of the hg branch)
  • Commit it (hg commit --message = Split branch for my changes)
  • Replace the set of changes, starting with "Change calendar to DateTime" on top of the new commit.
+1
source

Source: https://habr.com/ru/post/1332321/


All Articles