160
149
self._pending_box.show()
162
151
def _fill_in_files(self):
163
# We should really use add a progress bar of some kind.
152
# We should really use _iter_changes, and then add a progress bar of
164
154
# While we fill in the view, hide the store
165
155
store = self._files_store
166
156
self._treeview_files.set_model(None)
168
added = _i18n('added')
169
removed = _i18n('removed')
170
renamed = _i18n('renamed')
171
renamed_and_modified = _i18n('renamed and modified')
172
modified = _i18n('modified')
173
kind_changed = _i18n('kind changed')
159
removed = _('removed')
160
renamed = _('renamed')
161
renamed_and_modified = _('renamed and modified')
162
modified = _('modified')
163
kind_changed = _('kind changed')
175
165
# The store holds:
176
166
# [file_id, real path, checkbox, display path, changes type, message]
177
# iter_changes returns:
167
# _iter_changes returns:
178
168
# (file_id, (path_in_source, path_in_target),
179
169
# changed_content, versioned, parent, name, kind,
182
all_enabled = (self._selected is None)
183
172
# The first entry is always the 'whole tree'
184
all_iter = store.append([None, None, all_enabled, 'All Files', '', ''])
185
initial_cursor = store.get_path(all_iter)
173
store.append([None, None, True, 'All Files', '', ''])
186
174
# should we pass specific_files?
187
175
self._wt.lock_read()
188
176
self._basis_tree.lock_read()
190
from diff import iter_changes_to_status
191
for (file_id, real_path, change_type, display_path
192
) in iter_changes_to_status(self._basis_tree, self._wt):
193
if self._selected and real_path != self._selected:
197
item_iter = store.append([
199
real_path.encode('UTF-8'),
201
display_path.encode('UTF-8'),
203
'', # Initial comment
205
if self._selected and enabled:
206
initial_cursor = store.get_path(item_iter)
178
for (file_id, paths, changed_content, versioned, parent_ids, names,
179
kinds, executables) in self._wt._iter_changes(self._basis_tree):
181
# Skip the root entry.
182
if parent_ids == (None, None):
189
source_marker = osutils.kind_marker(kinds[0])
191
assert kinds[0] is not None
192
marker = osutils.kind_marker(kinds[0])
194
marker = osutils.kind_marker(kinds[1])
197
if real_path is None:
199
assert real_path is not None
200
display_path = real_path + marker
202
present_source = versioned[0] and kinds[0] is not None
203
present_target = versioned[1] and kinds[1] is not None
205
if present_source != present_target:
209
change_type = removed
210
elif names[0] != names[1] or parent_ids[0] != parent_ids[1]:
212
if changed_content or executables[0] != executables[1]:
214
change_type = renamed_and_modified
216
change_type = renamed
217
display_path = (paths[0] + source_marker
218
+ ' => ' + paths[1] + marker)
219
elif kinds[0] != kinds[1]:
220
change_type = kind_changed
221
display_path = (paths[0] + source_marker
222
+ ' => ' + paths[1] + marker)
223
elif changed_content is True or executables[0] != executables[1]:
224
change_type = modified
226
assert False, "How did we get here?"
228
store.append([file_id, real_path, True, display_path,
208
231
self._basis_tree.unlock()
209
232
self._wt.unlock()
211
234
self._treeview_files.set_model(store)
212
235
self._last_selected_file = None
213
# This sets the cursor, which causes the expander to close, which
214
# causes the _file_message_text_view to never get realized. So we have
215
# to give it a little kick, or it warns when we try to grab the focus
216
self._treeview_files.set_cursor(initial_cursor)
218
def _realize_file_message_tree_view(*args):
219
self._file_message_text_view.realize()
220
self.connect_after('realize', _realize_file_message_tree_view)
236
self._treeview_files.set_cursor(0)
222
238
def _fill_in_diff(self):
223
239
self._diff_view.set_trees(self._wt, self._basis_tree)
225
def _fill_in_checkout(self):
226
if not self._is_checkout:
227
self._check_local.hide()
230
bus = dbus.SystemBus()
232
proxy_obj = bus.get_object('org.freedesktop.NetworkManager',
233
'/org/freedesktop/NetworkManager')
234
except dbus.DBusException:
235
mutter("networkmanager not available.")
236
self._check_local.show()
239
dbus_iface = dbus.Interface(proxy_obj,
240
'org.freedesktop.NetworkManager')
242
# 3 is the enum value for STATE_CONNECTED
243
self._check_local.set_active(dbus_iface.state() != 3)
244
except dbus.DBusException, e:
245
# Silently drop errors. While DBus may be
246
# available, NetworkManager doesn't necessarily have to be
247
mutter("unable to get networkmanager state: %r" % e)
248
self._check_local.show()
250
def _fill_in_per_file_info(self):
251
config = self._wt.branch.get_config()
252
enable_per_file_commits = config.get_user_option('per_file_commits')
253
if (enable_per_file_commits is None
254
or enable_per_file_commits.lower()
255
not in ('y', 'yes', 'on', 'enable', '1', 't', 'true')):
256
self._enable_per_file_commits = False
258
self._enable_per_file_commits = True
259
if not self._enable_per_file_commits:
260
self._file_message_expander.hide()
261
self._global_message_label.set_markup(_i18n('<b>Commit Message</b>'))
263
241
def _compute_delta(self):
264
242
self._delta = self._wt.changes_from(self._basis_tree)
482
400
self._pending_store = liststore
483
401
self._treeview_pending.set_model(liststore)
484
self._treeview_pending.append_column(gtk.TreeViewColumn(_i18n('Date'),
402
self._treeview_pending.append_column(gtk.TreeViewColumn(_('Date'),
485
403
gtk.CellRendererText(), text=1))
486
self._treeview_pending.append_column(gtk.TreeViewColumn(_i18n('Committer'),
404
self._treeview_pending.append_column(gtk.TreeViewColumn(_('Committer'),
487
405
gtk.CellRendererText(), text=2))
488
self._treeview_pending.append_column(gtk.TreeViewColumn(_i18n('Summary'),
406
self._treeview_pending.append_column(gtk.TreeViewColumn(_('Summary'),
489
407
gtk.CellRendererText(), text=3))
491
409
def _construct_diff_view(self):
492
410
from diff import DiffView
494
# TODO: jam 2007-10-30 The diff label is currently disabled. If we
495
# decide that we really don't ever want to display it, we should
496
# actually remove it, and other references to it, along with the
497
# tests that it is set properly.
498
self._diff_label = gtk.Label(_i18n('Diff for whole tree'))
412
self._diff_label = gtk.Label(_('Diff for whole tree'))
499
413
self._diff_label.set_alignment(0, 0)
500
414
self._right_pane_table.set_row_spacing(self._right_pane_table_row, 0)
501
415
self._add_to_right_table(self._diff_label, 1, False)
502
# self._diff_label.show()
416
self._diff_label.show()
504
418
self._diff_view = DiffView()
505
419
self._add_to_right_table(self._diff_view, 4, True)
506
420
self._diff_view.show()
508
422
def _construct_file_message(self):
423
file_message_box = gtk.VBox()
509
424
scroller = gtk.ScrolledWindow()
510
425
scroller.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
512
427
self._file_message_text_view = gtk.TextView()
513
428
scroller.add(self._file_message_text_view)
514
430
scroller.set_shadow_type(gtk.SHADOW_IN)
431
file_message_box.pack_start(scroller, expand=True, fill=True)
517
433
self._file_message_text_view.modify_font(pango.FontDescription("Monospace"))
518
434
self._file_message_text_view.set_wrap_mode(gtk.WRAP_WORD)
519
435
self._file_message_text_view.set_accepts_tab(False)
520
436
self._file_message_text_view.show()
522
self._file_message_expander = gtk.Expander(_i18n('File commit message'))
523
self._file_message_expander.set_expanded(True)
524
self._file_message_expander.add(scroller)
438
self._file_message_expander = gtk.Expander(_('File commit message'))
439
self._file_message_expander.add(file_message_box)
440
file_message_box.show()
525
441
self._add_to_right_table(self._file_message_expander, 1, False)
526
442
self._file_message_expander.show()
528
444
def _construct_global_message(self):
529
self._global_message_label = gtk.Label(_i18n('Global Commit Message'))
530
self._global_message_label.set_markup(
531
_i18n('<b>Global Commit Message</b>'))
445
self._global_message_label = gtk.Label(_('Global Commit Message'))
532
446
self._global_message_label.set_alignment(0, 0)
533
447
self._right_pane_table.set_row_spacing(self._right_pane_table_row, 0)
534
448
self._add_to_right_table(self._global_message_label, 1, False)
595
487
def _update_per_file_info(self, selection):
596
488
# The node is changing, so cache the current message
597
if not self._enable_per_file_commits:
600
489
self._save_current_file_message()
601
490
text_buffer = self._file_message_text_view.get_buffer()
602
491
file_id, display_path, message = self._files_store.get(selection, 0, 3, 5)
603
492
if file_id is None: # Whole tree
604
self._file_message_expander.set_label(_i18n('File commit message'))
493
self._file_message_expander.set_label(_('File commit message'))
605
494
self._file_message_expander.set_expanded(False)
606
495
self._file_message_expander.set_sensitive(False)
607
496
text_buffer.set_text('')
608
497
self._last_selected_file = None
610
self._file_message_expander.set_label(_i18n('Commit message for ')
499
self._file_message_expander.set_label(_('Commit message for ')
612
501
self._file_message_expander.set_expanded(True)
613
502
self._file_message_expander.set_sensitive(True)
614
503
text_buffer.set_text(message)
615
504
self._last_selected_file = self._files_store.get_path(selection)
617
def _get_specific_files(self):
618
"""Return the list of selected paths, and file info.
620
:return: ([unicode paths], [{utf-8 file info}]
622
self._save_current_file_message()
624
records = iter(self._files_store)
625
rec = records.next() # Skip the All Files record
626
assert rec[0] is None, "Are we skipping the wrong record?"
629
for record in records:
630
if self._commit_all_changes or record[2]:# [2] checkbox
631
file_id = record[0] # [0] file_id
632
path = record[1] # [1] real path
633
file_message = record[5] # [5] commit message
634
files.append(path.decode('UTF-8'))
635
if self._enable_per_file_commits and file_message:
636
# All of this needs to be utf-8 information
637
file_info.append({'path':path, 'file_id':file_id,
638
'message':file_message})
639
file_info.sort(key=lambda x:(x['path'], x['file_id']))
640
if self._enable_per_file_commits:
641
return files, file_info
646
def _on_commit_clicked(self, button):
647
""" Commit button clicked handler. """
650
def _do_commit(self):
651
message = self._get_global_commit_message()
654
response = self._question_dialog(
655
_i18n('Commit with an empty message?'),
656
_i18n('You can describe your commit intent in the message.'))
657
if response == gtk.RESPONSE_NO:
658
# Kindly give focus to message area
659
self._global_message_text_view.grab_focus()
662
specific_files, file_info = self._get_specific_files()
664
specific_files = None
666
local = self._check_local.get_active()
668
# All we care about is if there is a single unknown, so if this loop is
669
# entered, then there are unknown files.
670
# TODO: jam 20071002 It seems like this should cancel the dialog
671
# entirely, since there isn't a way for them to add the unknown
672
# files at this point.
673
for path in self._wt.unknowns():
674
response = self._question_dialog(
675
_i18n("Commit with unknowns?"),
676
_i18n("Unknown files exist in the working tree. Commit anyway?"))
677
if response == gtk.RESPONSE_NO:
684
revprops['file-info'] = bencode.bencode(file_info).decode('UTF-8')
686
rev_id = self._wt.commit(message,
687
allow_pointless=False,
690
specific_files=specific_files,
692
except errors.PointlessCommit:
693
response = self._question_dialog(
694
_i18n('Commit with no changes?'),
695
_i18n('There are no changes in the working tree.'
696
' Do you want to commit anyway?'))
697
if response == gtk.RESPONSE_YES:
698
rev_id = self._wt.commit(message,
699
allow_pointless=True,
702
specific_files=specific_files,
704
self.committed_revision_id = rev_id
705
self.response(gtk.RESPONSE_OK)
707
def _get_global_commit_message(self):
708
buf = self._global_message_text_view.get_buffer()
709
start, end = buf.get_bounds()
710
return buf.get_text(start, end).decode('utf-8')
712
def _set_global_commit_message(self, message):
713
"""Just a helper for the test suite."""
714
if isinstance(message, unicode):
715
message = message.encode('UTF-8')
716
self._global_message_text_view.get_buffer().set_text(message)
718
def _set_file_commit_message(self, message):
719
"""Helper for the test suite."""
720
if isinstance(message, unicode):
721
message = message.encode('UTF-8')
722
self._file_message_text_view.get_buffer().set_text(message)
725
507
def _rev_to_pending_info(rev):
726
508
"""Get the information from a pending merge."""
727
509
from bzrlib.osutils import format_date
729
512
rev_dict['committer'] = re.sub('<.*@.*>', '', rev.committer).strip(' ')
730
513
rev_dict['summary'] = rev.get_summary()
734
517
show_offset=False)
735
518
rev_dict['revision_id'] = rev.revision_id
522
# class CommitDialog(gtk.Dialog):
523
# """ New implementation of the Commit dialog. """
524
# def __init__(self, wt, wtpath, notbranch, selected=None, parent=None):
525
# """ Initialize the Commit Dialog. """
526
# gtk.Dialog.__init__(self, title="Commit - Olive",
529
# buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL))
533
# self.wtpath = wtpath
534
# self.notbranch = notbranch
535
# self.selected = selected
538
# self.old_tree = self.wt.branch.repository.revision_tree(self.wt.branch.last_revision())
539
# self.delta = self.wt.changes_from(self.old_tree)
541
# # Get pending merges
542
# self.pending = self._pending_merges(self.wt)
544
# # Do some preliminary checks
545
# self._is_checkout = False
546
# self._is_pending = False
547
# if self.wt is None and not self.notbranch:
548
# error_dialog(_('Directory does not have a working tree'),
549
# _('Operation aborted.'))
554
# error_dialog(_('Directory is not a branch'),
555
# _('You can perform this action only in a branch.'))
559
# if self.wt.branch.get_bound_location() is not None:
560
# # we have a checkout, so the local commit checkbox must appear
561
# self._is_checkout = True
564
# # There are pending merges, file selection not supported
565
# self._is_pending = True
567
# # Create the widgets
568
# # This is the main horizontal box, which is used to separate the commit
569
# # info from the diff window.
570
# self._hpane = gtk.HPaned()
571
# self._button_commit = gtk.Button(_("Comm_it"), use_underline=True)
572
# self._expander_files = gtk.Expander(_("File(s) to commit"))
573
# self._vpaned_main = gtk.VPaned()
574
# self._scrolledwindow_files = gtk.ScrolledWindow()
575
# self._scrolledwindow_message = gtk.ScrolledWindow()
576
# self._treeview_files = gtk.TreeView()
577
# self._vbox_message = gtk.VBox()
578
# self._label_message = gtk.Label(_("Commit message:"))
579
# self._textview_message = gtk.TextView()
581
# if self._is_pending:
582
# self._expander_merges = gtk.Expander(_("Pending merges"))
583
# self._vpaned_list = gtk.VPaned()
584
# self._scrolledwindow_merges = gtk.ScrolledWindow()
585
# self._treeview_merges = gtk.TreeView()
588
# self._button_commit.connect('clicked', self._on_commit_clicked)
589
# self._treeview_files.connect('cursor-changed', self._on_treeview_files_cursor_changed)
590
# self._treeview_files.connect('row-activated', self._on_treeview_files_row_activated)
593
# self._scrolledwindow_files.set_policy(gtk.POLICY_AUTOMATIC,
594
# gtk.POLICY_AUTOMATIC)
595
# self._scrolledwindow_message.set_policy(gtk.POLICY_AUTOMATIC,
596
# gtk.POLICY_AUTOMATIC)
597
# self._textview_message.modify_font(pango.FontDescription("Monospace"))
598
# self.set_default_size(500, 500)
599
# self._vpaned_main.set_position(200)
600
# self._button_commit.set_flags(gtk.CAN_DEFAULT)
602
# if self._is_pending:
603
# self._scrolledwindow_merges.set_policy(gtk.POLICY_AUTOMATIC,
604
# gtk.POLICY_AUTOMATIC)
605
# self._treeview_files.set_sensitive(False)
607
# # Construct the dialog
608
# self.action_area.pack_end(self._button_commit)
610
# self._scrolledwindow_files.add(self._treeview_files)
611
# self._scrolledwindow_message.add(self._textview_message)
613
# self._expander_files.add(self._scrolledwindow_files)
615
# self._vbox_message.pack_start(self._label_message, False, False)
616
# self._vbox_message.pack_start(self._scrolledwindow_message, True, True)
618
# if self._is_pending:
619
# self._expander_merges.add(self._scrolledwindow_merges)
620
# self._scrolledwindow_merges.add(self._treeview_merges)
621
# self._vpaned_list.add1(self._expander_files)
622
# self._vpaned_list.add2(self._expander_merges)
623
# self._vpaned_main.add1(self._vpaned_list)
625
# self._vpaned_main.add1(self._expander_files)
627
# self._vpaned_main.add2(self._vbox_message)
629
# self._hpane.pack1(self._vpaned_main)
630
# self.vbox.pack_start(self._hpane, expand=True, fill=True)
631
# if self._is_checkout:
632
# self._check_local = gtk.CheckButton(_("_Only commit locally"),
633
# use_underline=True)
634
# self.vbox.pack_start(self._check_local, False, False)
636
# bus = dbus.SystemBus()
637
# proxy_obj = bus.get_object('org.freedesktop.NetworkManager',
638
# '/org/freedesktop/NetworkManager')
639
# dbus_iface = dbus.Interface(
640
# proxy_obj, 'org.freedesktop.NetworkManager')
642
# # 3 is the enum value for STATE_CONNECTED
643
# self._check_local.set_active(dbus_iface.state() != 3)
644
# except dbus.DBusException, e:
645
# # Silently drop errors. While DBus may be
646
# # available, NetworkManager doesn't necessarily have to be
647
# mutter("unable to get networkmanager state: %r" % e)
649
# # Create the file list
650
# self._create_file_view()
651
# # Create the pending merges
652
# self._create_pending_merges()
653
# self._create_diff_view()
655
# # Expand the corresponding expander
656
# if self._is_pending:
657
# self._expander_merges.set_expanded(True)
659
# self._expander_files.set_expanded(True)
662
# self.vbox.show_all()
664
# # Default to Commit button
665
# self._button_commit.grab_default()
667
# def _show_diff_view(self, treeview):
668
# # FIXME: the diff window freezes for some reason
669
# treeselection = treeview.get_selection()
670
# (model, iter) = treeselection.get_selected()
672
# if iter is not None:
673
# selected = model.get_value(iter, 3) # Get the real_path attribute
674
# self._diff_display.show_diff([selected])
676
# def _on_treeview_files_cursor_changed(self, treeview):
677
# self._show_diff_view(treeview)
679
# def _on_treeview_files_row_activated(self, treeview, path, view_column):
680
# self._show_diff_view(treeview)
683
# def _on_commit_clicked(self, button):
684
# """ Commit button clicked handler. """
685
# textbuffer = self._textview_message.get_buffer()
686
# start, end = textbuffer.get_bounds()
687
# message = textbuffer.get_text(start, end).decode('utf-8')
689
# if not self.pending:
690
# specific_files = self._get_specific_files()
692
# specific_files = None
695
# response = question_dialog(_('Commit with an empty message?'),
696
# _('You can describe your commit intent in the message.'))
697
# if response == gtk.RESPONSE_NO:
698
# # Kindly give focus to message area
699
# self._textview_message.grab_focus()
702
# if self._is_checkout:
703
# local = self._check_local.get_active()
707
# if list(self.wt.unknowns()) != []:
708
# response = question_dialog(_("Commit with unknowns?"),
709
# _("Unknown files exist in the working tree. Commit anyway?"))
710
# if response == gtk.RESPONSE_NO:
714
# self.wt.commit(message,
715
# allow_pointless=False,
718
# specific_files=specific_files)
719
# except errors.PointlessCommit:
720
# response = question_dialog(_('Commit with no changes?'),
721
# _('There are no changes in the working tree.'))
722
# if response == gtk.RESPONSE_YES:
723
# self.wt.commit(message,
724
# allow_pointless=True,
727
# specific_files=specific_files)
728
# self.response(gtk.RESPONSE_OK)
730
# def _pending_merges(self, wt):
731
# """ Return a list of pending merges or None if there are none of them. """
732
# parents = wt.get_parent_ids()
733
# if len(parents) < 2:
737
# from bzrlib.osutils import format_date
739
# pending = parents[1:]
741
# last_revision = parents[0]
743
# if last_revision is not None:
745
# ignore = set(branch.repository.get_ancestry(last_revision))
746
# except errors.NoSuchRevision:
747
# # the last revision is a ghost : assume everything is new
749
# ignore = set([None, last_revision])
751
# ignore = set([None])
754
# for merge in pending:
757
# m_revision = branch.repository.get_revision(merge)
760
# rev['committer'] = re.sub('<.*@.*>', '', m_revision.committer).strip(' ')
761
# rev['summary'] = m_revision.get_summary()
762
# rev['date'] = format_date(m_revision.timestamp,
763
# m_revision.timezone or 0,
764
# 'original', date_fmt="%Y-%m-%d",
769
# inner_merges = branch.repository.get_ancestry(merge)
770
# assert inner_merges[0] is None
771
# inner_merges.pop(0)
772
# inner_merges.reverse()
773
# for mmerge in inner_merges:
774
# if mmerge in ignore:
776
# mm_revision = branch.repository.get_revision(mmerge)
779
# rev['committer'] = re.sub('<.*@.*>', '', mm_revision.committer).strip(' ')
780
# rev['summary'] = mm_revision.get_summary()
781
# rev['date'] = format_date(mm_revision.timestamp,
782
# mm_revision.timezone or 0,
783
# 'original', date_fmt="%Y-%m-%d",
789
# except errors.NoSuchRevision:
790
# print "DEBUG: NoSuchRevision:", merge
794
# def _create_file_view(self):
795
# self._file_store = gtk.ListStore(gobject.TYPE_BOOLEAN, # [0] checkbox
796
# gobject.TYPE_STRING, # [1] path to display
797
# gobject.TYPE_STRING, # [2] changes type
798
# gobject.TYPE_STRING) # [3] real path
799
# self._treeview_files.set_model(self._file_store)
800
# crt = gtk.CellRendererToggle()
801
# crt.set_property("activatable", True)
802
# crt.connect("toggled", self._toggle_commit, self._file_store)
803
# self._treeview_files.append_column(gtk.TreeViewColumn(_('Commit'),
805
# self._treeview_files.append_column(gtk.TreeViewColumn(_('Path'),
806
# gtk.CellRendererText(), text=1))
807
# self._treeview_files.append_column(gtk.TreeViewColumn(_('Type'),
808
# gtk.CellRendererText(), text=2))
810
# for path, id, kind in self.delta.added:
811
# marker = osutils.kind_marker(kind)
812
# if self.selected is not None:
813
# if path == os.path.join(self.wtpath, self.selected):
814
# self._file_store.append([ True, path+marker, _('added'), path ])
816
# self._file_store.append([ False, path+marker, _('added'), path ])
818
# self._file_store.append([ True, path+marker, _('added'), path ])
820
# for path, id, kind in self.delta.removed:
821
# marker = osutils.kind_marker(kind)
822
# if self.selected is not None:
823
# if path == os.path.join(self.wtpath, self.selected):
824
# self._file_store.append([ True, path+marker, _('removed'), path ])
826
# self._file_store.append([ False, path+marker, _('removed'), path ])
828
# self._file_store.append([ True, path+marker, _('removed'), path ])
830
# for oldpath, newpath, id, kind, text_modified, meta_modified in self.delta.renamed:
831
# marker = osutils.kind_marker(kind)
832
# if text_modified or meta_modified:
833
# changes = _('renamed and modified')
835
# changes = _('renamed')
836
# if self.selected is not None:
837
# if newpath == os.path.join(self.wtpath, self.selected):
838
# self._file_store.append([ True,
839
# oldpath+marker + ' => ' + newpath+marker,
844
# self._file_store.append([ False,
845
# oldpath+marker + ' => ' + newpath+marker,
850
# self._file_store.append([ True,
851
# oldpath+marker + ' => ' + newpath+marker,
856
# for path, id, kind, text_modified, meta_modified in self.delta.modified:
857
# marker = osutils.kind_marker(kind)
858
# if self.selected is not None:
859
# if path == os.path.join(self.wtpath, self.selected):
860
# self._file_store.append([ True, path+marker, _('modified'), path ])
862
# self._file_store.append([ False, path+marker, _('modified'), path ])
864
# self._file_store.append([ True, path+marker, _('modified'), path ])
866
# def _create_pending_merges(self):
867
# if not self.pending:
870
# liststore = gtk.ListStore(gobject.TYPE_STRING,
871
# gobject.TYPE_STRING,
872
# gobject.TYPE_STRING)
873
# self._treeview_merges.set_model(liststore)
875
# self._treeview_merges.append_column(gtk.TreeViewColumn(_('Date'),
876
# gtk.CellRendererText(), text=0))
877
# self._treeview_merges.append_column(gtk.TreeViewColumn(_('Committer'),
878
# gtk.CellRendererText(), text=1))
879
# self._treeview_merges.append_column(gtk.TreeViewColumn(_('Summary'),
880
# gtk.CellRendererText(), text=2))
882
# for item in self.pending:
883
# liststore.append([ item['date'],
888
# def _create_diff_view(self):
889
# from diff import DiffView
891
# self._diff_display = DiffView()
892
# self._diff_display.set_trees(self.wt, self.wt.basis_tree())
893
# self._diff_display.show_diff(None)
894
# self._diff_display.show()
895
# self._hpane.pack2(self._diff_display)
897
# def _get_specific_files(self):
899
# it = self._file_store.get_iter_first()
901
# if self._file_store.get_value(it, 0):
902
# # get real path from hidden column 3
903
# ret.append(self._file_store.get_value(it, 3))
904
# it = self._file_store.iter_next(it)
908
# def _toggle_commit(self, cell, path, model):
909
# model[path][0] = not model[path][0]