##// END OF EJS Templates
merge: add merge action 'p' to record path conflicts during update...
Mark Thomas -
r34548:81aebcc7 default
parent child Browse files
Show More
@@ -1243,12 +1243,27 b' def applyupdates(repo, actions, wctx, mc'
1243 wctx[f].remove()
1243 wctx[f].remove()
1244
1244
1245 numupdates = sum(len(l) for m, l in actions.items() if m != 'k')
1245 numupdates = sum(len(l) for m, l in actions.items() if m != 'k')
1246 z = 0
1246
1247
1247 if [a for a in actions['r'] if a[0] == '.hgsubstate']:
1248 if [a for a in actions['r'] if a[0] == '.hgsubstate']:
1248 subrepo.submerge(repo, wctx, mctx, wctx, overwrite, labels)
1249 subrepo.submerge(repo, wctx, mctx, wctx, overwrite, labels)
1249
1250
1250 # remove in parallel (must come first)
1251 # record path conflicts
1251 z = 0
1252 for f, args, msg in actions['p']:
1253 f1, fo = args
1254 s = repo.ui.status
1255 s(_("%s: path conflict - a file or link has the same name as a "
1256 "directory\n") % f)
1257 if fo == 'l':
1258 s(_("the local file has been renamed to %s\n") % f1)
1259 else:
1260 s(_("the remote file has been renamed to %s\n") % f1)
1261 s(_("resolve manually then use 'hg resolve --mark %s'\n") % f)
1262 ms.addpath(f, f1, fo)
1263 z += 1
1264 progress(_updating, z, item=f, total=numupdates, unit=_files)
1265
1266 # remove in parallel (must come before getting)
1252 prog = worker.worker(repo.ui, 0.001, batchremove, (repo, wctx),
1267 prog = worker.worker(repo.ui, 0.001, batchremove, (repo, wctx),
1253 actions['r'])
1268 actions['r'])
1254 for i, item in prog:
1269 for i, item in prog:
@@ -1698,7 +1713,8 b' def update(repo, node, branchmerge, forc'
1698 del actionbyfile[f]
1713 del actionbyfile[f]
1699
1714
1700 # Convert to dictionary-of-lists format
1715 # Convert to dictionary-of-lists format
1701 actions = dict((m, []) for m in 'a am f g cd dc r dm dg m e k'.split())
1716 actions = dict((m, [])
1717 for m in 'a am f g cd dc r dm dg m e k p'.split())
1702 for f, (m, args, msg) in actionbyfile.iteritems():
1718 for f, (m, args, msg) in actionbyfile.iteritems():
1703 if m not in actions:
1719 if m not in actions:
1704 actions[m] = []
1720 actions[m] = []
@@ -486,7 +486,8 b' def refreshwdir(repo, origstatus, origsp'
486 dropped.append(file)
486 dropped.append(file)
487
487
488 # Apply changes to disk
488 # Apply changes to disk
489 typeactions = dict((m, []) for m in 'a f g am cd dc r dm dg m e k'.split())
489 typeactions = dict((m, [])
490 for m in 'a f g am cd dc r dm dg m e k p'.split())
490 for f, (m, args, msg) in actions.iteritems():
491 for f, (m, args, msg) in actions.iteritems():
491 if m not in typeactions:
492 if m not in typeactions:
492 typeactions[m] = []
493 typeactions[m] = []
General Comments 0
You need to be logged in to leave comments. Login now