Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 26939:50d2389a2e49
resolve: choose where .orig file locations are kept
Having your working copy littered with .orig files is a common HG complaint.
This patch uses the cmd.origpath helper function to let the user
specify where they should be kept when using the resolve command.
author | Christian Delahousse <cdelahousse@fb.com> |
---|---|
date | Tue, 10 Nov 2015 14:26:19 -0800 |
parents | 5f88e092f82c |
children | 216cc65cf227 |
comparison
equal
deleted
inserted
replaced
26938:080276d377d9 | 26939:50d2389a2e49 |
---|---|
5676 | 5676 |
5677 # replace filemerge's .orig file with our resolve file | 5677 # replace filemerge's .orig file with our resolve file |
5678 # for files in tocomplete, ms.resolve will not overwrite | 5678 # for files in tocomplete, ms.resolve will not overwrite |
5679 # .orig -- only preresolve does | 5679 # .orig -- only preresolve does |
5680 try: | 5680 try: |
5681 util.rename(a + ".resolve", a + ".orig") | 5681 util.rename(a + ".resolve", cmdutil.origpath(ui, repo, a)) |
5682 except OSError as inst: | 5682 except OSError as inst: |
5683 if inst.errno != errno.ENOENT: | 5683 if inst.errno != errno.ENOENT: |
5684 raise | 5684 raise |
5685 | 5685 |
5686 for f in tocomplete: | 5686 for f in tocomplete: |