]> Cypherpunks repositories - gostls13.git/commitdiff
codereview: Initialize "found" in codereview.py.
authorMiki Tebeka <miki.tebeka@gmail.com>
Fri, 16 Dec 2011 15:39:20 +0000 (10:39 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 16 Dec 2011 15:39:20 +0000 (10:39 -0500)
Fixes #2569 (hg undo crashes when CL not found).

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5489052

lib/codereview/codereview.py

index 7ab7b7e0f36beb668d2d66949a060d6771518902..3dbbb72606a970ced1f66afbe6024daa51c79656 100644 (file)
@@ -1490,6 +1490,7 @@ def clpatch_or_undo(ui, repo, clname, opts, mode):
                # Mercurial will fall over long before the change log
                # sequence numbers get to be 7 digits long.
                if re.match('^[0-9]{7,}$', clname):
+                       found = False
                        for r in hg_log(ui, repo, keyword="codereview.appspot.com/"+clname, limit=100, template="{node}\n").split():
                                rev = repo[r]
                                # Last line with a code review URL is the actual review URL.