[PATCH 3 of 3 V3] convert/mtn: Avoid unnecessary initial test of mtn repo
daniel.atallah at gmail.com
daniel.atallah at gmail.com
Fri Mar 25 14:14:41 UTC 2011
# HG changeset patch
# User Daniel Atallah <daniel.atallah at gmail.com>
# Date 1301062426 14400
# Branch stable
# Node ID 3ce8f1e70bad2cd91c588ce4bc24310ae0c6d665
# Parent 0a2ee21d180173c5991a7203c8177e6af9f430b7
convert/mtn: Avoid unnecessary initial test of mtn repo
As soon as before() is called, we'll know if there is a problem (and get a
better error message).
diff --git a/hgext/convert/monotone.py b/hgext/convert/monotone.py
--- a/hgext/convert/monotone.py
+++ b/hgext/convert/monotone.py
@@ -20,6 +20,7 @@
self.ui = ui
self.path = path
self.automatestdio = False
+ self.rev = rev
norepo = NoRepo(_("%s does not look like a monotone repository")
% path)
@@ -65,14 +66,6 @@
checktool('mtn', abort=False)
- # test if there are any revisions
- self.rev = None
- try:
- self.getheads()
- except:
- raise norepo
- self.rev = rev
-
def mtnrun(self, *args, **kwargs):
if self.automatestdio:
return self.mtnrunstdio(*args, **kwargs)
More information about the Mercurial-devel
mailing list