Mercurial > public > mercurial-scm > hg
diff mercurial/scmutil.py @ 34146:9e4f82bc2b0b
scmutil: don't append .orig to backups in origbackuppath (BC)
When ui.origbackuppath is set, .orig files are stored outside of the working
copy, however they still have a .orig suffix appended to them. This can cause
unexpected conflicts, particularly when tracked files or directories have .orig
at the end.
This change removes the .orig suffix from files stored in an out-of-tree
origbackuppath.
Test Plan:
Update and run unit tests.
Differential Revision: https://phab.mercurial-scm.org/D679
author | Mark Thomas <mbthomas@fb.com> |
---|---|
date | Mon, 11 Sep 2017 17:49:49 +0000 |
parents | d5b2beca16c0 |
children | 4647e0a8d3d7 |
line wrap: on
line diff
--- a/mercurial/scmutil.py Tue Sep 12 19:27:01 2017 -0700 +++ b/mercurial/scmutil.py Mon Sep 11 17:49:49 2017 +0000 @@ -553,7 +553,7 @@ '''customize where .orig files are created Fetch user defined path from config file: [ui] origbackuppath = <path> - Fall back to default (filepath) if not specified + Fall back to default (filepath with .orig suffix) if not specified ''' origbackuppath = ui.config('ui', 'origbackuppath') if origbackuppath is None: @@ -567,7 +567,7 @@ ui.note(_('creating directory: %s\n') % origbackupdir) util.makedirs(origbackupdir) - return fullorigpath + ".orig" + return fullorigpath class _containsnode(object): """proxy __contains__(node) to container.__contains__ which accepts revs"""