Mercurial > hg
diff hgext/convert/monotone.py @ 7973:db3a68fd9387
convert: attempt to check repo type before checking for tool
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 04 Apr 2009 12:28:13 -0500 |
parents | 88a2687fbd38 |
children | 683d8ebcf434 |
line wrap: on
line diff
--- a/hgext/convert/monotone.py Sat Apr 04 19:43:00 2009 +0200 +++ b/hgext/convert/monotone.py Sat Apr 04 12:28:13 2009 -0500 @@ -14,6 +14,10 @@ self.ui = ui self.path = path + norepo = NoRepo (_("%s does not look like a monotone repo") % path) + if not os.path.exists(os.path.join(path, '_MTN')): + raise norepo + # regular expressions for parsing monotone output space = r'\s*' name = r'\s+"((?:\\"|[^"])*)"\s*' @@ -39,10 +43,6 @@ self.files = None self.dirs = None - norepo = NoRepo (_("%s does not look like a monotone repo") % path) - if not os.path.exists(path): - raise norepo - checktool('mtn', abort=False) # test if there are any revisions