Show More
@@ -3352,7 +3352,11 b' def revert(ui, repo, ctx, *pats, **opts)' | |||||
3352 | for f in localchanges: |
|
3352 | for f in localchanges: | |
3353 | src = repo.dirstate.copied(f) |
|
3353 | src = repo.dirstate.copied(f) | |
3354 | # XXX should we check for rename down to target node? |
|
3354 | # XXX should we check for rename down to target node? | |
3355 | if src and src not in names and repo.dirstate[src] == b'r': |
|
3355 | if ( | |
|
3356 | src | |||
|
3357 | and src not in names | |||
|
3358 | and repo.dirstate.get_entry(src).removed | |||
|
3359 | ): | |||
3356 | dsremoved.add(src) |
|
3360 | dsremoved.add(src) | |
3357 | names[src] = True |
|
3361 | names[src] = True | |
3358 |
|
3362 | |||
@@ -3366,12 +3370,12 b' def revert(ui, repo, ctx, *pats, **opts)' | |||||
3366 | # distinguish between file to forget and the other |
|
3370 | # distinguish between file to forget and the other | |
3367 | added = set() |
|
3371 | added = set() | |
3368 | for abs in dsadded: |
|
3372 | for abs in dsadded: | |
3369 |
if repo.dirstate |
|
3373 | if not repo.dirstate.get_entry(abs).added: | |
3370 | added.add(abs) |
|
3374 | added.add(abs) | |
3371 | dsadded -= added |
|
3375 | dsadded -= added | |
3372 |
|
3376 | |||
3373 | for abs in deladded: |
|
3377 | for abs in deladded: | |
3374 |
if repo.dirstate |
|
3378 | if repo.dirstate.get_entry(abs).added: | |
3375 | dsadded.add(abs) |
|
3379 | dsadded.add(abs) | |
3376 | deladded -= dsadded |
|
3380 | deladded -= dsadded | |
3377 |
|
3381 |
General Comments 0
You need to be logged in to leave comments.
Login now