[ditrack commit] r2341 - src/trunk/tests/dttest

Ivan Glushkov gli.work at gmail.com
Sun Nov 25 22:23:43 PST 2007


> > +    def last_rev(self):
> > +        """
> > +        Returns the revision of the database
> > +        """
> >
>
> Which revision? The current or last changed one? The right thing to use
> here is actually 'svn info', since 'svn log' might not always return the
> HEAD revision in its output (e.g. right after "commit" before any
> "update" took place).
The latest revision. Documentation changed in r2394.
We use here svn_log_last() function, which firstly does 'svn up' and
the get the last log message. So we'll always have the latest revision
here.

> > @@ -533,6 +542,9 @@
> >
> >          rev_arg = ""
> >          if rev is not None:
> > +            if rev < 0:
> > +                rev = self.last_rev() + rev
> > +                assert (rev > 0)
> >
>
> Why not documented? Also, assert makes() more sense before updating
> 'rev' from a user standpoint. Braces are unnecessary, per our style.
changed in r2393

Ivan.


More information about the Dev mailing list