##// END OF EJS Templates
git-subrepos: revert respects specified location to save .orig files...
Christian Delahousse -
r26940:91786f20 default
parent child Browse files
Show More
@@ -1910,7 +1910,7 b' class gitsubrepo(abstractsubrepo):'
1910 1910 status = self.status(None)
1911 1911 names = status.modified
1912 1912 for name in names:
1913 bakname = "%s.orig" % name
1913 bakname = cmdutil.origpath(self.ui, self._subparent, name)
1914 1914 self.ui.note(_('saving current version of %s as %s\n') %
1915 1915 (name, bakname))
1916 1916 self.wvfs.rename(name, bakname)
@@ -875,6 +875,16 b' revert the subrepository'
875 875 $ hg status --subrepos
876 876 ? s/barfoo
877 877
878 revert moves orig files to the right place
879 $ echo 'bloop' > s/foobar
880 $ hg revert --all --verbose --config 'ui.origbackuppath=.hg/origbackups'
881 reverting subrepo ../gitroot
882 creating directory: $TESTTMP/tc/.hg/origbackups
883 saving current version of foobar as $TESTTMP/tc/.hg/origbackups/foobar.orig
884 $ ls .hg/origbackups
885 foobar.orig
886 $ rm -rf .hg/origbackups
887
878 888 show file at specific revision
879 889 $ cat > s/foobar << EOF
880 890 > woop woop
General Comments 0
You need to be logged in to leave comments. Login now