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 Unified Diffs Ignore Whitespace Patch

Changes to bin/backup_sf.

12
13
14
15
16
17
18
19
20












21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

### ### ### ######### ######### #########

proc red {text} {
    return "\[01;37;41m$text\[00m"
}

proc pull {name {rtype cvs}} {
    global trouble












    if {[catch {
	backup $name $rtype
    } msg]} {
	lappend trouble [list [list $name $rtype] $msg]
    }
    return
}

proc backup {name rtype} {
    global dst

    puts "\n[red "Backing up $rtype $name"]......"

    file mkdir $dst
    cd $dst
    file mkdir $name
    cd         $name

    # Known rtypes supported by sourceforge through their rsync service.
    # - cvs
    # - svn
    # - git
    # - hg  (mercurial)
    # - bzr (bazaar)







|

>
>
>
>
>
>
>
>
>
>
>
>

|






|




<

|
|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

46
47
48
49
50
51
52
53
54
55

### ### ### ######### ######### #########

proc red {text} {
    return "\[01;37;41m$text\[00m"
}

proc pull {name args} {
    global trouble
    if {![llength $args]} { set args cvs }
    if {[llength $args] > 1} {
        foreach rtype $args {
            do $name $rtype -$rtype
        }
    } else {
        do $name [lindex $args 0] "" 
    }
    return
}

proc do {name rtype suffix} {
    if {[catch {
	backup $name $rtype $suffix
    } msg]} {
	lappend trouble [list [list $name $rtype] $msg]
    }
    return
}

proc backup {name rtype suffix} {
    global dst

    puts "\n[red "Backing up $rtype $name"]......"


    cd $dst
    file mkdir $name$suffix
    cd         $name$suffix

    # Known rtypes supported by sourceforge through their rsync service.
    # - cvs
    # - svn
    # - git
    # - hg  (mercurial)
    # - bzr (bazaar)