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