# HG changeset patch
# User Peer Sommerlund <[email protected]>
# Date 1251705049 -7200
history: Add branch view
Add a view that uses branch_grapher to show branches
instead of parents.
diff -r 52ad7538a583 -r 465741edbb91 hggtk/history.py
--- a/hggtk/history.py
+++ b/hggtk/history.py
@@ -338,7 +338,8 @@
'Send refresh event to treeview object'
opts = {'date': None, 'no_merges':False, 'only_merges':False,
'keyword':[], 'branch':None, 'pats':[], 'filehist':None,
- 'revrange':[], 'revlist':[], 'noheads':False }
+ 'revrange':[], 'revlist':[], 'noheads':False,
+ 'branch-view':False }
opts.update(kwopts)
# handle strips, rebases, etc
@@ -373,6 +374,9 @@
elif self.filter == 'all':
ftitle(None)
self.graphview.refresh(True, None, opts)
+ elif self.filter == 'branches':
+ opts['branch-view'] = True
+ self.graphview.refresh(True, None, opts)
elif self.filter == 'new':
ftitle(_('new revisions'))
assert len(self.repo) > self.origtip
@@ -555,6 +559,10 @@
all.connect('toggled', self.filter_selected, 'all')
filterbox.pack_start(all, False)
+ all_compact = gtk.RadioButton(all, _('branches'))
+ all_compact.connect('toggled', self.filter_selected, 'branches')
+ filterbox.pack_start(all_compact, False)
+
self.newbutton = gtk.RadioButton(all, _('new'))
self.newbutton.connect('toggled', self.filter_selected, 'new')
filterbox.pack_start(self.newbutton, False)
diff -r 52ad7538a583 -r 465741edbb91 hggtk/logview/treeview.py
--- a/hggtk/logview/treeview.py
+++ b/hggtk/logview/treeview.py
@@ -163,8 +163,11 @@
else:
start = len(self.repo.changelog) - 1
noheads = opts.get('noheads', False)
- self.grapher = revision_grapher(self.repo, start, end, pats,
- noheads, self.branch_color)
+ if opts.get('branch-view', False):
+ self.grapher = branch_grapher(self.repo, start, end)
+ else:
+ self.grapher = revision_grapher(self.repo, start, end, pats,
+ noheads, self.branch_color)
elif opts.get('revlist', None):
self.grapher = dumb_log_generator(self.repo, opts['revlist'])
else:
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop