##// 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 status = self.status(None)
1910 status = self.status(None)
1911 names = status.modified
1911 names = status.modified
1912 for name in names:
1912 for name in names:
1913 bakname = "%s.orig" % name
1913 bakname = cmdutil.origpath(self.ui, self._subparent, name)
1914 self.ui.note(_('saving current version of %s as %s\n') %
1914 self.ui.note(_('saving current version of %s as %s\n') %
1915 (name, bakname))
1915 (name, bakname))
1916 self.wvfs.rename(name, bakname)
1916 self.wvfs.rename(name, bakname)
@@ -875,6 +875,16 b' revert the subrepository'
875 $ hg status --subrepos
875 $ hg status --subrepos
876 ? s/barfoo
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 show file at specific revision
888 show file at specific revision
879 $ cat > s/foobar << EOF
889 $ cat > s/foobar << EOF
880 > woop woop
890 > woop woop
General Comments 0
You need to be logged in to leave comments. Login now