我在Bazaar中使用(重量級)結賬,所以我不確定這對你而言是否完全相同,但是你應該可以使用switch
命令執行此操作。例如:
mkdir source-repo
bzr init-repo --no-trees source-repo
bzr init source-repo/trunk
bzr co source-repo/trunk workdir
cd workdir
# Hack hack hack
bzr add
bzr ci -m "Done some stuff"
# Now create a branch and change the working directory files to match it
bzr switch -b my-new-branch
# We're now working on a checkout of ../source-repo/my-new-branch
# Hack hack hack
bzr add
bzr ci -m "Working on the branch"
# Now go back to the trunk (no -b as we're not creating the branch)
bzr switch trunk
# Working directory files now match the trunk branch
# Hack hack hack
bzr add
bzr ci -m "Changes to trunk"
# Merge in the changes from my-new-branch
bzr merge ../source-repo/my-new-branch
bzr ci -m "Merged my-new-branch"
當然,您也可以使用分支的絕對路徑,但相對的路徑可以節省大量的輸入。不幸的是,合併命令需要一個完整的路徑。
這是你要找的東西嗎?
這個:http://stackoverflow.com/questions/1645672/local-branches-with-bazaar/1910439#1910439可以幫助這裏。 – VonC 2010-07-19 19:33:11
我曾經看過那個 - 只是試了一下。除非我錯過了一些東西,它不會改變目錄中的內容 - 只允許你克隆我已經可以做的分支,所以吶喊不停。 – 2010-07-19 21:26:49