From 03c008bcb2ab64d5ca2adbd44e3369077cc46655 Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Sat, 8 Nov 2014 17:12:23 -0800 Subject: [PATCH] lib/codereview: fix with more recent hg revisions. I've Mercurial version 3.2 and hg submit fails with: File "/home/agl/devel/go/lib/codereview/codereview.py", line 3567, in get_hg_status ret = hg_commands.status(fui, self.repo, *[], **{'rev': [rev], 'copies': True}) File "/usr/lib/python2.7/site-packages/mercurial/commands.py", line 5714, in status fm = ui.formatter('status', opts) File "/home/agl/devel/go/lib/codereview/codereview.py", line 3464, in formatter return plainformatter(self, topic, opts) File "/usr/lib/python2.7/site-packages/mercurial/formatter.py", line 57, in __init__ if ui.debugflag: AttributeError: 'FakeMercurialUI' object has no attribute 'debugflag' This change dumbly adds a boolean debugflag and that seems to work. LGTM=minux R=rsc, minux CC=golang-codereviews https://golang.org/cl/167410043 --- lib/codereview/codereview.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index fdf11d1f48f..b8814e1022e 100644 --- a/lib/codereview/codereview.py +++ b/lib/codereview/codereview.py @@ -3451,6 +3451,7 @@ class FakeMercurialUI(object): def __init__(self): self.quiet = True self.output = '' + self.debugflag = False def write(self, *args, **opts): self.output += ' '.join(args)