comparison mercurial/subrepo.py @ 26940:91786f20db83

git-subrepos: revert respects specified location to save .orig files This patch makes revert in git subrepos save .orig files where the user wants them by using the cmdutil.origpath function.
author Christian Delahousse <cdelahousse@fb.com>
date Tue, 10 Nov 2015 14:29:13 -0800
parents 1aee2ab0f902
children 07fc2f2134ba
comparison
equal deleted inserted replaced
26939:50d2389a2e49 26940:91786f20db83
1908 self.ui.status(_('reverting subrepo %s\n') % substate[0]) 1908 self.ui.status(_('reverting subrepo %s\n') % substate[0])
1909 if not opts.get('no_backup'): 1909 if not opts.get('no_backup'):
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)
1917 1917
1918 if not opts.get('dry_run'): 1918 if not opts.get('dry_run'):