##// END OF EJS Templates
addremove: automatically process a subrepository's subrepos...
Matt Harbison -
r23540:f274d27f default
parent child Browse files
Show More
@@ -5,6 +5,7 b''
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 import copy
8 import errno, os, re, shutil, posixpath, sys
9 import errno, os, re, shutil, posixpath, sys
9 import xml.dom.minidom
10 import xml.dom.minidom
10 import stat, subprocess, tarfile
11 import stat, subprocess, tarfile
@@ -624,6 +625,11 b' class hgsubrepo(abstractsubrepo):'
624 os.path.join(prefix, self._path), explicitonly)
625 os.path.join(prefix, self._path), explicitonly)
625
626
626 def addremove(self, m, prefix, opts, dry_run, similarity):
627 def addremove(self, m, prefix, opts, dry_run, similarity):
628 # In the same way as sub directories are processed, once in a subrepo,
629 # always entry any of its subrepos. Don't corrupt the options that will
630 # be used to process sibling subrepos however.
631 opts = copy.copy(opts)
632 opts['subrepos'] = True
627 return scmutil.addremove(self._repo, m,
633 return scmutil.addremove(self._repo, m,
628 os.path.join(prefix, self._path), opts,
634 os.path.join(prefix, self._path), opts,
629 dry_run, similarity)
635 dry_run, similarity)
@@ -155,6 +155,10 b' Test relative path printing + subrepos'
155 ? foo/bar/abc
155 ? foo/bar/abc
156 ? sub1/foo
156 ? sub1/foo
157 $ hg update -Cq
157 $ hg update -Cq
158 $ hg addremove sub1
159 adding sub1/sub2/folder/bar (glob)
160 adding sub1/foo (glob)
161 $ hg update -Cq
158 $ rm sub1/sub2/folder/test.txt
162 $ rm sub1/sub2/folder/test.txt
159 $ rm sub1/sub2/test.txt
163 $ rm sub1/sub2/test.txt
160 $ hg ci -ASm "remove test.txt"
164 $ hg ci -ASm "remove test.txt"
General Comments 0
You need to be logged in to leave comments. Login now