##// END OF EJS Templates
revert: use "remove" information from both statuses...
Pierre-Yves David -
r22188:0ad619c5 default
parent child Browse files
Show More
@@ -2410,6 +2410,12 b' def revert(ui, repo, ctx, parents, *pats'
2410 dsadded |= _deletedadded
2410 dsadded |= _deletedadded
2411 dsmodified |= _deletedmodified
2411 dsmodified |= _deletedmodified
2412
2412
2413 # only take into account for removes between wc and target
2414 clean |= dsremoved - removed
2415 dsremoved &= removed
2416 # distinct between dirstate remove and other
2417 removed -= dsremoved
2418
2413 # if f is a rename, update `names` to also revert the source
2419 # if f is a rename, update `names` to also revert the source
2414 cwd = repo.getcwd()
2420 cwd = repo.getcwd()
2415 for f in dsadded:
2421 for f in dsadded:
@@ -2429,8 +2435,6 b' def revert(ui, repo, ctx, parents, *pats'
2429 dsmodified -= missingmodified
2435 dsmodified -= missingmodified
2430 missingadded = dsadded - smf
2436 missingadded = dsadded - smf
2431 dsadded -= missingadded
2437 dsadded -= missingadded
2432 clean |= dsremoved - smf
2433 dsremoved -= clean
2434
2438
2435 # action to be actually performed by revert
2439 # action to be actually performed by revert
2436 # (<list of file>, message>) tuple
2440 # (<list of file>, message>) tuple
@@ -2448,6 +2452,7 b' def revert(ui, repo, ctx, parents, *pats'
2448 (missingmodified, (actions['remove'], True)),
2452 (missingmodified, (actions['remove'], True)),
2449 (dsadded, (actions['revert'], True)),
2453 (dsadded, (actions['revert'], True)),
2450 (missingadded, (actions['remove'], False)),
2454 (missingadded, (actions['remove'], False)),
2455 (removed, (actions['add'], True)),
2451 (dsremoved, (actions['undelete'], True)),
2456 (dsremoved, (actions['undelete'], True)),
2452 (clean, (None, False)),
2457 (clean, (None, False)),
2453 )
2458 )
General Comments 0
You need to be logged in to leave comments. Login now