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

Added bin/backup_hg.

























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
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
56
57
58
59
60
#!/home/aku/opt/ActiveTcl/bin/tclsh8.5
# -*- tcl -*- \
exec tclsh "$0" ${1+"$@"}

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

set dst  [file normalize [lindex $argv 0]]
set argv [lrange $argv 1 end]

puts "Destination = $dst"
puts "Projects in:  $argv"

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

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

proc pull {name url} {
    global trouble
    if {[catch {
	backup $name $url
    } msg]} {
	lappend trouble [list [list $name $url] $msg]
    }
    return
}

proc backup {name url} {
    global dst

    file mkdir $dst
    cd $dst

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

    if {![file exists $name]} {
	exec hg clone $url $name \
	    2>@ stderr >@ stdout
    } else {
	cd $name
	exec hg pull \
	    2>@ stderr >@ stdout
    }
    return
}

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

set trouble {}
foreach f $argv {
    source [file normalize $f]
}

puts ""
if {[llength $trouble]} {
    puts [red Troubles]\n\t[join $trouble \n\t]\n
}

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

Added etc/backup_hg.











>
>
>
>
>
1
2
3
4
5
# -*- tcl -*- Hg repositories to backup

pull twapi30	http://twapi.hg.sourceforge.net:8000/hgroot/twapi/twapi30
pull twapi	http://twapi.hg.sourceforge.net:8000/hgroot/twapi/twapi
pull naviserver	https://bitbucket.org/naviserver/naviserver