Is rebase a (or the) way to do this?

John Arbash Meinel john at arbash-meinel.com
Tue Feb 10 14:10:55 GMT 2009


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

Doug Lee wrote:
> Scenario: Multiple developers using either lightweight checkouts or
> bound branches, all sharing a central repository.  I am one:
> 
> ... work work work ...
> bzr commit -m "Today I brew, tomorrow I bake..."
> *** discover the central server is down or I don't have Internet
> !! --local  (repeat last commit locally)
> ... more work, more commits ...
> *** Server/Internet comes back
> 
> Now... I have this stack of commits, which I'd like logged in `bzr
> log' history centrally.  `bzr push' will do it, but only if nobody
> else committed in my absence.  If they did, I can do `bzr update' then
> `bzr commit', but my history seems to be skipped in the central
> branch.

If you do "bzr up && bzr commit" at this point, you will have the
commits, but they will be shown indented. At least if you do "bzr log
- --long" (the default). "bzr log --short" will only show a [merge]
mention for the commit.

> 
> Is this where I use `bzr rebase <central_branch>' and then `bzr push'
> to do what I want, or am I missing something, like a better way?  (I
> think the new -n option for `bzr log' may help, but I haven't tried
> that yet.)
> 
> Thanks much.
> 
> 


The -n option can now be used to toggle the listing of merged revision.
So if you do:

  bzr log --long -n1

It will hide them, and if you do:

  bzr log --short -n0

It will show them (versus the normal behavior of --long/--short).

If you must have your revisions in the mainline, then 'bzr rebase' is
the only way to do it. If you just want them listed in "bzr log" and
used for "bzr annotate", then "bzr up && bzr commit" works just fine.

John
=:->

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

iEYEARECAAYFAkmRiu8ACgkQJdeBCYSNAAMXEgCfWf0W0vYqPBBdfdTK9I58mm37
ZrIAn2bZybi7s753kIfDP/SaVl7HgjEs
=+gex
-----END PGP SIGNATURE-----



More information about the bazaar mailing list