comparison hgext/convert/monotone.py @ 6332:950e72fc7cf3

convert: allow missing tools not to stop source type detection
author Patrick Mezard <pmezard@gmail.com>
date Thu, 20 Mar 2008 23:32:43 +0100
parents 6840668e3bf6
children b40e90341ae2
comparison
equal deleted inserted replaced
6331:627665e37bdd 6332:950e72fc7cf3
1 # monotone support for the convert extension 1 # monotone support for the convert extension
2 2
3 import os, re, time 3 import os, re, time
4 from mercurial import util 4 from mercurial import util
5 from common import NoRepo, commit, converter_source, checktool, commandline 5 from common import NoRepo, MissingTool, commit, converter_source, checktool
6 from common import commandline
6 from mercurial.i18n import _ 7 from mercurial.i18n import _
7 8
8 class monotone_source(converter_source, commandline): 9 class monotone_source(converter_source, commandline):
9 def __init__(self, ui, path=None, rev=None): 10 def __init__(self, ui, path=None, rev=None):
10 converter_source.__init__(self, ui, path, rev) 11 converter_source.__init__(self, ui, path, rev)
39 40
40 norepo = NoRepo (_("%s does not look like a monotone repo") % path) 41 norepo = NoRepo (_("%s does not look like a monotone repo") % path)
41 if not os.path.exists(path): 42 if not os.path.exists(path):
42 raise norepo 43 raise norepo
43 44
44 checktool('mtn') 45 checktool('mtn', abort=False)
45 46
46 # test if there are any revisions 47 # test if there are any revisions
47 self.rev = None 48 self.rev = None
48 try: 49 try:
49 self.getheads() 50 self.getheads()