Patchwork [8,of,9] convert: more clear documentation of the 'include' default of a 'include .'

login
register
mail settings
Submitter Mads Kiilerich
Date March 18, 2014, 11:33 p.m.
Message ID <a8c131b3be15ba4b72bb.1395185636@localhost.localdomain>
Download mbox | patch
Permalink /patch/3979/
State Accepted
Commit 7f4cf938643d5182a20744854c8fcd247c6e31aa
Headers show

Comments

Mads Kiilerich - March 18, 2014, 11:33 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1395184794 -3600
#      Wed Mar 19 00:19:54 2014 +0100
# Node ID a8c131b3be15ba4b72bbce330258c46f6addd7d0
# Parent  e00c2a57827a52e15adaa000e427306a8b904bdb
convert: more clear documentation of the 'include' default of a 'include .'

At first glance it can be confusing that adding a superfluous include directive
will exclude more files.
Matt Mackall - March 19, 2014, 6:27 p.m.
On Wed, 2014-03-19 at 00:33 +0100, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski@unity3d.com>
> # Date 1395184794 -3600
> #      Wed Mar 19 00:19:54 2014 +0100
> # Node ID a8c131b3be15ba4b72bbce330258c46f6addd7d0
> # Parent  e00c2a57827a52e15adaa000e427306a8b904bdb
> convert: more clear documentation of the 'include' default of a 'include .'

doc fix -> queued for stable

Patch

diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py
--- a/hgext/convert/__init__.py
+++ b/hgext/convert/__init__.py
@@ -101,9 +101,10 @@  def convert(ui, src, dest=None, revmapfi
     longest matching path applies, so line order does not matter.
 
     The ``include`` directive causes a file, or all files under a
-    directory, to be included in the destination repository, and the
-    exclusion of all other files and directories not explicitly
-    included. The ``exclude`` directive causes files or directories to
+    directory, to be included in the destination repository. The default
+    if there are no ``include`` statements is to include everything.
+    If there are any ``include`` statements, nothing else is included.
+    The ``exclude`` directive causes files or directories to
     be omitted. The ``rename`` directive renames a file or directory if
     it is converted. To rename from a subdirectory into the root of
     the repository, use ``.`` as the path to rename to.
diff --git a/tests/test-convert.t b/tests/test-convert.t
--- a/tests/test-convert.t
+++ b/tests/test-convert.t
@@ -84,11 +84,12 @@ 
       so line order does not matter.
   
       The "include" directive causes a file, or all files under a directory, to
-      be included in the destination repository, and the exclusion of all other
-      files and directories not explicitly included. The "exclude" directive
-      causes files or directories to be omitted. The "rename" directive renames
-      a file or directory if it is converted. To rename from a subdirectory into
-      the root of the repository, use "." as the path to rename to.
+      be included in the destination repository. The default if there are no
+      "include" statements is to include everything. If there are any "include"
+      statements, nothing else is included. The "exclude" directive causes files
+      or directories to be omitted. The "rename" directive renames a file or
+      directory if it is converted. To rename from a subdirectory into the root
+      of the repository, use "." as the path to rename to.
   
       The splicemap is a file that allows insertion of synthetic history,
       letting you specify the parents of a revision. This is useful if you want