Backup

Check-in [0a5de9df32]
Login

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

Overview
Comment:Added support for mercurial repositories, and demo set of such.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:0a5de9df326d6857666122e88ed2d6233f2a680c
User & Date: aku 2011-02-14 18:49:40
Context
2011-02-18
18:35
Extended sfpull to be able to deal with multiple repositories in a project. Also fixed the bug where it might try to use a repository type not used by the project (class=disabled in the HTML). check-in: 528ecddc14 user: aku tags: trunk
2011-02-14
18:49
Added support for mercurial repositories, and demo set of such. check-in: 0a5de9df32 user: aku tags: trunk
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
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Added bin/backup_hg.

            1  +#!/home/aku/opt/ActiveTcl/bin/tclsh8.5
            2  +# -*- tcl -*- \
            3  +exec tclsh "$0" ${1+"$@"}
            4  +
            5  +### ### ### ######### ######### #########
            6  +
            7  +set dst  [file normalize [lindex $argv 0]]
            8  +set argv [lrange $argv 1 end]
            9  +
           10  +puts "Destination = $dst"
           11  +puts "Projects in:  $argv"
           12  +
           13  +### ### ### ######### ######### #########
           14  +
           15  +proc red {text} {
           16  +    return "\[01;37;41m$text\[00m"
           17  +}
           18  +
           19  +proc pull {name url} {
           20  +    global trouble
           21  +    if {[catch {
           22  +	backup $name $url
           23  +    } msg]} {
           24  +	lappend trouble [list [list $name $url] $msg]
           25  +    }
           26  +    return
           27  +}
           28  +
           29  +proc backup {name url} {
           30  +    global dst
           31  +
           32  +    file mkdir $dst
           33  +    cd $dst
           34  +
           35  +    puts "\n[red "Backing up $name @ $url"]......"
           36  +
           37  +    if {![file exists $name]} {
           38  +	exec hg clone $url $name \
           39  +	    2>@ stderr >@ stdout
           40  +    } else {
           41  +	cd $name
           42  +	exec hg pull \
           43  +	    2>@ stderr >@ stdout
           44  +    }
           45  +    return
           46  +}
           47  +
           48  +### ### ### ######### ######### #########
           49  +
           50  +set trouble {}
           51  +foreach f $argv {
           52  +    source [file normalize $f]
           53  +}
           54  +
           55  +puts ""
           56  +if {[llength $trouble]} {
           57  +    puts [red Troubles]\n\t[join $trouble \n\t]\n
           58  +}
           59  +
           60  +### ### ### ######### ######### #########

Added etc/backup_hg.

            1  +# -*- tcl -*- Hg repositories to backup
            2  +
            3  +pull twapi30	http://twapi.hg.sourceforge.net:8000/hgroot/twapi/twapi30
            4  +pull twapi	http://twapi.hg.sourceforge.net:8000/hgroot/twapi/twapi
            5  +pull naviserver	https://bitbucket.org/naviserver/naviserver