OSSP CVS Repository

ossp - ossp-pkg/cvsfusion/00BRAINSTORM 1.1
Not logged in
[Honeypot]  [Browse]  [Directory]  [Home]  [Login
[Reports]  [Search]  [Ticket]  [Timeline
  [Raw

ossp-pkg/cvsfusion/00BRAINSTORM 1.1


##
##  cvsfusion [-R/path/to/rcs/bin] [-D/path/to/diff/bin] [-t /tmp] -rOPENPKG:1.1.42 -dopenpkg-src -dopenpkg-re /path/to/vendor/cvs /path/to/local/cvs
##

foreach dir in -d {
    foreach file in $vendorcvsroot/$dir {
        #   remove old attachment
        if (exists $localcvsroot/$file) {
            cp $localcvsroot/$file $localcvsroot/$file.new
            rcs -obranch:: $localcvsroot/$file.new
        }
        else {
            create $localcvsroot/Attic/$file.new (dead, 1.1, /dev/null)
        }

        #   load both into internal structure
        load $localcvsroot/$file.new
        load $vendorcvsroot/$dir/$file

        #   turn trunk into regular branch
        $prev = -1;
        $curr = admin->head();
        while (no more $curr) {
            getrev($curr, /tmp/curr); # co
            $prev = $curr->next();
            if (exists $prev) {
                getrev($prev, /tmp/prev); # co
            }
            else {
                my $localhead = local->head();
                getrev($localhead, /tmp/prev); # co
            }
            $newdiff = `diff -n /tmp/prev /tmp/curr`;
            store($curr, $newdiff);
            system("cp /tmp/prev /tmp/curr");
            $curr = $prev;
        }

        #   prefix revisions with branch number

        #   merge target into local structures

        #   store local structures onto filesystem

    }
}


CVSTrac 2.0.1