Backup

Check-in [4cafd464c3]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Extended "backup_sf" to allow specification of more than one repository type to rsync. In that case the destination directories are constructed from project name and repository type, the latter is used as suffix. Previous cases are unchanged, i.e. cvs is default, and using a single repository type uses just the project name for the destination directory.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:4cafd464c3cc8bba039eb9207a93277c85760974
User & Date: aku 2011-02-11 19:12:18
Context
2011-02-11
22:05
Extended "sfpull" to search the tickets in Tracker.xml for attachment and retrieve these as well. The application now additionally requires tDOM (xml processing), and Tcl 8.5 (dict). check-in: 1edb3423c3 user: aku tags: trunk
19:12
Extended "backup_sf" to allow specification of more than one repository type to rsync. In that case the destination directories are constructed from project name and repository type, the latter is used as suffix. Previous cases are unchanged, i.e. cvs is default, and using a single repository type uses just the project name for the destination directory. check-in: 4cafd464c3 user: aku tags: trunk
05:04
Initial checkin of the backup scripts. check-in: 6cd21d9311 user: aku tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to bin/backup_sf.

    12     12   
    13     13   ### ### ### ######### ######### #########
    14     14   
    15     15   proc red {text} {
    16     16       return "\[01;37;41m$text\[00m"
    17     17   }
    18     18   
    19         -proc pull {name {rtype cvs}} {
           19  +proc pull {name args} {
    20     20       global trouble
           21  +    if {![llength $args]} { set args cvs }
           22  +    if {[llength $args] > 1} {
           23  +        foreach rtype $args {
           24  +            do $name $rtype -$rtype
           25  +        }
           26  +    } else {
           27  +        do $name [lindex $args 0] "" 
           28  +    }
           29  +    return
           30  +}
           31  +
           32  +proc do {name rtype suffix} {
    21     33       if {[catch {
    22         -	backup $name $rtype
           34  +	backup $name $rtype $suffix
    23     35       } msg]} {
    24     36   	lappend trouble [list [list $name $rtype] $msg]
    25     37       }
    26     38       return
    27     39   }
    28     40   
    29         -proc backup {name rtype} {
           41  +proc backup {name rtype suffix} {
    30     42       global dst
    31     43   
    32     44       puts "\n[red "Backing up $rtype $name"]......"
    33     45   
    34         -    file mkdir $dst
    35     46       cd $dst
    36         -    file mkdir $name
    37         -    cd         $name
           47  +    file mkdir $name$suffix
           48  +    cd         $name$suffix
    38     49   
    39     50       # Known rtypes supported by sourceforge through their rsync service.
    40     51       # - cvs
    41     52       # - svn
    42     53       # - git
    43     54       # - hg  (mercurial)
    44     55       # - bzr (bazaar)