RFC: revno pertubation rules

John Arbash Meinel john at arbash-meinel.com
Thu Aug 14 15:54:17 BST 2008


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

Robert Collins wrote:
> This is a draft, I'm trying to document exactly how and why revno's
> change, to ensure any new logic written can accomodate that.
> 
> John, I'd appreciate a double-check on this, as you altered the code
> last :)
> 
> Events that can change revision numbers->revision id mappings for a
> branch:
> 
>  * commit
>  * tip rollback
>  * tip advance
>  * ghost filling
> 
> commit
> ------
> 
> Commit adds a mapping of new-revid->new-revno, and also causes any
> merges to get assigned branch numbers and revnos within that. I'm pretty
> sure that it never renumbers older revisions.
> 
> ghost filling
> -------------
> 
> A ghost being filled can cause previously allocated revision numbers
> that actually should have been given to the ghost to get renumbered up
> to a higher branch number. Note that in the event of mainline ghosts
> (like arch conversions), this can renumber everything.
> 
> tip advance
> -----------
> 
> This can be reduced down to commit
> 
> tip rollback
> ------------
> 
> If the tip is rolled back down the left hand side, all the revision
> numbers for the popped revisions *and their merges* are invalidated.
> Note that pull with a different LHS (whether --overwrite or convergence)
> can be considered a case of rollback + advance.
> 
> -Rob
> 
> 

I would probably reduce "commit" to "tip advance" rather than "tip
advance" => commit.

But yes, by design, tip advance (along the left-hand-side) will not
renumber anything that is already numbered. So you only need to number
the new tips and their merges.

The only further bit to say is that:

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

rolling back F => D invalidates E but not C. So it isn't the ancestry of
everything merged, but just things that weren't merged before.

John
=:->

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

iEYEARECAAYFAkikRxkACgkQJdeBCYSNAAMAQACfTOCDWtN3ANCx+X6x2aALgrzu
Z+cAn1swWcIFbQ3A27YYKYKDOQrjKnfK
=T4IL
-----END PGP SIGNATURE-----



More information about the bazaar mailing list