[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svn_opt_parse_path peg revision inconsistency

From: Blair Zajac <blair_at_orcaware.com>
Date: 2007-10-16 23:21:06 CEST

If you pass a path to svn_opt_parse_path with no trailing @, then the revision
is svn_opt_revision_unspecified:

   /* Didn't find an @-sign. */
   *truepath = svn_path_canonicalize(path, pool);
   rev->kind = svn_opt_revision_unspecified;

but if you have path with a trailing @ just to protect another @ earlier in the
path, then it's set to either svn_opt_revision_head or svn_opt_revision_base
based if the path is an URL or not:

           if (path[i + 1] == '\0') /* looking at empty peg revision */
             {
               ret = 0;
               start_revision.kind = is_url ? svn_opt_revision_head
                                            : svn_opt_revision_base;
             }

           ...
           ...

           rev->kind = start_revision.kind;
           rev->value = start_revision.value;

Shouldn't the @ protection just use svn_opt_revision_unspecified?

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 16 23:21:19 2007

This is an archived mail posted to the Subversion Dev mailing list.