diff mercurial/version.py @ 6548:962eb403165b

replace usage of os.popen() with util.popen() To make this possible, I added a mode parameter to both implementations of util.popen(), defaulting to 'r' (as it does in the Python stdlib).
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 14 Apr 2008 14:34:38 +0200
parents 9cd6292abfdf
children a0a726909871
line wrap: on
line diff
--- a/mercurial/version.py	Sun Apr 13 11:31:45 2008 -0500
+++ b/mercurial/version.py	Mon Apr 14 14:34:38 2008 +0200
@@ -12,6 +12,7 @@
 import os
 import re
 import time
+import util
 
 unknown_version = 'unknown'
 remembered_version = False
@@ -48,7 +49,7 @@
     """Store version information."""
     global remembered_version
     if not version and os.path.isdir(".hg"):
-        f = os.popen("hg identify")  # use real hg installation
+        f = util.popen("hg identify")  # use real hg installation
         ident = f.read()[:-1]
         if not f.close() and ident:
             ids = ident.split(' ', 1)