# HG changeset patch # User Daniel Atallah # Date 1301062426 14400 # Node ID aeb41f0048e70dadeae2c8c6e3557367bf5d4de6 # Parent ed97955e0c041aabc6886a6b99527dcbf402c0d6 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 -r ed97955e0c04 -r aeb41f0048e7 hgext/convert/monotone.py --- a/hgext/convert/monotone.py Wed Mar 23 14:26:56 2011 -0400 +++ b/hgext/convert/monotone.py Fri Mar 25 10:13:46 2011 -0400 @@ -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)