Eskil

Check-in [02a3bda086]
Login

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

Overview
Comment:Support files and revisions with -review in fossil.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 02a3bda086fd502a14a766886c64674dbc64dd46
User & Date: peter.spjuth@gmail.com 2011-04-11 22:22:42.000
Context
2011-04-11
22:44
Support revisions with -review in Git. check-in: 329d49a32b user: peter.spjuth@gmail.com tags: trunk
22:22
Support files and revisions with -review in fossil. check-in: 02a3bda086 user: peter.spjuth@gmail.com tags: trunk
2011-04-10
22:05
Include struct::list to let DiffUtil fall back on pure Tcl LCS. check-in: 8cfbf113d8 user: peter.spjuth@gmail.com tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Changes.



1
2
3
4
5
6
7



2011-04-05
 Added -pluginlist option.
 Added Paste Patch command in Tools.

2011-04-04
 Support list of files with -review.
 Support commit from -review.
>
>
>







1
2
3
4
5
6
7
8
9
10
2011-04-11
 Support files and revisions with -review in fossil.

2011-04-05
 Added -pluginlist option.
 Added Paste Patch command in Tools.

2011-04-04
 Support list of files with -review.
 Support commit from -review.
Changes to src/rev.tcl.
282
283
284
285
286
287
288
289
290
291
292

293
294
295
296
297
298
299
    if {$old != ""} {
        cd $old
    }
}

# Get a SVN patch
proc eskil::rev::SVN::getPatch {revs {files {}}} {
    set cmd [list exec svn diff {*}$files]
    foreach rev $revs {
        lappend cmd -r $rev
    }


    if {[catch {eval $cmd} res]} {
        tk_messageBox -icon error -title "SVN error" -message $res
        return ""
    }
    return $res
}







|



>







282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
    if {$old != ""} {
        cd $old
    }
}

# Get a SVN patch
proc eskil::rev::SVN::getPatch {revs {files {}}} {
    set cmd [list exec svn diff]
    foreach rev $revs {
        lappend cmd -r $rev
    }
    lappend cmd {*}$files

    if {[catch {eval $cmd} res]} {
        tk_messageBox -icon error -title "SVN error" -message $res
        return ""
    }
    return $res
}
466
467
468
469
470
471
472
473
474
475


476
















477
478
479

480
481
482
483
484
485
486
        catch {exec fossil finfo -p $tail -r $rev > $outfile}
    }
    cd $old
}

# Get a FOSSIL patch
proc eskil::rev::FOSSIL::getPatch {revs {files {}}} {
    # TODO: support files
    set cmd [list exec fossil diff]
    # No rev support yet



















    if {[catch {eval $cmd} res]} {
        tk_messageBox -icon error -title "FOSSIL error" -message $res
        return ""

    }
    return $res
}

# Get a ClearCase revision
proc eskil::rev::CT::get {filename outfile rev} {
    set filerev [file nativename $filename@@$rev]







<

|
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
>







467
468
469
470
471
472
473

474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
        catch {exec fossil finfo -p $tail -r $rev > $outfile}
    }
    cd $old
}

# Get a FOSSIL patch
proc eskil::rev::FOSSIL::getPatch {revs {files {}}} {

    set cmd [list exec fossil diff]

    if {[llength $revs] >= 1} {
        lappend cmd --from [lindex $revs 0]
    }
    if {[llength $revs] >= 2} {
        lappend cmd --to [lindex $revs 1]
    }
    if {[llength $files] > 0} {
        # Fossil diff only handles one file at a time.
        set res ""
        foreach file $files {
            set fcmd $cmd
            lappend fcmd $file
            if {[catch {eval $cmd} fres]} {
                tk_messageBox -icon error -title "FOSSIL error" -message $fres
                return ""
            }
            append res $fres
        }
    } else {
        if {[catch {eval $cmd} res]} {
            tk_messageBox -icon error -title "FOSSIL error" -message $res
            return ""
        }
    }
    return $res
}

# Get a ClearCase revision
proc eskil::rev::CT::get {filename outfile rev} {
    set filerev [file nativename $filename@@$rev]