#!/usr/bin/perl # # Copyright (C) 2003 ImageLinks Inc. All rights reserved. # # OSSIM is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation. # # This software is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # You should have received a copy of the GNU General Public License # along with this software. If not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111- # 1307, USA. # # See the GPL in the COPYING.GPL file for more details. # # Author: David Burken (dburken@imagelinks.com) # # Description: # # Script to query cvs repository and return "whats changed". # Currently does not print out "?"s. # # $Id$ ### # Use the "cvs -qn update" command and stuff the output to an array. ### $command = "cvs -qn update ."; # print("$command\n"); @output = `$command`; ### # Parse the output and print any files that have a status of # "M, A, R, C, U or P". ### foreach $line (@output) { chop ($line); if($line =~ /^M /) { $line =~ s/M //; print ("locally modified: $line\n"); } elsif($line =~ /^A /) { $line =~ s/A //; print ("locally added: $line\n"); } elsif($line =~ /^R /) { $line =~ s/R //; print ("locally removed: $line\n"); } elsif($line =~ /^C /) { $line =~ s/C //; print ("has conflict: $line\n"); } elsif($line =~ /^U /) { $line =~ s/U //; print ("needs update: $line\n"); } elsif($line =~ /^P /) { $line =~ s/P //; print ("needs patch: $line\n"); } } exit 0;