comparison mercurial/filemerge.py @ 27599:ad5966de3c9a

filemerge: default change/delete conflicts to 'leave unresolved' (BC) It makes far more sense to leave these conflicts unresolved and kick back to the user than to just assume that the local version be chosen. There are almost certainly buggy scripts and applications using Mercurial in the wild that do merges or rebases non-interactively, and then assume that if the operation succeeded there's nothing the user needs to pay attention to. (This wasn't possible earlier because there was no way to re-resolve change/delete conflicts -- but now it is.)
author Siddharth Agarwal <sid0@fb.com>
date Wed, 23 Dec 2015 12:51:45 -0800
parents 88d5db4b155c
children 07fc2f2134ba
comparison
equal deleted inserted replaced
27598:97e39f70fb47 27599:ad5966de3c9a
238 try: 238 try:
239 if fco.isabsent(): 239 if fco.isabsent():
240 index = ui.promptchoice( 240 index = ui.promptchoice(
241 _("local changed %s which remote deleted\n" 241 _("local changed %s which remote deleted\n"
242 "use (c)hanged version, (d)elete, or leave (u)nresolved?" 242 "use (c)hanged version, (d)elete, or leave (u)nresolved?"
243 "$$ &Changed $$ &Delete $$ &Unresolved") % fd, 0) 243 "$$ &Changed $$ &Delete $$ &Unresolved") % fd, 2)
244 choice = ['local', 'other', 'unresolved'][index] 244 choice = ['local', 'other', 'unresolved'][index]
245 elif fcd.isabsent(): 245 elif fcd.isabsent():
246 index = ui.promptchoice( 246 index = ui.promptchoice(
247 _("remote changed %s which local deleted\n" 247 _("remote changed %s which local deleted\n"
248 "use (c)hanged version, leave (d)eleted, or " 248 "use (c)hanged version, leave (d)eleted, or "
249 "leave (u)nresolved?" 249 "leave (u)nresolved?"
250 "$$ &Changed $$ &Deleted $$ &Unresolved") % fd, 0) 250 "$$ &Changed $$ &Deleted $$ &Unresolved") % fd, 2)
251 choice = ['other', 'local', 'unresolved'][index] 251 choice = ['other', 'local', 'unresolved'][index]
252 else: 252 else:
253 index = ui.promptchoice( 253 index = ui.promptchoice(
254 _("no tool found to merge %s\n" 254 _("no tool found to merge %s\n"
255 "keep (l)ocal, take (o)ther, or leave (u)nresolved?" 255 "keep (l)ocal, take (o)ther, or leave (u)nresolved?"