Re: [viewvc-dev] [PATCH] issue #441: Allow "rNNN" formatting for Subversion revision specifiers
Daniel Shahaf <[email protected]> Thu, 17 Jun 2010 23:56:37 +0300 (Jerusalem Daylight Time)
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the speedy application. :-)
Daniel
(now, to convince the svn.a.o admins to upgrade their install...)
C. Michael Pilato wrote on Thu, 17 Jun 2010 at 23:53 -0000:
> > Index: lib/vclib/svn/svn_repos.py
> > ===================================================================
> > --- lib/vclib/svn/svn_repos.py (revision 2402)
> > +++ lib/vclib/svn/svn_repos.py (working copy)
> > @@ -727,6 +727,8 @@ class LocalSubversionRepository(vclib.Repository):
> > if rev is None or rev == 'HEAD':
> > return self.youngest
> > try:
> > + if type(rev) == type(''):
> > + rev = re.sub('^r*', '', rev)
>
> I went a different route here:
>
> if type(rev) == type('') and rev[0] == 'r':
> rev = rev[1:]
>
> (And did the same in the identical area of svn_ra.py.)
>
> > Index: lib/viewvc.py
> > ===================================================================
> > --- lib/viewvc.py (revision 2402)
> > +++ lib/viewvc.py (working copy)
> > @@ -658,7 +658,7 @@ _re_validate_number = re.compile('^[0-9]+$')
> > _re_validate_boolint = re.compile('^[01]$')
> >
> > # when comparing two revs, we sometimes construct REV:SYMBOL, so ':' is needed
> > -_re_validate_revnum = re.compile('^[-_.a-zA-Z0-9:~\\[\\]/]*$')
> > +_re_validate_revnum = re.compile('^r?[-_.a-zA-Z0-9:~\\[\\]/]*$')
>
> And as noted previously, this change is unnecessary because the 'r' is
> already covered by the "a-z" portion of the preexisting regexp.
>
> Committed the tweaked patch in r2405. Not sure if I can backport to 1.1.x
> as it technically is a change to the URL syntax. Will think on these things.
>
>
------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4251&dsMessageId=2623169
To unsubscribe from this discussion, e-mail: [[email protected]].