# HG changeset patch # User Benoit Boissinot # Date 1165776117 -3600 # Node ID 8c24b6fd5866455ea5670216f5646168005182ef # Parent 7c12958eba263d92cb2a42f14a7bb6aaddb188aa fix errors spotted by pychecker diff -r 7c12958eba26 -r 8c24b6fd5866 mercurial/changegroup.py --- 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) diff -r 7c12958eba26 -r 8c24b6fd5866 mercurial/commands.py --- 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']) diff -r 7c12958eba26 -r 8c24b6fd5866 mercurial/statichttprepo.py --- 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): diff -r 7c12958eba26 -r 8c24b6fd5866 mercurial/util.py --- 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():