hgext/convert/git.py
changeset 5481 003d1f174fe1
parent 5404 67d3daa8ac42
child 5498 4d38e6970b8c
child 5521 03496d4fa509
--- a/hgext/convert/git.py	Tue Oct 30 16:54:25 2007 -0700
+++ b/hgext/convert/git.py	Thu Nov 01 12:05:14 2007 +0100
@@ -14,7 +14,7 @@
             prevgitdir = os.environ.get('GIT_DIR')
             os.environ['GIT_DIR'] = self.path
             try:
-                return os.popen(s)
+                return util.popen(s)
             finally:
                 if prevgitdir is None:
                     del os.environ['GIT_DIR']
@@ -22,7 +22,7 @@
                     os.environ['GIT_DIR'] = prevgitdir
     else:
         def gitcmd(self, s):
-            return os.popen('GIT_DIR=%s %s' % (self.path, s))
+            return util.popen('GIT_DIR=%s %s' % (self.path, s))
 
     def __init__(self, ui, path, rev=None):
         super(convert_git, self).__init__(ui, path, rev=rev)
@@ -42,8 +42,7 @@
 
     def catfile(self, rev, type):
         if rev == "0" * 40: raise IOError()
-        fh = self.gitcmd("git-cat-file %s %s 2>%s" % (type, rev,
-                                                      util.nulldev))
+        fh = self.gitcmd("git-cat-file %s %s" % (type, rev))
         return fh.read()
 
     def getfile(self, name, rev):
@@ -108,8 +107,7 @@
 
     def gettags(self):
         tags = {}
-        fh = self.gitcmd('git-ls-remote --tags "%s" 2>%s' % (self.path,
-                                                             util.nulldev))
+        fh = self.gitcmd('git-ls-remote --tags "%s"' % self.path)
         prefix = 'refs/tags/'
         for line in fh:
             line = line.strip()