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

[PATCH] svn log URL fix (revised edition)

From: David Summers <david_at_summersoft.fay.ar.us>
Date: 2002-02-14 08:24:37 CET

I made the changes that people suggested, here is the revised edition:

* ./subversion/libsvn_client/log.c (svn_client_log): Fixed svn log command
  to check to see if the argument passed is a URL, and if so to skip the
  check to see if it is a working copy.

Index: ./subversion/libsvn_client/log.c
===================================================================
--- ./subversion/libsvn_client/log.c
+++ ./subversion/libsvn_client/log.c Sat Feb 9 13:21:17 2002
@@ -62,6 +62,8 @@
   svn_stringbuf_t *basename;
   apr_array_header_t *condensed_targets;
   svn_revnum_t start_revnum, end_revnum;
+ svn_string_t path_str;
+ svn_stringbuf_t *path_strbuf;
 
   if ((start->kind == svn_client_revision_unspecified)
       || (end->kind == svn_client_revision_unspecified))
@@ -74,17 +76,28 @@
   SVN_ERR (svn_path_condense_targets (&basename, &condensed_targets,
                                       targets, pool));
 
- /* Get full URL from the common path, carefully. */
- SVN_ERR (svn_wc_entry (&entry, basename, pool));
- if (! entry)
- return svn_error_createf
- (SVN_ERR_UNVERSIONED_RESOURCE, 0, NULL, pool,
- "svn_client_log: %s is not under revision control", basename->data);
- if (! entry->url)
- return svn_error_createf
- (SVN_ERR_ENTRY_MISSING_URL, 0, NULL, pool,
- "svn_client_log: entry '%s' has no URL", basename->data);
- URL = svn_stringbuf_dup (entry->url, pool);
+ path_strbuf = ((svn_stringbuf_t **) targets->elts)[0];
+ path_str.data = path_strbuf->data;
+ path_str.len = path_strbuf->len;
+
+ if (svn_path_is_url (&path_str))
+ {
+ URL = svn_stringbuf_dup (path_strbuf, pool);
+ }
+ else
+ {
+ /* Get full URL from the common path, carefully. */
+ SVN_ERR (svn_wc_entry (&entry, basename, pool));
+ if (! entry)
+ return svn_error_createf
+ (SVN_ERR_UNVERSIONED_RESOURCE, 0, NULL, pool,
+ "svn_client_log: %s is not under revision control", basename->data);
+ if (! entry->url)
+ return svn_error_createf
+ (SVN_ERR_ENTRY_MISSING_URL, 0, NULL, pool,
+ "svn_client_log: entry '%s' has no URL", basename->data);
+ URL = svn_stringbuf_dup (entry->url, pool);
+ }
 
   /* Get the RA library that handles URL. */
   SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));

-- 
David Wayne Summers          "Linux: Because reboots are for upgrades!"
david_at_summersoft.fay.ar.us   PGP Key: http://summersoft.fay.ar.us/~david/pgp.txt
PGP Key fingerprint =  C0 E0 4F 50 DD A9 B6 2B  60 A1 31 7E D2 28 6D A8 
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:07 2006

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.