Eskil

Diff
Login

Differences From Artifact [312c085c71]:

To Artifact [fcd0033209]:


50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
    while {[llength $todo] > 0} {
        set line [lindex $todo 0]
        set todo [lrange $todo 1 end]
        # Expected format in a line:
        # B baseline
        # F tests/left.txt c1572b3809a1ba6ab2de9307c96b1cfeefdcf0ba
        # D 2015-02-23T23:30:07.509
        if {[regexp {B (.*)} $line -> bUuid]} {
            # Pick up a baseline manifest and parse it first
            set artifact [exec fossil artifact $bUuid]
            set todo [concat [split $artifact \n] $todo]
            continue
        }
        if {[regexp {D (.*)} $line -> cTime]} {
            # Remove decimals and middle T
            regsub {\.\d+} $cTime "" cTime
            regsub {T} $cTime " " cTime
            set commitTime [clock scan $cTime -gmt 1]
        }
        if {[regexp {F (\S+) (\S+)} $line -> fName fSha]} {
            # File names can have spaces, coded with \s
            set fName [string map {\\s " "} $fName]
            dict set finfo $fName sha $fSha
            dict set finfo $fName mtimestr $cTime ;# Anything
            dict set finfo $fName type file
            dict set finfo $fName isfile 1
            dict set finfo $fName isdir 0







|

|



|





|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
    while {[llength $todo] > 0} {
        set line [lindex $todo 0]
        set todo [lrange $todo 1 end]
        # Expected format in a line:
        # B baseline
        # F tests/left.txt c1572b3809a1ba6ab2de9307c96b1cfeefdcf0ba
        # D 2015-02-23T23:30:07.509
        if {[regexp {^B (.*)} $line -> bUuid]} {
            # Pick up a baseline manifest and parse it first
            set artifact [exec fossil "artifact" $bUuid]
            set todo [concat [split $artifact \n] $todo]
            continue
        }
        if {[regexp {^D (.*)} $line -> cTime]} {
            # Remove decimals and middle T
            regsub {\.\d+} $cTime "" cTime
            regsub {T} $cTime " " cTime
            set commitTime [clock scan $cTime -gmt 1]
        }
        if {[regexp {^F (\S+) (\S+)} $line -> fName fSha]} {
            # File names can have spaces, coded with \s
            set fName [string map {\\s " "} $fName]
            dict set finfo $fName sha $fSha
            dict set finfo $fName mtimestr $cTime ;# Anything
            dict set finfo $fName type file
            dict set finfo $fName isfile 1
            dict set finfo $fName isdir 0