##// END OF EJS Templates
dirstate: update messages in verify to not use the old `state` API
Raphaël Gomès -
r50718:2715c854 default
parent child Browse files
Show More
@@ -1541,23 +1541,30 b' class dirstate:'
1541 o.unlink(data_backup[0])
1541 o.unlink(data_backup[0])
1542
1542
1543 def verify(self, m1, m2, narrow_matcher=None):
1543 def verify(self, m1, m2, narrow_matcher=None):
1544 """check the dirstate content again the parent manifest and yield errors"""
1544 """
1545 missing_from_p1 = b"%s in state %s, but not in manifest1\n"
1545 check the dirstate contents against the parent manifest and yield errors
1546 unexpected_in_p1 = b"%s in state %s, but also in manifest1\n"
1546 """
1547 missing_from_ps = b"%s in state %s, but not in either manifest\n"
1547 missing_from_p1 = _(
1548 missing_from_ds = b"%s in manifest1, but listed as state %s\n"
1548 b"%s marked as tracked in p1 but not in manifest1\n"
1549 )
1550 unexpected_in_p1 = _(b"%s marked as added, but also in manifest1\n")
1551 missing_from_ps = _(
1552 b"%s marked as modified, but not in either manifest\n"
1553 )
1554 missing_from_ds = _(
1555 b"%s in manifest1, but not marked as tracked in p1\n"
1556 )
1549 for f, entry in self.items():
1557 for f, entry in self.items():
1550 state = entry.state
1551 if entry.p1_tracked:
1558 if entry.p1_tracked:
1552 if entry.modified and f not in m1 and f not in m2:
1559 if entry.modified and f not in m1 and f not in m2:
1553 yield (missing_from_ps, f, state)
1560 yield (missing_from_ps, f)
1554 elif f not in m1:
1561 elif f not in m1:
1555 yield (missing_from_p1, f, state)
1562 yield (missing_from_p1, f)
1556 if entry.added and f in m1:
1563 if entry.added and f in m1:
1557 yield (unexpected_in_p1, f, state)
1564 yield (unexpected_in_p1, f)
1558 for f in m1:
1565 for f in m1:
1559 if narrow_matcher is not None and not narrow_matcher(f):
1566 if narrow_matcher is not None and not narrow_matcher(f):
1560 continue
1567 continue
1561 entry = self.get_entry(f)
1568 entry = self.get_entry(f)
1562 if not entry.p1_tracked:
1569 if not entry.p1_tracked:
1563 yield (missing_from_ds, f, entry.state)
1570 yield (missing_from_ds, f)
General Comments 0
You need to be logged in to leave comments. Login now