Lines Matching +full:rev +full:- +full:list
11 # notice, this list of conditions and the following disclaimer.
13 # copyright notice, this list of conditions and the following disclaimer
34 Usage summary: upload.py [options] [-- diff_options]
44 against by using the '--rev' option.
154 If False, use an in-memory cookiejar instead. Subclasses must
211 "source": "rietveld-codereview-upload",
307 content_type="application/octet-stream",
315 content_type: The Content-Type header to use.
339 req.add_header("Content-Type", content_type)
351 ## # Server Error - try again.
360 """Provides a simplified RPC-style interface for HTTP requests."""
392 # Failed to load cookies - just ignore them.
407 parser = optparse.OptionParser(usage="%prog [options] [-- diff_options]")
408 parser.add_option("-y", "--assume_yes", action="store_true",
413 group.add_option("-q", "--quiet", action="store_const", const=0,
415 group.add_option("-v", "--verbose", action="store_const", const=2,
418 group.add_option("--noisy", action="store_const", const=3,
422 group.add_option("-s", "--server", action="store", dest="server",
427 group.add_option("-e", "--email", action="store", dest="email",
430 group.add_option("-H", "--host", action="store", dest="host",
433 group.add_option("--no_cookies", action="store_false",
438 group.add_option("-d", "--description", action="store", dest="description",
441 group.add_option("-f", "--description_file", action="store",
446 group.add_option("-r", "--reviewers", action="store", dest="reviewers",
449 group.add_option("--cc", action="store", dest="cc",
454 group.add_option("-m", "--message", action="store", dest="message",
458 group.add_option("-i", "--issue", type="int", action="store",
461 group.add_option("--download_base", action="store_true",
464 "(side-by-side diffs may not work on files with CRs).")
465 group.add_option("--rev", action="store", dest="revision",
466 metavar="REV", default=None,
468 group.add_option("--send_mail", action="store_true",
496 logging.info("Using debug user %s. Override with --email" % email)
514 """Encode form fields for multipart/form-data.
526 BOUNDARY = '-M-A-G-I-C---B-O-U-N-D-A-R-Y-'
530 lines.append('--' + BOUNDARY)
531 lines.append('Content-Disposition: form-data; name="%s"' % key)
535 lines.append('--' + BOUNDARY)
536 lines.append('Content-Disposition: form-data; name="%s"; filename="%s"' %
538 lines.append('Content-Type: %s' % GetContentType(filename))
541 lines.append('--' + BOUNDARY + '--')
544 content_type = 'multipart/form-data; boundary=%s' % BOUNDARY
549 """Helper to guess the content-type from the filename."""
550 return mimetypes.guess_type(filename)[0] or 'application/octet-stream'
621 "abstract method -- subclass %s must override" % self.__class__)
624 """Return a list of files unknown to the VCS."""
626 "abstract method -- subclass %s must override" % self.__class__)
654 "abstract method -- subclass %s must override" % self.__class__)
711 StatusUpdate(" --> %s" % response_body)
719 if file_id_str.find("nobase") != -1:
749 # Cache output from "svn list -r REVNO dirname".
750 # Keys: dirname, Values: 2-tuple (output for start rev and end rev).
808 cmd += ["-r", self.options.revision]
830 'Revision': ['Revision', 'LastChangedRevision', 'Rev'],
837 'LastChangedRevision': ['LastChangedRevision', 'Rev', 'Revision'],
852 status = RunShell(["svn", "status", "--ignore-externals"], silent_ok=True)
872 status = RunShell(["svn", "status", "--ignore-externals", filename])
877 # "\n--- Changelist 'cl_name':\n". See
878 …# https://web.archive.org/web/20090918234815/svn.collab.net/repos/svn/trunk/notes/changelist-desig…
881 status_lines[1].startswith("--- Changelist")):
885 # If we have a revision to diff against we need to run "svn list"
891 cmd = ["svn", "list", "-r", self.rev_start, dirname or "."]
896 args = ["svn", "list"]
898 args += ["-r", self.rev_end]
919 # "addition-with-history". See "svn st" for more information. We need to
925 mimetype = RunShell(["svn", "propget", "svn:mime-type", filename],
940 args += ["-r", "BASE"]
941 cmd = ["svn"] + args + ["propget", "svn:mime-type", url]
973 # "svn cat -r REV delete_file.txt" doesn't work. cat requires
974 # the full URL with "@REV" appended instead of using "-r" option.
989 args += ["-r", "BASE"]
1005 # Map of filename -> hash of base file.
1010 # the diff output to include an svn-style "Index:" line as well as record
1014 gitdiff = RunShell(["git", "diff", "--full-index"] + extra_args)
1019 match = re.match(r"diff --git a/(.*) b/.*$", line)
1037 status = RunShell(["git", "ls-files", "--exclude-standard", "--others"],
1046 if hash == "0" * 40: # All-zero hash indicates no base file.
1071 self.base_rev = RunShell(["hg", "parent", "-q"]).split(':')[1].strip()
1082 cmd = ["hg", "diff", "--git", "-r", self.base_rev] + extra_args
1087 m = re.match("diff --git a/(\S+) b/(\S+)", line)
1106 """Return a list of files unknown to the VCS."""
1108 status = RunShell(["hg", "status", "--rev", self.base_rev, "-u", "."],
1125 # "hg status -C" returns two lines for moved/copied files, one otherwise
1126 out = RunShell(["hg", "status", "-C", "--rev", self.base_rev, relpath])
1140 base_content = RunShell(["hg", "cat", "-r", self.base_rev, oldrelpath],
1148 base_content = RunShell(["hg", "cat", "-r", self.base_rev, oldrelpath],
1163 A list of 2-tuple (filename, text) where text is the svn diff output
1199 Returns a list of [patch_key, filename] for each file.
1218 StatusUpdate(" --> %s" % response_body)
1242 if errno != 2: # ENOENT -- they don't have hg installed.
1253 out, returncode = RunShellWithReturnCode(["git", "rev-parse",
1254 "--is-inside-work-tree"])
1258 if errno != 2: # ENOENT -- they don't have git installed.
1274 A 2-tuple (issue id, patchset id).
1304 print "Upload server:", options.server, "(change with -s/--server)"
1311 ErrorExit("A non-empty message is required")