13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
variable DataRefChan
variable mpoints {}
namespace eval fossil {}
namespace eval svn {}
namespace eval git {}
namespace eval hg {}
}
# Create a Virtual File System showing a revision of a fossil checkout
#
# dir: Directory in a fossil checkout
# rev: Revision to mount
#
# Returns: path to the generated VFS
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
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
|
variable DataRefChan
variable mpoints {}
namespace eval fossil {}
namespace eval svn {}
namespace eval git {}
namespace eval hg {}
}
# Create a command which when eval'd recreates known file systems
proc vcsvfs::serialize {} {
variable ::vcsvfs::mpoints
return [list vcsvfs::deserialize $mpoints]
}
# Pick up the command created by serialize
proc vcsvfs::deserialize {data} {
variable ::vcsvfs::mpoints
dict for {key value} $data {
dict set mpoints $key $value
# Handle if this is done again, do not mount it twice
if {[string match *vcsvfs* [file system $key]]} {
continue
}
vfs::filesystem mount $key [list vcsvfs::Vfs]
}
}
# Create a Virtual File System showing a revision of a fossil checkout
#
# dir: Directory in a fossil checkout
# rev: Revision to mount
#
# Returns: path to the generated VFS
|