Mercurial > hg
comparison hgext/absorb.py @ 49960:c166b212bdee
dirstate: pass the repo to the `changeparent` method
If we want the context to be responsible for writing (and we want it), we need
to have access to a localrepository object.
So we now requires a localrepository object as an argument to this context
manager.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 25 Jan 2023 18:46:20 +0100 |
parents | d44e3c45f0e4 |
children | 7a8bfc05b691 |
comparison
equal
deleted
inserted
replaced
49959:376395868b7b | 49960:c166b212bdee |
---|---|
879 def restore(): | 879 def restore(): |
880 dirstate._fsmonitorstate.invalidate = bak | 880 dirstate._fsmonitorstate.invalidate = bak |
881 | 881 |
882 dirstate._fsmonitorstate.invalidate = noop | 882 dirstate._fsmonitorstate.invalidate = noop |
883 try: | 883 try: |
884 with dirstate.parentchange(): | 884 with dirstate.parentchange(self.repo): |
885 dirstate.rebuild(ctx.node(), ctx.manifest(), self.paths) | 885 dirstate.rebuild(ctx.node(), ctx.manifest(), self.paths) |
886 finally: | 886 finally: |
887 restore() | 887 restore() |
888 | 888 |
889 @staticmethod | 889 @staticmethod |