comparison mercurial/cmdutil.py @ 21578:7cfe51661e98

revert: explicitly get status against the parent This makes absolutely no functional changes. The default value for node1 is already the same as the current value of parent. But to be able to properly use the second parent in merge context, we have to start to be a bit more explicit about what we compute the status against.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 14 May 2014 10:37:25 -0700
parents c62c5ce750ee
children 87a972b5c039
comparison
equal deleted inserted replaced
21577:c62c5ce750ee 21578:7cfe51661e98
2296 # get the list of subrepos that must be reverted 2296 # get the list of subrepos that must be reverted
2297 targetsubs = sorted(s for s in ctx.substate if m(s)) 2297 targetsubs = sorted(s for s in ctx.substate if m(s))
2298 2298
2299 # Find status of all file in `names`. (Against working directory parent) 2299 # Find status of all file in `names`. (Against working directory parent)
2300 m = scmutil.matchfiles(repo, names) 2300 m = scmutil.matchfiles(repo, names)
2301 changes = repo.status(match=m)[:4] 2301 changes = repo.status(node1=parent, match=m)[:4]
2302 modified, added, removed, deleted = map(set, changes) 2302 modified, added, removed, deleted = map(set, changes)
2303 2303
2304 # if f is a rename, update `names` to also revert the source 2304 # if f is a rename, update `names` to also revert the source
2305 cwd = repo.getcwd() 2305 cwd = repo.getcwd()
2306 for f in added: 2306 for f in added: