Show More
@@ -735,10 +735,9 b' class queue(object):' | |||||
735 | if not keep: |
|
735 | if not keep: | |
736 | r = self.qrepo() |
|
736 | r = self.qrepo() | |
737 | if r: |
|
737 | if r: | |
738 |
r[None]. |
|
738 | r[None].forget(patches) | |
739 |
e |
|
739 | for p in patches: | |
740 | for p in patches: |
|
740 | os.unlink(self.join(p)) | |
741 | os.unlink(self.join(p)) |
|
|||
742 |
|
741 | |||
743 | if numrevs: |
|
742 | if numrevs: | |
744 | qfinished = self.applied[:numrevs] |
|
743 | qfinished = self.applied[:numrevs] | |
@@ -2623,7 +2622,7 b' def rename(ui, repo, patch, name=None, *' | |||||
2623 | if r.dirstate[name] == 'r': |
|
2622 | if r.dirstate[name] == 'r': | |
2624 | wctx.undelete([name]) |
|
2623 | wctx.undelete([name]) | |
2625 | wctx.copy(patch, name) |
|
2624 | wctx.copy(patch, name) | |
2626 |
wctx. |
|
2625 | wctx.forget([patch]) | |
2627 | finally: |
|
2626 | finally: | |
2628 | wlock.release() |
|
2627 | wlock.release() | |
2629 |
|
2628 |
@@ -2269,7 +2269,7 b' def forget(ui, repo, *pats, **opts):' | |||||
2269 | if ui.verbose or not m.exact(f): |
|
2269 | if ui.verbose or not m.exact(f): | |
2270 | ui.status(_('removing %s\n') % m.rel(f)) |
|
2270 | ui.status(_('removing %s\n') % m.rel(f)) | |
2271 |
|
2271 | |||
2272 |
repo[None]. |
|
2272 | repo[None].forget(forget) | |
2273 | return errs |
|
2273 | return errs | |
2274 |
|
2274 | |||
2275 | @command('grep', |
|
2275 | @command('grep', |
@@ -835,12 +835,14 b' class workingctx(changectx):' | |||||
835 | finally: |
|
835 | finally: | |
836 | wlock.release() |
|
836 | wlock.release() | |
837 |
|
837 | |||
838 |
def forget(self, |
|
838 | def forget(self, files): | |
839 | wlock = self._repo.wlock() |
|
839 | wlock = self._repo.wlock() | |
840 | try: |
|
840 | try: | |
841 |
for f in |
|
841 | for f in files: | |
842 | if self._repo.dirstate[f] != 'a': |
|
842 | if self._repo.dirstate[f] != 'a': | |
843 |
self._repo. |
|
843 | self._repo.dirstate.remove(f) | |
|
844 | elif f not in self._repo.dirstate: | |||
|
845 | self._repo.ui.warn(_("%s not tracked!\n") % f) | |||
844 | else: |
|
846 | else: | |
845 | self._repo.dirstate.drop(f) |
|
847 | self._repo.dirstate.drop(f) | |
846 | finally: |
|
848 | finally: |
@@ -489,7 +489,7 b' class workingbackend(fsbackend):' | |||||
489 | scmutil.dirstatecopy(self.ui, self.repo, wctx, src, dst) |
|
489 | scmutil.dirstatecopy(self.ui, self.repo, wctx, src, dst) | |
490 | addremoved.discard(src) |
|
490 | addremoved.discard(src) | |
491 | if (not self.similarity) and self.removed: |
|
491 | if (not self.similarity) and self.removed: | |
492 |
wctx. |
|
492 | wctx.forget(sorted(self.removed)) | |
493 | if addremoved: |
|
493 | if addremoved: | |
494 | cwd = self.repo.getcwd() |
|
494 | cwd = self.repo.getcwd() | |
495 | if cwd: |
|
495 | if cwd: |
@@ -623,7 +623,7 b' def addremove(repo, pats=[], opts={}, dr' | |||||
623 | wctx = repo[None] |
|
623 | wctx = repo[None] | |
624 | wlock = repo.wlock() |
|
624 | wlock = repo.wlock() | |
625 | try: |
|
625 | try: | |
626 |
wctx. |
|
626 | wctx.forget(deleted) | |
627 | wctx.add(unknown) |
|
627 | wctx.add(unknown) | |
628 | for new, old in copies.iteritems(): |
|
628 | for new, old in copies.iteritems(): | |
629 | wctx.copy(old, new) |
|
629 | wctx.copy(old, new) |
General Comments 0
You need to be logged in to leave comments.
Login now