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

[PATCH] Fix issue #1722: svn diff may missreport a revision as the working copy.

From: Alexey Dobriyan <adobriyan_at_mail.ru>
Date: 2004-12-03 20:11:40 CET

Fix issue #1722: svn diff may missreport a revision as the working copy.

* subversion/libsvn_wc/diff.c: (close_file),
* subversion/libsvn_client/diff.c: (diff_repos_wc):

If BASE < HEAD, then "diff -r BASE:HEAD" and "diff -r HEAD:BASE" should say
"(revision X)" in the second line of the diff's header, not "(working copy)".

Index: subversion/libsvn_wc/diff.c
===================================================================
--- subversion/libsvn_wc/diff.c (revision 12127)
+++ subversion/libsvn_wc/diff.c (working copy)
@@ -1184,7 +1184,8 @@
                   svn_wc__empty_file_path (b->wc_path, b->pool),
                   temp_file_path,
                   0,
- entry ? entry->revision : SVN_INVALID_REVNUM,
+ entry ? entry->revision :
+ eb->use_text_base ? eb->revnum : SVN_INVALID_REVNUM,
                   NULL,
                   pristine_mimetype,
                   apr_array_make (pool, 1, sizeof (svn_prop_t)), NULL,
Index: subversion/libsvn_client/diff.c
===================================================================
--- subversion/libsvn_client/diff.c (revision 12127)
+++ subversion/libsvn_client/diff.c (working copy)
@@ -2050,6 +2050,11 @@
                             url1,
                             diff_editor, diff_edit_baton, pool));
 
+ if (rev2_is_base)
+ SVN_ERR (svn_client__get_revision_number (&callback_baton->revnum2,
+ NULL, NULL,
+ revision2, path2, pool));
+
   /* Create a txn mirror of path2; the diff editor will print
      diffs in reverse. :-) */
   SVN_ERR (svn_wc_crawl_revisions (path2, dir_access,

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 3 20:12:52 2004

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.