diff mercurial/commands.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 92ba3cd55be6
children ba0a1701c81a
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Oct 30 18:48:44 2012 -0500
+++ b/mercurial/commands.py	Wed Oct 17 21:30:08 2012 -0700
@@ -10,7 +10,7 @@
 from i18n import _, gettext
 import os, re, difflib, time, tempfile, errno
 import hg, scmutil, util, revlog, extensions, copies, error, bookmarks
-import patch, help, url, encoding, templatekw, discovery
+import patch, help, encoding, templatekw, discovery
 import archival, changegroup, cmdutil, hbisect
 import sshserver, hgweb, hgweb.server, commandserver
 import merge as mergemod
@@ -1590,7 +1590,7 @@
 @command('debugbundle', [('a', 'all', None, _('show all details'))], _('FILE'))
 def debugbundle(ui, bundlepath, all=None, **opts):
     """lists the contents of a bundle"""
-    f = url.open(ui, bundlepath)
+    f = hg.openpath(ui, bundlepath)
     try:
         gen = changegroup.readbundle(f, bundlepath)
         if all:
@@ -3856,7 +3856,7 @@
                 else:
                     patchurl = os.path.join(base, patchurl)
                     ui.status(_('applying %s\n') % patchurl)
-                    patchfile = url.open(ui, patchurl)
+                    patchfile = hg.openpath(ui, patchurl)
 
                 haspatch = False
                 for hunk in patch.split(patchfile):
@@ -5804,7 +5804,7 @@
     wc = repo['.']
     try:
         for fname in fnames:
-            f = url.open(ui, fname)
+            f = hg.openpath(ui, fname)
             gen = changegroup.readbundle(f, fname)
             modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname)
     finally: