diff options
author | Russ Cox <rsc@golang.org> | 2014-10-29 12:25:24 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-10-29 12:25:24 -0400 |
commit | d6f4e5020b0dc4014a75782a72d39c99657bd659 (patch) | |
tree | e419d4f78cd1af1e45c2dde4fd84ea3dd007b19d /lib | |
parent | 8e171e196615bc40a3a804811acf768eee6b2aa8 (diff) | |
parent | 599199fd9f53dc91ccc3f29c41cc318052668f70 (diff) | |
download | go-git-d6f4e5020b0dc4014a75782a72d39c99657bd659.tar.gz |
[dev.garbage] all: merge dev.power64 (5ad5e85cfb99) into dev.garbage
The goal here is to get the big-endian fixes so that
in some upcoming code movement for write barriers
I don't make them unmergeable.
LGTM=rlh
R=rlh
CC=golang-codereviews
https://golang.org/cl/166890043
Diffstat (limited to 'lib')
-rw-r--r-- | lib/codereview/codereview.cfg | 1 | ||||
-rw-r--r-- | lib/codereview/codereview.py | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/codereview/codereview.cfg b/lib/codereview/codereview.cfg index 2801ebf8d6..43dbf3ce3b 100644 --- a/lib/codereview/codereview.cfg +++ b/lib/codereview/codereview.cfg @@ -1 +1,2 @@ defaultcc: golang-codereviews@googlegroups.com +contributors: http://go.googlecode.com/hg/CONTRIBUTORS diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index 876264584b..3aac8f43c9 100644 --- a/lib/codereview/codereview.py +++ b/lib/codereview/codereview.py @@ -3603,11 +3603,17 @@ class MercurialVCS(VersionControlSystem): if use_hg_shell: base_content = RunShell(["hg", "cat", "-r", base_rev, oldrelpath], silent_ok=True) else: - base_content = str(self.repo[base_rev][oldrelpath].data()) + try: + base_content = str(self.repo[base_rev][oldrelpath].data()) + except Exception: + pass is_binary = "\0" in base_content # Mercurial's heuristic if status != "R": - new_content = open(relpath, "rb").read() - is_binary = is_binary or "\0" in new_content + try: + new_content = open(relpath, "rb").read() + is_binary = is_binary or "\0" in new_content + except Exception: + pass if is_binary and base_content and use_hg_shell: # Fetch again without converting newlines base_content = RunShell(["hg", "cat", "-r", base_rev, oldrelpath], |