[PATCH 3 of 3 STABLE V2] doc: add explanation about Mercurial specific escaping for subpaths

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Wed May 16 03:05:02 CDT 2012


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1337155350 -32400
# Branch stable
# Node ID 7cd7ea68a04d5f28d664f6183a3e07011b1a89a0
# Parent  c3eeae0a2e0ff4c0f493eb918f7458f2b12d93cb
doc: add explanation about Mercurial specific escaping for subpaths

diff -r c3eeae0a2e0f -r 7cd7ea68a04d mercurial/help/config.txt
--- a/mercurial/help/config.txt	Wed May 16 17:02:30 2012 +0900
+++ b/mercurial/help/config.txt	Wed May 16 17:02:30 2012 +0900
@@ -1065,6 +1065,16 @@
 
 rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``.
 
+.. note:: Even on Windows platforms, it is recommended to use ``/`` as
+   the path delimiter for local paths instead of ``\``, because the latter is
+   the special character for the regular expression.
+
+   For convenience, recent Mercurial escapes backslashes in
+   ``replacement`` at first, and then treats backslashes followed by
+   digits as back references of the regular expression. So, you can not
+   specify "the path element starting with digits" with backslashes as
+   path delimiters in ``replacement``.
+
 Relative subrepository paths are first made absolute, and the the
 rewrite rules are then applied on the full (absolute) path. The rules
 are applied in definition order.


More information about the Mercurial-devel mailing list