261
262
263
264
265
266
267
268
269
270
271
272
273
274
|
if {$old != ""} {
cd $old
}
}
# List local changes in a checkout
proc eskil::rev::SVN::localChanges {dir} {
set old [pwd]
cd $dir
set info [exec svn status --ignore-externals -q]
cd $old
set changes {}
foreach line [split $info \n] {
|
>
>
|
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
|
if {$old != ""} {
cd $old
}
}
# List local changes in a checkout
# This is used to optimise dirdiff in the case of current vs local.
# For SVN a lot of server calls can thus be avoided.
proc eskil::rev::SVN::localChanges {dir} {
set old [pwd]
cd $dir
set info [exec svn status --ignore-externals -q]
cd $old
set changes {}
foreach line [split $info \n] {
|
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
|
return $result
}
# Figure out HG revision from arguments
proc eskil::rev::HG::ParseRevs {filename revs} {
set result ""
foreach rev $revs {
# HG internally supports negative numbers for backwards search
# though -1 means current. Translate to Eskil notation by adding one
if {[string is integer $rev] && $rev < 0} {
incr rev -1
}
if {$rev eq "_" || $rev eq "0"} {set rev tip}
lappend result $rev
}
|
|
|
|
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
|
return $result
}
# Figure out HG revision from arguments
proc eskil::rev::HG::ParseRevs {filename revs} {
set result ""
foreach rev $revs {
# HG internally supports negative numbers for backwards search though
# -1 means current. Translate to Eskil notation by subtracting one.
if {[string is integer $rev] && $rev < 0} {
incr rev -1
}
if {$rev eq "_" || $rev eq "0"} {set rev tip}
lappend result $rev
}
|
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
|
set atRev ""
}
set Url [eskil::rev::SVN::LookForBranch $filename $rev]
if {$Url ne ""} {
set rev $atRev
}
}
if {$rev eq "_"} {
# Common name for current
#set rev [eskil::rev::SVN::GetCurrent $filename]
set rev BASE
} elseif {[string is integer -strict $rev] && $rev <= 0} {
# Zero means current
# A negative integer rev is a relative rev
# Save a roundtrip to the server in the case where we
# can start from current
if {$Url eq "" && $rev >= -1} {
set curr [eskil::rev::SVN::GetCurrent $filename]
|
|
|
|
>
>
|
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
|
set atRev ""
}
set Url [eskil::rev::SVN::LookForBranch $filename $rev]
if {$Url ne ""} {
set rev $atRev
}
}
if {$rev eq "_" || $rev eq "0"} {
# Common names for current
# Use BASE since SVN then knows to use the local copy and avoid
# server calls.
set rev BASE
#set rev [eskil::rev::SVN::GetCurrent $filename]
} elseif {[string is integer -strict $rev] && $rev <= 0} {
# Zero means current
# A negative integer rev is a relative rev
# Save a roundtrip to the server in the case where we
# can start from current
if {$Url eq "" && $rev >= -1} {
set curr [eskil::rev::SVN::GetCurrent $filename]
|