[Pkg-bazaar-commits] ./bzr-gtk/unstable r41: restore --maxnum functionality, reflush some comments
David Allouche
david.allouche at canonical.com
Fri Apr 10 07:15:56 UTC 2009
------------------------------------------------------------
revno: 41
committer: David Allouche <david.allouche at canonical.com>
branch nick: ddaa
timestamp: Mon 2006-05-08 15:40:46 +0200
message:
restore --maxnum functionality, reflush some comments
modified:
branchwin.py
graph.py
-------------- next part --------------
=== modified file 'branchwin.py'
--- a/branchwin.py 2006-05-08 13:03:59 +0000
+++ b/branchwin.py 2006-05-08 13:40:46 +0000
@@ -256,23 +256,23 @@
last_lines = []
(self.revisions, colours, self.children, self.parent_ids,
- merge_sorted) = distances(branch, start, maxnum)
- for revision, node, lines in graph(
- self.revisions, colours, merge_sorted):
- # FIXME: at this point we should be able to show the graph order and
- # lines with no message or commit data - and then incrementally fill
- # the timestamp, committer etc data as desired.
+ merge_sorted) = distances(branch, start)
+ for (index, (revision, node, lines)) in enumerate(graph(
+ self.revisions, colours, merge_sorted)):
+ # FIXME: at this point we should be able to show the graph order
+ # and lines with no message or commit data - and then incrementally
+ # fill the timestamp, committer etc data as desired.
message = revision.message.split("\n")[0]
if revision.committer is not None:
timestamp = format_date(revision.timestamp, revision.timezone)
else:
timestamp = None
- self.model.append([ revision, node, last_lines, lines,
- message, revision.committer, timestamp ])
+ self.model.append([revision, node, last_lines, lines,
+ message, revision.committer, timestamp])
self.index[revision] = index
- index += 1
-
last_lines = lines
+ if maxnum is not None and index > maxnum:
+ break
self.set_title(branch.nick + " - bzrk")
self.treeview.set_model(self.model)
=== modified file 'graph.py'
--- a/graph.py 2006-05-08 13:03:59 +0000
+++ b/graph.py 2006-05-08 13:40:46 +0000
@@ -237,7 +237,7 @@
self.colours[revid] = self.last_colour = self.last_colour + 1
-def distances(branch, start, maxnum):
+def distances(branch, start):
"""Sort the revisions.
Traverses the branch revision tree starting at start and produces an
@@ -254,14 +254,12 @@
for seq, revid, merge_depth, end_of_merge in distance.merge_sorted:
distance.choose_colour(revid)
- if maxnum is not None:
- print 'FIXME: maxnum disabled.'
-
revisions = distance.revisions
colours = distance.colours
parent_ids_of = distance.parent_ids_of
return (revisions, colours, children, parent_ids_of, distance.merge_sorted)
+
def graph(revisions, colours, merge_sorted):
"""Produce a directed graph of a bzr branch.
@@ -416,15 +414,15 @@
parent_seq = revs[parent_id][0]
parent_depth = revs[parent_id][1]
if parent_depth == indent + 1:
- # the parent was a merge into this branch
- # determine if it was already merged into the mainline
- # via a different merge:
- # if all revisions between us and parent_seq have a
- # indent greater than there are no revisions with a lower indent than
- # us.
- # we do not use 'parent_depth < indent' because that would allow
- # un-uniqueified merges to show up, and merge_sorted should take
- # care of that for us (but does not trim the values)
+ # The parent was a merge into this branch determine if
+ # it was already merged into the mainline via a
+ # different merge: if all revisions between us and
+ # parent_seq have a indent greater than there are no
+ # revisions with a lower indent than us.
+ # We do not use 'parent_depth < indent' because that
+ # would allow un-uniqueified merges to show up, and
+ # merge_sorted should take care of that for us (but
+ # does not trim the values)
if parent_seq < next_lower_rev[revid]:
draw_line(h_idx, len(new_hanging), parent_id)
elif parent_depth == indent and parent_seq == seq + 1:
More information about the Pkg-bazaar-commits
mailing list