diff options
author | Christian Hammond <chipx86@chipx86.com> | 2010-02-11 22:33:16 -0800 |
---|---|---|
committer | Christian Hammond <chipx86@chipx86.com> | 2010-02-11 22:33:16 -0800 |
commit | f16aed06ad9c2a90c2e4058351357ecce4188f0f (patch) | |
tree | 8f850a832ea5432991cd0c065dea857076a8989c | |
parent | bf0f91d0852298e5d75de0db3dd41545f23d5b96 (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/
-rw-r--r-- | AUTHORS | 1 | ||||
-rwxr-xr-x | rbtools/postreview.py | 12 |
2 files changed, 9 insertions, 4 deletions
@@ -16,6 +16,7 @@ Contributors: * Jeremy Bettis * Lepton Wu * Luke Lu + * Luke Robison * Matthew Woehlke * Mike Crute * Paul Scott 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 |