1
0
mirror of https://github.com/golang/go synced 2024-11-26 09:48:14 -07:00

codereview: remove unused upload_options.revision

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/60640052
This commit is contained in:
Patrick Mézard 2014-02-24 10:11:37 -05:00 committed by Russ Cox
parent b1c5bafda3
commit dd449a1cfa

View File

@ -2656,7 +2656,6 @@ def RietveldSetup(ui, repo):
upload_options.message = None upload_options.message = None
upload_options.issue = None upload_options.issue = None
upload_options.download_base = False upload_options.download_base = False
upload_options.revision = None
upload_options.send_mail = False upload_options.send_mail = False
upload_options.vcs = None upload_options.vcs = None
upload_options.server = server upload_options.server = server
@ -3435,18 +3434,16 @@ class MercurialVCS(VersionControlSystem):
cwd = os.path.normpath(os.getcwd()) cwd = os.path.normpath(os.getcwd())
assert cwd.startswith(self.repo_dir) assert cwd.startswith(self.repo_dir)
self.subdir = cwd[len(self.repo_dir):].lstrip(r"\/") self.subdir = cwd[len(self.repo_dir):].lstrip(r"\/")
if self.options.revision: mqparent, err = RunShellWithReturnCode(['hg', 'log', '--rev', 'qparent', '--template={node}'])
self.base_rev = self.options.revision if not err and mqparent != "":
self.base_rev = mqparent
else: else:
mqparent, err = RunShellWithReturnCode(['hg', 'log', '--rev', 'qparent', '--template={node}']) out = RunShell(["hg", "parents", "-q"], silent_ok=True).strip()
if not err and mqparent != "": if not out:
self.base_rev = mqparent # No revisions; use 0 to mean a repository with nothing.
else: out = "0:0"
out = RunShell(["hg", "parents", "-q"], silent_ok=True).strip() self.base_rev = out.split(':')[1].strip()
if not out:
# No revisions; use 0 to mean a repository with nothing.
out = "0:0"
self.base_rev = out.split(':')[1].strip()
def _GetRelPath(self, filename): def _GetRelPath(self, filename):
"""Get relative path of a file according to the current directory, """Get relative path of a file according to the current directory,
given its logical path in the repo.""" given its logical path in the repo."""