comparison mercurial/subrepo.py @ 36945:45bfcd16f27e

forget: add --dry-run mode
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Sat, 10 Mar 2018 12:33:19 +0530
parents 390d16ea7c76
children f0b6fbea00cf
comparison
equal deleted inserted replaced
36944:8fd9b56e8d7c 36945:45bfcd16f27e
346 ''' 346 '''
347 walk recursively through the directory tree, finding all files 347 walk recursively through the directory tree, finding all files
348 matched by the match function 348 matched by the match function
349 ''' 349 '''
350 350
351 def forget(self, match, prefix): 351 def forget(self, match, prefix, dryrun):
352 return ([], []) 352 return ([], [])
353 353
354 def removefiles(self, matcher, prefix, after, force, subrepos, warnings): 354 def removefiles(self, matcher, prefix, after, force, subrepos, warnings):
355 """remove the matched files from the subrepository and the filesystem, 355 """remove the matched files from the subrepository and the filesystem,
356 possibly by force and/or after the file has been removed from the 356 possibly by force and/or after the file has been removed from the
809 def walk(self, match): 809 def walk(self, match):
810 ctx = self._repo[None] 810 ctx = self._repo[None]
811 return ctx.walk(match) 811 return ctx.walk(match)
812 812
813 @annotatesubrepoerror 813 @annotatesubrepoerror
814 def forget(self, match, prefix): 814 def forget(self, match, prefix, dryrun):
815 return cmdutil.forget(self.ui, self._repo, match, 815 return cmdutil.forget(self.ui, self._repo, match,
816 self.wvfs.reljoin(prefix, self._path), True) 816 self.wvfs.reljoin(prefix, self._path),
817 True, dryrun=dryrun)
817 818
818 @annotatesubrepoerror 819 @annotatesubrepoerror
819 def removefiles(self, matcher, prefix, after, force, subrepos, warnings): 820 def removefiles(self, matcher, prefix, after, force, subrepos, warnings):
820 return cmdutil.remove(self.ui, self._repo, matcher, 821 return cmdutil.remove(self.ui, self._repo, matcher,
821 self.wvfs.reljoin(prefix, self._path), 822 self.wvfs.reljoin(prefix, self._path),