Show More
@@ -707,15 +707,7 def addremove(repo, pats=[], opts={}, dr | |||
|
707 | 707 | similarity) |
|
708 | 708 | |
|
709 | 709 | if not dry_run: |
|
710 | wctx = repo[None] | |
|
711 | wlock = repo.wlock() | |
|
712 | try: | |
|
713 | wctx.forget(deleted) | |
|
714 | wctx.add(unknown) | |
|
715 | for new, old in renames.iteritems(): | |
|
716 | wctx.copy(old, new) | |
|
717 | finally: | |
|
718 | wlock.release() | |
|
710 | _markchanges(repo, unknown, deleted, renames) | |
|
719 | 711 | |
|
720 | 712 | for f in rejected: |
|
721 | 713 | if f in m.files(): |
@@ -763,6 +755,19 def _findrenames(repo, matcher, added, r | |||
|
763 | 755 | renames[new] = old |
|
764 | 756 | return renames |
|
765 | 757 | |
|
758 | def _markchanges(repo, unknown, deleted, renames): | |
|
759 | '''Marks the files in unknown as added, the files in deleted as removed, | |
|
760 | and the files in renames as copied.''' | |
|
761 | wctx = repo[None] | |
|
762 | wlock = repo.wlock() | |
|
763 | try: | |
|
764 | wctx.forget(deleted) | |
|
765 | wctx.add(unknown) | |
|
766 | for new, old in renames.iteritems(): | |
|
767 | wctx.copy(old, new) | |
|
768 | finally: | |
|
769 | wlock.release() | |
|
770 | ||
|
766 | 771 | def dirstatecopy(ui, repo, wctx, src, dst, dryrun=False, cwd=None): |
|
767 | 772 | """Update the dirstate to reflect the intent of copying src to dst. For |
|
768 | 773 | different reasons it might not end with dst being marked as copied from src. |
General Comments 0
You need to be logged in to leave comments.
Login now