Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

stable manifestdialog: fix assert failure of stand-alone dialog at visdifflocal

ManifestWidget expects integer revision, but run() passes command-line
option as str.

Changeset 5c861b4906e1

Parent 43bab3fabe3b

by Yuya Nishihara

Changes to one file · Browse files at 5c861b4906e1 Showing diff from parent 43bab3fabe3b Diff from another changeset...

 
13
14
15
 
 
16
17
18
 
526
527
528
529
 
 
 
 
 
 
 
 
530
531
532
 
538
539
540
541
 
542
543
544
 
13
14
15
16
17
18
19
20
 
528
529
530
 
531
532
533
534
535
536
537
538
539
540
541
 
547
548
549
 
550
551
552
553
@@ -13,6 +13,8 @@
 from PyQt4.QtCore import *  from PyQt4.QtGui import *   +from mercurial import error +  from tortoisehg.util import paths, hglib    from tortoisehg.hgqt.i18n import _ @@ -526,7 +528,14 @@
   def run(ui, *pats, **opts):   repo = opts.get('repo') or thgrepo.repository(ui, paths.find_root()) - dlg = ManifestDialog(repo, opts.get('rev')) + try: + # ManifestWidget expects integer revision + rev = repo[opts.get('rev')].rev() + except error.RepoLookupError, e: + qtlib.ErrorMsgBox(_('Failed to open Manifest dialog'), + hglib.tounicode(e.message)) + return + dlg = ManifestDialog(repo, rev)     # set initial state after dialog visible   def init(): @@ -538,7 +547,7 @@
  else:   return   line = opts.get('line') and int(opts['line']) or None - dlg.setSource(path, opts.get('rev'), line) + dlg.setSource(path, rev, line)   if opts.get('pattern'):   dlg.setSearchPattern(opts['pattern'])   if dlg._manifest_widget._fileview.actionAnnMode.isEnabled():