You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2011/12/20 21:03:51 UTC
svn commit: r1221463 - /subversion/trunk/subversion/mod_dav_svn/repos.c
Author: danielsh
Date: Tue Dec 20 20:03:50 2011
New Revision: 1221463
URL: http://svn.apache.org/viewvc?rev=1221463&view=rev
Log:
Allow leading "r"'s in mod_dav_svn ?p= and ?r= query string parameters.
* subversion/mod_dav_svn/repos.c
(parse_querystring): Skip leading r's in the &p= and &r= arguments.
Modified:
subversion/trunk/subversion/mod_dav_svn/repos.c
Modified: subversion/trunk/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/repos.c?rev=1221463&r1=1221462&r2=1221463&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/repos.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/repos.c Tue Dec 20 20:03:50 2011
@@ -1816,6 +1816,8 @@ parse_querystring(request_rec *r, const
if (prevstr)
{
+ while (*prevstr == 'r')
+ prevstr++;
peg_rev = SVN_STR_TO_REV(prevstr);
if (!SVN_IS_VALID_REVNUM(peg_rev))
return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
@@ -1833,6 +1835,8 @@ parse_querystring(request_rec *r, const
wrevstr = apr_table_get(pairs, "r");
if (wrevstr)
{
+ while (*wrevstr == 'r')
+ wrevstr++;
working_rev = SVN_STR_TO_REV(wrevstr);
if (!SVN_IS_VALID_REVNUM(working_rev))
return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
Re: svn commit: r1221463 -
/subversion/trunk/subversion/mod_dav_svn/repos.c
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
C. Michael Pilato wrote on Tue, Dec 20, 2011 at 15:28:03 -0500:
> On 12/20/2011 03:26 PM, Greg Stein wrote:
> > Do we do this on the command line, too? I was just thinking about that
> > the other day, when I cut/pasted a command line kinda like:
> >
> > $ svn diff -c r99999
> >
> > ... then I went back and removed the 'r'. Maybe I should just look myself? :-P
>
> We allow that syntax, yes.
And viewvc supports it, too.
Now I suppose I should lobby people to change the ASCII code of 'r' to 48
so that we don't have to change _every_ _single_ _place_ that parses
revnums from strings.
Re: svn commit: r1221463 -
/subversion/trunk/subversion/mod_dav_svn/repos.c
Posted by Stefan Sperling <st...@elego.de>.
On Tue, Dec 20, 2011 at 03:28:03PM -0500, C. Michael Pilato wrote:
> On 12/20/2011 03:26 PM, Greg Stein wrote:
> > Do we do this on the command line, too? I was just thinking about that
> > the other day, when I cut/pasted a command line kinda like:
> >
> > $ svn diff -c r99999
> >
> > ... then I went back and removed the 'r'. Maybe I should just look myself? :-P
>
> We allow that syntax, yes.
And it's even been fixed to allow -c -rX for reverse-merging :)
Re: svn commit: r1221463 - /subversion/trunk/subversion/mod_dav_svn/repos.c
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 12/20/2011 03:26 PM, Greg Stein wrote:
> Do we do this on the command line, too? I was just thinking about that
> the other day, when I cut/pasted a command line kinda like:
>
> $ svn diff -c r99999
>
> ... then I went back and removed the 'r'. Maybe I should just look myself? :-P
We allow that syntax, yes.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: svn commit: r1221463 - /subversion/trunk/subversion/mod_dav_svn/repos.c
Posted by Greg Stein <gs...@gmail.com>.
Do we do this on the command line, too? I was just thinking about that
the other day, when I cut/pasted a command line kinda like:
$ svn diff -c r99999
... then I went back and removed the 'r'. Maybe I should just look myself? :-P
On Tue, Dec 20, 2011 at 15:03, <da...@apache.org> wrote:
> Author: danielsh
> Date: Tue Dec 20 20:03:50 2011
> New Revision: 1221463
>
> URL: http://svn.apache.org/viewvc?rev=1221463&view=rev
> Log:
> Allow leading "r"'s in mod_dav_svn ?p= and ?r= query string parameters.
>
> * subversion/mod_dav_svn/repos.c
> (parse_querystring): Skip leading r's in the &p= and &r= arguments.
>
> Modified:
> subversion/trunk/subversion/mod_dav_svn/repos.c
>
> Modified: subversion/trunk/subversion/mod_dav_svn/repos.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/repos.c?rev=1221463&r1=1221462&r2=1221463&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/mod_dav_svn/repos.c (original)
> +++ subversion/trunk/subversion/mod_dav_svn/repos.c Tue Dec 20 20:03:50 2011
> @@ -1816,6 +1816,8 @@ parse_querystring(request_rec *r, const
>
> if (prevstr)
> {
> + while (*prevstr == 'r')
> + prevstr++;
> peg_rev = SVN_STR_TO_REV(prevstr);
> if (!SVN_IS_VALID_REVNUM(peg_rev))
> return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
> @@ -1833,6 +1835,8 @@ parse_querystring(request_rec *r, const
> wrevstr = apr_table_get(pairs, "r");
> if (wrevstr)
> {
> + while (*wrevstr == 'r')
> + wrevstr++;
> working_rev = SVN_STR_TO_REV(wrevstr);
> if (!SVN_IS_VALID_REVNUM(working_rev))
> return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
>
>