Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changes between Version 1 and Version 2 of BazaarWorkflow


Ignore:
Timestamp:
2009-08-16T18:26:54Z (10 years ago)
Author:
Jiri Svoboda
Comment:

Structured history

Legend:

Unmodified
Added
Removed
Modified
  • BazaarWorkflow

    v1 v2  
    1515{{{
    1616$ cd my_branch
    17 $ ...modify some files...
    18 $ bzr commit -m "Fixed crash when writing zero bytes to FAT."
     17my_branch$ ...modify some files...
     18my_branch$ bzr commit -m "Fixed crash when writing zero bytes to FAT."
    1919}}}
    2020
     
    2222
    2323{{{
    24 $ bzr push --remember bzr+http://jermar@bzr.helenos.org/head
     24my_branch$ bzr push --remember bzr+http://jermar@bzr.helenos.org/head
    2525}}}
    2626
     
    2828
    2929{{{
    30 $ bzr push
     30my_branch$ bzr push
    3131}}}
    3232
     
    4242
    4343== Structured History ==
     44
     45If your branch diverged from the mainline (i.e. somebody pushed to the main repository since you branched off), you cannot push anymore. You must merge the two branches. 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.
     46
     47Therefore 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:
     48
     49{{{
     50$ bzr branch bzr://bzr.helenos.org/head head_clone
     51}}}
     52
     53Now go to the clone repository and merge your branch into it:
     54
     55{{{
     56$ cd head_clone
     57head_clone$ bzr merge ../my_branch
     58}}}
     59
     60Now we can push from the clone to the main repository:
     61
     62{{{
     63head_clone$ bzr push bzr+http://jermar@bzr.helenos.org/head
     64}}}
     65
     66Finally let us sync our branch with the main repository:
     67
     68{{{
     69head_clone$ cd ../my_branch
     70my_branch$ bzr pull
     71}}}