[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:41:55 CET

Ben Collins-Sussman wrote:
> On 1/3/07, Hyrum K. Wright <hyrum_wright@mail.utexas.edu> wrote:
>
>> +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;
>> + }
>> +
>> + if (op_rev->kind == svn_opt_revision_unspecified)
>> + op_rev->kind = peg_rev->kind;
>> +
>> + return SVN_NO_ERROR;
>> +}
>> +
>
>
> It looks right to me! Are you thinking of making all subcommands use
> this function?

Yes, at least all the subcommands which support peg revs.

> We really need a bunch of tests for pegrev/oprevs. :-)

Agreed. Hopefully someone will write some. :)

-Hyrum

Received on Wed Jan 3 18:42:07 2007

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.