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

Re: svn commit: r23538 - in trunk/subversion: include libsvn_client libsvn_wc

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: 2007-03-02 04:32:54 CET

Peter Lundblad wrote:
> Hi,
>
> hwright@tigris.org writes:
>> Modified: trunk/subversion/include/svn_wc.h
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/svn_wc.h?pathrev=23538&r1=23537&r2=23538
>> ==============================================================================
>> --- trunk/subversion/include/svn_wc.h (original)
>> +++ trunk/subversion/include/svn_wc.h Thu Mar 1 12:53:06 2007
>> @@ -474,8 +474,10 @@
>> /** One external item. This usually represents one line from an
>> * svn:externals description but with the path and URL
>> * canonicalized.
>> + *
>> + * @since New in 1.5.
>> */
>> -typedef struct svn_wc_external_item_t
>> +typedef struct svn_wc_external_item2_t
>> {
>> /** The name of the subdirectory into which this external should be
>> checked out. This is relative to the parent directory that
>> @@ -492,23 +494,55 @@
>> svn_opt_revision_head. */
>> svn_opt_revision_t revision;
>>
>> -} svn_wc_external_item_t;
>> + /** The peg revision to use when checking out. THe only valid kinds are
>> + svn_opt_revision_number, svn_opt_revision_date, and
>> + svn_opt_revision_head. */
>> + svn_opt_revision_t peg_revision;
>>
>> +} svn_wc_external_item2_t;
>> +
>
>
> Does it make sese to document this as extensible in the future, so we
> don't have to rev it to add a field, ossibly adding a factory function
> to create the struct if needed? That has proven useful before;)

That does make sense. I'll make the change.

While doing so, I found this function tucked in libsvn_client/externals.c:

static svn_boolean_t
compare_external_items(svn_wc_external_item2_t *new_item,
                       svn_wc_external_item2_t *old_item)
{
  if ((strcmp(new_item->target_dir, old_item->target_dir) != 0)
      || (strcmp(new_item->url, old_item->url) != 0)
      || (! svn_client__compare_revisions(&(new_item->revision),
                                          &(old_item->revision)))
      || (! svn_client__compare_revisions(&(new_item->peg_revision),
                                          &(old_item->peg_revision))))
    return FALSE;

  /* Else. */
  return TRUE;
}

Should it be moved to libsvn_wc and exposed through the API? (Perhaps
svn_wc_external_item_eq() ?) If we do expand the external_item
structure again, equivalence checking should probably extend to the new
fields as well.

-Hyrum

Received on Fri Mar 2 04:33:24 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.