示例#1
0
 def testNoRevisionsOnTrunk(self):
     # This RCS file contains no revisions on the "trunk", i.e. the
     # first trunk revision 1.1 is explicitly marked 'dead' but it
     # is still a branchpoint for OpenBSD release branches in which
     # the path exists.
     f = RCSFile(join(dirname(__file__), 'data', 'patch-copyin_c,v'))
     for c in f.changes(): self.assertTrue(False)
示例#2
0
    def testIncompleteRevisionTrail(self):
        """HEAD branch missing 1.3 and earlier ancestors

        The file sbin/isakmpd/Attic/pkcs.c,v in OpenBSD's src repostiory
        only contains revisions back to 1.4, but no earlier revisions.
        """
        f = RCSFile(join(dirname(__file__), 'data', 'pkcs.c,v'))
        for c in f.changes(): pass
        self.assertEqual('1.4', c.revision)
示例#3
0
    def run(self):
        rcsfile = RCSFile(self.rcsfile)

        if self.options.checkout:
            return self.checkout(rcsfile, self.options.checkout)

        print 'Head: %s' % rcsfile.head
        print 'Branch: %s' % rcsfile.branch
        print 'Revision trail:',
        for revision in rcsfile.revisions():
            print revision,
        print ''
        for change in rcsfile.changes():
            rcsfile._print_revision(change.revision)