summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Trowbridge <trowbrds@gmail.com>2009-09-27 16:28:40 -0700
committerDavid Trowbridge <trowbrds@gmail.com>2009-09-27 16:28:40 -0700
commit3b21dced3ab65b8fd309b5e51cd0c79ce32a57b5 (patch)
treecc97c27fdcd1c67b250d6fc75602df0ef3b2ff6a
parent6085ed147af85e3351c91bca1c809a0ad2598f76 (diff)
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
-rwxr-xr-xrbtools/postreview.py7
1 files 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: