]> Cypherpunks repositories - gostls13.git/commitdiff
codereview: do not gofmt deleted files
authorRuss Cox <rsc@golang.org>
Fri, 4 Dec 2009 01:23:11 +0000 (17:23 -0800)
committerRuss Cox <rsc@golang.org>
Fri, 4 Dec 2009 01:23:11 +0000 (17:23 -0800)
R=r
https://golang.org/cl/164083

lib/codereview/codereview.py

index 5daad8ee79e988924c0aea2ceca2aa7b5d26c56c..fa535d634d49574950819e794ca46b007f76ab6c 100644 (file)
@@ -622,6 +622,7 @@ def CheckGofmt(ui, repo, files, just_warn=False):
                return
        cwd = os.getcwd()
        files = [RelativePath(repo.root + '/' + f, cwd) for f in files]
+       files = [f for f in files if os.access(f, 0)]
        try:
                cmd = subprocess.Popen(["gofmt", "-l"] + files, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
                cmd.stdin.close()