diff -Nru rabbitvcs-0.13.2.1/clients/gedit/rabbitvcs.gedit-plugin rabbitvcs-0.13.3/clients/gedit/rabbitvcs.gedit-plugin --- rabbitvcs-0.13.2.1/clients/gedit/rabbitvcs.gedit-plugin 2010-01-25 18:44:23.000000000 +0000 +++ rabbitvcs-0.13.3/clients/gedit/rabbitvcs.gedit-plugin 2010-05-31 14:07:45.000000000 +0100 @@ -5,6 +5,6 @@ Name=RabbitVCS Description=RabbitVCS plugin for Gedit Authors=Adam Plumb -Copyright=Copyright © 2009 Adam Plumb +Copyright=Copyright © 2010 Adam Plumb Website=http://www.rabbitvcs.org diff -Nru rabbitvcs-0.13.2.1/clients/gedit/rabbitvcs-plugin.py rabbitvcs-0.13.3/clients/gedit/rabbitvcs-plugin.py --- rabbitvcs-0.13.2.1/clients/gedit/rabbitvcs-plugin.py 2010-04-21 15:40:19.000000000 +0100 +++ rabbitvcs-0.13.3/clients/gedit/rabbitvcs-plugin.py 2010-05-31 14:07:45.000000000 +0100 @@ -24,12 +24,12 @@ import gtk import gedit -import rabbitvcs.util.helper -from rabbitvcs.vcs import create_vcs_instance -from rabbitvcs.util.contextmenu import GtkFilesContextMenuConditions, \ +import rabbitvcs.lib.helper +from rabbitvcs.lib.vcs import create_vcs_instance +from rabbitvcs.lib.contextmenu import GtkFilesContextMenuConditions, \ GtkFilesContextMenuCallbacks, MainContextMenu, MainContextMenuCallbacks, \ MenuBuilder -from rabbitvcs.util.contextmenuitems import * +from rabbitvcs.lib.contextmenuitems import * # Menu item example, insert a new item in the Tools menu ui_str = """ diff -Nru rabbitvcs-0.13.2.1/clients/nautilus/RabbitVCS.py rabbitvcs-0.13.3/clients/nautilus/RabbitVCS.py --- rabbitvcs-0.13.2.1/clients/nautilus/RabbitVCS.py 2010-05-29 17:29:47.000000000 +0100 +++ rabbitvcs-0.13.3/clients/nautilus/RabbitVCS.py 2010-06-13 09:44:35.000000000 +0100 @@ -586,8 +586,8 @@ if len(paths) == 0: return [] - label = rabbitvcs.ui.property_page.PropertyPageLabel().get_widget() - page = rabbitvcs.ui.property_page.PropertyPage(paths).get_widget() + label = rabbitvcs.ui.property_page.PropertyPageLabel(claim_domain=False).get_widget() + page = rabbitvcs.ui.property_page.PropertyPage(paths, claim_domain=False).get_widget() ppage = nautilus.PropertyPage('RabbitVCS::PropertyPage', label, diff -Nru rabbitvcs-0.13.2.1/debian/changelog rabbitvcs-0.13.3/debian/changelog --- rabbitvcs-0.13.2.1/debian/changelog 2010-06-16 14:48:34.000000000 +0100 +++ rabbitvcs-0.13.3/debian/changelog 2010-06-16 14:48:35.000000000 +0100 @@ -1,3 +1,9 @@ +rabbitvcs (0.13.3-1~hardy) hardy; urgency=low + + * New upstream release. + + -- Jason Heeris Wed, 16 Jun 2010 21:32:45 +0800 + rabbitvcs (0.13.2.1-1~hardy) hardy; urgency=low * Point-point fix. diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/__init__.py rabbitvcs-0.13.3/rabbitvcs/__init__.py --- rabbitvcs-0.13.2.1/rabbitvcs/__init__.py 2010-05-29 20:00:35.000000000 +0100 +++ rabbitvcs-0.13.3/rabbitvcs/__init__.py 2010-06-16 14:09:47.000000000 +0100 @@ -24,7 +24,7 @@ import gettext as _gettext from locale import getdefaultlocale -version = "0.13.2" +version = "0.13.3" APP_NAME = "RabbitVCS" TEMP_DIR_PREFIX = "rabbitvcs-" LOCALE_DIR = "%s/locale" % os.path.dirname(os.path.abspath(__file__)) diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/lib/contextmenu.py rabbitvcs-0.13.3/rabbitvcs/lib/contextmenu.py --- rabbitvcs-0.13.2.1/rabbitvcs/lib/contextmenu.py 2010-05-29 17:29:47.000000000 +0100 +++ rabbitvcs-0.13.3/rabbitvcs/lib/contextmenu.py 2010-06-13 10:36:51.000000000 +0100 @@ -711,7 +711,8 @@ not self.path_dict["is_added"]) def properties(self, data=None): - return (self.path_dict["is_in_a_or_a_working_copy"] and + return (self.path_dict["length"] == 1 and + self.path_dict["is_in_a_or_a_working_copy"] and self.path_dict["is_versioned"]) def create_patch(self, data=None): diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/lib/helper.py rabbitvcs-0.13.3/rabbitvcs/lib/helper.py --- rabbitvcs-0.13.2.1/rabbitvcs/lib/helper.py 2010-05-29 17:29:47.000000000 +0100 +++ rabbitvcs-0.13.3/rabbitvcs/lib/helper.py 2010-06-16 13:30:45.000000000 +0100 @@ -37,6 +37,9 @@ import time import shutil +import urllib +import urlparse + import gobject import rabbitvcs.lib.settings @@ -326,7 +329,13 @@ open("/tmp/tmp.patch", "w").write(patch) tmp_path = "/tmp/%s" % os.path.split(path1)[-1] - shutil.copy(path1, "/tmp") + if os.path.isfile(path1): + shutil.copy(path1, tmp_path) + elif os.path.isdir(path1): + shutil.copytree(path1, tmp_path) + else: + return + os.popen( "patch --reverse '%s' < /tmp/tmp.patch" % tmp_path @@ -583,14 +592,19 @@ if l1[0] != l2[0]: return (common, l1, l2) return _commonpath(l1[1:], l2[1:], common+[l1[0]]) -def get_relative_path(p1, p2): +def get_relative_path(from_path, to_path): """ Method that returns the relative path between the specified paths """ - (common,l1,l2) = _commonpath(p1.split(os.path.sep), p2.split(os.path.sep)) + + nice_path1 = from_path.rstrip(os.path.sep).split(os.path.sep) + nice_path2 = to_path.rstrip(os.path.sep).split(os.path.sep) + + (common,l1,l2) = _commonpath(nice_path1, nice_path2) + p = [] if len(l1) > 0: - p = [ '../' * len(l1) ] + p = ['..'] * len(l1) p = p + l2 return os.sep.join(p) @@ -625,6 +639,43 @@ def url_join(path, *args): return "/".join([path.rstrip("/")] + list(args)) +def quote_url(url_text): + (scheme, netloc, path, params, query, fragment) = urlparse.urlparse(url_text) + # netloc_quoted = urllib.quote(netloc) + path_quoted = urllib.quote(path) + params_quoted = urllib.quote(query) + query_quoted = urllib.quote_plus(query) + fragment_quoted = urllib.quote(fragment) + + url_quoted = urlparse.urlunparse( + (scheme, + netloc, + path_quoted, + params_quoted, + query_quoted, + fragment_quoted)) + + return url_quoted + +def unquote_url(url_text): + (scheme, netloc, path, params, query, fragment) = urlparse.urlparse(url_text) + # netloc_unquoted = urllib.unquote(netloc) + path_unquoted = urllib.unquote(path) + params_unquoted = urllib.unquote(query) + query_unquoted = urllib.unquote_plus(query) + fragment_unquoted = urllib.unquote(fragment) + + url_unquoted = urlparse.urlunparse( + (scheme, + netloc, + path_unquoted, + params_unquoted, + query_unquoted, + fragment_unquoted)) + + return url_unquoted + + def pretty_filesize(bytes): if bytes >= 1073741824: return str(bytes / 1073741824) + ' GB' @@ -711,4 +762,9 @@ if children: annotated_children = [(level+1, child) for child in children] annotated_children.reverse() - to_process.extendleft(annotated_children) + to_process.extendleft(annotated_children) + +def urlize(path): + if path.startswith("/"): + return "file://%s" % path + return path diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/lib/vcs/svn/__init__.py rabbitvcs-0.13.3/rabbitvcs/lib/vcs/svn/__init__.py --- rabbitvcs-0.13.2.1/rabbitvcs/lib/vcs/svn/__init__.py 2010-05-29 17:29:47.000000000 +0100 +++ rabbitvcs-0.13.3/rabbitvcs/lib/vcs/svn/__init__.py 2010-06-16 14:14:18.000000000 +0100 @@ -33,6 +33,7 @@ import pysvn import rabbitvcs.lib.vcs +import rabbitvcs.lib.helper from rabbitvcs.lib.helper import abspaths from rabbitvcs.lib.decorators import timeit from rabbitvcs.lib.log import Log @@ -1166,6 +1167,8 @@ """ + src = rabbitvcs.lib.helper.urlize(src) + dest = rabbitvcs.lib.helper.urlize(dest) return self.client.copy(src, dest, revision.primitive()) def copy_all(self, sources, dest_url_or_path, copy_as_child=False, @@ -1217,6 +1220,8 @@ """ + url = rabbitvcs.lib.helper.urlize(url) + return self.client.checkout(url, path, recurse=recurse, revision=revision.primitive(), ignore_externals=ignore_externals) @@ -1348,6 +1353,7 @@ """ + url = rabbitvcs.lib.helper.urlize(url) return self.client.import_(path, url, log_message, ignore) def lock(self, url_or_path, lock_comment, force=False): @@ -1383,7 +1389,9 @@ @param path: The path of the local working copy """ - + + from_url = rabbitvcs.lib.helper.urlize(from_url) + to_url = rabbitvcs.lib.helper.urlize(to_url) return self.client.relocate(from_url, to_url, path, recurse) def move(self, src_url_or_path, dest_url_or_path): @@ -1489,6 +1497,7 @@ """ + url = rabbitvcs.lib.helper.urlize(url) return self.client.switch(path, url, revision.primitive()) def unlock(self, path, force=False): @@ -1628,6 +1637,8 @@ """ + url_or_path1 = rabbitvcs.lib.helper.urlize(url_or_path1) + url_or_path2 = rabbitvcs.lib.helper.urlize(url_or_path2) return self.client.merge(url_or_path1, revision1.primitive(), url_or_path2, revision2.primitive(), local_path, force, recurse, record_only) @@ -1703,6 +1714,7 @@ url_or_path2, revision2.primitive(), recurse, ignore_ancestry) def list(self, url_or_path, revision=Revision("HEAD"), recurse=True): + url_or_path = rabbitvcs.lib.helper.urlize(url_or_path) return self.client.list(url_or_path, revision=revision.primitive(), recurse=recurse) diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/ui/action.py rabbitvcs-0.13.3/rabbitvcs/ui/action.py --- rabbitvcs-0.13.2.1/rabbitvcs/ui/action.py 2010-05-29 19:48:19.000000000 +0100 +++ rabbitvcs-0.13.3/rabbitvcs/ui/action.py 2010-06-13 09:44:35.000000000 +0100 @@ -82,6 +82,10 @@ def set_canceled_by_user(self, was_canceled_by_user): pass + @gtk_unsafe + def exception_callback(self, e): + MessageBox(str(e)) + class MessageCallbackNotifier(VCSNotifier): """ Provides an interface to handle the Notification UI. diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/ui/browser.py rabbitvcs-0.13.3/rabbitvcs/ui/browser.py --- rabbitvcs-0.13.2.1/rabbitvcs/ui/browser.py 2010-05-27 18:46:34.000000000 +0100 +++ rabbitvcs-0.13.3/rabbitvcs/ui/browser.py 2010-06-16 14:08:37.000000000 +0100 @@ -55,7 +55,8 @@ self.url = "" if self.vcs.is_in_a_or_a_working_copy(url): - self.url = self.vcs.get_repo_url(url) + action = rabbitvcs.ui.action.VCSAction(self.vcs, notification=False, run_in_thread=False) + self.url = action.run_single(self.vcs.get_repo_url, url) elif self.vcs.is_path_repository_url(url): self.url = url @@ -124,14 +125,17 @@ self.load() def load(self): + self.url = self.urls.get_active_text() self.action = rabbitvcs.ui.action.VCSAction( self.vcs, notification=False ) revision = self.revision_selector.get_revision_object() - self.action.append(self.vcs.list, self.urls.get_active_text(), - revision=revision, recurse=False) + self.action.append( + self.vcs.list, + rabbitvcs.lib.helper.quote_url(self.url), + revision=revision, recurse=False) self.action.append(self.init_repo_root_url) self.action.append(self.populate_table, 0) self.action.start() @@ -154,7 +158,8 @@ def init_repo_root_url(self): if self.repo_root_url is None and self.vcs.is_in_a_or_a_working_copy(self.url): - self.repo_root_url = self.vcs.get_repo_root_url(self.url) + action = rabbitvcs.ui.action.VCSAction(self.vcs, notification=False, run_in_thread=False) + self.repo_root_url = action.run_single(self.vcs.get_repo_root_url, self.url) def on_destroy(self, widget): self.destroy() @@ -174,7 +179,7 @@ else: self.url = path - if self.file_column_callback(self.url) == "dir": + if self.file_column_callback(self.url) == "dir" or self.url != path: self.urls.set_child_text(self.url) self.load() else: diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/ui/checkout.py rabbitvcs-0.13.3/rabbitvcs/ui/checkout.py --- rabbitvcs-0.13.2.1/rabbitvcs/ui/checkout.py 2010-05-29 17:29:47.000000000 +0100 +++ rabbitvcs-0.13.3/rabbitvcs/ui/checkout.py 2010-06-16 13:30:45.000000000 +0100 @@ -128,7 +128,7 @@ self.action.append(rabbitvcs.lib.helper.save_repository_path, url) self.action.append( self.vcs.checkout, - url, + rabbitvcs.lib.helper.quote_url(url), path, recurse=recursive, revision=revision, @@ -145,6 +145,7 @@ self.get_widget("destination").set_text(path) def on_repositories_changed(self, widget, data=None): + # Do not use quoting for this bit url = self.repositories.get_active_text() tmp = url.replace("//", "/").split("/")[1:] append = "" @@ -158,7 +159,7 @@ if append in ("http:", "https:", "file:", "svn:", "svn+ssh:"): append = "" break - + self.get_widget("destination").set_text( os.path.join(self.destination, append) ) diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/ui/commit.py rabbitvcs-0.13.3/rabbitvcs/ui/commit.py --- rabbitvcs-0.13.2.1/rabbitvcs/ui/commit.py 2010-03-26 14:30:36.000000000 +0000 +++ rabbitvcs-0.13.3/rabbitvcs/ui/commit.py 2010-06-16 13:43:39.000000000 +0100 @@ -138,8 +138,7 @@ Determines if a file should be activated or not """ if ((item.path in self.paths - or item.is_versioned) - and os.path.exists(item.path)): + or item.is_versioned)): return True return False @@ -204,11 +203,15 @@ return added = 0 + recurse = False for item in items: + status = self.vcs.status(item, recurse=False)[0].text_status try: - if self.vcs.status(item, recurse=False)[0].text_status == self.vcs.STATUS["unversioned"]: + if status == self.vcs.STATUS["unversioned"]: self.vcs.add(item) added += 1 + elif status == self.vcs.STATUS["deleted"] and os.path.isdir(item): + recurse = True except Exception, e: log.exception(e) @@ -225,7 +228,7 @@ rabbitvcs.lib.helper.save_log_message, self.message.get_text() ) - self.action.append(self.vcs.commit, items, self.message.get_text()) + self.action.append(self.vcs.commit, items, self.message.get_text(), recurse=recurse) self.action.append(self.action.set_status, _("Completed Commit")) self.action.append(self.action.finish) self.action.start() diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/ui/dialog.py rabbitvcs-0.13.3/rabbitvcs/ui/dialog.py --- rabbitvcs-0.13.2.1/rabbitvcs/ui/dialog.py 2010-05-29 17:29:47.000000000 +0100 +++ rabbitvcs-0.13.3/rabbitvcs/ui/dialog.py 2010-06-13 09:44:35.000000000 +0100 @@ -90,16 +90,19 @@ return returner def on_prevmes_table_row_activated(self, treeview, data, col): + self.update_message_table() self.dialog.response(gtk.RESPONSE_OK) def on_prevmes_table_cursor_changed(self, treeview): - + self.update_message_table() + + def update_message_table(self): selection = self.message_table.get_selected_row_items(1) if selection: selected_message = selection[-1] self.message.set_text(selected_message) - + class FolderChooser: def __init__(self): self.dialog = gtk.FileChooserDialog(_("Select a Folder"), diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/ui/diff.py rabbitvcs-0.13.3/rabbitvcs/ui/diff.py --- rabbitvcs-0.13.2.1/rabbitvcs/ui/diff.py 2010-03-25 20:05:20.000000000 +0000 +++ rabbitvcs-0.13.3/rabbitvcs/ui/diff.py 2010-06-11 13:37:15.000000000 +0100 @@ -101,6 +101,9 @@ action.stop_loader() + if diff_text is None: + diff_text = "" + fh = tempfile.mkstemp("-rabbitvcs-" + str(self.revision1) + "-" + str(self.revision2) + ".diff") os.write(fh[0], diff_text) os.close(fh[0]) @@ -178,4 +181,3 @@ pathrev2 = rabbitvcs.lib.helper.parse_path_revision_string(args.pop(0)) SVNDiff(pathrev1[0], pathrev1[1], pathrev2[0], pathrev2[1], sidebyside=options.sidebyside) - gtk.main() diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/ui/glade/dialogs.glade rabbitvcs-0.13.3/rabbitvcs/ui/glade/dialogs.glade --- rabbitvcs-0.13.2.1/rabbitvcs/ui/glade/dialogs.glade 2010-05-29 19:58:21.000000000 +0100 +++ rabbitvcs-0.13.3/rabbitvcs/ui/glade/dialogs.glade 2010-06-11 18:26:25.000000000 +0100 @@ -209,6 +209,8 @@ -5 True True + True + True True True True @@ -994,6 +996,7 @@ 0 6 6 + True 1 diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/ui/__init__.py rabbitvcs-0.13.3/rabbitvcs/ui/__init__.py --- rabbitvcs-0.13.2.1/rabbitvcs/ui/__init__.py 2010-05-29 19:14:53.000000000 +0100 +++ rabbitvcs-0.13.3/rabbitvcs/ui/__init__.py 2010-06-13 09:44:35.000000000 +0100 @@ -65,27 +65,34 @@ "error": "rabbitvcs-error" } -def get_glade_tree(filename, id): - path = "%s/glade/%s.glade" % ( - os.path.dirname(os.path.realpath(__file__)), - filename - ) - gtk.glade.bindtextdomain(APP_NAME, LOCALE_DIR) - gtk.glade.textdomain(APP_NAME) - tree = gtk.glade.XML(path, id, APP_NAME) - return tree - class GladeWidgetWrapper: - - def __init__(self, glade_filename = None, glade_id = None): + + def __init__(self, glade_filename = None, + glade_id = None, claim_domain=True): if glade_filename: self.glade_filename = glade_filename if glade_id: self.glade_id = glade_id + + self.claim_domain = claim_domain - self.tree = get_glade_tree(self.glade_filename, self.glade_id) + self.tree = self.get_glade_tree() + self.tree.signal_autoconnect(self) + + def get_glade_tree(self): + if self.claim_domain: + gtk.glade.bindtextdomain(APP_NAME, LOCALE_DIR) + gtk.glade.textdomain(APP_NAME) + + path = "%s/glade/%s.glade" % ( + os.path.dirname(os.path.realpath(__file__)), + self.glade_filename + ) + + tree = gtk.glade.XML(path, self.glade_id, APP_NAME) + return tree def get_widget(self, id = None): if not id: diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/ui/log.py rabbitvcs-0.13.3/rabbitvcs/ui/log.py --- rabbitvcs-0.13.2.1/rabbitvcs/ui/log.py 2010-05-27 19:27:20.000000000 +0100 +++ rabbitvcs-0.13.3/rabbitvcs/ui/log.py 2010-06-10 21:00:00.000000000 +0100 @@ -106,7 +106,7 @@ ) self.stop_on_copy = False - self.root_url = self.vcs.get_repo_root_url(self.path) + self.initialize_root_url() self.load_or_refresh() # @@ -227,6 +227,18 @@ # Helper methods # + def initialize_root_url(self): + action = VCSAction( + self.vcs, + notification=False, + run_in_thread=False + ) + + self.root_url = action.run_single( + self.vcs.get_repo_root_url, + self.path + ) + def load_or_refresh(self): if self.cache.has(self.rev_start): self.refresh() diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/ui/property_page.py rabbitvcs-0.13.3/rabbitvcs/ui/property_page.py --- rabbitvcs-0.13.2.1/rabbitvcs/ui/property_page.py 2010-05-29 17:29:47.000000000 +0100 +++ rabbitvcs-0.13.3/rabbitvcs/ui/property_page.py 2010-06-13 09:44:35.000000000 +0100 @@ -36,21 +36,24 @@ glade_filename = "property_page" glade_id = "prop_page_scroller" - def __init__(self, paths, vcs = None): - rabbitvcs.ui.GladeWidgetWrapper.__init__(self) + def __init__(self, paths, vcs=None, claim_domain=True): + rabbitvcs.ui.GladeWidgetWrapper.__init__(self, + claim_domain=claim_domain) self.paths = paths self.vcs_client = vcs or rabbitvcs.lib.vcs.create_vcs_instance() self.info_pane = self.get_widget("property_page") if len(paths) == 1: - file_info = FileInfoPane(paths[0], self.vcs_client) + file_info = FileInfoPane(paths[0], self.vcs_client, + claim_domain=self.claim_domain) self.info_pane.pack_start(file_info.get_widget(), expand=False) elif len(paths) > 1: try: for path in paths: - expander = FileInfoExpander(path, vcs) + expander = FileInfoExpander(path, self.vcs_client, + claim_domain=self.claim_domain) self.info_pane.pack_start(expander.get_widget(), expand=False) except Exception, ex: @@ -64,8 +67,9 @@ glade_filename = "property_page" glade_id = "file_info_table" - def __init__(self, path, vcs = None): - rabbitvcs.ui.GladeWidgetWrapper.__init__(self) + def __init__(self, path, vcs=None, claim_domain=True): + rabbitvcs.ui.GladeWidgetWrapper.__init__(self, + claim_domain=claim_domain) self.vcs = vcs or rabbitvcs.lib.vcs.create_vcs_instance() self.checker = StatusChecker() @@ -112,12 +116,13 @@ glade_filename = "property_page" glade_id = "file_info_expander" - def __init__(self, path, vcs = None): + def __init__(self, path, vcs=None, claim_domain=True): # Might be None, but that's okay, only subclasses use it self.vcs = vcs - rabbitvcs.ui.GladeWidgetWrapper.__init__(self) + rabbitvcs.ui.GladeWidgetWrapper.__init__(self, + claim_domain=claim_domain) self.path = path self.get_widget("file_expander_path").set_label(path) @@ -131,9 +136,12 @@ def on_expand(self, param_spec, user_data): if self.expander.get_expanded() and not self.file_info: - self.file_info = FileInfoPane(self.path, self.vcs).get_widget() + self.file_info = FileInfoPane(self.path, self.vcs, + claim_domain=self.claim_domain + ).get_widget() self.expander.add(self.file_info) class PropertyPageLabel(rabbitvcs.ui.GladeWidgetWrapper): glade_filename = "property_page" - glade_id = "property_page_label" \ No newline at end of file + glade_id = "property_page_label" + \ No newline at end of file diff -Nru rabbitvcs-0.13.2.1/rabbitvcs/ui/widget.py rabbitvcs-0.13.3/rabbitvcs/ui/widget.py --- rabbitvcs-0.13.2.1/rabbitvcs/ui/widget.py 2010-01-25 15:28:43.000000000 +0000 +++ rabbitvcs-0.13.3/rabbitvcs/ui/widget.py 2010-06-11 13:57:37.000000000 +0100 @@ -86,7 +86,12 @@ """ - row = model.get_model()[model.get_path(iter)] + try: + row = model.get_model()[model.get_path(iter)] + except TypeError, e: + log.exception(e) + log.exception(model.get_path(iter)) + if not filters: return row[column] @@ -234,19 +239,23 @@ self.data = self.get_store(coltypes) - # self.filter == filtered data (abs paths -> rel paths) - # self.data == actual data - - # The filter is there to change the way data is displayed. The data - # should always be accessed via self.data, NOT self.filter. - self.filter = self.data.filter_new() - types = (filter_types and filter_types or coltypes) - self.filter.set_modify_func( - types, - filter_router, - filters) - - self.treeview.set_model(self.filter) + if filters: + + # self.filter == filtered data (abs paths -> rel paths) + # self.data == actual data + + # The filter is there to change the way data is displayed. The data + # should always be accessed via self.data, NOT self.filter. + self.filter = self.data.filter_new() + types = (filter_types and filter_types or coltypes) + self.filter.set_modify_func( + types, + filter_router, + filters) + + self.treeview.set_model(self.filter) + else: + self.treeview.set_model(self.data) if len(values) > 0: self.populate(values)