diff contrib/synthrepo.py @ 17887:0e2846b2482c stable

url: use open and not url.open for local files (issue3624)
author Siddharth Agarwal <sid0@fb.com>
date Wed, 17 Oct 2012 21:30:08 -0700
parents 619068c280fd
children 9196638b08ce
line wrap: on
line diff
--- a/contrib/synthrepo.py	Tue Oct 30 18:48:44 2012 -0500
+++ b/contrib/synthrepo.py	Wed Oct 17 21:30:08 2012 -0700
@@ -36,7 +36,7 @@
 '''
 
 import bisect, collections, json, os, random, time
-from mercurial import cmdutil, context, patch, scmutil, url, util
+from mercurial import cmdutil, context, patch, scmutil, url, util, hg
 from mercurial.i18n import _
 from mercurial.node import nullrev, nullid
 
@@ -224,7 +224,7 @@
     path to an alternate dictionary to use.
     '''
     try:
-        fp = url.open(ui, descpath)
+        fp = hg.openpath(ui, descpath)
     except Exception, err:
         raise util.Abort('%s: %s' % (descpath, err[0].strerror))
     desc = json.load(fp)