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

def hardlink::HardLink::divide_and_conquer (   self  ) 

Divide and Conquer linking

Definition at line 173 of file hardlink.py.

00173                                 :
        '''Divide and Conquer linking'''
        for files in self.files.itervalues():
            while files:
                if len(files) < 2:
                    break
                remaining = set()
                # Find the master (highest/lowest link/date)
                master = max(files)
                for other in files:
                    # Ignore already linked files
                    if master.is_linked_to(other):
                        continue
                    # If it is allowed to link, do so.
                    elif master.may_link_to(other):
                        master.link(other)
                    # If not, add to remaining
                    else:
                        remaining.add(other)
                files = remaining

    def get_files(self):


Generated by  Doxygen 1.6.0   Back to index