Commits

Anonymous committed 48d1349

history: fix 'hang-up' in empty repository

[SF Bug #2103275]

Comments (0)

Files changed (1)

hggtk/vis/treeview.py

     def refresh(self, graphcol, pats, opts):
         self.repo.invalidate()
         self.repo.dirstate.invalidate()
-        self.create_log_generator(graphcol, pats, opts)
-        self.pbar.begin()
-        gobject.idle_add(self.populate, self.get_revision())
+        if self.repo.changelog.count() > 0:
+            self.create_log_generator(graphcol, pats, opts)
+            self.pbar.begin()
+            gobject.idle_add(self.populate, self.get_revision())
+        else:
+            self.pbar.set_status_text('Repository is empty')
 
     def construct_treeview(self):
         self.treeview = gtk.TreeView()