[PATCH 3 of 3] add: deprecate --subrepo option
David M. Carr
david at carrclan.us
Mon Oct 31 20:56:48 CDT 2011
# HG changeset patch
# User David M. Carr <david at carrclan.us>
# Date 1320030277 14400
# Branch stable
# Node ID 8d239d0d31bf8a5b8f1f8aa0a89f64a491ed4e41
# Parent 5e4b658f6f60adff3cc39ef20ea2753ca9a29db5
add: deprecate --subrepo option
Now that handling subrepos in add is always done, there's no point in
using an option that will always be ignored. For now, retain it for
backwards compatibility.
diff -r 5e4b658f6f60 -r 8d239d0d31bf mercurial/commands.py
--- a/mercurial/commands.py Sun Oct 30 22:12:02 2011 -0400
+++ b/mercurial/commands.py Sun Oct 30 23:04:37 2011 -0400
@@ -133,10 +133,15 @@
_('recurse into subrepositories'))
]
+subrepoopts2 = [
+ ('S', 'subrepos', None,
+ _('recurse into subrepositories (DEPRECATED)'))
+]
+
# Commands start here, listed alphabetically
@command('^add',
- walkopts + subrepoopts + dryrunopts,
+ walkopts + subrepoopts2 + dryrunopts,
_('[OPTION]... [FILE]...'))
def add(ui, repo, *pats, **opts):
"""add the specified files on the next commit
diff -r 5e4b658f6f60 -r 8d239d0d31bf tests/test-help.t
--- a/tests/test-help.t Sun Oct 30 22:12:02 2011 -0400
+++ b/tests/test-help.t Sun Oct 30 23:04:37 2011 -0400
@@ -282,7 +282,6 @@
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
- -S --subrepos recurse into subrepositories
-n --dry-run do not perform actions, just print output
[+] marked option can be specified multiple times
@@ -321,7 +320,7 @@
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
- -S --subrepos recurse into subrepositories
+ -S --subrepos recurse into subrepositories (DEPRECATED)
-n --dry-run do not perform actions, just print output
[+] marked option can be specified multiple times
@@ -368,7 +367,6 @@
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
- -S --subrepos recurse into subrepositories
-n --dry-run do not perform actions, just print output
[+] marked option can be specified multiple times
More information about the Mercurial-devel
mailing list