Merge with crew-stable
authorPatrick Mezard <pmezard@gmail.com>
Sun, 26 Aug 2007 19:13:24 +0200
changeset 5247 20770c5d41e0
parent 5246 7d3dcdd92a1a (current diff)
parent 5220 9d7052f17d77 (diff)
child 5248 5517aa5aafb0
Merge with crew-stable
hgext/convert/git.py
--- a/hgext/convert/git.py	Sun Aug 26 16:49:26 2007 +0200
+++ b/hgext/convert/git.py	Sun Aug 26 19:13:24 2007 +0200
@@ -1,6 +1,7 @@
 # git support for the convert extension
 
 import os
+from mercurial import util
 
 from common import NoRepo, commit, converter_source
 
@@ -41,7 +42,8 @@
 
     def catfile(self, rev, type):
         if rev == "0" * 40: raise IOError()
-        fh = self.gitcmd("git-cat-file %s %s 2>/dev/null" % (type, rev))
+        fh = self.gitcmd("git-cat-file %s %s 2>%s" % (type, rev,
+                                                      util.nulldev))
         return fh.read()
 
     def getfile(self, name, rev):
@@ -101,7 +103,8 @@
 
     def gettags(self):
         tags = {}
-        fh = self.gitcmd('git-ls-remote --tags "%s" 2>/dev/null' % self.path)
+        fh = self.gitcmd('git-ls-remote --tags "%s" 2>%s' % (self.path,
+                                                             util.nulldev))
         prefix = 'refs/tags/'
         for line in fh:
             line = line.strip()