From 3b21dced3ab65b8fd309b5e51cd0c79ce32a57b5 Mon Sep 17 00:00:00 2001 From: David Trowbridge Date: Sun, 27 Sep 2009 16:28:40 -0700 Subject: Support creating diffs with multiple files when using --revision-range When creating an SVN diff for a remote repository using --revision-range and passing in specific filenames, post-review would only get the first file as the diff. This is because it was using the arg as the base path. This change makes it treat the arg as a file list if it's more than one item long. Fixes bug 1162 --- rbtools/postreview.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rbtools/postreview.py b/rbtools/postreview.py index 4411e86..fd98e7e 100755 --- a/rbtools/postreview.py +++ b/rbtools/postreview.py @@ -1118,8 +1118,11 @@ class SVNClient(SCMClient): revisions.append('HEAD') # if a new path was supplied at the command line, set it - if len(args): + files = [] + if len(args) == 1: repository_info.set_base_path(args[0]) + elif len(args) > 1: + files = args url = repository_info.path + repository_info.base_path @@ -1127,7 +1130,7 @@ class SVNClient(SCMClient): new_url = url + '@' + revisions[1] return self.do_diff(["svn", "diff", "--diff-cmd=diff", old_url, - new_url], + new_url] + files, repository_info) # Otherwise, perform the revision range diff using a working copy else: -- cgit v1.2.3