Pushing several local commits to a remote branch

John Arbash Meinel john at arbash-meinel.com
Sun Jun 27 19:21:04 BST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> I'm not sure I get the last part, which is actually the point of my
> question (sorry if that was unclear).  Let's take an example.  Suppose
> I do the following sequence of commands:
> 
>   bzr up
>   hack, hack
>   bzr ci --local # revno A
>   hack some more
>   bzr ci --local # revno B
>   bzr up
>   bzr ci
> 
> and suppose that someone committed 2 revisions X and Y to the master
> repository while I was hacking away, which "bzr up" brought to my
> local branch.  What will be the history DAG of the master repository
> after my last "bzr ci"?
> 
> TIA
> 

Time going down:

 Master   Local
  A        A
  |        |
  B        B
  |        |
  C        D  # point of divergence
  |        |
  E        F

bzr up

 Master
  A        A
  |        |
  B        B
  |        |\
  C        C D
  |        | |
  E        E F
           # waiting for commit

bzr ci
  A        A
  |        |
  B        B
  |\       |\
  C D      G D
  | |      | |
  E F      E F
  |/       |/
  G        G


You could possibly do something with 'bzr rebase' (or at least a
rebase-like command), that could do:

  A
  |
  B
  |
  C
  |
  E
  |
  G
  |
  D'
  |
  F'


Or even

  A
  |
  B
  |\
  C |
  | |
  E D
  |/|
  D'F
  |/
  F'

It really depends on what the user needs/expects. But almost always the
standard 'bzr up && bzr ci' is sufficient:
  A
  |
  B
  |\
  C D
  | |
  E F
  |/
  G

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwnlo8ACgkQJdeBCYSNAANkQACgy5O6uZqvXrdBEUo39DlgOWaS
3oQAoJKrzGyy00YMaPWlWg9jleZo4vQl
=Rqb0
-----END PGP SIGNATURE-----



More information about the bazaar mailing list