1523 o.rename(backupname, filename, checkambig=True) |
1523 o.rename(backupname, filename, checkambig=True) |
1524 |
1524 |
1525 def clearbackup(self, tr, backupname): |
1525 def clearbackup(self, tr, backupname): |
1526 '''Clear backup file''' |
1526 '''Clear backup file''' |
1527 self._opener.unlink(backupname) |
1527 self._opener.unlink(backupname) |
|
1528 |
|
1529 def verify(self, m1, m2): |
|
1530 """check the dirstate content again the parent manifest and yield errors""" |
|
1531 missing_from_p1 = b"%s in state %s, but not in manifest1\n" |
|
1532 unexpected_in_p1 = b"%s in state %s, but also in manifest1\n" |
|
1533 missing_from_ps = b"%s in state %s, but not in either manifest\n" |
|
1534 missing_from_ds = b"%s in manifest1, but listed as state %s\n" |
|
1535 for f, entry in self.items(): |
|
1536 state = entry.state |
|
1537 if state in b"nr" and f not in m1: |
|
1538 yield (missing_from_p1, f, state) |
|
1539 if state in b"a" and f in m1: |
|
1540 yield (unexpected_in_p1, f, state) |
|
1541 if state in b"m" and f not in m1 and f not in m2: |
|
1542 yield (missing_from_ps, f, state) |
|
1543 for f in m1: |
|
1544 state = self.get_entry(f).state |
|
1545 if state not in b"nrm": |
|
1546 yield (missing_from_ds, f, state) |