[PATCH 1 of 2] commands: show also the hint other than ".hg not found" for "no Mercurial repository" failure
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Thu Aug 30 02:51:56 CDT 2012
At Wed, 29 Aug 2012 13:57:59 +0200,
Mads Kiilerich wrote:
>
> On 08/29/2012 10:17 AM, FUJIWARA Katsunori wrote:
> > # HG changeset patch
> > # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> > # Date 1346226786 -32400
> > # Node ID da5222276e629c7280d94972d55a8140e83117f4
> > # Parent fc14953e8e34667181cd0d492825342b5e1e880b
> > commands: show also the hint other than ".hg not found" for "no Mercurial repository" failure
> >
> > Before this patch, Mercurial shows the error message below, even if
> > there is ".hg" directory and the real reason of failure is mismatching
> > between features supported by "hg" command and ones required in target
> > repository:
> >
> > there is no Mercurial repository here (.hg not found)
> >
> > The message explaining detail of failure like as below is shown at
> > some command invocations:
> >
> > unknown repository format: requires features 'xxxx' (upgrade
> > Mercurial)
> >
> > But this message is hidden at invocations of commands categorized as
> > "norepo" or "optionalrepo".
>
> It seems like it would be better to not hide these errors in the first
> place.
>
> That could perhaps be done with a cleanup of the different uses of
> RepoError (and thus RequirementError). "repository %s not found" is
> AFAICS the only error that silently should be ignored for 'optionalrepo'
> (and 'norepo'). All other kinds of RepoError are much more serious and
> should thus perhaps use a different exception.
>
> /Mads
>
Thank you for your comments, Mads.
And, sorry, I overlooked that this problem was already fixed by
931a72e00efa (and released in "1.8"):
http://selenic.com/repo/hg/rev/931a72e00efa
So, I'll focus on #2 patch of this series for combination of new "hg"
on client side and old (earlier than 1.8) one on remote side.
----------------------------------------------------------------------
[FUJIWARA Katsunori] foozy at lares.dti.ne.jp
More information about the Mercurial-devel
mailing list