summaryrefslogtreecommitdiff
path: root/rbtools/postreview.py
diff options
context:
space:
mode:
authorChristian Hammond <chipx86@chipx86.com>2010-02-11 22:33:16 -0800
committerChristian Hammond <chipx86@chipx86.com>2010-02-11 22:33:16 -0800
commitf16aed06ad9c2a90c2e4058351357ecce4188f0f (patch)
tree8f850a832ea5432991cd0c065dea857076a8989c /rbtools/postreview.py
parentbf0f91d0852298e5d75de0db3dd41545f23d5b96 (diff)
Add support for --diff-filename when using --repository-url.
This change allows --diff-filename to be used with --repository-url. This can be used to submit a diff outside of a working checkout. Patch by Luke Robison. Reviewed at http://reviews.reviewboard.org/r/1393/
Diffstat (limited to 'rbtools/postreview.py')
-rwxr-xr-xrbtools/postreview.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/rbtools/postreview.py b/rbtools/postreview.py
index 3022726..e8ea416 100755
--- a/rbtools/postreview.py
+++ b/rbtools/postreview.py
@@ -2607,7 +2607,8 @@ def parse_options(args):
dest="repository_url", default=None,
help="the url for a repository for creating a diff "
"outside of a working copy (currently only supported "
- "by Subversion). Requires --revision-range")
+ "by Subversion). Requires either --revision-range"
+ "or --diff-filename options")
parser.add_option("-d", "--debug",
action="store_true", dest="debug", default=DEBUG,
help="display debug output")
@@ -2648,9 +2649,12 @@ def parse_options(args):
options.testing_file)
sys.exit(1)
- if options.repository_url and not options.revision_range:
- sys.stderr.write("The --repository-url option requires the "
- "--revision-range option.\n")
+ if (options.repository_url and
+ not options.revision_range and
+ not options.diff_filename):
+ sys.stderr.write("The --repository-url option requires either the "
+ "--revision-range option or the --diff-filename "
+ "option.\n")
sys.exit(1)
return args