[MERGE] reject reserved revision ids

Martin Pool mbp at canonical.com
Mon Jan 15 04:48:07 GMT 2007


On 14 Jan 2007, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> Martin Pool wrote:
> > Martin Pool has voted +1 (conditional).
> > Status is now: Conditionally approved
> > Comment:
> > I'm in favour of the checks.  I have some stylistic comments.
> > 
> > I would suggest that method names should generally have verbs in them --
> > so is_reserved_revision_id.  But beyond that, DRY suggests that since
> > every call to this is just raising the same exception if it's wrong, why
> > not put that in and call it check_for_reserved_revision_id (or some
> > shorter variant)?
> 
> Okay.  Thinking about this raised an interesting issue: do we want to
> draw a distinction between version ids and revision ids?
> 
> That is, in versionedfiles, the ids are version ids, but when retrieving
> revisions or revision trees, the ids are revision ids.  They happen to
> have the same set of names, but Tom Lord would call this "punning", I
> think, implying that they are the same by choice not by necessity.

I think they should both be subject to this check.

More broadly, I would think of (file) version ids as pretty much an
implementation detail of the repository, allowing it to get the
corresponding text for a file, and to identify one revision in which it
was changed to have the current value.

-- 
Martin



More information about the bazaar mailing list