Mercurial > hg > mercurial-source
diff mercurial/subrepo.py @ 24189:afed5d2e7985
revert: display full subrepo output with --dry-run
Since the point of --dry-run is to show what will happen, the output with and
without it should agree. And since revert wasn't being called on subrepos with
--dry-run before, revert in the subrepo had to be defanged in this case.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 07 Feb 2015 21:47:28 -0500 (2015-02-08) |
parents | b5898bf7119a |
children | 27b6d41aa029 |
line wrap: on
line diff
--- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -884,7 +884,8 @@ self.filerevert(*pats, **opts) # Update the repo to the revision specified in the given substate - self.get(substate, overwrite=True) + if not opts.get('dry_run'): + self.get(substate, overwrite=True) def filerevert(self, *pats, **opts): ctx = self._repo[opts['rev']] @@ -1693,7 +1694,8 @@ util.rename(os.path.join(self._abspath, name), os.path.join(self._abspath, bakname)) - self.get(substate, overwrite=True) + if not opts.get('dry_run'): + self.get(substate, overwrite=True) return [] def shortid(self, revid):