# # # patch "mtn.py" # from [129ee303fd073267a567dcf79c20517f3590c856] # to [10bae73eaa4b6b891d434bfcffa8ca66968b204b] # # patch "viewmtn.py" # from [828eb384d1e682db243067aaac97d9eb823cb336] # to [41ee82ea67af893f58bbd2d99f2913d96890f4a5] # ============================================================ --- mtn.py 129ee303fd073267a567dcf79c20517f3590c856 +++ mtn.py 10bae73eaa4b6b891d434bfcffa8ca66968b204b @@ -61,7 +61,6 @@ class Automate(Runner): """ def __init__(self, *args, **kwargs): Runner.__init__(*[self] + list(args), **kwargs) - debug("** a new automate instance just started **") self.lock = threading.Lock() self.process = None @@ -108,7 +107,6 @@ class Automate(Runner): for stanza in self: pass except StopIteration: - debug("got a StopIteration ok.") pass try: @@ -122,7 +120,7 @@ class Automate(Runner): def __run(self, command, args): enc = "l%d:%s" % (len(command), command) - enc += ''.join(map(lambda x: "%d:%s" % (len(x), x), args)) + 'e' + enc += ''.join(["%d:%s" % (len(x), x) for x in args]) + 'e' # number of tries to get a working mtn going.. for i in xrange(2): @@ -335,13 +333,9 @@ class Operations: class Operations: def __init__(self, runner_args): - debug ("** a new Operations just started **") self.standalone = apply(Standalone, runner_args) self.automate = apply(Automate, runner_args) - def __del__(self): - debug ( "** DESTROY operations") - def tags(self): for stanza in basic_io_from_stream(self.automate.run('tags', [])): if stanza[0] == 'tag': ============================================================ --- viewmtn.py 828eb384d1e682db243067aaac97d9eb823cb336 +++ viewmtn.py 41ee82ea67af893f58bbd2d99f2913d96890f4a5 @@ -181,9 +181,7 @@ def prettify(s): self.to_rev = to_rev def prettify(s): - return ' '.join( - map(lambda x: hq(x[0].upper() + x[1:]), - s.replace("_", " ").split(" "))) + return ' '.join([hq(x[0].upper() + x[1:]) for x in s.replace("_", "").split(" ")]) def certs_for_template(cert_gen): for cert in cert_gen: @@ -404,7 +402,7 @@ class BranchChanges: old_revision = stanza[1] diffs.append(Diff(mtn.Revision(old_revision), revision)) if diffs: - diffs = '| ' + ', '.join(map(lambda d: link(d).html('diff'), diffs)) + diffs = '| ' + ', '.join([link(d).html('diff') for d in diffs]) else: diffs = '' rv.append((revision, diffs, ago, mtn.Author(author), '\n'.join(changelog), shortlog, when)) @@ -704,7 +702,7 @@ class RevisionBrowse(RevisionPage): renderer.render('revisionbrowse.html', branches=branches, - branch_links=', '.join(map(lambda b: link(mtn.Branch(b)).html(), branches)), + branch_links=', '.join([link(mtn.Branch(b)).html() for b in branches]), path=path, page_title=page_title, revision=revision, @@ -771,7 +769,7 @@ def ancestry_dot(revision): hue = f(5) li = f(1) * 0.15 + 0.55 sat = f(2) * 0.5 + .5 - return ''.join(map(lambda x: "%.2x" % int(x * 256), hls_to_rgb(hue, li, sat))) + return ''.join(["%.2x" % int(x * 256) for x in hls_to_rgb(hue, li, sat)]) nodes.add(revision) for i in xrange(3):