# # # patch "common.py" # from [19a25a6ea138661ce01454ec58c1ea20fcd884aa] # to [f77fd516022cfc46ebfc2070554f08eb36e1cee3] # # patch "diff.psp" # from [4c495def64a5c64f8da213eaa870663f859b404e] # to [5bccce0a3df7e5bf14ac23897359aec37593aee3] # # patch "file.psp" # from [f19f6fefe38a97ca636705f070f4535534947a48] # to [eb1d7cf5c64b63b5e551e28c73d774fedc670aeb] # # patch "monotone.py" # from [f8211dca24b2b5e48c89d5e88d95388a683282b7] # to [7a49d40e757446fa186a98730c7a1c0ac8f4250f] # # patch "wrapper.py" # from [dbbc871353ddfec1b56bf57b743a6b5cd70688c2] # to [778e7d848c775e907bd5e89e4124dd7728a25a54] # ============================================================ --- common.py 19a25a6ea138661ce01454ec58c1ea20fcd884aa +++ common.py f77fd516022cfc46ebfc2070554f08eb36e1cee3 @@ -175,7 +175,7 @@ def is_binary(str): # hm, later on might make this be some javascript that does an call back to the server. # then could have a pull down to let people choose which enscript encoding to use, and # just update the DOM with the new data. -def colourise_code(req, hq, path, contents, filter=None): +def colourise_code(req, hq, matching_file_id, path, contents, filter=None): mime_type = mimetypes.guess_type(path)[0] if mime_type == None: mime_type = 'text/plain' if mime_type == 'image/png' or mime_type == 'image/jpeg' or mime_type == 'image/gif': @@ -206,7 +206,7 @@ def colourise_code(req, hq, path, conten req.write('''
') ============================================================ --- diff.psp 4c495def64a5c64f8da213eaa870663f859b404e +++ diff.psp 5bccce0a3df7e5bf14ac23897359aec37593aee3 @@ -58,7 +58,7 @@ contents = mt.diff(id1, id2, files) ### this means having _the entire file_ in memory ### which is pointless and dumb. contents = mt.diff(id1, id2, files) -colourise_code(req, hq, 'a.diff', contents, filter='diffu') +colourise_code(req, hq, id1, 'a.diff', contents, filter='diffu') req.write(template.footer(info)) ============================================================ --- file.psp f19f6fefe38a97ca636705f070f4535534947a48 +++ file.psp eb1d7cf5c64b63b5e551e28c73d774fedc670aeb @@ -71,7 +71,7 @@ contents = mt.file(matching_file_id) ### this means having _the entire file_ in memory ### which is pointless and dumb. contents = mt.file(matching_file_id) -colourise_code(req, hq, path, contents) +colourise_code(req, hq, matching_file_id, path, contents) req.write(template.footer(info)) ============================================================ --- monotone.py f8211dca24b2b5e48c89d5e88d95388a683282b7 +++ monotone.py 7a49d40e757446fa186a98730c7a1c0ac8f4250f @@ -285,7 +285,7 @@ class Monotone: def log(self, ids, limit=0): rv = [] entry = None - command = self.base_command + " --merges log " + ' '.join(map(lambda x: '-r ' + pipes.quote(x), ids)) + command = self.base_command + " log " + ' '.join(map(lambda x: '-r ' + pipes.quote(x), ids)) if limit > 0: command += " --last=%d" % (limit) iterator = utility.iter_command(command) for line in iterator: ============================================================ --- wrapper.py dbbc871353ddfec1b56bf57b743a6b5cd70688c2 +++ wrapper.py 778e7d848c775e907bd5e89e4124dd7728a25a54 @@ -102,7 +102,7 @@ def get_json(req, vars): rv['type'] = 'manifest' dir_seen = {} # would use a set, but need python2.4 really rv['file_count'] = 0 - for file_id, filename in ((t[3], t[1]) for t in mt.manifest_of(query['id'])['file']): + for file_id, filename in [(t[3], t[1]) for t in mt.manifest_of(query['id'])['file']]: fsp = filename.rsplit('/', 1) if len(fsp) == 2 and not dir_seen.has_key(fsp[1]): dir_seen[fsp[1]] = True @@ -136,7 +136,7 @@ def get_tar(req, vars): req.content_type = 'application/x-tar; charset=utf-8' req.headers_out["Content-Disposition"] = "attachment; filename=%s" % tar_file_name tf = tarfile.open(mode="w", fileobj=tar_file) - for fileid, filename in ((t[3], t[1]) for t in mt.manifest_of(id)['file']): + for fileid, filename in [(t[3], t[1]) for t in mt.manifest_of(id)['file']]: data = mt.file(fileid) ti = tarfile.TarInfo() ti.mode = 00700