Logo Search packages:      
Sourcecode: hgview version File versions  Download package

def hgviewlib::hggraph::Graph::fileflags (   self,
  filename,
  rev 
)

Return a couple of flags ('=', '+', '-' or '?') depending on the nature
of the diff for filename between rev and its parents.        

Definition at line 329 of file hggraph.py.

00329                                       :
        """
        Return a couple of flags ('=', '+', '-' or '?') depending on the nature
        of the diff for filename between rev and its parents.        
        """
        ctx = self.repo.changectx(rev)
        flags = []
        for p in ctx.parents():
            changes = self.repo.status(p.node(), ctx.node())[:5]
            # changes = modified, added, removed, deleted, unknown
            for flag, lst in zip(["=", "+", "-", "-", "?"], changes):
                if filename in lst:
                    if flag == "+":
                        renamed = ctx.filectx(filename).renamed()
                        if renamed:
                            flags.append(renamed)
                            break
                    flags.append(flag)
                    break
            else:
                flags.append('')
        return flags

    def fileflag(self, filename, rev):


Generated by  Doxygen 1.6.0   Back to index