You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Marco Yu <ma...@mentor.com> on 2006/10/07 00:21:00 UTC
Patch for issue 2349
Hi,
We use an url in the form of svn+ssh://foo@svnsvr/. svn ls prints
svn: Syntax error parsing revision 'jediweb.sje.mentorg.com'
Basically the parser confuses the @ in the URL for a pegged revision
syntax. Here's a patch I use to fix this problem. Essentially I just
disable the error message when it thinks it should expect a revision
number and fallback to have svn try the other syntax.
Is this an appropriate fix?
Thanks,
Marco
***
/home/jedi/replica/src/subversion/subversion-1.3.1/subversion/libsvn_subr/opt.c 2006-09-28 14:52:10.000000000 -0700
--- opt.c 2006-01-18 11:47:55.000000000 -0800
***************
*** 526,540 ****
}
if (ret || end_revision.kind !=
svn_opt_revision_unspecified)
! {
! /* return svn_error_createf (SVN_ERR_CL_ARG_PARSING_ERROR,
NULL,
_("Syntax error parsing revision
'%s'"), path + i + 1);
- */
- *truepath = svn_path_canonicalize (path, pool);
- rev->kind = svn_opt_revision_unspecified;
- return SVN_NO_ERROR;
- }
*truepath = svn_path_canonicalize (apr_pstrndup (pool, path,
i),
pool);
--- 526,534 ----
}
if (ret || end_revision.kind !=
svn_opt_revision_unspecified)
! return svn_error_createf (SVN_ERR_CL_ARG_PARSING_ERROR,
NULL,
_("Syntax error parsing revision
'%s'"), path + i + 1);
*truepath = svn_path_canonicalize (apr_pstrndup (pool, path,
i),
pool);
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Patch for issue 2349
Posted by Alan Barrett <ap...@cequrux.com>.
On Sun, 08 Oct 2006, Karl Fogel wrote:
> Marco Yu <ma...@mentor.com> writes:
> > We use an url in the form of svn+ssh://foo@svnsvr/. svn ls prints
> >
> > svn: Syntax error parsing revision 'jediweb.sje.mentorg.com'
> >
> > Basically the parser confuses the @ in the URL for a pegged revision
I think it's a bug for "@" characters anywhere other than after the
last "/" to be considered as introducing peg revisions. Even if you
disagree with that proposition, I hope you'll agree that it's a bug for
"@" before the third slash in a "scheme://authority/path" URL to be
treated as a pegrev introducer.
> Subversion has a run-time fix, just append "@" to the URL. Would that
> work for you?
I didn't know about that, but I wouldn't call it a "fix"; it's a
workaround.
> I tentatively think I'm not in favor of this change, because it
> complicates our peg-revision syntax semantics, and may lock us out of
> future extensions of revision syntax (e.g., there are already some
> non-numeric revision strings, such as "BASE", "HEAD", etc).
Do you want to reserve the possibility that "/" might one day be a
valid character *inside* a peg revision specifier? I would find that
confusing; I think that treating "/" as a path separator should have
higher priority than treating "@" as a peg revision introducer.
--apb (Alan Barrett)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Patch for issue 2349
Posted by Karl Fogel <kf...@google.com>.
Marco Yu <ma...@mentor.com> writes:
> We use an url in the form of svn+ssh://foo@svnsvr/. svn ls prints
>
> svn: Syntax error parsing revision 'jediweb.sje.mentorg.com'
>
> Basically the parser confuses the @ in the URL for a pegged revision
> syntax. Here's a patch I use to fix this problem. Essentially I just
> disable the error message when it thinks it should expect a revision
> number and fallback to have svn try the other syntax.
>
> Is this an appropriate fix?
Subversion has a run-time fix, just append "@" to the URL. Would that
work for you?
See http://subversion.tigris.org/mailing-list-guidelines.html#patches
for what makes a patch easy for us to read. Short answer: log
message, and -u diff format :-). Not suggesting you repost, unless we
seriously go down the patch route here, I'm just mentioning it for
next time.
I tentatively think I'm not in favor of this change, because it
complicates our peg-revision syntax semantics, and may lock us out of
future extensions of revision syntax (e.g., there are already some
non-numeric revision strings, such as "BASE", "HEAD", etc).
Best,
-Karl
> Thanks,
>
> Marco
>
>
>
> ***
> /home/jedi/replica/src/subversion/subversion-1.3.1/subversion/libsvn_subr/opt.c 2006-09-28 14:52:10.000000000 -0700
> --- opt.c 2006-01-18 11:47:55.000000000 -0800
> ***************
> *** 526,540 ****
> }
>
> if (ret || end_revision.kind !=
> svn_opt_revision_unspecified)
> ! {
> ! /* return svn_error_createf (SVN_ERR_CL_ARG_PARSING_ERROR,
> NULL,
> _("Syntax error parsing revision
> '%s'"), path + i + 1);
> - */
> - *truepath = svn_path_canonicalize (path, pool);
> - rev->kind = svn_opt_revision_unspecified;
> - return SVN_NO_ERROR;
> - }
>
> *truepath = svn_path_canonicalize (apr_pstrndup (pool, path,
> i),
> pool);
> --- 526,534 ----
> }
>
> if (ret || end_revision.kind !=
> svn_opt_revision_unspecified)
> ! return svn_error_createf (SVN_ERR_CL_ARG_PARSING_ERROR,
> NULL,
> _("Syntax error parsing revision
> '%s'"), path + i + 1);
>
> *truepath = svn_path_canonicalize (apr_pstrndup (pool, path,
> i),
> pool);
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org