comparison mercurial/copies.py @ 44994:cfd06649a1b8

copies: implement __repr__ on branch_copies for debugging Differential Revision: https://phab.mercurial-scm.org/D8650
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 19 Jun 2020 09:27:02 -0700
parents 4c1d39215034
children fb000408bca5
comparison
equal deleted inserted replaced
44993:98f97026fa05 44994:cfd06649a1b8
634 self.copy = {} if copy is None else copy 634 self.copy = {} if copy is None else copy
635 self.renamedelete = {} if renamedelete is None else renamedelete 635 self.renamedelete = {} if renamedelete is None else renamedelete
636 self.dirmove = {} if dirmove is None else dirmove 636 self.dirmove = {} if dirmove is None else dirmove
637 self.movewithdir = {} if movewithdir is None else movewithdir 637 self.movewithdir = {} if movewithdir is None else movewithdir
638 638
639 def __repr__(self):
640 return (
641 '<branch_copies\n copy=%r\n renamedelete=%r\n dirmove=%r\n movewithdir=%r\n>'
642 % (self.copy, self.renamedelete, self.dirmove, self.movewithdir,)
643 )
644
639 645
640 def _fullcopytracing(repo, c1, c2, base): 646 def _fullcopytracing(repo, c1, c2, base):
641 """ The full copytracing algorithm which finds all the new files that were 647 """ The full copytracing algorithm which finds all the new files that were
642 added from merge base up to the top commit and for each file it checks if 648 added from merge base up to the top commit and for each file it checks if
643 this file was copied from another file. 649 this file was copied from another file.