Show More
@@ -526,7 +526,7 b' def _filternarrowactions(narrowmatch, br' | |||
|
526 | 526 | pass |
|
527 | 527 | elif not branchmerge: |
|
528 | 528 | mresult.removefile(f) # just updating, ignore changes outside clone |
|
529 |
elif action[0] in merge |
|
|
529 | elif action[0] in mergestatemod.NO_OP_ACTIONS: | |
|
530 | 530 | mresult.removefile(f) # merge does not affect file |
|
531 | 531 | elif action[0] in nonconflicttypes: |
|
532 | 532 | raise error.Abort( |
@@ -549,12 +549,6 b' class mergeresult(object):' | |||
|
549 | 549 | It has information about what actions need to be performed on dirstate |
|
550 | 550 | mapping of divergent renames and other such cases. ''' |
|
551 | 551 | |
|
552 | NO_OP_ACTIONS = ( | |
|
553 | mergestatemod.ACTION_KEEP, | |
|
554 | mergestatemod.ACTION_KEEP_ABSENT, | |
|
555 | mergestatemod.ACTION_KEEP_NEW, | |
|
556 | ) | |
|
557 | ||
|
558 | 552 | def __init__(self): |
|
559 | 553 | """ |
|
560 | 554 | filemapping: dict of filename as keys and action related info as values |
@@ -707,7 +701,7 b' class mergeresult(object):' | |||
|
707 | 701 | mergestatemod.ACTION_PATH_CONFLICT_RESOLVE, |
|
708 | 702 | ) |
|
709 | 703 | and self._actionmapping[a] |
|
710 |
and a not in |
|
|
704 | and a not in mergestatemod.NO_OP_ACTIONS | |
|
711 | 705 | ): |
|
712 | 706 | return True |
|
713 | 707 | |
@@ -1398,7 +1392,7 b' def applyupdates(' | |||
|
1398 | 1392 | # mergestate so that it can be reused on commit |
|
1399 | 1393 | ms.addcommitinfo(f, op) |
|
1400 | 1394 | |
|
1401 |
numupdates = mresult.len() - mresult.len(merge |
|
|
1395 | numupdates = mresult.len() - mresult.len(mergestatemod.NO_OP_ACTIONS) | |
|
1402 | 1396 | progress = repo.ui.makeprogress( |
|
1403 | 1397 | _(b'updating'), unit=_(b'files'), total=numupdates |
|
1404 | 1398 | ) |
@@ -1502,7 +1496,7 b' def applyupdates(' | |||
|
1502 | 1496 | progress.increment(item=f) |
|
1503 | 1497 | |
|
1504 | 1498 | # keep (noop, just log it) |
|
1505 |
for a in merge |
|
|
1499 | for a in mergestatemod.NO_OP_ACTIONS: | |
|
1506 | 1500 | for f, args, msg in mresult.getactions((a,), sort=True): |
|
1507 | 1501 | repo.ui.debug(b" %s: %s -> %s\n" % (f, msg, a)) |
|
1508 | 1502 | # no progress |
@@ -123,6 +123,13 b" ACTION_KEEP_NEW = b'kn'" | |||
|
123 | 123 | ACTION_EXEC = b'e' |
|
124 | 124 | ACTION_CREATED_MERGE = b'cm' |
|
125 | 125 | |
|
126 | # actions which are no op | |
|
127 | NO_OP_ACTIONS = ( | |
|
128 | ACTION_KEEP, | |
|
129 | ACTION_KEEP_ABSENT, | |
|
130 | ACTION_KEEP_NEW, | |
|
131 | ) | |
|
132 | ||
|
126 | 133 | |
|
127 | 134 | class _mergestate_base(object): |
|
128 | 135 | '''track 3-way merge state of individual files |
@@ -399,7 +399,7 b' def filterupdatesactions(repo, wctx, mct' | |||
|
399 | 399 | temporaryfiles.append(file) |
|
400 | 400 | prunedactions[file] = action |
|
401 | 401 | elif branchmerge: |
|
402 |
if type not in mergemod |
|
|
402 | if type not in mergestatemod.NO_OP_ACTIONS: | |
|
403 | 403 | temporaryfiles.append(file) |
|
404 | 404 | prunedactions[file] = action |
|
405 | 405 | elif type == mergestatemod.ACTION_FORGET: |
General Comments 0
You need to be logged in to leave comments.
Login now