"update -r REVNO" support
Martin Pool
mbp at sourcefrog.net
Wed Aug 8 02:14:45 BST 2007
On 8/8/07, Robert Widhopf-Fenk <hack at robf.de> wrote:
> 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".
Robert, could you please for now leave the revnos out of this message,
and just submit it with the update fixes? I don't mind changing the
message to be more clear.
--
Martin
More information about the bazaar
mailing list