今天我發現我可以切換回分支,即使我關閉它。爲什麼?爲什麼我可以在關閉它之後切換到分支?
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
現在我認爲我不應該這樣做
hg update other-branch
但它工作正常
它混淆了我,讓我感到有些不安。
UPDATE:對不起,忘了說明,我使用HG v.1.6