Why can I switch to a branch after it closes?

Today I found that I can return to the branch even after I closed it. What for?

hg init abc
cd abc
echo 'readme1' > README1.txt
hg ci -Am "1st commit"
hg branch other-branch
echo 'readme2' > README2.txt
hg ci -Am "2nd commit" 
hg update default
hg merge other-branch
hg ci -m "Merged other-branch into default"
hg update other-branch
hg ci -m "Closing other branch" --close-branch
hg update default

now i think i shouldn't do that

hg update other-branch

but it works fine

It bothers me and makes me feel a little awkward.

UPDATE: sorry, forgot to indicate that I am using HG v.1.6

+3
source share
2 answers

As Amber said, when you close a branch, it just records that it is closed. As a result, when you do " hg branches", you will see " default", not " other-branch".

, - , (, , "hg branches" ). , .

, . , "stable" , , . , ( , scrum, ). , , , , , ( ), , , . Mercurial .

0,02 €: -)

Cheers,
.

= 21- , ; , , . - =

+2

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


All Articles