Changes between Version 11 and Version 12 of BazaarWorkflow


Ignore:
Timestamp:
2009-08-17T19:27:03Z (15 years ago)
Author:
Jiri Svoboda
Comment:

Add in the clones.

Legend:

Unmodified
Added
Removed
Modified
  • BazaarWorkflow

    v11 v12  
    5151Let us say your branch diverged from the mainline (i.e. somebody pushed to the main repository since you branched off). This is perfectly normal. You can work on your branch independently of the mainline. However, from time to time you might want to actually propagate your great new changes to the mainline. We do it by merging.
    5252
    53 With merging, the order of arguments is significant. You must always ''merge your branch into the mainline'', never the other way around! How can you do this? With bazaar you can only merge to a local repository (you need to chdir into it), you cannot merge to a remote repository.
     53With merging, the order of arguments is significant. In this case we want to ''merge your branch into the mainline'', not the other way around! How can you do this? With bazaar you can only merge to a local repository (you need to chdir into it), you cannot merge to a remote repository.
    5454
    55 Therefore we have to resort to a little trick. Suppose your branch {{{my_branch}}} diverged from the mainline. We thus create a new branch {{{head_clone}}} which will be a clone of the mainline:
     55Therefore we have to resort to a little trick. Suppose you have a branch {{{my_branch}}}. We create a new branch {{{head_clone}}} which will be a clone of the mainline:
    5656
    5757{{{
     
    7373}}}
    7474
     75Remember that it is not necessary to merge every commit you make into the mainline right away. It can be better to merge more changes at a time.
     76
    7577=== Keeping Your Branch Up to Date ===
    7678
     
    8183my_branch$ bzr commit -m "Merge latest mainline changes."
    8284}}}
     85
     86Note that it is not necessary to merge all new mainline changes at once, you can do it less often, preventing unnecessary merges. Especially note that it makes no sense merging the mainline if the only new changeset is the changeset that merges the latest changes from your branch.
     87
     88=== Keeping a Clone Around ===
     89
     90It is advisable to keep a clone (such as the {{{head_clone}}} repository mentioned above) around. You can keep it up to date by pulling from the main repository:
     91
     92{{{
     93head_clone$ bzr pull
     94}}}
     95
     96It is good for two things:
     97
     98 * compiling and testing the latest and greatest changes in the mainline (without having to merge them)
     99 * merging into the mainline
    83100
    84101== What if I pull from mainline to my feature branch? ==