File: ForceUpdate.tcl

package info (click to toggle)
gcvs 1.0final-12
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 12,248 kB
  • ctags: 10,631
  • sloc: ansic: 71,709; cpp: 39,780; sh: 18,434; makefile: 1,915; yacc: 1,299; tcl: 1,283; perl: 910; lex: 249; csh: 185; lisp: 7
file content (25 lines) | stat: -rw-r--r-- 781 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!CVSGUI1.0 --selection  --name "Force Update"
# Originally by: Scott MacHaffie <scottm@saltire.com>
# Modified by: Jerzy Kaczorowski <kaczoroj@hotmail.com>
#
# Forces update - remove selected non-modified files and call cvs up -C on all selected
# Only works on files (by design, too dangerous for directories IMHO) 

set selList [cvsbrowser get]
set selSize [llength $selList]

cvsout "Force Update...\n"
for {set i 0} {$i < $selSize} {incr i} {
	set file [lindex $selList $i]
	cvsbrowser info $file fileInfo
	if {[string compare $fileInfo(kind) "file"] == 0 && $fileInfo(unknown) == 0} {
		if {$fileInfo(missing) == 0 && $fileInfo(modified) == 0} {
			trash $file
			cvserr "D " $fileInfo(name) "\n"
		}

		cvsout "U " $fileInfo(name) "\n"
		cvs update -C $fileInfo(name)
	}
}