# HG changeset patch # User Thomas Arendsen Hein # Date 1164231237 -3600 # Node ID 0d810798acb125f2f24f7eff27643087337d014a # Parent e9d339d5d2d79effb5591f515962a82d83a0b315 Use 'bundletype' instead of 'type' to not shadow built-in function. diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -54,7 +54,7 @@ bundletypes = { "HG10GZ": ("HG10GZ", zlib.compressobj), } -def writebundle(cg, filename, type): +def writebundle(cg, filename, bundletype): """Write a bundle file and return its filename. Existing files will not be overwritten. @@ -75,7 +75,7 @@ def writebundle(cg, filename, type): fh = os.fdopen(fd, "wb") cleanup = filename - header, compressor = bundletypes[type] + header, compressor = bundletypes[bundletype] fh.write(header) z = compressor() diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1324,8 +1324,8 @@ def incoming(ui, repo, source="default", if fname or not other.local(): # create a bundle (uncompressed if other repo is not local) cg = other.changegroup(incoming, "incoming") - type = other.local() and "HG10BZ" or "HG10UN" - fname = cleanup = changegroup.writebundle(cg, fname, type) + bundletype = other.local() and "HG10BZ" or "HG10UN" + fname = cleanup = changegroup.writebundle(cg, fname, bundletype) # keep written bundle? if opts["bundle"]: cleanup = None