[RFC] making the null revision become real
Denys Duchier
duchier at ps.uni-sb.de
Wed Feb 15 22:18:32 GMT 2006
Currently bzr maintains a useful fiction that all projects are descended from
what is called the "null" revision. However this is a virtual revision, and the
fact that it is not real, and therefore unlike other revisions, has undesirable
consequences:
- it needs to be special-cased
- asking for the "null" revision object raises an exception
- None is also accepted to mean its revid and that clashes with the pythonic
conventional value for omitted keyword arguments
- revnos need to be offet by 1
- it is not possible to do: "bzr init A; bzr branch A B"
I'd like to propose to turn the null revision into an actual revision. It
should have revid "null:" i.e. bzrlib.revision.NULL_REVISION, and it should be
present as the first revision in every branch's history. This means that revnos
no longer have to be offset; revno=0 is simply the null revision. It also
becomes trivial to branch off a newly created empty branch. And we should no
longer accept a revid=None to mean the null revision. revid=None should only
mean that a revid has not been provided.
Opinions?
Cheers,
--Denys
More information about the bazaar
mailing list