Show More
@@ -475,9 +475,15 b' class workingbackend(fsbackend):' | |||
|
475 | 475 | addremoved = set(self.changed) |
|
476 | 476 | for src, dst in self.copied: |
|
477 | 477 | scmutil.dirstatecopy(self.ui, self.repo, wctx, src, dst) |
|
478 | addremoved.discard(src) | |
|
479 | if (not self.similarity) and self.removed: | |
|
478 | if self.removed: | |
|
480 | 479 | wctx.forget(sorted(self.removed)) |
|
480 | for f in self.removed: | |
|
481 | if f not in self.repo.dirstate: | |
|
482 | # File was deleted and no longer belongs to the | |
|
483 | # dirstate, it was probably marked added then | |
|
484 | # deleted, and should not be considered by | |
|
485 | # addremove(). | |
|
486 | addremoved.discard(f) | |
|
481 | 487 | if addremoved: |
|
482 | 488 | cwd = self.repo.getcwd() |
|
483 | 489 | if cwd: |
@@ -402,6 +402,23 b' Renames and strip' | |||
|
402 | 402 | A b |
|
403 | 403 | a |
|
404 | 404 | R a |
|
405 | ||
|
406 | Renames, similarity and git diff | |
|
407 | ||
|
408 | $ hg revert -aC | |
|
409 | undeleting a | |
|
410 | forgetting b | |
|
411 | $ rm b | |
|
412 | $ hg import --similarity 90 --no-commit - <<EOF | |
|
413 | > diff --git a/a b/b | |
|
414 | > rename from a | |
|
415 | > rename to b | |
|
416 | > EOF | |
|
417 | applying patch from stdin | |
|
418 | $ hg st --copies | |
|
419 | A b | |
|
420 | a | |
|
421 | R a | |
|
405 | 422 | $ cd .. |
|
406 | 423 | |
|
407 | 424 | Pure copy with existing destination |
@@ -663,7 +663,6 b' test import with similarity and git and ' | |||
|
663 | 663 | applying ../rename.diff |
|
664 | 664 | patching file a |
|
665 | 665 | patching file b |
|
666 | removing a | |
|
667 | 666 | adding b |
|
668 | 667 | recording removal of a as rename to b (88% similar) |
|
669 | 668 | applied to working directory |
@@ -679,7 +678,6 b' test import with similarity and git and ' | |||
|
679 | 678 | applying ../rename.diff |
|
680 | 679 | patching file a |
|
681 | 680 | patching file b |
|
682 | removing a | |
|
683 | 681 | adding b |
|
684 | 682 | applied to working directory |
|
685 | 683 | $ hg st -C |
General Comments 0
You need to be logged in to leave comments.
Login now