ä»æ´ã ãã©bzr-coloã®è©±ãããã(åºæ¬ç·¨)
GitãMercurialã®å ´åã¯ããã©ã³ãæ§æã¯.gitã.hgãã©ã«ãã®ä¸ã«é è½ããã¦ãã¾ãããBazaarã®å ´åã¯åã ã®ãã©ã³ãã¯ç©ççã«å¥ãã£ã¬ã¯ããªã«ãªã£ã¦ãã¾ãã
ãããBazaarã®ç¹è²ã§ãããã¡ãªãããå¤ãã®ã§ããããã£ã±ãGitãMercurialã¿ããã«ã²ã¨ã¤ã®ãã£ã¬ã¯ããªã§å®çµããå½¢ã§ä½æ¥ãããããã¨ãã人ã®ããã«ããbzr-coloãã©ã°ã¤ã³ãã¨ããã®ãããã¾ãã
ãã®bzr-coloã®æ©è½ãè¿ãBazaaræ¬ä½ã«åãè¾¼ã¾ãããã¨ã«ãªã£ã¦ã¾ãã¦ãããã«ä¼´ã£ã¦ã³ãã³ãä½ç³»ãä»æ§ãå¤ããå¯è½æ§ãé«ãã®ã§ãä»æ´æã¯ãããã§ããã使ãæ¹ã説æãã¾ãã
ãã£ã¡ãååã«ä¾¿å©ã§ãããæ¬ä½ã«åãè¾¼ã¾ããå¾ããã°ãããã£ã¡ã¯æ§åè¦ãã§ã¤ãºã«ãªãã¨æãã¾ããã
ã¯ã¼ã¯ã¹ãã¼ã¹ãä½ã
ãµã¼ãä¸ã®ãã©ã³ããã³ãã¼ãã¦ããã¼ã«ã«ã«ã¯ã¼ã¯ã¹ãã¼ã¹ãä½ãã¾ãã
$ bzr colo-fetch url/to/remote/branch MY-COLOCATED-WORKSPACEä½ãæå®ããªããã°ãããã©ã«ã㧠"origin/trunk" ã¨ãããã©ã³ããä½æããã¦ãã¾ãã
$ cd MY-COLOCATED-WORKSPACE
ã¯ã¼ã¯ã¹ãã¼ã¹å ã«ã©ããªãã©ã³ããããã®ãã¯ãcolo-branchesã³ãã³ãã§è¦ããã¨ãã§ãã¾ãã
$ bzr colo-branches
* origin/trunk
ãã©ã³ããä½ã£ã¦ä½æ¥ãã
fooæ©è½ãå®è£
ãããã¨ã«ãªãã¾ãããfooæ©è½å®è£
ç¨ã®ãã©ã³ããä½ãã¾ãã
colo-branchã³ãã³ãã使ãã¾ãã
$ bzr colo-branch feature-fooããã§ãã©ã³ããä½æããã¾ããããã©ã³ãä¸è¦§ãè¦ãã¨ããããªã£ã¦ãã¾ãã"*"ã¯ã«ã¬ã³ãã®ãã©ã³ãã®å°ã§ããã
ãã®ç¶æ ã§ã³ã¼ããä¿®æ£ãã¦ã³ãããããã°ãfeature-fooãã©ã³ãã«ã³ãããããã¾ãã
$ bzr colo-branches
* feature-foo
origin/trunk
å¥ã®ãã©ã³ãã«åãæ¿ãã
fooæ©è½ãéçºãã¦ãããã¡ã«ãé¢ä¿ãªãé¨åã§ç·æ¥ã®ä¸å
·åãè¦ã¤ãã¦ãã¾ãã¾ãããããã«ä¿®æ£ã§ããå
容ã§ãããfeature-fooãã©ã³ãä¸ã§ä¿®æ£ãããã®ã¯è¡åãæªãã§ãããfooæ©è½ãå®æããã¾ã§ä¸å
·åä¿®æ£ããªãªã¼ã¹ã§ããªããªã£ã¦ãã¾ãã¾ãã
ãã®ãããå¥ã®ãã©ã³ããä½ã£ã¦ããã£ã¡ã§ä½æ¥ãã¾ãã
# ç¾å¨ã®ä½æ¥å 容ãéé¿
$ bzr shelve --all -m "feature-fooã§ã®ä½æ¥ãä¸æä¿å"
# fix-bugãã©ã³ããä½ã£ã¦ãã£ã¡ã«åãæ¿ã
$ bzr colo-branch fix-bug --from-branch=origin/trunk
$ bzr colo-branches
feature-foo
* fix-bug
origin/trunk
ã»ã»ã»HACK, HACK, HACKã»ã»ã»
$ bzr commit -m "ââã®ä»¶ãä¿®æ£ãã"
ä¸å
·åä¿®æ£ãçµãã£ãããtrunkã«ãã¼ã¸ãã¦ã¢ãããã¾ãã
switchãmergeãpushãpullãªã©ã®ã³ãã³ãã¯ãå¼æ°ã¨ãã¦å¦ç対象ãã©ã³ãã®ãã¹ãåãåãã¾ãããããã§ä»¥ä¸ã®ããã«ãcolo:ãã©ã³ãåãã¨æ¸ããã¨ã§ãcoloã¯ã¼ã¯ã¹ãã¼ã¹å
ã®ãã©ã³ããæå®ãããã¨ãã§ãã¾ãã
# origin/trunkã«åãæ¿ãã¦ããµã¼ãããææ°ã®ã³ã¼ããåå¾
$ bzr switch colo:origin/trunk
$ bzr pull url/to/remote/branch
# fix-bugãããã¼ã¸ãã¦ã³ããã
$ bzr merge colo:fix-bug
$ bzr commit -m "ââã®ä»¶ã®ä¿®æ£ããã¼ã¸"
# ãµã¼ãã«ã¢ãã
$ bzr push url/to/remote/branch
# ãã¼ã¸ãããã ãfix-bugãã©ã³ãã¯ãããããªãã®ã§ãåé¤
$ bzr colo-prune fix-bug
ä¸å ·åä¿®æ£ãçä»ããã®ã§ãfooæ©è½ã®å®è£ ã«ãã©ãã¾ãã
$ bzr switch colo:feature-foo
# éé¿ããä½æ¥å 容ã復å
$ bzr unshelve
ã»ã»ã»HACK, HACK, HACKã»ã»ã»
ã¨ãbzr-coloã使ã£ãåºæ¬ã®ã¯ã¼ã¯ããã¼ã¯ãããªæãã§ãã
ææ¥ã¯ãbzr-coloå¿ç¨ç·¨ã®äºå®ã