Patchwork D5873: subrepo: always show relative path to .orig backup

login
register
mail settings
Submitter phabricator
Date Feb. 7, 2019, 2:02 a.m.
Message ID <f2feb453e39f3404431247d60e0caec2@localhost.localdomain>
Download mbox | patch
Permalink /patch/38500/
State Not Applicable
Headers show

Comments

phabricator - Feb. 7, 2019, 2:02 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG59025c9b3540: subrepo: always show relative path to .orig backup (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5873?vs=13854&id=13871

REVISION DETAIL
  https://phab.mercurial-scm.org/D5873

AFFECTED FILES
  mercurial/subrepo.py
  tests/test-subrepo-git.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t
--- a/tests/test-subrepo-git.t
+++ b/tests/test-subrepo-git.t
@@ -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
diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -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)