comparison mercurial/cmdutil.py @ 22213:f1debbcd71cd

revert: add an XXX about rename tracking We check for rename information in the dirstate. This is probably not enough to preserve this behavior when using an explicit target rev. I just spotted this while working on this code, but this is outside the scope of my series so I'm just adding a comment to highlight this suspicious situation.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 24 Jun 2014 16:59:40 +0100
parents f18aca03ddd9
children 525cde5d954d
comparison
equal deleted inserted replaced
22212:f18aca03ddd9 22213:f1debbcd71cd
2448 2448
2449 # if f is a rename, update `names` to also revert the source 2449 # if f is a rename, update `names` to also revert the source
2450 cwd = repo.getcwd() 2450 cwd = repo.getcwd()
2451 for f in dsadded: 2451 for f in dsadded:
2452 src = repo.dirstate.copied(f) 2452 src = repo.dirstate.copied(f)
2453 # XXX should we check for rename down to target node?
2453 if src and src not in names and repo.dirstate[src] == 'r': 2454 if src and src not in names and repo.dirstate[src] == 'r':
2454 dsremoved.add(src) 2455 dsremoved.add(src)
2455 names[src] = (repo.pathto(src, cwd), True) 2456 names[src] = (repo.pathto(src, cwd), True)
2456 2457
2457 ## computation of the action to performs on `names` content. 2458 ## computation of the action to performs on `names` content.