explain uncommit to me please

Matthew D. Fuller fullermd at over-yonder.net
Sun Aug 15 13:36:10 BST 2010

On Sun, Aug 15, 2010 at 03:06:25AM -0700 I heard the voice of
Chris Hecker, and lo! it spake thus:
> I just used bzr uncommit for the first time tonite, and I feel a
> little dirty.  :)

Perfectly natural; that's why most of us do it late at night under a
blanket in the closet with all the lights turned off   :)

> I wanted to change the log message I just committed, and saw
> uncommit, and said what the hell.  What happens to that revision in
> the branch?  It's still got a revid, so it's in there somewhere?

Technically, the revision is no longer in the _branch_.  It's still in
the _repository_, because uncommit doesn't actually delete anything.
But it's no longer part of the branch history; anything looking at
that branch would never know it was there.

> What would have happened if I'd pushed to another branch before
> uncommitting?  Etc.

Then (after your uncommit) that 'far' branch would have the rev, but
your local branch wouldn't.  To push later, you'd either need to push
--overwrite (to tell bzr it's OK to discard that rev from the farside
branch), or get that rev back into your local copy to push (e.g., via
merge).  Of course, that latter would defeat the purpose of
uncommitting in the first place...

Matthew Fuller     (MF4839)   |  fullermd at over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.

More information about the bazaar mailing list