chiark / gitweb /
Multiple corrections to previous commit
authorCiaran Gultnieks <ciaran@ciarang.com>
Sun, 8 Jan 2012 14:13:41 +0000 (14:13 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Sun, 8 Jan 2012 14:13:41 +0000 (14:13 +0000)
common.py

index 01d2114af81ef7ac0a21d9ffbed2b8cdebf799e8..a4bb8fbb755b0bc0fd88ccda3760b377dffca86e 100644 (file)
--- a/common.py
+++ b/common.py
@@ -86,10 +86,10 @@ class vcs:
 class vcs_git(vcs):
 
     def checkrepo(self):
-        p = subprocess.Popen('git', 'rev-parse', '--show-toplevel',
-                stdout=subprocess.PIPE)
+        p = subprocess.Popen(['git', 'rev-parse', '--show-toplevel'],
+                stdout=subprocess.PIPE, cwd=self.local)
         result = p.communicate()[0].rstrip()
-        if not self.local.endswith(result):
+        if not result.endswith(self.local):
             raise VCSException('Repository mismatch')
 
     def clone(self):