changeset 41593:59025c9b3540

subrepo: always show relative path to .orig backup Same as previous commit, but for subrepo. Differential Revision: https://phab.mercurial-scm.org/D5873
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 06 Feb 2019 15:35:25 -0800
parents e67a85e0f19e
children 7e09ffb3170d
files mercurial/subrepo.py tests/test-subrepo-git.t
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/subrepo.py	Wed Feb 06 15:26:53 2019 -0800
+++ b/mercurial/subrepo.py	Wed Feb 06 15:35:25 2019 -0800
@@ -1830,7 +1830,7 @@
             for name in names:
                 bakname = scmutil.origpath(self.ui, self._subparent, name)
                 self.ui.note(_('saving current version of %s as %s\n') %
-                        (name, bakname))
+                        (name, os.path.relpath(bakname)))
                 name = self.wvfs.join(name)
                 origvfs.rename(name, bakname)
 
--- a/tests/test-subrepo-git.t	Wed Feb 06 15:26:53 2019 -0800
+++ b/tests/test-subrepo-git.t	Wed Feb 06 15:35:25 2019 -0800
@@ -925,7 +925,7 @@
   $ hg revert --all --verbose --config 'ui.origbackuppath=.hg/origbackups'
   reverting subrepo ../gitroot
   creating directory: $TESTTMP/tc/.hg/origbackups
-  saving current version of foobar as $TESTTMP/tc/.hg/origbackups/foobar
+  saving current version of foobar as .hg/origbackups/foobar
   $ ls .hg/origbackups
   foobar
   $ rm -rf .hg/origbackups