Eskil

Check-in [6a2afdf1ab]
Login

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

Overview
Comment:Pass read channel directly to vfs
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6a2afdf1abda43cf4a20d0917445eae63082373b
User & Date: peter 2014-11-17 00:14:04.621
Context
2014-11-17
16:59
Avoid duplicated .-files in dirdiff check-in: bd1e62dc68 user: peter tags: trunk
00:14
Pass read channel directly to vfs check-in: 6a2afdf1ab user: peter tags: trunk
00:10
Allow dirdiff without -r. Like files, try revision mode if only one dir given. check-in: 081ebab19e user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vcsvfs.tcl.
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
            set rev [dict get $mpoints $root rev]
            # Which way of extracting file data is best?
            # fossil finfo -p -r $rev $relative
            # set sha [dict get $finfor sha]
            # fossil artifact $sha
            # fossil cat $relative -r $rev
            # Read through a pipe to get a binary channel
            set ch [open [list |fossil cat $relative -r $rev] rb]
            set data [read $ch]
            close $ch
            cd $oldpwd

            set chId [vcsvfs::CreateDataRefChan $data]
            return [list $chId ""]
        }
        stat {
            set res [dict create dev 0 ino 0 "mode" 0 nlink 0 uid 0 gid 0 \
                             size 0 atime 0 mtime 0 ctime 0 type file]
            if {[dict get $finfor isdir]} {
                # TBD, fake mtime etc. for directory?







|
|
|
|

|







315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
            set rev [dict get $mpoints $root rev]
            # Which way of extracting file data is best?
            # fossil finfo -p -r $rev $relative
            # set sha [dict get $finfor sha]
            # fossil artifact $sha
            # fossil cat $relative -r $rev
            # Read through a pipe to get a binary channel
            set chId [open [list |fossil cat $relative -r $rev] rb]
            #set data [read $chId]
            #close $chId
            #cd $oldpwd

            #set chId [vcsvfs::CreateDataRefChan $data]
            return [list $chId ""]
        }
        stat {
            set res [dict create dev 0 ino 0 "mode" 0 nlink 0 uid 0 gid 0 \
                             size 0 atime 0 mtime 0 ctime 0 type file]
            if {[dict get $finfor isdir]} {
                # TBD, fake mtime etc. for directory?
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
                return -code error $::vfs::posix(EACCES)
            }

            set oldpwd [pwd]
            cd [dict get $mpoints $root "origroot"]
            set rev [dict get $mpoints $root rev]
            # Read through a pipe to get a binary channel
            set ch [open [list |svn cat -r $rev $relative] rb]
            set data [read $ch]
            close $ch
            cd $oldpwd

            set chId [vcsvfs::CreateDataRefChan $data]
            return [list $chId ""]
        }
        stat {
            set res [dict create dev 0 ino 0 "mode" 0 nlink 0 uid 0 gid 0 \
                             size 0 atime 0 mtime 0 ctime 0 type file]
            if {[dict get $finfor isdir]} {
                # TBD, fake mtime etc. for directory?







|
|
|
|

|







404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
                return -code error $::vfs::posix(EACCES)
            }

            set oldpwd [pwd]
            cd [dict get $mpoints $root "origroot"]
            set rev [dict get $mpoints $root rev]
            # Read through a pipe to get a binary channel
            set chId [open [list |svn cat -r $rev $relative] rb]
            #set data [read $chId]
            #close $chId
            #cd $oldpwd

            #set chId [vcsvfs::CreateDataRefChan $data]
            return [list $chId ""]
        }
        stat {
            set res [dict create dev 0 ino 0 "mode" 0 nlink 0 uid 0 gid 0 \
                             size 0 atime 0 mtime 0 ctime 0 type file]
            if {[dict get $finfor isdir]} {
                # TBD, fake mtime etc. for directory?