Changeset 268c0f038bcf…
Parent f5977e1979ed…
by
Changes to 2 files · Browse files at 268c0f038bcf Showing diff from parent f5977e1979ed Diff from another changeset...
@@ -21,12 +21,13 @@ import sys, os
import os.path as osp
-from mercurial import ui, hg, util
+from mercurial import ui, util
from mercurial.revlog import LookupError
from PyQt4 import QtGui, QtCore, Qsci
from PyQt4.QtCore import Qt, QSettings
+from tortoisehg.util import paths, thgrepo
from tortoisehg.util.hglib import tounicode
from tortoisehg.hgqt.dialogmixin import HgDialogMixin
@@ -141,25 +142,6 @@ s.setValue('manifest/splitter', self.splitter.saveState())
-if __name__ == '__main__':
- from mercurial import ui, hg
- from optparse import OptionParser
- opt = OptionParser()
- opt.add_option('-R', '--repo',
- dest='repo',
- default='.',
- help='Hg repository')
-
- options, args = opt.parse_args()
- if len(args) != 1:
- opt.error('Please specify a revision number')
- rev = args[0]
-
- u = ui.ui()
- repo = hg.repository(u, options.repo)
- app = QtGui.QApplication([])
-
- view = ManifestDialog(repo, int(rev))
- view.show()
- sys.exit(app.exec_())
-
+def run(ui, *pats, **opts):
+ repo = opts.get('repo') or thgrepo.repository(ui, paths.find_root())
+ return ManifestDialog(repo, opts.get('rev'))
|
@@ -469,6 +469,11 @@ from tortoisehg.hgqt.merge import run
qtrun(run, ui, *pats, **opts)
+def manifest(ui, *pats, **opts):
+ """display the current or given revision of the project manifest"""
+ from tortoisehg.hgqt.manifestdialog import run
+ qtrun(run, ui, *pats, **opts)
+
def guess(ui, *pats, **opts):
"""guess previous renames or copies"""
from tortoisehg.hgqt.guess import run
@@ -844,6 +849,10 @@ (log,
[('l', 'limit', '', _('limit number of changes displayed'))],
_('thg log [OPTIONS] [FILE]')),
+ "manifest":
+ (manifest,
+ [('r', 'rev', '', _('revision to display'))],
+ _('thg manifest [-r REV]')),
"^merge":
(merge,
[('r', 'rev', '', _('revision to merge'))],
|
Loading...