changeset 41:b8a7342fbf23

outgoingall and incomingall can't handle -g as it is already taken, sticking to just --group
author Marcin Kasperski <Marcin.Kasperski@mekk.waw.pl>
date Sat, 24 Sep 2016 23:06:23 +0200
parents 1c22cd2904eb
children 7b4bc975644c
files README.txt mercurial_all_paths.py tests/groups-legacy.t
diffstat 3 files changed, 37 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/README.txt	Sat Sep 24 22:46:21 2016 +0200
+++ b/README.txt	Sat Sep 24 23:06:23 2016 +0200
@@ -51,7 +51,11 @@
     hg pushall -g publish
 
 pushes to all paths from the ``publish`` group (where ``publish`` is
-symbolic name of your choosing).
+symbolic name of your choosing). Or::
+
+    hg pullall -g shared
+
+pulls from all paths in ``shared`` group.
 
 There are two ways to define such a group:
 
@@ -87,6 +91,12 @@
 every repository (especially handy if you use `Path Pattern`_), and is
 more compact.
 
+Groups are also handled for ``incomingall`` and ``outgoingall``, but
+long ``--group`` option must be used (``-g`` is already taken by
+standard Mercurial, means reporting in ``--git`` diff format)::
+
+     hg outgoingall --group publish
+
 Configuration
 =======================================================
 
--- a/mercurial_all_paths.py	Sat Sep 24 22:46:21 2016 +0200
+++ b/mercurial_all_paths.py	Sat Sep 24 23:06:23 2016 +0200
@@ -81,14 +81,15 @@
         pullall,
         EXT_OPTS + _original_options('pull'),
         _('[-g GROUP] [--ignore-errors] <pull options>')),
+    # For incoming and outgoing -g is taken (--git diff format)
     "incomingall": (
         incomingall,
         EXT_OPTS + _original_options('incoming'),
-        _('[-g GROUP] [--ignore-errors] <incoming options>')),
+        _('[--group GROUP] [--ignore-errors] <incoming options>')),
     "outgoingall": (
         outgoingall,
         EXT_OPTS + _original_options('outgoing'),
-        _('[-g GROUP] [--ignore-errors] <outgoing options>')),
+        _('[--group GROUP] [--ignore-errors] <outgoing options>')),
 }
 
 testedwith = '2.7 2.9 3.0 3.3 3.6 3.7 3.8'
--- a/tests/groups-legacy.t	Sat Sep 24 22:46:21 2016 +0200
+++ b/tests/groups-legacy.t	Sat Sep 24 23:06:23 2016 +0200
@@ -86,7 +86,7 @@
   $ hg --cwd $BASE commit -m 'Second'
 
 
-  $ hg --cwd $BASE pushall -g even
+  $ hg --cwd $BASE pushall --group even
   pushing to */rep2 (glob)
   searching for changes
   adding changesets
@@ -138,7 +138,7 @@
 
   $ hg --cwd $REP2 commit -m "In repo2"
 
-  $ hg --cwd $BASE incomingall -g odd
+  $ hg --cwd $BASE incomingall --group odd
   comparing with */rep1 (glob)
   searching for changes
   changeset:   1:* (glob)
@@ -146,21 +146,24 @@
   user:        Andy Default <default@nowhere.net>
   date:        .* (re)
   summary:     In repo1
+  
+  comparing with */rep3 (glob)
+  searching for changes
+  no changes found
 
+  $ hg --cwd $BASE incomingall --group even
   comparing with */rep2 (glob)
   searching for changes
-  changeset:   1:* (glob)
+  changeset:   2:.* (re)
   tag:         tip
   user:        Andy Default <default@nowhere.net>
   date:        .* (re)
   summary:     In repo2
-
-  comparing with */rep3 (glob)
+  
+  comparing with */rep4 (glob)
   searching for changes
   no changes found
 
-  $ hg --cwd $BASE incomingall -g even
-
   $ hg --cwd $BASE pullall -g odd
   pulling from */rep1 (glob)
   searching for changes
@@ -174,11 +177,11 @@
   no changes found
 
   $ hg --cwd $BASE log  -T '{rev}: {desc}\n'
-  2: In repo2
-  1: In repo1
+  2: In repo1
+  1: Second
   0: First
 
-  $ hg --cwd $BASE outgoingall
+  $ hg --cwd $BASE outgoingall --group even
   comparing with */rep1 (glob)
   searching for changes
   changeset:   2:.* (re)
@@ -188,14 +191,16 @@
   date:        .* (re)
   summary:     In repo2
 
-  comparing with */rep2 (glob)
+  comparing with */rep3 (glob)
   searching for changes
   changeset:   1:* (glob)
   user:        Andy Default <default@nowhere.net>
   date:        .* (re)
   summary:     In repo1
 
-  comparing with */rep3 (glob)
+  $ hg --cwd $BASE outgoingall --group odd
+
+  comparing with */rep2 (glob)
   searching for changes
   changeset:   1:* (glob)
   user:        Andy Default <default@nowhere.net>
@@ -209,23 +214,22 @@
   date:        .* (re)
   summary:     In repo2
 
-
 Wrong groups do not work
 
   $ hg --cwd $BASE pullall -g unknown
-  abort: No paths defined in section paths
+  abort: No paths defined in section unknown
   [255]
 
-  $ hg --cwd $BASE incomingall -g unknown
-  abort: No paths defined in section paths
+  $ hg --cwd $BASE incomingall --group unknown
+  abort: No paths defined in section unknown
   [255]
 
-  $ hg --cwd $BASE outgoingall -g unknown
-  abort: No paths defined in section paths
+  $ hg --cwd $BASE outgoingall --group unknown
+  abort: No paths defined in section unknown
   [255]
 
   $ hg --cwd $BASE pushall -g unknown
-  abort: No paths defined in section paths
+  abort: No paths defined in section unknown
   [255]
 
 Neither do default commands without normal paths