ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/svn2cvs/svn2cvs
(Generate patch)

Comparing svn2cvs (file contents):
Revision 1.3 by nishi, Fri Oct 4 00:35:49 2024 UTC vs.
Revision 1.6 by nishi, Thu Oct 17 10:08:53 2024 UTC

# Line 13 | Line 13 | set log [exec svn log --incremental "$sv
13  
14   set added ""
15   set removed ""
16 + set added_dir ""
17  
18   exec -ignorestderr svn up "$svn" -r "$rev"
19   exec -ignorestderr cvs up -d "$cvs"
20  
21   proc rescan {path prefix} {
22 <        global svn cvs cache old
22 >        global svn cvs cache old added added_dir
23          foreach name [glob -tails -nocomplain -directory "$path" *] {
24                  if { [file type "$path/$name"] == "directory" } {
25                          if { ! [file exists "$cvs/$prefix/$name"] } {
26                                  file mkdir "$cvs/$prefix/$name"
27                                  file mkdir "$cache/$prefix/$name"
28                                  cd "$cvs"
29 <                                lappend added "[string range "$prefix/$name" 1 [string length "$prefix/$name"]]"
29 >                                lappend added_dir "[string range "$prefix/$name" 1 [string length "$prefix/$name"]]"
30                                  cd "$old"
31                          }
32                          rescan "$path/$name" "$prefix/$name"
# Line 57 | Line 58 | proc rescan {path prefix} {
58   }
59  
60   proc remove_left {path prefix} {
61 <        global svn cvs cache old
61 >        global svn cvs cache old removed
62          foreach name [glob -tails -nocomplain -directory "$path" *] {
63                  if { [file type "$path/$name"] == "directory" } {
64                          if { "$name" != "CVS" } {
# Line 80 | Line 81 | rescan "$svn" ""
81   remove_left "$cvs" ""
82  
83   cd "$cvs"
84 + if { "$added_dir" != "" } {
85 +        eval exec -ignorestderr cvs add \"[join $added_dir "\" \""]\" >/dev/stdout 2>@1
86 + }
87   if { "$added" != "" } {
88 <        exec -ignorestderr cvs add \"[join $added "\" \""]\"
88 >        eval exec -ignorestderr cvs add \"[join $added "\" \""]\" >/dev/stdout 2>@1
89   }
90   if { "$removed" != "" } {
91 <        exec -ignorestderr cvs rm \"[join $removed "\" \""]\"
91 >        eval exec -ignorestderr cvs rm \"[join $removed "\" \""]\" >/dev/stdout 2>@1
92   }
93   exec -ignorestderr cvs ci -m "$log"
94   cd "$old"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines