Skip to content
Snippets Groups Projects
Commit 03decaaf authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

dirstate: enforce `running_status` context for calling `status`

Now that the context is working as intended and that the callers are updated.
We can enforce it.
parent b583988c
No related branches found
No related tags found
3 merge requests!485branching: merge default into stable,!457dirstate-scoping [18] : scope the rest of the operation,!453dirstate-scoping [17]: scope status operation
......@@ -1554,9 +1554,6 @@
)
return (lookup, status)
# XXX since this can make the dirstate dirty (through rust), we should
# enforce that it is done withing an appropriate change-context that scope
# the change and ensure it eventually get written on disk (or rolled back)
def status(self, match, subrepos, ignored, clean, unknown):
"""Determine the status of the working copy relative to the
dirstate and return a pair of (unsure, status), where status is of type
......@@ -1573,6 +1570,9 @@
files that have definitely not been modified since the
dirstate was written
"""
if not self._running_status:
msg = "Calling `status` outside a `running_status` context"
raise error.ProgrammingError(msg)
listignored, listclean, listunknown = ignored, clean, unknown
lookup, modified, added, unknown, ignored = [], [], [], [], []
removed, deleted, clean = [], [], []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment