Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(10)

Unified Diff: static/upload.py

Issue 955: Allow upload with no base (Closed) SVN Base: http://rietveld.googlecode.com/svn/trunk/
Patch Set: I incorporated the changes as per your comments in previous patch. Created 3 months, 3 weeks ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
Index: static/upload.py
===================================================================
--- static/upload.py (revision 103)
+++ static/upload.py (working copy)
@@ -361,6 +361,9 @@
parser.add_option("-i", "--issue", type="int", action="store",
metavar="ISSUE", default=None,
help="Issue number to which to add. Defaults to new issue.")
+parser.add_option("-l", "--local_base", action="store_true",
+ dest="local_base", default=False,
+ help="base file will be uploaded")
def GetRpcServer(options):
@@ -495,7 +498,10 @@
logging.getLogger().setLevel(logging.DEBUG)
elif verbosity >= 2:
logging.getLogger().setLevel(logging.INFO)
- base = GuessBase()
+ if options.local_base:
+ base = None
+ else:
+ base = GuessBase()
CheckForUnknownFiles()
data = RunShell("svn diff", args)
count = 0
@@ -513,7 +519,9 @@
if not message:
ErrorExit("A non-empty message is required")
rpc_server = GetRpcServer(options)
- form_fields = [("base", base), ("subject", message)]
+ form_fields = [("subject", message)]
+ if base is not None:
+ form_fields.append(("base", base))
if options.issue:
form_fields.append(("issue", str(options.issue)))
if options.email:
« codereview/views.py ('k') | no next file »

Powered by Google App Engine
This is Rietveld r305