RepoError should be importable from mercurial.repo?
Peter Ruibal
ruibalp at gmail.com
Mon Feb 2 15:45:04 UTC 2009
On Mon, Feb 2, 2009 at 5:10 AM, Christian Boos <cboos at neuf.fr> wrote:
> Hello,
>
> In the 08cabecfa8a8 changeset ("errors: move revlog errors"), together with
> the move of RevLogError and LookupError from mercurial.revlog to
> mercurial.error, there was also a change which took care of backward
> compatibility, in mercurial/revlog.py:
> +RevlogError = error.RevlogError
> +LookupError = error.LookupError
>
> But a few changesets later, in 1d54e2f6c0b7 "error: move repo errors", such
> a backward compatibility change was not done. Was that on purpose or simply
> accidental?
> In case this was indeed accidental, I'd be interested to get at least
> RepoError importable from mercurial.repo again.
>
> Thanks!
>
> -- Christian
>
>
> # HG changeset patch
> # User Christian Boos <cboos at neuf.fr>
> # Date 1233577418 -3600
> # Node ID 289c7d58983cfc8ef9aa4c046480dce84bfb6a1d
> # Parent 752325f2208d4279a4fc892adddd1bfbc61b0ad1
> RepoError should be importable from mercurial.repo
> (backward compatibility fix for 1d54e2f6c0b7)
>
> diff -r 752325f2208d -r 289c7d58983c mercurial/repo.py
> --- a/mercurial/repo.py Sun Jan 25 12:09:51 2009 -0600
> +++ b/mercurial/repo.py Mon Feb 02 13:23:38 2009 +0100
> @@ -7,6 +7,9 @@
> # of the GNU General Public License, incorporated herein by reference.
>
> from i18n import _
> +from mercurial import error
> +
> +RepoError = error.RepoError
>
> class repository(object):
> def capable(self, name):
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
>
In this case, wouldn't we want a similar patch to cmdutil.py too?
Thanks,
--
Peter Ruibal
# HG changeset patch
# User Peter Ruibal <ruibalp at gmail.com>
# Date 1233589306 28800
Ambiguous/UnknownCommand should be importable from mercurial.cmdutil
(backward compatibility fix for 1d54e2f6c0b7)
diff -r 29910eec7e79 mercurial/cmdutil.py
--- a/mercurial/cmdutil.py Sun Jan 11 14:49:19 2009 -0800
+++ b/mercurial/cmdutil.py Mon Feb 02 07:42:32 2009 -0800
@@ -12,6 +12,8 @@
import match as _match
revrangesep = ':'
+AmbiguousCommand = error.AmbiguousCommand
+UnknownCommand = error.UnknownCommand
def findpossible(cmd, table, strict=False):
"""
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20090202/494fd6c1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-import-cmdutil_CommandErrors.patch
Type: application/octet-stream
Size: 561 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20090202/494fd6c1/attachment-0002.obj>
More information about the Mercurial-devel
mailing list