You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Eli Barzilay <el...@barzilay.org> on 2005/06/01 03:38:39 UTC

Re: [svn] Problem with Peg Revisions and files containing '@'

On May 31, Eli Barzilay wrote:
> 
> (submitting an issue, FWIW.)

OK, so it seems like this is impossible without registration, which
will not go through immediately.  I'll post it here instead...

It seems like there is no way to escape a real `@' character which is
part of a file name.  Looking at the code in
"subversion/libsvn_subr/opt.c", this behavior hard wired with no way
to avoid it.  It also looks like standard escaping will not be
convenient since it's only needed for the last `@' in a filename.

The way to avoid this currently is to append a `@BASE' to the path.
If nothing else is changed, then its probably a good idea to mention
this in some docs.  It would be better to actually come up with a
proper solution which can be used in scripts etc.  I guess that having
a rule that the `@' is interpreted as part of a path if that path
exists is impossible when considering URLs.

So how about making an empty peg revision be used as the default?
Then the only escape that will be needed to guarantee proper behavior
in scripts is to use "path@".

Another thing that seems like it should be working is to use "path/".
It's questionable (IMO) whether this should be working, but it seems
to be working for plain file paths.  However, with a `@', it fails
with the same

  svn proplist foo@bar/
  svn: Syntax error parsing revision 'bar'

which seems strange since the code in the above file look like it
stops as soon as it hits a `/'.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: [svn] Problem with Peg Revisions and files containing '@'

Posted by Eli Barzilay <el...@barzilay.org>.
On Jun  2, kfogel@collab.net wrote:
> Eli Barzilay <el...@barzilay.org> writes:
> > > Yeah, I wish it were possible for us to set the website to
> > > automatically approve all requests for 'Observer' role (or to simply
> > > not require it for issue filings).
> > 
> > (BTW, the whole bug report thing is really difficult to follow.)
> 
> We've made updates to the instructions since then.  Is it still
> difficult, and if so, could you suggest some improvements?

Well, it's still difficult in the sense that you have to register
first, but now it's clear that you should do so.  This is what was
confusing before.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: [svn] Problem with Peg Revisions and files containing '@'

Posted by kf...@collab.net.
Eli Barzilay <el...@barzilay.org> writes:
> > Yeah, I wish it were possible for us to set the website to
> > automatically approve all requests for 'Observer' role (or to simply
> > not require it for issue filings).
> 
> (BTW, the whole bug report thing is really difficult to follow.)

We've made updates to the instructions since then.  Is it still
difficult, and if so, could you suggest some improvements?

Thanks for filing those issues, by the way!

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: [svn] Problem with Peg Revisions and files containing '@'

Posted by Eli Barzilay <el...@barzilay.org>.
On Jun  1, kfogel@collab.net wrote:
> Eli Barzilay <el...@barzilay.org> writes:
> > On May 31, Eli Barzilay wrote:
> > > (submitting an issue, FWIW.)
> > 
> > OK, so it seems like this is impossible without registration,
> > which will not go through immediately.  I'll post it here
> > instead...
> 
> Yeah, I wish it were possible for us to set the website to
> automatically approve all requests for 'Observer' role (or to simply
> not require it for issue filings).

(BTW, the whole bug report thing is really difficult to follow.)


> > It seems like there is no way to escape a real `@' character which is
> > part of a file name.  Looking at the code in
> > "subversion/libsvn_subr/opt.c", this behavior hard wired with no way
> > to avoid it.  It also looks like standard escaping will not be
> > convenient since it's only needed for the last `@' in a filename.
> > 
> > The way to avoid this currently is to append a `@BASE' to the path.
> > If nothing else is changed, then its probably a good idea to mention
> > this in some docs.  It would be better to actually come up with a
> > proper solution which can be used in scripts etc.  I guess that having
> > a rule that the `@' is interpreted as part of a path if that path
> > exists is impossible when considering URLs.
> 
> +1 on both.
> 
> The workaround should be documented, but the more intuitive solution
> would be for "@" to quote itself.  That's what many people probably
> expect anyway.

If you're talking about making "@@" represent "@", then that's not a
good idea...  The problem is that only the last "@" need quoting,
which will be difficult to remember and to implement in scripts.  The
other option is to force quoting all "@"s like that which is even less
pleasant (at least IMO).


> > So how about making an empty peg revision be used as the default?
> > Then the only escape that will be needed to guarantee proper behavior
> > in scripts is to use "path@".
> 
> We should also do that, IMHO.

This seems to be the most convenient thing -- for both usets and for
scripting.


> > Another thing that seems like it should be working is to use "path/".
> > It's questionable (IMO) whether this should be working, but it seems
> > to be working for plain file paths.  However, with a `@', it fails
> > with the same
> > 
> >   svn proplist foo@bar/
> >   svn: Syntax error parsing revision 'bar'
> > 
> > which seems strange since the code in the above file look like it
> > stops as soon as it hits a `/'.
> 
> I don't think we should be allowing trailing '/' on files, but
> that's sort of a separate issue.
> 
> Do you have Observer role now?  Would you mind filing the "@" issue,
> and if you're really feeling squirrely, the "/" issue too?  If so,
> please refer to this mail thread from both issues.

Yes, I'll do that now.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: [svn] Problem with Peg Revisions and files containing '@'

Posted by kf...@collab.net.
Eli Barzilay <el...@barzilay.org> writes:
> On May 31, Eli Barzilay wrote:
> > (submitting an issue, FWIW.)
> 
> OK, so it seems like this is impossible without registration, which
> will not go through immediately.  I'll post it here instead...

Yeah, I wish it were possible for us to set the website to
automatically approve all requests for 'Observer' role (or to simply
not require it for issue filings).

> It seems like there is no way to escape a real `@' character which is
> part of a file name.  Looking at the code in
> "subversion/libsvn_subr/opt.c", this behavior hard wired with no way
> to avoid it.  It also looks like standard escaping will not be
> convenient since it's only needed for the last `@' in a filename.
> 
> The way to avoid this currently is to append a `@BASE' to the path.
> If nothing else is changed, then its probably a good idea to mention
> this in some docs.  It would be better to actually come up with a
> proper solution which can be used in scripts etc.  I guess that having
> a rule that the `@' is interpreted as part of a path if that path
> exists is impossible when considering URLs.

+1 on both.

The workaround should be documented, but the more intuitive solution
would be for "@" to quote itself.  That's what many people probably
expect anyway.

> So how about making an empty peg revision be used as the default?
> Then the only escape that will be needed to guarantee proper behavior
> in scripts is to use "path@".

We should also do that, IMHO.

> Another thing that seems like it should be working is to use "path/".
> It's questionable (IMO) whether this should be working, but it seems
> to be working for plain file paths.  However, with a `@', it fails
> with the same
> 
>   svn proplist foo@bar/
>   svn: Syntax error parsing revision 'bar'
> 
> which seems strange since the code in the above file look like it
> stops as soon as it hits a `/'.

I don't think we should be allowing trailing '/' on files, but that's
sort of a separate issue.

Do you have Observer role now?  Would you mind filing the "@" issue,
and if you're really feeling squirrely, the "/" issue too?  If so,
please refer to this mail thread from both issues.

Thanks for the report & analysis,
-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org