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

def vcpx::cvsps::CvspsWorkingDir::__forceTagOnEachEntry (   self  )  [private]

Massage each CVS/Entries file, locking (ie, tagging) each
entry to its current CVS version.

This is to prevent silly errors such those that could arise
after a manual ``cvs update`` in the working directory.

Definition at line 467 of file cvsps.py.

00467                                    :
        """
        Massage each CVS/Entries file, locking (ie, tagging) each
        entry to its current CVS version.

        This is to prevent silly errors such those that could arise
        after a manual ``cvs update`` in the working directory.
        """

        from os import walk, rename
        from os.path import join, exists

        for dir, subdirs, files in walk(self.basedir):
            if dir[-3:] == 'CVS':
                efn = join(dir, 'Entries')

                # Strangeness is a foreign word in CVS: sometime
                # the Entries isn't there...
                if not exists(efn):
                    continue

                f = open(efn)
                entries = f.readlines()
                f.close()
                rename(efn, efn+'.old')

                newentries = []
                for e in entries:
                    if e.startswith('/'):
                        fields = e.split('/')
                        fields[-1] = "T%s\n" % fields[2]
                        newe = '/'.join(fields)
                        newentries.append(newe)
                    else:
                        newentries.append(e)

                f = open(efn, 'w')
                f.writelines(newentries)
                f.close()

    def _getCommitEntries(self, changeset):


Generated by  Doxygen 1.6.0   Back to index