"update -r REVNO" support
Robert Widhopf-Fenk
hack at robf.de
Wed Aug 8 00:17:23 BST 2007
On Monday, August 6, 2007 at 00:34:07, Matthew D. Fuller wrote:
> On Mon, Aug 06, 2007 at 03:25:45PM +1000 I heard the voice of
> Martin Pool, and lo! it spake thus:
> > > + b_revno = wt.branch.last_revision_info()[0]
> > > + wt_revno =
> > > wt.branch.revision_id_to_revno(wt.last_revision())
> > > + missing = b_revno - wt_revno
> > > + warning("Working tree is at revno %d missing %d
> > > revision%s!" %
> > > + (wt_revno, missing,
> > > + (missing > 1) and "s" or ""))
> >
> > Giving more information here is good.
>
> But correct information is better. The above fails twice if the
> working tree is on a non-mainline revision; first because
> revision_id_to_revno() doesn't give you an answer in that case, and
> second because the subtraction wouldn't give you a useful answer if
> it did ("How the heck am I 7.8.37.931.5 revisions out of date?!")
>
> It would probably be better just to say "Branch is at revision X,
> working tree at revision Y.Z".
Is there a way to get a "numeric" revno for the working
tree? I cannot figure out how to do it for this case.
Thanks
Robert
More information about the bazaar
mailing list