.. This file is in Python ReStructuredText format - it can be formatted .. into HTML or text. In the future we plan to extract the example commands .. and automatically test them. .. This text was previously on the wiki at .. http://bazaar.canonical.com/IntroductionToBzr .. but has been moved into the source tree so it can be kept in sync with .. the source and possibly automatically checked. ====================== Bazaar ãã¥ã¼ããªã¢ã« ====================== .. Introduction ã¯ããã« ============ ãããããåæ£åãã¼ã¸ã§ã³ç®¡çã«æ £ã親ããã§ãããªãã "Bazaarã«èªå·±ç´¹ä»ãã" ã®ç¯ã¾ã§ã¨ã°ãã¦ãã ããã ãããåæ£åã§ãªããã¼ã¸ã§ã³ç®¡çã«æ £ã親ããã§ããããã©åæ£åãã¼ã¸ã§ã³ç®¡çã¯\ ããããããªãã®ã§ããã°ã"åæ£ãã¼ã¸ã§ã³ç®¡çã¨åæ£ã§ãªããã¼ã¸ã§ã³ç®¡çã®éã"ã¾ã§\ ã¨ã°ãã¦ãã ããã ãã以å¤ã®å ´åãã³ã¼ãã¼ãç´ è¶(訳注:æ¥æ¬è¶ã§ãããã§ãã)ãç¨æãã¦ã\ ãªã©ãã¯ã¹ãã¦èªã¿å§ãã¦ãã ããã ãã¼ã¸ã§ã³ç®¡çã®ç®ç ==================== ãªã«ãã®ããã¹ããã¼ã¿(ããã°ã©ã ã®ã½ã¼ã¹ã³ã¼ããWebãµã¤ããUnixã·ã¹ãã ã§ã®\ è¨å®ãã¡ã¤ã«ãªã©)ãæ±ãä½æ¥ããã¦ããã¨ãã¾ãããã ãªã«ããã¹ããã¦ãé大ãªãã°ã¬ã¼ããå¼ãèµ·ããã¦ãã¾ãããããã¾ããã ä¾ãã°ã¡ã¼ã«ãµã¼ãã¼ã®è¨å®ãã¡ã¤ã«ãæ¶ãã¦ãã¾ã£ãããã ãããªããã¸ã§ã¯ãã®\ ã½ã¼ã¹ã³ã¼ããå£ãã¦ãã¾ã£ãããããã¨ãããã¾ãã ã ãããªæ å ±ã失ã£ã¦ãä½ãä½ã§ãåãæ»ãããã¨æã£ãçµé¨ãããã®ã§ããã°ã\ ãã£ã¨ããªãã¯Bazaarã使ãæºåãã§ãã¦ãã¾ãã Bazaarãã¯ããã¨ãããã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã¯ããã£ã¬ã¯ããªã«èµ·ãã£ãå¤æ´ã\ **ãã©ã³ã (branch)** ã¨ãããã£ã¬ã¯ããªãããè¤éãªãã®ã®ä¸ã«å ¥ãã¦\ 追跡ãã¾ãã ãã©ã³ãã¯ãã£ã¬ã¯ããªã®ä¸ã«ä½ãå ¥ã£ã¦ãããã ãã§ãªããéå»ã®ãããããª\ æç¹ã§ã®ãã£ã¬ã¯ããªã®ä¸èº«ãæ ¼ç´ãã¦ãã¾ãã ãªã®ã§ãæã¾ã¬å¤æ´ããã¦ãã¾ã£ãã¨ãã«ã¯éå»ã®æç¹ã®ç¶æ ã«æ»ããã¨ãã§ãã¾ãã ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã¯ãã¦ã¼ã¶ã¼ã "**ãªãã¸ã§ã³ (revision)** ãã³ããã" ãããã¨ã§å¤æ´ããã©ã³ãã«ä¿åãã¾ãã ãã®ã¨ãã«çæããããªãã¸ã§ã³ã¨ã¯ãæ¬è³ªçã«ãã£ã¦ãååä¿åããã¨ãããã®\ å¤æ´ç¹ã«ãªãã¾ãã ãªãã¸ã§ã³ã¯ãã以å¤ã®ãã®ãæã£ã¦ãã¾ã(åæ:These revisions have other uses as well.) ãã¨ãã°ããªãã·ã§ã³ã®ãã°ã¡ãã»ã¼ã¸ãã¤ãããã¨ã§ãå¤æ´ãä½ãæå³ãã¦\ ããã®ãã¨ããã³ã¡ã³ããæ®ããã¨ãã§ãã¾ãã å®éã«å©ç¨ããããã°ã¡ãã»ã¼ã¸ã¯ã "Webãã³ãã¬ã¼ãããã¼ãã«ãéããããã«\ ä¿®æ£" ã¨ã "sftpã«å¯¾å¿ããã #595 ãä¿®æ£ã" ã¨ãã£ããã®ã§ãã ãããã£ããã°ãä¿åããã¦ãããããã§ããã¨ãã°å¾ã«ãªã£ã¦ sftp ã«åé¡ãçºç\ ããã¨ãã«ãåé¡ãçºçããããã«ãªã£ãã®ãã©ã®æç¹ãªã®ãç®æãã¤ãããã¨ã\ ã§ãã¾ãã åæ£ãã¼ã¸ã§ã³ç®¡çã¨åæ£ã§ãªããã¼ã¸ã§ã³ç®¡çã®éã =================================================== å¤ãã®ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã¯ãµã¼ãã¼ã«é ç½®ããã¦ãã¾ãã ãã¼ã¸ã§ã³ç®¡çããã¦ããã³ã¼ãã«å¯¾ãã¦ä½æ¥ããããå ´åããµã¼ãã¼ã«æ¥ç¶ãã¦\ ã³ã¼ãã "ãã§ãã¯ã¢ã¦ã (checkout)" ããå¿ è¦ãããã¾ãã ããããã¨ãå¤æ´ãã³ããããã§ãããã£ã¬ã¯ããªãã§ãã¾ãã ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã®ã¯ã©ã¤ã¢ã³ãã¯ããã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã®ãµã¼ãã¼ã«\ ã³ããããããå¤æ´ãä¿åãã¾ãããã®æ¹å¼ã¯éä¸åã¨ãã¦ç¥ããã¦ãã¾ãã éä¸åã«ã¯ããã¤ãã®æ¬ ç¹ãããã¾ãã éä¸åãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã¯ãåä½ããããã«ãµã¼ãã¼ã¨ã®æ¥ç¶ãè¦æ±ãã¾ãã ãã®ãã¨ã¯ããµã¼ãã¼ãã©ããã¤ã³ã¿ã¼ãããä¸ã«ãã£ã¦ãããªãã®ãã·ã³ã\ ã¤ã³ã¿ã¼ãããã«æ¥ç¶ã§ããªãã¨ãã«åé¡ã«ãªãã¾ãã ãããã¯ãããªãã®ãã·ã³ãã¤ã³ã¿ã¼ãããã«æ¥ç¶ã§ãã¦ããµã¼ãã¼ãè½ã¡ã¦ãã\ ã¨ãã«ããã¯ãåé¡ã«ãªãã¾ãã åæ£ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã¯ããã©ã³ããã¯ã©ã¤ã¢ã³ãã¨åããã·ã³ã«ç½®ããã¨ã§\ ãã®åé¡ã解決ãã¦ãã¾ãã Bazaarã®å ´åããã©ã³ãã¯ãã¼ã¸ã§ã³ç®¡çããã¦ããã³ã¼ãã¨åããã£ã¬ã¯ããªã«\ ä¿åããã¾ãã ããã«ãããã¦ã¼ã¶ã¼ã¯(ãã¨ããªãã©ã¤ã³ã§ãã£ãã¨ãã¦ã)好ããªã¨ãã«å¤æ´ãä¿å\ (**ã³ããã (commit)**)ãããã¨ãã§ãã¾ãã ã¤ã³ã¿ã¼ãããæ¥ç¶ãå¿ è¦ã«ãªãã®ã¯ãã©ããå¥ã®å ´æã«ãããã©ã³ãã®å¤æ´ã«ã¢ã¯ã»ã¹\ ããã¨ãã ãã§ãã .. TODO: .. Performing this tracking by hand is a awkward process that over time .. becomes unwieldy. ã®é¨åã®è¨³ãå¤ããªãã å¤ãã®äººãå¿ è¦ã¨ãã¦ãããã¨ã¯ããã£ã¬ã¯ããªå ã§ããã£ããã¡ã¤ã«ããµããã£ã¬ã¯ããª\ ã®å¤æ´ã追跡ãããã¨ã§ãã ãã®è¿½è·¡ãæã§ãããªãã®ã¯é¢åã§ä¸æ°å¥½ãªä½æ¥ã§ãã ããã¯ãBazaarã®ãããªãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã®ç®çã®ã²ã¨ã¤ã§ãã ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã¯ã¦ã¼ã¶ã¼ãæ示ããã¨ãã«ãã£ã¬ã¯ããªããªã¼ã® **ãªãã¸ã§ã³ (revision)** ãä½ããã¨ã§ãã®ä½æ¥ãèªååãã¾ãã ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã¯åã«ä¿åãããundoãããããã ãã§ã¯ããã¾ããã ãã¨ãã°Bazaarã§ã¯ãã½ããã¦ã§ã¢ã®ãããã©ã³ãããå¤æ´ãåãåºãã¦ã\ é¢é£ããå¥ã®ãã©ã³ãã«é©ç¨ãããã¨ãã§ãã¾ãããã®ã¨ããå¤æ´ãåãåºã\ ãã©ã³ãã¯å¥ã®äººã®ãã®ã§ãã£ã¦ããã¾ãã¾ãããããã«ãããéçºè ã®ã°ã«ã¼ãã¯\ ãäºãã«æ¸ãè¾¼ã¿æ¨©ãä¸ãããã¨ãªãå ±åä½æ¥ãããã¨ãã§ãã¾ãã .. Bazaar remembers the ''ancestry'' of a revision: the previous revisions .. that it is based upon. A single revision may have more than one direct .. descendant, each with different changes, representing a divergence in the .. evolution of the tree. By branching, Bazaar allows multiple people to .. cooperate on the evolution of a project, without all needing to work in .. strict lock-step. Branching can be useful even for a single developer. Bazaarã§ã¯ãªãã¸ã§ã³ã® ''親 (ancestry)'' ãã¤ã¾ããã®ãªãã¸ã§ã³ã®å ã«ãªã£ã\ ãªãã¸ã§ã³ãè¨é²ãã¦ãã¾ãã ã²ã¨ã¤ã®ãªãã¸ã§ã³ã¯è¤æ°ã®ãããããå¥ã®å¤æ´ãå«ãåä¾ãªãã¸ã§ã³ãæã¤ãã¨ã\ ãããããã¯ããªã¼ã®é²åãåå²ãã¦ãããã¨ãæå³ãã¦ãã¾ãã Bazaarã§ã¯ãã©ã³ããä½ããã¨ã«ãã£ã¦ãè¤æ°ã®äººãå³ãã lock-step ãã¨ããªãã¦ã\ ååãããã¨ãã§ãã¾ãã ãã©ã³ããä½ããã¨ã¯å人ã§ã®éçºã§ã便å©ã§ãã .. Introducing yourself to Bazaar Bazaarã«èªå·±ç´¹ä»ãã ===================== .. Bazaar installs a single new command, **bzr**. Everything else is a subcommand of this. You can get some help with ``bzr help``. Some arguments are grouped in topics: ``bzr help topics`` to see which topics are available. Bazaar㯠**bzr** ã¨ããæ°ããã³ãã³ããã²ã¨ã¤ã¤ã³ã¹ãã¼ã«ãã¾ãã ä»ã®å ¨ã¦ã¯ bzr ã®ãµãã³ãã³ãã«ãªãã¾ãã ``bzr help`` ã³ãã³ãã§ããã¤ãã®ãã«ããè¦ããã¾ãã å¹¾ã¤ãã®è©±é¡ã¯ topic ã«ã¾ã¨ãããã¦ãã¦ã ``bzr help topics`` ã§\ å©ç¨å¯è½ãªãããã¯ã®ä¸è¦§ãè¦ããã¾ãã ãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã®ä¸ã¤ã®æ©è½ã¯ã誰ãä½ãå¤æ´ããã®ãã追跡ãããã¨ã§ãã åæ£åãã¼ã¸ã§ã³ç®¡çã·ã¹ãã ã§ã¯ãåéçºè ãã°ãã¼ãã«ã¦ãã¼ã¯ãªIDãæã¤\ å¿ è¦ãããã¾ãã ã»ã¨ãã©ã®äººã¯ãã®IDã¨ãã¦å©ç¨ã§ãã eã¡ã¼ã«ã¢ãã¬ã¹ ãæã£ã¦ãã¾ãã Bazaarã¯ã³ã³ãã¥ã¼ã¿ã®ã¦ã¼ã¶ã¼åã¨ãã¹ãåããèªåã§ã¡ã¼ã«ã¢ãã¬ã¹ã\ çæãã¾ããBazaarãèªåã§ä½æããã¡ã¼ã«ã¢ãã¬ã¹ä»¥å¤ã®ãã®ã使ããã\ å ´åãï¼ã¤ã®é¸æè¢ãããã¾ãã 1. ``bzr whoami`` ã使ã£ã¦ã¡ã¼ã«ã¢ãã¬ã¹ãè¨å®ãã¾ããããã¯ã°ãã¼ãã«ãªIDãè¨å®\ ããæãç°¡åãªæ¹æ³ã§ããã°ãã¼ãã«ãªIDãè¨å®ããã«ã¯:: % bzr whoami "Your Name <email@example.com>" ç¹å®ã®ãã©ã³ãã§ã¹ã¤ã®ã¢ãã¬ã¹ã使ãããå ´åããã®ãã©ã³ãã®ãã£ã¬ã¯ããªã®\ ãªãã§æ¬¡ã®ã³ãã³ããå®è¡ãã¾ã:: % bzr whoami --branch "Your Name <email@example.com>" #. ``?/.bazaar/bazaar.conf`` [1]_ ã®ä¸ã®ã¡ã¼ã«ã¢ãã¬ã¹ãã以ä¸ã®ããã«ãã¦\ è¨å®ãã¾ãã ``[DEFAULT]`` ã®é¨åã大æåã¨å°æåãåºå¥ããã®ã§æ³¨æãã¦\ ãã ãã:: [DEFAULT] email=Your Name <email@isp.com> ç¹å®ã®ãã©ã³ãã«ãããè¨å®ã¯ã ``?/.bazaar/locations.conf`` ã«ãã©ã³ãã®ã»ã¯ã·ã§ã³ãä½æãã¦æ¬¡ã®ããã«æ¸ããã¨ãã§ãã¾ãã :: [/the/path/to/the/branch] email=Your Name <email@isp.com> #. ç°å¢å¤æ° ``$BZR_EMAIL`` ããã㯠``$EMAIL`` (``$BZR_EMAIL`` ã®æ¹ãåªå \ ããã¾ã)ã«ã¡ã¼ã«ã¢ãã¬ã¹ãè¨å®ãããã¨ã§ãä¸ã®äºã¤ã®æ¹æ³ã§è¨å®ããã\ ãªãã·ã§ã³ãä¸æ¸ããããã¨ãã§ãã¾ãã .. [1] Windowsã§ã¯ã¦ã¼ã¶ã¼è¨å®ãã¡ã¤ã«ã¯ã¢ããªã±ã¼ã·ã§ã³ãã¼ã¿ãã£ã¬ã¯ããªã«\ ãããã¾ãããªã®ã§ãè¨å®ãã¡ã¤ã«ã®å ´æ㯠``?/.bazaar/branch.conf`` ã§ã¯ãªã\ ``C:\Documents and Settings\<username>\Application Data\Bazaar\2.0\branch.conf`` ã«ãªãã¾ãã åããã¨ã ``locations.conf``, ``ignore``, ``plugins`` ãã£ã¬ã¯ããªã\ åãã§ãã ãã©ã³ããä½ã ============== å±¥æ´ã¯ããã©ã«ãã§ã¯ãã©ã³ãã® .bzr ãã£ã¬ã¯ããªã®ä¸ã«ä¿åããã¾ãã .. ããã¯ç¾è¡ã®ãã¼ã¸ã§ã³ã§ã§ããã®ã§ã¯ï¼: In a future version of Bazaar, there will be a facility to store it in a separate repository, which may be remote. æ¢åã®ãã£ã¬ã¯ããªã®ä¸ã§ ``bzr init`` ãããã¨æ°ãããã©ã³ããä½æã§ãã¾ã:: % mkdir tutorial % cd tutorial % ls -a ./ ../ % pwd /home/mbp/work/bzr.test/tutorial % % bzr init % ls -aF ./ ../ .bzr/ % ãã¡ã¤ã«ã«ã¯ï¼ã¤ã®ã¯ã©ã¹ã unknown, ignored, versioned ãããã¾ãã **add** ã³ãã³ãã¯ãã¡ã¤ã«ã versioned ã«ãããã®ãã¡ã¤ã«ã¸ã®å¤æ´ã®è¨é²ã\ éå§ãã¾ã:: % echo 'hello world' > hello.txt % bzr status unknown: hello.txt % bzr add hello.txt added hello.txt % bzr status added: hello.txt ããééãããã¡ã¤ã«ã add ãã¦ãã¾ã£ãå ´åããã®ãã¡ã¤ã«ã unversioned ç¶æ ã«æ»ãããã« ``bzr remove`` ãã¦ãã ããã ãã®å ´åã® ``bzr remove`` ã¯ãã»ãã®å ´å [2]_ ã¨ã¡ãã£ã¦ãã¡ã¤ã«ãåé¤\ ãã¾ããã .. [2] ``bzr remove`` ã¯ãã¡ã¤ã«ããã¼ã¸ã§ã³ç®¡çããã¦ãã¦ä½ãå¤æ´ããã¦\ ããªãå ´åã«ããã®ãã¡ã¤ã«ãåé¤ãã¾ãã ``--keep`` ãªãã·ã§ã³ã§å¸¸ã«\ ãã¡ã¤ã«ãæ®ããã¨ãã§ãã¾ãã ``--force`` ãªãã·ã§ã³ã§å¸¸ã«ãã¡ã¤ã«ã\ åé¤ãããã¨ãã§ãã¾ãã .. Branch locations ãã©ã³ãã®å ´æ =============== ãã¹ã¦ã®å±¥æ´ã¯ãã©ã³ãã«æ ¼ç´ããã¾ãããã©ã³ãã¨ã¯ã管çç¨ã®ãã¡ã¤ã«ã\ å«ãã ãã ã®ãã£ã¬ã¯ããªã§ããããã©ã«ãã§ã¯ãsvnãsvkã®ãããªãåé¢ãã\ ãªãã¸ããªããã¼ã¿ãã¼ã¹ã¯ããã¾ãããåé¢ãããªãã¸ããªãä½æãããã¨ã\ ã§ãã¾ã(``bzr init-repo`` ã³ãã³ããåç §ãã¦ãã ãã)ã大è¦æ¨¡ãªãã©ã³ãã\ å©ç¨ããå ´åããä¸è¦æ¨¡ã®ãã©ã³ããããããå©ç¨ããå ´åã«ã¯ãªãã¸ããªã\ åé¢ããã¨ããã§ãããã èªåã®ã³ã³ãã¥ã¼ã¿ã®ãã¡ã¤ã«ã·ã¹ãã ä¸ã«ãããã©ã³ããåç §ããã¨ãã¯\ ãã©ã³ããæ ¼ç´ãã¦ãããã£ã¬ã¯ããªåã§æå®ã§ãã¾ãã bzr 㯠http ã ftp\ çµç±ã§ãã©ã³ãã«ã¢ã¯ã»ã¹ãããã¨ãã§ãã¾ããä¾:: % bzr log http://bazaar-vcs.org/bzr/bzr.dev/ % bzr log sftp://bazaar-vcs.org/bzr/bzr.dev/ ãã©ã°ã¤ã³ãã¤ã³ã¹ãã¼ã«ããã°ã rsync ãããã³ã«ã使ã£ã¦ãã©ã³ãã«ã¢ã¯ã»ã¹\ ãããã¨ãã§ãã¾ãã ãã©ã³ããæå®ããå ´æã«ç½®ãæ¹æ³ã«ã¤ãã¦ã¯ã `ãã©ã³ããå ¬éãã`_ ç¯ã\ ã覧ãã ããã .. Reviewing changes å¤æ´ãã¬ãã¥ã¼ãã =================== ä¸ä»äºçµãããããããå±¥æ´ã« **ã³ããã (commit)** ãã¾ãããã æ°ããæ©è½ã追å ãããããã°ãç´ããããã³ã¼ããããã¥ã¡ã³ããæ´æ°ããã\ ãã¤ã§ãã³ãããããã®ã¯è¯ããã¨ã§ãã ãã¹ã¦ã®ãªãã¸ã§ã³ãè¯ãç¶æ ã§ããããã«ããããã«ãã³ãããããåã«ã³ã¼ãã\ ã³ã³ãã¤ã«ããããã¹ãã¹ã¤ã¼ããå®è¡ããã®ãè¯ãç¿æ £ã§ãã ã³ãããããåã«ã³ããããããã¨ãã¦ãããã®ã確èªããããã«ã¬ãã¥ã¼ãããã¨ã\ ã§ãã¾ãã ãã®ç®çã§ä¾¿å©ãªäºã¤ã®ã³ãã³ããããã¾ãã **status** 㨠**diff** ã§ãã bzr status ---------- **status** ã³ãã³ãã¯ãä»ã®ä½æ¥ããªã¼ãæå¾ã®ãªãã¸ã§ã³ããã©ã®ããã«\ å¤æ´ãããã®ããæãã¦ããã¾ã:: % bzr status modified: foo ``bzr status`` ã¯å¤æ´ãç¡ãã£ããç¡è¦ããã¦ãããã¡ã¤ã«ãé ãã¾ãã status ã³ãã³ãã¯ãªãã·ã§ã³ã¨ãã¦ã確èªå¯¾è±¡ã¨ãªãè¤æ°ã®ãã¡ã¤ã«åããã£ã¬ã¯ããªåã\ 渡ããã¨ãã§ãã¾ãã bzr diff -------- **diff** ã³ãã³ãã¯é常㮠unified diff ãã©ã¼ãããã§ãã¹ã¦ã®ãã¡ã¤ã«ã®\ ããã¹ãã®å¤æ´ã表示ãã¾ãã ãã®ã³ãã³ãã®åºåã pipe çµç±ã§ã''patch'', ''diffstat'', ''fileterdiff'', ''colordiff'' ã¨ãã£ãã³ãã³ãã«æ¸¡ããã¨ãã§ãã¾ãã :: % bzr diff === added file 'hello.txt' --- hello.txt 1970-01-01 00:00:00 +0000 +++ hello.txt 2005-10-18 14:23:29 +0000 @@ -0,0 +1,1 @@ +hello world ``-r`` ãªãã·ã§ã³ãã¤ããã¨ãä½æ¥ããªã¼ãå¤ããªãã¸ã§ã³ã¨æ¯è¼ãããã\ äºã¤ã®ãªãã¸ã§ã³éã®å·®åãè¦ããã¨ãã§ãã¾ãã :: % bzr diff -r 1000.. # everything since r1000 % bzr diff -r 1000..1100 # changes from 1000 to 1100 ``--diff-options`` ãªãã·ã§ã³ãã¤ããã¨ã bzr ã¯å¤é¨ã® diff ããã°ã©ã ã«\ ãªãã·ã§ã³ãã¤ãã¦èµ·åãã¾ãã ä¾:: % bzr diff --diff-options --side-by-side foo ããã¸ã§ã¯ãã«ãã£ã¦ã¯äºã¤ã®ãã¡ã¤ã«ã«æ¥é è¾ãã¤ãã patch ã好ã¾ãã¾ãã ``--prefix`` ãªãã·ã§ã³ã§ãã®ãããªæ¥é è¾ãã¤ãããã¨ãã§ãã¾ãã ã·ã§ã¼ãã«ããã¨ãã¦ã ``bzr diff -p1`` 㯠``patch -p1`` ã³ãã³ããåãä»ãã\ å½¢ã§å·®åãåºåãã¾ãã .. Committing changes å¤æ´ãã³ããããã ================== ä½æ¥ããªã¼ã®ç¶æ ã«æºè¶³ãããããã©ã³ãã« **ã³ããã (commit)** ãã¾ãããã ã³ãããã¨ã¯ä½æ¥ããªã¼ã®ç¶æ ã®ã¹ãããã·ã§ãããä¿æãããªãã¸ã§ã³ãæ°ããä½ããã¨ã§ãã bzr commit ---------- .. The **commit** command takes a message describing the changes in the .. revision. It also records your userid, the current time and timezone, and .. the inventory and contents of the tree. The commit message is specified .. by the ``-m`` or ``--message`` option. You can enter a multi-line commit .. message; in most shells you can enter this just by leaving the quotes open .. at the end of the line. **commit** ã³ãã³ãã¯ãã®ãªãã¸ã§ã³ã®å¤æ´ã説æããã¡ãã»ã¼ã¸ãåãåãã¾ãã ã¾ããããªãã®ã¦ã¼ã¶ã¼IDãä»ã®æéã¨ã¿ã¤ã ã¾ã¼ã³ãããªã¼ã®å 容ããããã¦è¨é²ãã¾ãã ã³ãããã¡ãã»ã¼ã¸ã¯ ``-m`` ããã㯠``--message`` ãªãã·ã§ã³ã§æå®ã§ãã¾ãã è¤æ°è¡ã®ã³ã¡ã³ããå©ç¨ã§ãã¾ããå¤ãã®ã·ã§ã«ã¯ã¯ã©ã¼ããéããã¾ã¾ã§æ¹è¡ãã\ ãã¨ã§è¤æ°è¡ã®å ¥åãå¯è½ã§ãã :: % bzr commit -m "added my first file" .. You can also use the ``-F`` option to take the message from a file. Some .. people like to make notes for a commit message while they work, then .. review the diff to make sure they did what they said they did. (This file .. can also be useful when you pick up your work after a break.) ã¡ãã»ã¼ã¸ããã¡ã¤ã«ã§æ¸¡ãã«ã¯ ``-F`` ãªãã·ã§ã³ã使ãã¾ãã ã³ãããã¡ãã»ã¼ã¸ãå ã«ä½æããããã¨diffãåããã¦ã¬ãã¥ã¼ãããã¨ã§ã ã³ãããã¡ãã»ã¼ã¸ã¨ã³ãããå 容ãä¸è´ãã¦ãããã¨ã確èªãã人ããã¾ãã (ãã®ãã¡ã¤ã«ã¯ä¼æ©ããæ»ã£ã¦ãã¦ä½æ¥ãæãåºãã¨ãã«ãå½¹ã«ç«ã¤ã§ããã) .. Message from an editor ã¨ãã£ã¿ããã¡ãã»ã¼ã¸ãå ¥åãã ---------------------------------- .. If you use neither the ``-m`` nor the ``-F`` option then bzr will open an .. editor for you to enter a message. The editor to run is controlled by .. your ``$VISUAL`` or ``$EDITOR`` environment variable, which can be overridden .. by the ``editor`` setting in ``?/.bazaar/bazaar.conf``; ``$BZR_EDITOR`` will .. override either of the above mentioned editor options. If you quit the .. editor without making any changes, the commit will be cancelled. ``-m`` ãªãã·ã§ã³ã ``-F`` ãªãã·ã§ã³ãæå®ããªãã£ãå ´åã bzr ã¯ã¡ãã»ã¼ã¸ã\ å ¥åããããã«ã¨ãã£ã¿ãç«ã¡ä¸ãã¾ãã ãã®ã¨ãã£ã¿ã¯ ``$VISUAL`` ã ``$EDITOR`` ç°å¢å¤æ°ã§å¶å¾¡ãããã¨ãã§ãã¾ãã ãã®ç°å¢å¤æ°ã `` /.bazaar/bazaar.conf`` å ã® ``editor`` ãè¨å®ãã¦ä¸æ¸ã\ ãããã¨ãã§ããããã« ``$BZR_EDITOR`` ç°å¢å¤æ°ãããããã¹ã¦ãä¸æ¸ããã¾ãã ããä½ãå¤æ´ããã«ã¨ãã£ã¿ãéãããªããã³ãããã¯ãã£ã³ã»ã«ããã¾ãã .. The file that is opened in the editor contains a horizontal line. The part .. of the file below this line is included for information only, and will not .. form part of the commit message. Below the separator is shown the list of .. files that are changed in the commit. You should write your message above .. the line, and then save the file and exit. ã¨ãã£ã¿ã§éããããã¡ã¤ã«ã«ã¯æ°´å¹³ç·ãå«ã¾ãã¦ãã¾ãããã®ç·ããä¸ã®é¨åã¯\ åèç¨ã§ãããã³ãããã¡ãã»ã¼ã¸ã«ã¯å«ã¾ãã¾ããã æ°´å¹³ç·ã®ä¸ã«ã¯ã³ãããã§å¤æ´ããããã¡ã¤ã«ã®ãªã¹ãã表示ããã¾ãã ã¡ãã»ã¼ã¸ã¯æ°´å¹³ç·ã®ä¸ã«æ¸ãå¿ è¦ãããã¾ãããããããããã¡ã¤ã«ãä¿åãã¦\ ã¨ãã£ã¿ãçµäºãã¦ãã ããã .. If you would like to see the diff that will be committed as you edit the .. message you can use the ``--show-diff`` option to ``commit``. This will include .. the diff in the editor when it is opened, below the separator and the .. information about the files that will be committed. This means that you can .. read it as you write the message, but the diff itself wont be seen in the .. commit message when you have finished. If you would like parts to be .. included in the message you can copy and paste them above the separator. ``commit`` ã³ãã³ãã« ``--show-diff`` ãªãã·ã§ã³ãã¤ããã¨ãã³ãããããã\ å¤æ´ã® diff ãè¦ããã¨ãã§ãã¾ãããã® diff ã¯ã¨ãã£ã¿ãéããã¨ãã«æ°´å¹³ç·\ ãã³ãããããããã¡ã¤ã«ã®æ å ±ãããä¸ã«å«ã¾ãã¾ãã ãªã®ã§ãã³ãããã¡ãã»ã¼ã¸ãæ¸ãã¨ãã« diff ãè¦ããã¨ãã§ãã¾ããã\ ã³ãããã¡ãã»ã¼ã¸èªä½ã«ã¯ diff ãå«ã¾ãã¾ããã ã³ãããã¡ãã»ã¼ã¸ã« diff ãå«ãããå ´åã¯ãæ°´å¹³ç·ããä¸ã«ã³ãã¼ãã¼ã¹ã\ ãã¦ãã ããã .. Selective commit é¸æã³ããã ---------------- .. If you give file or directory names on the commit command line then only .. the changes to those files will be committed. For example:: commit ã³ãã³ãã«ãã¡ã¤ã«åããã£ã¬ã¯ããªåã渡ããã¨ãããããã®ãã¡ã¤ã«ã®\ å¤æ´ã ããã³ãããããã¾ãã ä¾ :: % bzr commit -m "documentation fix" commit.py .. By default bzr always commits all changes to the tree, even if run from a .. subdirectory. To commit from only the current directory down, use:: ããã©ã«ãã§ã¯ bzr ã¯ããµããã£ã¬ã¯ããªããå®è¡ãããå ´åã§ããã¹ã¦ã®å¤æ´ã\ ã³ããããã¾ãã ã«ã¬ã³ããã£ã¬ã¯ããªä»¥ä¸ã ããã³ãããããå ´åã¯ã次ã®ããã«ãã¾ã :: % bzr commit . .. Removing uncommitted changes ã³ãããããã¦ããªãå¤æ´ãåé¤ãã =================================== .. If you've made some changes and don't want to keep them, use the .. **revert** command to go back to the previous head version. It's a good .. idea to use ``bzr diff`` first to see what will be removed. By default the .. revert command reverts the whole tree; if file or directory names are .. given then only those ones will be affected. ``bzr revert`` also clears the .. list of pending merges revisions. ä¸è¦ãªå¤æ´ãããå ´åã **revert** ã³ãã³ãã§æå¾ã®ãªãã¸ã§ã³ã®ç¶æ ã«æ»ã\ ãã¨ãã§ãã¾ãã revert ããã¾ãã« ``bzr diff`` ã§ä½ãåé¤ãããã®ãã確èªãã¦ããã¨è¯ãã§ãããã ããã©ã«ãã§ã¯ revert ã³ãã³ãã¯ããªã¼å ¨ä½ã revert ãã¾ãããã¡ã¤ã«åã\ ãã£ã¬ã¯ããªåãæå®ããã¦ããå ´åã¯ããã®ãã¡ã¤ã«ã ãã revert ããã¾ãã ``bzr revert`` ã¯ãã¼ã¸å¾ ã¡ãªãã¸ã§ã³ã®ãªã¹ããåé¤ãã¾ãã .. Ignoring files ãã¡ã¤ã«ãç¡è¦ãã =================== .. The .bzrignore file .bzrignore ãã¡ã¤ã« ------------------- .. Many source trees contain some files that do not need to be versioned, .. such as editor backups, object or bytecode files, and built programs. You .. can simply not add them, but then they'll always crop up as unknown files. .. You can also tell bzr to ignore these files by adding them to a file .. called ``.bzrignore`` at the top of the tree. å¤ãã®ã½ã¼ã¹ããªã¼ã¯ãã¼ã¸ã§ã³ç®¡çããå¿ è¦ã®ãªããã¡ã¤ã«ãããããå«ãã§ãã¾ãã ãã¨ãã°ãã¨ãã£ã¿ã®ããã¯ã¢ãããã¡ã¤ã«ãããªãã¸ã§ã¯ããã¡ã¤ã«ããã¤ãã³ã¼ãã ãã«ããããããã°ã©ã ãªã©ã§ãã ãããã£ããã¡ã¤ã«ãåã« add ããªããã¨ãã§ãã¾ãããããããã¨æ¯å unknown file ã¨ãã¦ãã³ãã³åºç¾ãããã¨ã«ãªãã¾ãã ããªã¼ãããã«ãã ``.bzrignore`` ã¨ãã°ãããã¡ã¤ã«ã«ãããã®ãã¡ã¤ã«ã追å ãã\ ãã¨ã§ãbzrã«ãããã®ãã¡ã¤ã«ãç¡è¦ããããã¨ãã§ãã¾ãã .. This file contains a list of file wildcards (or "globs"), one per line. .. Typical contents are like this:: ãã®ãã¡ã¤ã«ã¯è¡ãã¨ã«ã¯ã¤ã«ãã«ã¼ã (ãããã¯"glob") ã®ãªã¹ããå«ã¿ã¾ãã å ¸åçãªå 容ã®ä¾ã§ã:: *.o *? *.tmp *.py[co] .. If a glob contains a slash, it is matched against the whole path from the .. top of the tree; otherwise it is matched against only the filename. So .. the previous example ignores files with extension ``.o`` in all .. subdirectories, but this example ignores only ``config.h`` at the top level .. and HTML files in ``doc/``:: glob ãã¹ã©ãã·ã¥ãå«ãå ´åãããªã¼ã®ãããããã®ãã¹å ¨ä½ã«ããããã¾ãã ããã§ãªãå ´åã¯ãåã«ãã¡ã¤ã«åã«ããããã¾ãã ãªã®ã§ãä¸ã®ä¾ã¯ãã¹ã¦ã®ãµããã£ã¬ã¯ããªã® ``.o`` æ¡å¼µåãæã¤ãã¡ã¤ã«ãç¡è¦\ ãã¾ããã次ã®ä¾ã§ã¯ããªã¼ã®ãããã«ãã ``config.h`` ãã¡ã¤ã«ã¨ã ``doc/`` ãã£ã¬ã¯ããªä»¥ä¸ã®HTMLãã¡ã¤ã«ã ããç¡è¦ãã¾ã:: ./config.h doc/*.html .. To get a list of which files are ignored and what pattern they matched, .. use ``bzr ignored``:: ã©ã®ãã¡ã¤ã«ãã©ã®ãã¿ã¼ã³ã«ããããã¦ç¡è¦ããã¦ããã®ããã ``bzr ignored`` ã³ãã³ãã§è¡¨ç¤ºãããã¨ãã§ãã¾ã:: % bzr ignored config.h ./config.h configure.in? *? .. It is OK to have either an ignore pattern match a versioned file, or to .. add an ignored file. Ignore patterns have no effect on versioned files; .. they only determine whether unversioned files are reported as unknown or .. ignored. ãã¼ã¸ã§ã³ç®¡çããã¦ãããã¡ã¤ã«ãç¡è¦ãã¿ã¼ã³ã«ããããããç¡è¦ãªã¹ãã«\ å ¥ã£ã¦ãã¦ã大ä¸å¤«ã§ããç¡è¦ãã¿ã¼ã³ã¯ãã¼ã¸ã§ã³ç®¡çããããã¡ã¤ã«ã«ã¯\ å½±é¿ãã¾ããããã¼ã¸ã§ã³ç®¡çããã¦ããªããã¡ã¤ã«ã 'unknown' ã¨ãã¦æ±ãã\ 'ignored' ã¨ãã¦æ±ããã決ããããã ãã«ä½¿ããã¾ãã .. The ``.bzrignore`` file should normally be versioned, so that new copies .. of the branch see the same patterns:: ``.bzrignore`` ãã¡ã¤ã«ã¯æ®éã¯ãã¼ã¸ã§ã³ç®¡çããã¾ãããªã®ã§ãã®ãã©ã³ãã®\ ã³ãã¼ã§ãåããã¿ã¼ã³ãç¡è¦ããã¾ãã :: % bzr add .bzrignore % bzr commit -m "Add ignore patterns" .. Global ignores ã°ãã¼ãã«ã®ç¡è¦è¨å® --------------------- .. There are some ignored files which are not project specific, but more user .. specific. Things like editor temporary files, or personal temporary files. .. Rather than add these ignores to every project, bzr supports a global .. ignore file in ``?/.bazaar/ignore`` [1]_. It has the same syntax as the .. per-project ignore file. ã¨ãã£ã¿ã®ä¸æãã¡ã¤ã«ãå人ã®ä¸æãã¡ã¤ã«ãªã©ã\ å¹¾ã¤ãã®ç¡è¦ãã¡ã¤ã«ã¯ããã¸ã§ã¯ãä¾åã§ã¯ãªãã¦ã¦ã¼ã¶ã¼ä¾åã§ãã ãããã£ããã¡ã¤ã«ãå ¨ããã¸ã§ã¯ãã§ç¡è¦è¨å®ãããããã«ãã°ãã¼ãã«ã®\ ç¡è¦è¨å®ãã¡ã¤ã« ``~/.bazaar/ignore`` ãå©ç¨ã§ãã¾ãã ããã¯ããã¸ã§ã¯ãã® ignore ãã¡ã¤ã«ã¨åãææ³ã§è¨è¿°ãã¾ãã .. Examining history å±¥æ´ãé²è¦§ãã =============== bzr log ------- .. The ``bzr log`` command shows a list of previous revisions. The ``bzr log .. --forward`` command does the same in chronological order to get most .. recent revisions printed at last. ``bzr log`` ã³ãã³ãã¯éå»ã®ãªãã¸ã§ã³ã®ãªã¹ãã表示ãã¾ãã ``bzr log --forward`` ã³ãã³ãã¯åãå 容ããæç³»åé ã§ææ°ã®ãã®ãæå¾ã«\ ããããã«åºåãã¾ãã .. As with ``bzr diff``, ``bzr log`` supports the ``-r`` argument:: ``bzr diff`` ã¨åãããã«ã ``bzr log`` ã ``-r`` å¼æ°ããµãã¼ããã¾ã:: % bzr log -r 1000.. # ãªãã¸ã§ã³ r1000 ã¨ãã以éãã¹ã¦ % bzr log -r ..1000 # r1000 ã¨ãã以åã®ãã¹ã¦ % bzr log -r 1000..1100 # r1000 ãã r1100 ã¾ã§ % bzr log -r 1000 # ãªãã¸ã§ã³ r1000 ã ã .. % bzr log -r 1000.. # Revision 1000 and everything after it .. % bzr log -r ..1000 # Everything up to and including r1000 .. % bzr log -r 1000..1100 # changes from 1000 to 1100 .. % bzr log -r 1000 # The changes in only revision 1000 .. Branch statistics ãã©ã³ãã®æ å ± ================= .. The ``bzr info`` command shows some summary information about the working .. tree and the branch history. ``bzr info`` ã³ãã³ãã¯ä½æ¥ããªã¼ã¨ãã©ã³ãã®å±¥æ´ã«é¢ããæ å ±ã®è¦ç´ã表示ãã¾ãã .. Versioning directories ãã£ã¬ã¯ããªããã¼ã¸ã§ã³ç®¡çãã ================================ .. bzr versions files and directories in a way that can keep track of renames .. and intelligently merge them:: bzr ã¯ãã¡ã¤ã«ã¨ãã£ã¬ã¯ããªããååã®å¤æ´ã追跡ãã¦è³¢ããã¼ã¸ã§ããããã«\ ãã¼ã¸ã§ã³ç®¡çãã¾ã:: % mkdir src % echo 'int main() {}' > src/simple.c % bzr add src added src added src/simple.c % bzr status added: src/ src/simple.c .. Deleting and removing files ãã¡ã¤ã«ãåé¤ãã =================== .. You can delete files or directories by just deleting them from the working .. directory. This is a bit different to CVS, which requires that you also .. do ``cvs remove``. ãã¡ã¤ã«ãåé¤ããã®ã¯ãåç´ã«ä½æ¥ããªã¼ãããã¡ã¤ã«ãåé¤ããã ãã§ã§ãã¾ãã ããã¯ã ``cvs remove`` ãå¿ è¦ãª CVS ã¨ã¯å°ãç°ãªãã¾ãã .. ``bzr remove`` makes the file un-versioned, but may or may not delete the .. working copy [2]_. This is useful when you add the wrong file, or decide that .. a file should actually not be versioned. ``bzr remove`` ã¯ãã¡ã¤ã«ããã¼ã¸ã§ã³ç®¡ç対象ããã¯ããã¾ãããä½æ¥ããªã¼ãã\ åé¤ãããã¨ãåé¤ããªããã¨ãã§ãã¾ãã [2]_ ããã¯ééã£ããã¡ã¤ã«ã追å ãã¦ãã¾ã£ããããããã¡ã¤ã«ããã¼ã¸ã§ã³ç®¡çããã®ã\ ãããå ´åã«ä¾¿å©ã§ãã :: % rm -r src % bzr remove -v hello.txt ? hello.txt % bzr status removed: hello.txt src/ src/simple.c unknown: hello.txt .. If you remove the wrong file by accident, you can use ``bzr revert`` to .. restore it. ããééã£ã¦ãã¡ã¤ã«ãåé¤ãã¦ãã¾ã£ãå ´åã ``bzr revert`` ã§ãªã¹ãã¢ã§ãã¾ãã .. Branching ãã©ã³ããä½ã ============== .. Often rather than starting your own project, you will want to submit a .. change to an existing project. To do this, you'll need to get a copy of .. the existing branch. Because this new copy is potentially a new branch, .. the command is called **branch**:: èªåã§ããã¸ã§ã¯ããå§ããã®ã§ã¯ãªããæ¢åã®ããã¸ã§ã¯ãã«å¤æ´ãå ãããå ´åãããã¾ãã ãã®å ´åãæ¢åã®ãã©ã³ãã®ã³ãã¼ãåå¾ããå¿ è¦ãããã¾ãã ãã®ã³ãã¼ã¯æ°ãããã©ã³ãã«ãªãã®ã§ããã®ã³ãã³ã㯠**branch** ã¨ããååã«ãªã£ã¦ãã¾ã:: % bzr branch http://bazaar-vcs.org/bzr/bzr.dev % cd bzr.dev .. This copies down the complete history of this branch, so we can do all .. operations on it locally: log, annotate, making and merging branches. .. There will be an option to get only part of the history if you wish. .. XXX: There will be ã®è¨³ããã§ããï¼ ããã§ãã©ã³ãã®å®å ¨ãªå±¥æ´ãã³ãã¼ã§ããã®ã§ããã¹ã¦ã®æä½ (log, annotate, branch ã®ä½æã¨ãã¼ã¸ãªã©) ããã¼ã«ã«ã§å®è¡ã§ãã¾ãã å±¥æ´ã®ä¸é¨ã ããåå¾ãããªãã·ã§ã³ã追å ãããäºå®ã§ãã .. You can also get a copy of an existing branch by copying its directory, .. expanding a tarball, or by a remote copy using something like rsync. æ¢åã®ãã©ã³ããã³ãã¼ããã«ã¯ãæ®éã«ãã£ã¬ã¯ããªãã³ãã¼ããããtarballã\ å±éãããããªã¢ã¼ããã rsync ã®ãããªæ¹æ³ã§ã³ãã¼ãããã¨ãã§ãã¾ãã .. Following upstream changes ä¸æµã®å¤æ´ã追ãããã ========================== .. You can stay up-to-date with the parent branch by "pulling" in their changes:: å¤æ´ã "pull" ãããã¨ã§æå ã®ãã©ã³ããä¸æµã®ãã©ã³ãã«å¯¾ãã¦ææ°ã«ä¿ã¤ãã¨ã\ ã§ãã¾ãã % bzr pull .. After this change, the local directory will be a mirror of the source. This .. includes the ''revision-history'' - which is a list of the commits done in .. this branch, rather than merged from other branches. .. XXX This includesï½ãããããªã. ãã®ã³ãã³ããå®è¡ããå¾ããã¼ã«ã«ãã£ã¬ã¯ããªã¯pullå ã®ãã©ã¼ã«ãªãã¾ãã ãã©ã¼ãããã®ã«ã¯ã ''revision-history'' ãå«ã¿ã¾ããã¤ã¾ããå¥ã®ãã©ã³ããã\ ãã¼ã¸ããã®ã§ã¯ãªãã¦ããã®ãã©ã³ãã«å¯¾ãã¦ã³ãããããå±¥æ´ã«ãªãã¾ãã .. This command only works if your local (destination) branch is either an .. older copy of the parent branch with no new commits of its own, or if the .. most recent commit in your local branch has been merged into the parent .. branch. ãã®ã³ãã³ãã¯ãã¼ã«ã«ã®(pullå )ãã©ã³ãã親ãã©ã³ãã®å¤ãã³ãã¼ã§ç¬èªã®\ ããããããªãã¸ã§ã³ãä¸åå«ã¾ãªããããã¼ã«ã«ãã©ã³ãã¸ã®ææ°ã®ã³ãããã\ 親ãã©ã³ãã«ãã¼ã¸ããã¦ããã¨ãã«ã®ã¿æåãã¾ãã .. Merging from related branches é¢é£ãã©ã³ããããã¼ã¸ãã ============================= .. If two branches have diverged (both have unique changes) then ``bzr .. merge`` is the appropriate command to use. Merge will automatically .. calculate the changes that exist in the branch you're merging from that .. are not in your branch and attempt to apply them in your branch. äºã¤ã®ãã©ã³ããåå²ãã¦ãã(äºãã«ç°ãªãå¤æ´ãæã£ã¦ãã)ã¨ãã ``bzr merge`` ã³ãã³ãã®åºçªã§ãã merge ã¯ãã¼ã¸å ãã©ã³ãã«ãã£ã¦æå ã®ãã©ã³ãã«ãªãå¤æ´ãèªåã§æ¢ãã¦ã\ ãã®å¤æ´ãæå ã«é©ç¨ãããã¨è©¦ã¿ã¾ãã :: % bzr merge URL .. If there is a conflict during a merge, 3 files with the same basename .. are created. The filename of the common base is appended with ".BASE", .. the filename of the file containing your changes is appended with .. ".THIS" and the filename with the changes from the other tree is .. appended with ".OTHER". Using a program such as kdiff3, you can now .. comfortably merge them into one file. In order to commit you have to .. rename the merged file (".THIS") to the original file name. To .. complete the conflict resolution you must use the resolve command, .. which will remove the ".OTHER" and ".BASE" files. As long as there .. exist files with .BASE, .THIS or .OTHER the commit command will .. report an error. ãã¼ã¸ä¸ã«è¡çª(conflict)ãçºçããå ´åãåãåºæ¬å(basename)ããã¤\ 3ã¤ã®ãã¡ã¤ã«ãä½æããã¾ãã å ±éã®ç¥å ã«ãªããã¡ã¤ã«ã®ãã¡ã¤ã«åã«ã¯ ".BASE" ãã æå ã®ãã©ã³ãã®å¤æ´ãå«ããã¡ã¤ã«åã«ã¯ ".THIS" ãã ãã¼ã¸å ã®å¤æ´ãå«ããã¡ã¤ã«åã«ã¯ ".OTHER" ãæ«å°¾ã«è¿½å ããã¾ãã kdiff3 ã®ãããªããã°ã©ã ãå©ç¨ãã¦ãããã®ãã¡ã¤ã«ãã²ã¨ã¤ã«\ ãã¼ã¸ãããã¨ãã§ãã¾ãã ã³ãããããã«ã¯ããã¼ã¸ããã ".THIS" ãã¡ã¤ã«ãå ã®ãã¡ã¤ã«åã«\ ãªãã¼ã ãã¾ãã è¡çªã®è§£æ±ºãå®äºããã«ã¯ã resolve ã³ãã³ãã使ãã¾ãã ãã®ã³ãã³ã㯠".OTHER" 㨠".BASE" ãã¡ã¤ã«ãåé¤ãã¾ãã .BASE, .THIS, .OTHER ãã¡ã¤ã«ãæ®ã£ã¦ããå ´åã commit ã³ãã³ãã¯\ ã¨ã©ã¼ãå ±åãã¾ãã :: % kdiff3 file.BASE file.OTHER file.THIS % mv file.THIS file % bzr resolve file [**TODO**: explain conflict markers within files] ãã©ã³ããå ¬éãã ====================== .. You don't need a special server to publish a bzr branch, just a normal web .. server. Just mirror the files to your server, including the .bzr .. directory. One can push a branch (or the changes for a branch) by one of .. the following three methods: bzrã®ãã©ã³ããå ¬éããã«ã¯ç¹å¥ãªãµã¼ãã¼ã¯å¿ è¦ããã¾ãããæ®éã®Webãµã¼ãã¼ã\ 使ãã¾ãã .bzr ãã£ã¬ã¯ããªãå«ãã¦ãã¡ã¤ã«ããµã¼ãã¼ã«ãã©ã¼ãã¦ãã ããã ãã©ã³ããpush(ããã©ã³ãã«å¯¾ããæä½)ããã®ã«ä»¥ä¸ã®3ã¤ã®æ¹æ³ãããã¾ãã .. * The best method is to use bzr itself to do it. * æè¯ã®æ¹æ³ã¯ bzr èªä½ã使ããã¨ã§ãã :: % bzr push sftp://servername.com/path/to/directory .. (The destination directory must already exist unless the .. ``--create-prefix`` option is used.) (pushå ãã£ã¬ã¯ããªããã§ã«åå¨ãããã ``--create-prefix`` ãªãã·ã§ã³ã\ å©ç¨ããå¿ è¦ãããã¾ãã) .. * Another option is the ``rspush`` plugin that comes with BzrTools, which .. uses rsync to push the changes to the revision history and the working .. tree. * å¥ã®é¸æè¢ã¯ bzrtools ã«å«ã¾ãã ``rspush`` ãã©ã°ã¤ã³ãå©ç¨ãããã¨ã§ãã ããã¯ãªã¢ã¼ãã®å±¥æ´ã¨ä½æ¥ããªã¼ã«å¤æ´ã push ããã®ã« rsync ãå©ç¨ãã¾ãã .. * You can also copy the files around manually, by sending a tarball, or using .. rsync, or other related file transfer methods. This is usually less safe .. than using ``push``, but may be faster or easier in some situations. * æåã§ã tarball ãéã£ãã rsync ã使ã£ããã»ãã®è»¢éæ¹æ³ãå©ç¨ãã¦ãã¡ã¤ã«ã\ éããã¨ã§ .. Moving changes between trees å¤æ´ãããªã¼éã§ç§»åãã ============================ .. It happens to the best of us: sometimes you'll make changes in the wrong .. tree. Maybe because you've accidentally started work in the wrong directory, .. maybe because as you're working, the change turns out to be bigger than you .. expected, so you start a new branch for it. ã©ããªäººã«ã§ããããããã¨ã§ãããé©åã§ã¯ãªãããªã¼ä¸ã§å¤æ´ãã¦ãã¾ããã¨ãããã¾ãã åç´ã«ä½æ¥ãããã£ã¬ã¯ããªãééããããå¤æ´ããããããã大ãããªã£ã¦ãã¾ã£ãããã¦ã ãã®å¤æ´ã®ããã«æ°ãããã©ã³ããä½ããªãããã¨ãããã¾ãã .. To move your changes from one tree to another, use å¤æ´ãããããªã¼ããå¥ã®ããªã¼ã«ç§»åããã«ã¯ :: % cd NEWDIR % bzr merge --uncommitted OLDDIR .. This will apply all of the uncommitted changes you made in OLDDIR to NEWDIR. .. It will not apply committed changes, even if they could be applied to NEWDIR .. with a regular merge. The changes will remain in OLDDIR, but you can use ``bzr .. revert OLDDIR`` to remove them, once you're satisfied with NEWDIR. ããã§ãã¹ã¦ã®ã³ãããããã¦ããªãOLDDIRä¸ã®å¤æ´ãNEWDIRã«é©ç¨ããã¾ãã ã³ãããããã¦ããªãå¤æ´ã¯ãé常ã®mergeã§NEWDIRã«é©ç¨ãããã¨ãã§ããå ´åã§ãé©ç¨ããã¾ããã OLDDIRä¸ã®å¤æ´ã¯ãã®ã¾ã¾æ®ãã¾ãããNEWDIRã®ç¶æ ã«æºè¶³ããã ``bzr revert OLDDIR`` ã§åé¤ãããã¨ãã§ãã¾ãã .. NEWDIR does not have to be a copy of OLDDIR, but they should be related. .. The more different they are, the greater the chance of conflicts. NEWDIRã¯OLDDIRã®ã³ãã¼ã§ããå¿ è¦ã¯ããã¾ããããé¢é£ãã¦ããã¹ãã§ãã 両è ã®éãã大ãããã°ããã ãè¡çªãèµ·ããå¯è½æ§ã大ãããªãã¾ãã