@@ -204,7 +204,7 @@
return rejected and 1 or 0
@command('addremove',
- similarityopts + walkopts + dryrunopts,
+ similarityopts + subrepoopts + walkopts + dryrunopts,
_('[OPTION]... [FILE]...'),
inferrepo=True)
def addremove(ui, repo, *pats, **opts):
@@ -81,6 +81,10 @@
Git and Subversion subrepositories are currently silently
ignored.
+:addremove: addremove does not recurse into subrepos unless
+ -S/--subrepos is specified. Git and Subversion subrepositories
+ will print a warning and continue.
+
:archive: archive does not recurse in subrepositories unless
-S/--subrepos is specified.
@@ -215,7 +215,7 @@
status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, copies, print0, rev, change, include, exclude, subrepos, template
summary: remote
update: clean, check, date, rev, tool
- addremove: similarity, include, exclude, dry-run
+ addremove: similarity, subrepos, include, exclude, dry-run
archive: no-decode, prefix, rev, type, subrepos, include, exclude
backout: merge, parent, rev, edit, tool, include, exclude, message, logfile, date, user
bisect: reset, good, bad, skip, extend, command, noupdate
@@ -128,11 +128,23 @@
R sub1/.hgsubstate
R sub1/sub2/folder/test.txt
$ hg update -Cq
+ $ touch sub1/foo
+ $ hg forget sub1/sub2/folder/test.txt
+ $ rm sub1/sub2/test.txt
+ $ hg addremove -S
+ adding sub1/sub2/folder/test.txt (glob)
+ removing sub1/sub2/test.txt (glob)
+ adding sub1/foo (glob)
+ $ hg status -S
+ A sub1/foo
+ R sub1/sub2/test.txt
+ $ hg update -Cq
$ rm sub1/sub2/folder/test.txt
$ rm sub1/sub2/test.txt
$ hg ci -ASm "remove test.txt"
removing sub1/sub2/folder/test.txt (glob)
removing sub1/sub2/test.txt (glob)
+ adding sub1/foo (glob)
committing subrepository sub1
committing subrepository sub1/sub2 (glob)
$ hg rollback -q