##// END OF EJS Templates
delta-find: move filing of some debug data in `_one_dbg_data`...
marmoute -
r52221:46415df4 default
parent child Browse files
Show More
@@ -1313,20 +1313,6 b' class deltacomputer:'
1313 start = util.timer()
1313 start = util.timer()
1314 dbg = self._one_dbg_data()
1314 dbg = self._one_dbg_data()
1315 dbg['revision'] = target_rev
1315 dbg['revision'] = target_rev
1316 target_revlog = b"UNKNOWN"
1317 target_type = self.revlog.target[0]
1318 target_key = self.revlog.target[1]
1319 if target_type == KIND_CHANGELOG:
1320 target_revlog = b'CHANGELOG:'
1321 elif target_type == KIND_MANIFESTLOG:
1322 target_revlog = b'MANIFESTLOG:'
1323 if target_key:
1324 target_revlog += b'%s:' % target_key
1325 elif target_type == KIND_FILELOG:
1326 target_revlog = b'FILELOG:'
1327 if target_key:
1328 target_revlog += b'%s:' % target_key
1329 dbg['target-revlog'] = target_revlog
1330 p1r = revlog.rev(revinfo.p1)
1316 p1r = revlog.rev(revinfo.p1)
1331 p2r = revlog.rev(revinfo.p2)
1317 p2r = revlog.rev(revinfo.p2)
1332 if p1r != nullrev:
1318 if p1r != nullrev:
@@ -1599,7 +1585,7 b' class deltacomputer:'
1599 return deltainfo
1585 return deltainfo
1600
1586
1601 def _one_dbg_data(self):
1587 def _one_dbg_data(self):
1602 return {
1588 dbg = {
1603 'duration': None,
1589 'duration': None,
1604 'revision': None,
1590 'revision': None,
1605 'delta-base': None,
1591 'delta-base': None,
@@ -1612,6 +1598,21 b' class deltacomputer:'
1612 'snapshot-depth': None,
1598 'snapshot-depth': None,
1613 'target-revlog': None,
1599 'target-revlog': None,
1614 }
1600 }
1601 target_revlog = b"UNKNOWN"
1602 target_type = self.revlog.target[0]
1603 target_key = self.revlog.target[1]
1604 if target_type == KIND_CHANGELOG:
1605 target_revlog = b'CHANGELOG:'
1606 elif target_type == KIND_MANIFESTLOG:
1607 target_revlog = b'MANIFESTLOG:'
1608 if target_key:
1609 target_revlog += b'%s:' % target_key
1610 elif target_type == KIND_FILELOG:
1611 target_revlog = b'FILELOG:'
1612 if target_key:
1613 target_revlog += b'%s:' % target_key
1614 dbg['target-revlog'] = target_revlog
1615 return dbg
1615
1616
1616 def _dbg_process_data(self, dbg):
1617 def _dbg_process_data(self, dbg):
1617 if self._debug_info is not None:
1618 if self._debug_info is not None:
General Comments 0
You need to be logged in to leave comments. Login now