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

Re: Peg Revision Syntax

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: 2007-01-03 18:27:40 CET

C. Michael Pilato wrote:
> Hyrum K. Wright wrote:
>> Index: subversion/libsvn_client/revisions.c
>> ===================================================================
>> --- subversion/libsvn_client/revisions.c (revision 22879)
>> +++ subversion/libsvn_client/revisions.c (working copy)
>> @@ -140,3 +140,24 @@
>> else
>> return TRUE;
>> }
>> +
>> +
>> +svn_error_t *
>> +svn_client__resolve_revisions(svn_opt_revision_t *peg_rev,
>> + svn_opt_revision_t *op_rev,
>> + svn_boolean_t is_url)
>> +{
>> + if (peg_rev->kind == svn_opt_revision_unspecified)
>> + {
>> + if (is_url)
>> + peg_rev->kind = svn_opt_revision_head;
>> + else
>> + peg_rev->kind = svn_opt_revision_base;
>> + }
>
> This looks good.
>
>> +
>> + if (op_rev->kind == svn_opt_revision_unspecified)
>> + op_rev->kind = peg_rev->kind;
>
> But not this. If the op_rev->kind isn't specified, we *do* need to take
> the kind from the peg_rev. But depending on peg_rev's kind, might we
> also need to copy its ->value field, too?
>
> What about this?
>
> if (op_rev->kind == svn_opt_revision_unspecified)
> *op_rev = *peg_rev;

Good point, I'll use that instead. Thanks!

-Hyrum

Received on Wed Jan 3 18:27:55 2007

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