Changeset c19f15cb969c…
Parent bea7aabf45bc…
by
Changes to one file · Browse files at c19f15cb969c Showing diff from parent bea7aabf45bc Diff from another changeset...
@@ -11,7 +11,7 @@ import re
import threading
import time
-from mercurial import hg, ui, util
+from mercurial import hg, ui, util, revlog
from hglib import hgcmd_toq
from gdialog import *
from vis import treemodel
@@ -334,7 +334,12 @@ '''
if revid == '.':
ctx = self.repo.workingctx().parents()[0]
- fctx = ctx.filectx(path)
+ try:
+ fctx = ctx.filectx(path)
+ except revlog.LookupError:
+ Prompt('File is unrevisioned',
+ 'Unable to annotate ' + path, self).run()
+ return
rev = fctx.filelog().linkrev(fctx.filenode())
revid = str(rev)
else:
@@ -591,7 +596,7 @@ dialog.display()
for f in cfiles:
dialog.add_annotate_page(f, '.')
- if not cfiles:
+ if not dialog.notebook.get_n_pages():
dialog.add_search_page()
gtk.gdk.threads_init()
|
Loading...