--- a/mercurial/changegroup.py Sun Dec 10 16:24:21 2006 +0100
+++ b/mercurial/changegroup.py Sun Dec 10 19:41:57 2006 +0100
@@ -99,7 +99,7 @@
if cleanup is not None:
os.unlink(cleanup)
-def readbundle(fh):
+def readbundle(fh, fname):
header = fh.read(6)
if not header.startswith("HG"):
raise util.Abort(_("%s: not a Mercurial bundle file") % fname)
--- a/mercurial/commands.py Sun Dec 10 16:24:21 2006 +0100
+++ b/mercurial/commands.py Sun Dec 10 19:41:57 2006 +0100
@@ -2474,7 +2474,7 @@
Apply a compressed changegroup file generated by the bundle
command.
"""
- gen = changegroup.readbundle(urllib.urlopen(fname))
+ gen = changegroup.readbundle(urllib.urlopen(fname), fname)
modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname)
return postincoming(ui, repo, modheads, opts['update'])
--- a/mercurial/statichttprepo.py Sun Dec 10 16:24:21 2006 +0100
+++ b/mercurial/statichttprepo.py Sun Dec 10 19:41:57 2006 +0100
@@ -10,7 +10,7 @@
from demandload import *
from i18n import gettext as _
demandload(globals(), "changelog filelog httprangereader")
-demandload(globals(), "localrepo manifest os urllib urllib2 util")
+demandload(globals(), "repo localrepo manifest os urllib urllib2 util")
class rangereader(httprangereader.httprangereader):
def read(self, size=None):
--- a/mercurial/util.py Sun Dec 10 16:24:21 2006 +0100
+++ b/mercurial/util.py Sun Dec 10 19:41:57 2006 +0100
@@ -902,7 +902,7 @@
The return value of a util.fstat(f) may be passed as the st argument.
"""
if st is None:
- st = fstat(f)
+ st = fstat(fp)
return st.st_uid == os.getuid()
def _buildencodefun():