comparison mercurial/commands.py @ 41602:92bd3d86f2e0

resolve: migrate to scmutil.backuppath() Differential Revision: https://phab.mercurial-scm.org/D5858
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 04 Feb 2019 21:31:18 -0800
parents 5f827e9ce870
children eeab8c1c926b
comparison
equal deleted inserted replaced
41601:ac8cf125d8d5 41602:92bd3d86f2e0
4969 # replace filemerge's .orig file with our resolve file, but only 4969 # replace filemerge's .orig file with our resolve file, but only
4970 # for merges that are complete 4970 # for merges that are complete
4971 if complete: 4971 if complete:
4972 try: 4972 try:
4973 util.rename(a + ".resolve", 4973 util.rename(a + ".resolve",
4974 scmutil.origpath(ui, repo, a)) 4974 scmutil.backuppath(ui, repo, f))
4975 except OSError as inst: 4975 except OSError as inst:
4976 if inst.errno != errno.ENOENT: 4976 if inst.errno != errno.ENOENT:
4977 raise 4977 raise
4978 4978
4979 if hasconflictmarkers: 4979 if hasconflictmarkers:
4995 ms.commit() 4995 ms.commit()
4996 4996
4997 # replace filemerge's .orig file with our resolve file 4997 # replace filemerge's .orig file with our resolve file
4998 a = repo.wjoin(f) 4998 a = repo.wjoin(f)
4999 try: 4999 try:
5000 util.rename(a + ".resolve", scmutil.origpath(ui, repo, a)) 5000 util.rename(a + ".resolve", scmutil.backuppath(ui, repo, f))
5001 except OSError as inst: 5001 except OSError as inst:
5002 if inst.errno != errno.ENOENT: 5002 if inst.errno != errno.ENOENT:
5003 raise 5003 raise
5004 5004
5005 ms.commit() 5005 ms.commit()