Commit 94998564 authored by Russ Cox's avatar Russ Cox

codereview: fix upload of hg copied file

Fixes #1134.

R=r, r2
CC=golang-dev
https://golang.org/cl/2264043
parent 5474e166
...@@ -2600,7 +2600,7 @@ class MercurialVCS(VersionControlSystem): ...@@ -2600,7 +2600,7 @@ class MercurialVCS(VersionControlSystem):
if use_hg_shell: if use_hg_shell:
base_content = RunShell(["hg", "cat", "-r", base_rev, oldrelpath], silent_ok=True) base_content = RunShell(["hg", "cat", "-r", base_rev, oldrelpath], silent_ok=True)
else: else:
base_content = str(self.repo[base_rev][filename].data()) base_content = str(self.repo[base_rev][oldrelpath].data())
is_binary = "\0" in base_content # Mercurial's heuristic is_binary = "\0" in base_content # Mercurial's heuristic
if status != "R": if status != "R":
new_content = open(relpath, "rb").read() new_content = open(relpath, "rb").read()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment