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

[PATCH] Issue 2333 "diff URL1 URL2 not reverse of diff URL2 URL1"

From: Stephen Butler <sbutler_at_elego.de>
Date: Fri, 06 Aug 2010 12:21:27 +0200

Hi folks,

here's a patch that fixes issue 2333. When doing a repos-repos diff,
Subversion has always skipped the content of a deleted directory.
All diff tests now pass, except for those that try to diff locally-
added files.

Does anyone have a problem with my changes to the repos_diff layer?
Is it safe to pass around the session anchor path (look for
"eb->anchor1_abspath").

It'll be nice to tell users that diff does what it says on the box!

Cheers,
Steve

[[[
Fix issue 2333 "diff URL1 URL2 not reverse of diff URL2 URL1". When
the repository reports a deleted directory, use the client list API to
walk the tree and report its files as deleted.

* subversion/libsvn_client/repos_diff.c
   (edit_baton): Add a boolean field to control whether this workaround
    should be used. Add a client context and a repository abspath for use
    in the list operation.
   (diff_deleted_tree_cb): New list callback function.
   (delete_entry): Call svn_client_list2 if needed.
   (svn_client__get_diff_editor): Set all the new edit_baton fields.

* subversion/libsvn_client/client.h
   (svn_client__get_diff_editor): Declare args for new edit_baton fields.

* subversion/libsvn_client/diff.c
   (diff_repos_repos_t): Add a repository abspath field.
   (diff_prepare_repos_repos): Calculate the repository abspath. Pass it
    and the client context to svn_client__get_diff_editor.

* subversion/libsvn_client/merge.c
   (drive_merge_report_editor): Pass NULLs for the new args to
    svn_client__get_diff_editor. No behavior change.

* subversion/tests/cmdline/diff_tests.py
   (diff_multiple_reverse): Remove a comment that made this test the moral
    equivalent of an XFAIL.
   (diff_renamed_dir): Add more test cases. Correct the expectations for
    diffs within a moved directory.
   (test_list): Remove XFail from diff_renamed_dir.
]]]

-- 
Stephen Butler | Software Developer
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
fon: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194

Received on 2010-08-06 12:22:11 CEST

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.