mercurial - Why I can switch to a branch after closing it? -


I have come to know today that I can switch back to a branch even after closing it. Why?

hg init ABC CD ABC Echo 'Readme 1' & gt; README1.txt Hg CI-AM "1 Commit" Hg Branch Other Branches 'Readme 2' & gt; README2.txt Hg CI-AM "2 Commit" HG Update Default Hg Other Branch Branches HG CI-M "Merges Other Merged Merge in Default" Update Hg Other Hg CI-M "Closing Other Branch" --Col-branch HG update default

Now I think I'm not going to do this

  hg Other branch Update  

but it works fine

It confuses me and I It feels somewhat uncomfortable.

UPDATE: Forgotten Sorry I'm Using HG v.1.6

< P> As Amber said, when you close a branch, it only records that it is closed when you do " hg branches ", you will get " default "will appear, and" other-branch "will not be.

However, as soon as you switch to this branch and do something new, it automatically opens it again (and thus " hg branches " You can do this again when you can turn it off again.

I think this feature is really desirable: Imagine you have created a branch to stabilize some code for delivery, allowing only bug fixes in this branch. Now after delivery, you can turn off the static branch and at the default again, you can develop new features, switch to next iteration and prepare the next delivery (for assuming you scrum for example Are using). Now after three days, your delivery customer gets a problem and a definite delivery, do not want to wait for the next one, you can easily go to the stable branch, reproduce the problem Can fix it (open the branch again), refinance and finally close the branch again It looks like a pleasant scenario and good mercurial behavior for me.

Just my 0.02 €: -)

Cheers, Christophe.

= The uneducated 21st century will not be those who can not read or write; They will be like those who can not learn, unwind and release. - Alvin Tuffer =


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -