##// END OF EJS Templates
fix errors spotted by pychecker
Benoit Boissinot -
r3859:8c24b6fd default
parent child Browse files
Show More
@@ -99,7 +99,7 b' def writebundle(cg, filename, bundletype'
99 if cleanup is not None:
99 if cleanup is not None:
100 os.unlink(cleanup)
100 os.unlink(cleanup)
101
101
102 def readbundle(fh):
102 def readbundle(fh, fname):
103 header = fh.read(6)
103 header = fh.read(6)
104 if not header.startswith("HG"):
104 if not header.startswith("HG"):
105 raise util.Abort(_("%s: not a Mercurial bundle file") % fname)
105 raise util.Abort(_("%s: not a Mercurial bundle file") % fname)
@@ -2474,7 +2474,7 b' def unbundle(ui, repo, fname, **opts):'
2474 Apply a compressed changegroup file generated by the bundle
2474 Apply a compressed changegroup file generated by the bundle
2475 command.
2475 command.
2476 """
2476 """
2477 gen = changegroup.readbundle(urllib.urlopen(fname))
2477 gen = changegroup.readbundle(urllib.urlopen(fname), fname)
2478 modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname)
2478 modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname)
2479 return postincoming(ui, repo, modheads, opts['update'])
2479 return postincoming(ui, repo, modheads, opts['update'])
2480
2480
@@ -10,7 +10,7 b''
10 from demandload import *
10 from demandload import *
11 from i18n import gettext as _
11 from i18n import gettext as _
12 demandload(globals(), "changelog filelog httprangereader")
12 demandload(globals(), "changelog filelog httprangereader")
13 demandload(globals(), "localrepo manifest os urllib urllib2 util")
13 demandload(globals(), "repo localrepo manifest os urllib urllib2 util")
14
14
15 class rangereader(httprangereader.httprangereader):
15 class rangereader(httprangereader.httprangereader):
16 def read(self, size=None):
16 def read(self, size=None):
@@ -902,7 +902,7 b' else:'
902 The return value of a util.fstat(f) may be passed as the st argument.
902 The return value of a util.fstat(f) may be passed as the st argument.
903 """
903 """
904 if st is None:
904 if st is None:
905 st = fstat(f)
905 st = fstat(fp)
906 return st.st_uid == os.getuid()
906 return st.st_uid == os.getuid()
907
907
908 def _buildencodefun():
908 def _buildencodefun():
General Comments 0
You need to be logged in to leave comments. Login now