##// END OF EJS Templates
scripts/i18n: let 'normalized-merge' leave 3-way conflict markers in output file...
Mads Kiilerich -
r8188:f8314738 default
parent child Browse files
Show More
@@ -110,15 +110,18 b' def normalized_merge(local, base, other,'
110 ret = simplemerge.simplemerge(uimod.ui.load(),
110 ret = simplemerge.simplemerge(uimod.ui.load(),
111 context.arbitraryfilectx(local.encode('utf-8')),
111 context.arbitraryfilectx(local.encode('utf-8')),
112 context.arbitraryfilectx(base.encode('utf-8')),
112 context.arbitraryfilectx(base.encode('utf-8')),
113 context.arbitraryfilectx(other.encode('utf-8'))
113 context.arbitraryfilectx(other.encode('utf-8')),
114 label=[b'local', b'other', b'base'],
115 mode='merge',
114 )
116 )
115 shutil.copyfile(local, output) # simplemerge wrote to local
117 shutil.copyfile(local, output) # simplemerge wrote to local - either resolved or with conflict markers
116 if ret:
118 if ret:
119 shutil.copyfile(localkeep, local)
117 basekeep = base + '.keep'
120 basekeep = base + '.keep'
118 otherkeep = other + '.keep'
121 otherkeep = other + '.keep'
119 shutil.copyfile(base, basekeep)
122 shutil.copyfile(base, basekeep)
120 shutil.copyfile(other, otherkeep)
123 shutil.copyfile(other, otherkeep)
121 sys.stderr.write("Error: simple merge failed. Run a merge tool manually to resolve conflicts, then use 'hg resolve -m'.\n")
124 sys.stderr.write("Error: simple merge failed and %s is left with conflict markers. Resolve the conflics , then use 'hg resolve -m'.\n" % output)
122 sys.stderr.write('Resolve with e.g.: kdiff3 %s %s %s -o %s\n' % (basekeep, localkeep, otherkeep, output))
125 sys.stderr.write('Resolve with e.g.: kdiff3 %s %s %s -o %s\n' % (basekeep, localkeep, otherkeep, output))
123 sys.exit(ret)
126 sys.exit(ret)
124
127
General Comments 0
You need to be logged in to leave comments. Login now