]> Cypherpunks repositories - gostls13.git/commitdiff
codereview: fix initialization check
authorRuss Cox <rsc@golang.org>
Sun, 29 Jan 2012 19:04:24 +0000 (14:04 -0500)
committerRuss Cox <rsc@golang.org>
Sun, 29 Jan 2012 19:04:24 +0000 (14:04 -0500)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5596046

lib/codereview/codereview.py

index 1957d7cbb77f8d97f639c4c1f4299bac359f911c..7630cdfe5683ebd3da7f7f1a071d319cef8897df 100644 (file)
@@ -2177,9 +2177,12 @@ def reposetup(ui, repo):
        global codereview_disabled
        global defaultcc
        
+       # reposetup gets called both for the local repository
+       # and also for any repository we are pulling or pushing to.
+       # Only initialize the first time.
        global codereview_init
        if codereview_init:
-               raise hg_util.Abort("codereview extension initialized twice")
+               return
        codereview_init = True
        
        remote = ui.config("paths", "default", "")