##// END OF EJS Templates
Use 'bundletype' instead of 'type' to not shadow built-in function.
Thomas Arendsen Hein -
r3706:0d810798 default
parent child Browse files
Show More
@@ -54,7 +54,7 b' bundletypes = {'
54 "HG10GZ": ("HG10GZ", zlib.compressobj),
54 "HG10GZ": ("HG10GZ", zlib.compressobj),
55 }
55 }
56
56
57 def writebundle(cg, filename, type):
57 def writebundle(cg, filename, bundletype):
58 """Write a bundle file and return its filename.
58 """Write a bundle file and return its filename.
59
59
60 Existing files will not be overwritten.
60 Existing files will not be overwritten.
@@ -75,7 +75,7 b' def writebundle(cg, filename, type):'
75 fh = os.fdopen(fd, "wb")
75 fh = os.fdopen(fd, "wb")
76 cleanup = filename
76 cleanup = filename
77
77
78 header, compressor = bundletypes[type]
78 header, compressor = bundletypes[bundletype]
79 fh.write(header)
79 fh.write(header)
80 z = compressor()
80 z = compressor()
81
81
@@ -1324,8 +1324,8 b' def incoming(ui, repo, source="default",'
1324 if fname or not other.local():
1324 if fname or not other.local():
1325 # create a bundle (uncompressed if other repo is not local)
1325 # create a bundle (uncompressed if other repo is not local)
1326 cg = other.changegroup(incoming, "incoming")
1326 cg = other.changegroup(incoming, "incoming")
1327 type = other.local() and "HG10BZ" or "HG10UN"
1327 bundletype = other.local() and "HG10BZ" or "HG10UN"
1328 fname = cleanup = changegroup.writebundle(cg, fname, type)
1328 fname = cleanup = changegroup.writebundle(cg, fname, bundletype)
1329 # keep written bundle?
1329 # keep written bundle?
1330 if opts["bundle"]:
1330 if opts["bundle"]:
1331 cleanup = None
1331 cleanup = None
General Comments 0
You need to be logged in to leave comments. Login now