Eskil

Check-in [56314e936b]
Login

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

Overview
Comment:Support -context/-w/-b for -review.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 56314e936ba670dc8d52b89735bc4356738c2783c509071b2f428940773e75f6
User & Date: peter 2021-03-29 12:32:25.935
Context
2021-04-09
16:32
Select frame/top in balloonhelp check-in: 6d239b452a user: peter tags: trunk
2021-03-29
12:32
Support -context/-w/-b for -review. check-in: 56314e936b user: peter tags: trunk
2021-02-28
23:46
Bumped revision to 2.8.5 check-in: 7d500c2e30 user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Changes.



1
2
3
4
5
6
7



2021-03-01
 Bumped revision to 2.8.5

2021-02-28
 Ballonhelp within frame.

2020-12-10
>
>
>







1
2
3
4
5
6
7
8
9
10
2021-03-29
 Support -context/-w/-b for -review.

2021-03-01
 Bumped revision to 2.8.5

2021-02-28
 Ballonhelp within frame.

2020-12-10
Changes to src/rev.tcl.
405
406
407
408
409
410
411










412
413
414
415
416
417
418
    return $cmd
}

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










    lappend cmd {*}$files

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







>
>
>
>
>
>
>
>
>
>







405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
    return $cmd
}

# Get a SVN patch
proc eskil::rev::SVN::getPatch {revs files {fileListName {}}} {
    set cmd [list exec svn diff]
    lappend cmd {*}[RevsToCmd $revs]
    set ext {}
    if {$::Pref(context) >= 0} {
        lappend ext --context $::Pref(context)
    }
    if {$::Pref(ignore) in "-w -b"} {
        lappend ext $::Pref(ignore)
    }
    if {[llength $ext] > 0} {
        lappend cmd -x $ext
    }
    lappend cmd {*}$files

    if {[catch {eval $cmd} res]} {
        tk_messageBox -icon error -title "SVN error" -message $res
        return ""
    }
    if {$fileListName ne ""} {
613
614
615
616
617
618
619






620
621
622
623
624
625
626
    GetTopDir $filename dir tail
    catch {execDir $dir git add $tail}
}

# Get a GIT patch
proc eskil::rev::GIT::getPatch {revs files {fileListName {}}} {
    set cmd [list exec git diff -p]






    if {[llength $revs] == 0} {
        # Always default to HEAD to see changes regardless of index
        lappend cmd HEAD
    } else {
        foreach rev $revs {
            lappend cmd $rev
        }







>
>
>
>
>
>







623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
    GetTopDir $filename dir tail
    catch {execDir $dir git add $tail}
}

# Get a GIT patch
proc eskil::rev::GIT::getPatch {revs files {fileListName {}}} {
    set cmd [list exec git diff -p]
    if {$::Pref(context) >= 0} {
        lappend cmd -U$::Pref(context)
    }
    if {$::Pref(ignore) in "-w -b"} {
        lappend cmd $::Pref(ignore)
    }
    if {[llength $revs] == 0} {
        # Always default to HEAD to see changes regardless of index
        lappend cmd HEAD
    } else {
        foreach rev $revs {
            lappend cmd $rev
        }
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
        foreach line [lsearch -all -inline -regexp [split $res \n] {^diff -}] {
            if {[regexp { a/(.*) b/} $line -> fn]} {
                lappend fileList $fn
            }
        }
        set fileList [lsort -dictionary -unique $fileList]
    }
    
    return $res
}

# Get a GIT change set
proc eskil::rev::GIT::getChangedFiles {dir revs} {
    set cmd [list execDir $dir git diff --name-only]
    if {[llength $revs] == 0} {







|







655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
        foreach line [lsearch -all -inline -regexp [split $res \n] {^diff -}] {
            if {[regexp { a/(.*) b/} $line -> fn]} {
                lappend fileList $fn
            }
        }
        set fileList [lsort -dictionary -unique $fileList]
    }

    return $res
}

# Get a GIT change set
proc eskil::rev::GIT::getChangedFiles {dir revs} {
    set cmd [list execDir $dir git diff --name-only]
    if {[llength $revs] == 0} {
691
692
693
694
695
696
697







698
699
700
701
702
703
704
        lappend cmd --from [lindex $revs 0]
    }
    if {[llength $revs] >= 2} {
        lappend cmd --to [lindex $revs 1]
    }
    # Include added files contents
    lappend cmd -N








    lappend cmd {*}$files

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







>
>
>
>
>
>
>







707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
        lappend cmd --from [lindex $revs 0]
    }
    if {[llength $revs] >= 2} {
        lappend cmd --to [lindex $revs 1]
    }
    # Include added files contents
    lappend cmd -N

    if {$::Pref(context) >= 0} {
        lappend cmd --context $::Pref(context)
    }
    if {$::Pref(ignore) in "-w -b"} {
        lappend cmd -w
    }

    lappend cmd {*}$files

    if {[catch {eval $cmd} res]} {
        tk_messageBox -icon error -title "FOSSIL error" -message $res
        return ""
    }
Changes to src/startup.tcl.
722
723
724
725
726
727
728



729
730
731
732
733
734
735
    addFlags -dir -clip -fourway -patch -review -
    docFlag -dir    "Start in directory diff mode. Ignores other args"
    docFlag -clip   "Start in clip diff mode. Ignores other args"
    docFlag -fourway "Start in fourway diff mode. Ignores other args"
    docFlag -patch  "View patch file"
    docFlag -       "Read patch file from standard input, to allow pipes"
    docFlag -review "View revision control tree as a patch"



    addFlags -browse -nodiff
    docFlag -browse "Automatically bring up file dialog after starting"
    docFlag -nodiff "Do not run diff after startup"
    addFlags -server -cvs -svn -debug
    docFlag -server "Set up Eskil to be controllable from the outside"
    docFlag -cvs    "Detect CVS first, if multiple version systems are used"
    docFlag -svn    "Detect SVN first, if multiple version systems are used"







>
>
>







722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
    addFlags -dir -clip -fourway -patch -review -
    docFlag -dir    "Start in directory diff mode. Ignores other args"
    docFlag -clip   "Start in clip diff mode. Ignores other args"
    docFlag -fourway "Start in fourway diff mode. Ignores other args"
    docFlag -patch  "View patch file"
    docFlag -       "Read patch file from standard input, to allow pipes"
    docFlag -review "View revision control tree as a patch"
    addSideEffect -review {
        optSet -noignore 1
    }
    addFlags -browse -nodiff
    docFlag -browse "Automatically bring up file dialog after starting"
    docFlag -nodiff "Do not run diff after startup"
    addFlags -server -cvs -svn -debug
    docFlag -server "Set up Eskil to be controllable from the outside"
    docFlag -cvs    "Detect CVS first, if multiple version systems are used"
    docFlag -svn    "Detect SVN first, if multiple version systems are used"