[PATCH V2] import: report directory-relative paths in error messages (issue5224)

Yuya Nishihara yuya at tcha.org
Sun Sep 4 11:22:39 EDT 2016


On Fri, 02 Sep 2016 09:15:26 +0200, liscju wrote:
> # HG changeset patch
> # User liscju <piotr.listkiewicz at gmail.com>
> # Date 1472208500 -7200
> #      Fri Aug 26 12:48:20 2016 +0200
> # Node ID 48eb647e37e99a8c996420e3b99e8b538cf08caa
> # Parent  b1809f5d7630a3fff0fa715bbd30dba0f07672a8
> import: report directory-relative paths in error messages (issue5224)

> diff --git a/tests/test-import-bypass.t b/tests/test-import-bypass.t
> --- a/tests/test-import-bypass.t
> +++ b/tests/test-import-bypass.t
> @@ -41,6 +41,7 @@ Test failure without --exact
>    $ hg import --bypass ../test.diff
>    applying ../test.diff
>    unable to find 'a' for patching
> +  Note that paths are relative to the root of repository, use --prefix option to change it
>    abort: patch failed to apply

As you see, warning messages generally start with lowercase letter, and hints
are surrounded by parens. So I suggest something like this:

  unable to find 'a' for patching
  (use '--prefix .' to apply patch relative to the current directory)


More information about the Mercurial-devel mailing list