Show More
@@ -1824,15 +1824,15 b' class gitsubrepo(abstractsubrepo):' | |||
|
1824 | 1824 | if not opts.get(r'no_backup'): |
|
1825 | 1825 | status = self.status(None) |
|
1826 | 1826 | names = status.modified |
|
1827 | origvfs = scmutil.getorigvfs(self.ui, self._subparent) | |
|
1828 | if origvfs is None: | |
|
1829 | origvfs = self.wvfs | |
|
1830 | 1827 | for name in names: |
|
1831 | bakname = scmutil.origpath(self.ui, self._subparent, name) | |
|
1828 | # backuppath() expects a path relative to the parent repo (the | |
|
1829 | # repo that ui.origbackuppath is relative to) | |
|
1830 | parentname = os.path.join(self._path, name) | |
|
1831 | bakname = scmutil.backuppath(self.ui, self._subparent, | |
|
1832 | parentname) | |
|
1832 | 1833 | self.ui.note(_('saving current version of %s as %s\n') % |
|
1833 | 1834 | (name, os.path.relpath(bakname))) |
|
1834 |
|
|
|
1835 | origvfs.rename(name, bakname) | |
|
1835 | util.rename(self.wvfs.join(name), bakname) | |
|
1836 | 1836 | |
|
1837 | 1837 | if not opts.get(r'dry_run'): |
|
1838 | 1838 | self.get(substate, overwrite=True) |
@@ -924,9 +924,9 b' revert moves orig files to the right pla' | |||
|
924 | 924 | $ echo 'bloop' > s/foobar |
|
925 | 925 | $ hg revert --all --verbose --config 'ui.origbackuppath=.hg/origbackups' |
|
926 | 926 | reverting subrepo ../gitroot |
|
927 | creating directory: $TESTTMP/tc/.hg/origbackups | |
|
928 | saving current version of foobar as .hg/origbackups/foobar | |
|
929 | $ ls .hg/origbackups | |
|
927 | creating directory: $TESTTMP/tc/.hg/origbackups/s | |
|
928 | saving current version of foobar as .hg/origbackups/s/foobar | |
|
929 | $ ls .hg/origbackups/s | |
|
930 | 930 | foobar |
|
931 | 931 | $ rm -rf .hg/origbackups |
|
932 | 932 |
General Comments 0
You need to be logged in to leave comments.
Login now