##// END OF EJS Templates
dirstate: enforce `running_status` context for calling `status`...
marmoute -
r51044:03decaaf default
parent child Browse files
Show More
@@ -1554,9 +1554,6 b' class dirstate:'
1554 )
1554 )
1555 return (lookup, status)
1555 return (lookup, status)
1556
1556
1557 # XXX since this can make the dirstate dirty (through rust), we should
1558 # enforce that it is done withing an appropriate change-context that scope
1559 # the change and ensure it eventually get written on disk (or rolled back)
1560 def status(self, match, subrepos, ignored, clean, unknown):
1557 def status(self, match, subrepos, ignored, clean, unknown):
1561 """Determine the status of the working copy relative to the
1558 """Determine the status of the working copy relative to the
1562 dirstate and return a pair of (unsure, status), where status is of type
1559 dirstate and return a pair of (unsure, status), where status is of type
@@ -1573,6 +1570,9 b' class dirstate:'
1573 files that have definitely not been modified since the
1570 files that have definitely not been modified since the
1574 dirstate was written
1571 dirstate was written
1575 """
1572 """
1573 if not self._running_status:
1574 msg = "Calling `status` outside a `running_status` context"
1575 raise error.ProgrammingError(msg)
1576 listignored, listclean, listunknown = ignored, clean, unknown
1576 listignored, listclean, listunknown = ignored, clean, unknown
1577 lookup, modified, added, unknown, ignored = [], [], [], [], []
1577 lookup, modified, added, unknown, ignored = [], [], [], [], []
1578 removed, deleted, clean = [], [], []
1578 removed, deleted, clean = [], [], []
General Comments 0
You need to be logged in to leave comments. Login now