[PATCH 3 of 3] convert/mtn: Avoid unnecessary initial test of mtn repo
Patrick Mézard
pmezard at gmail.com
Wed Mar 23 19:04:16 CDT 2011
Le 23/03/11 20:24, daniel.atallah at gmail.com a écrit :
> # HG changeset patch
> # User Daniel Atallah <daniel.atallah at gmail.com>
> # Date 1300907025 14400
> # Branch stable
> # Node ID 4aa86a646c758dd86c13b4172d5e52f72c59b66c
> # Parent d2ef3495b1a62785683fc2a57212e8f2d2500fc6
> convert/mtn: Avoid unnecessary initial test of mtn repo
>
> As soon as begin() is called, we'll know if there is a problem (and get a better
> error message).
I do not understand this patch. Is begin() really before()? Where do you expect it to fail? Will it fail in non-stdioautomate mode too?
> 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)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
More information about the Mercurial-devel
mailing list