︙ | | |
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
-
+
-
+
|
#
# NOTE: The command to use when attempting to check for changes prior to
# staging files using Fossil.
#
variable fossilChangesCommand; # DEFAULT fossil changes ...
if {![info exists fossilChangesCommand]} then {
set fossilChangesCommand {fossil changes --chdir {${checkoutDirectory}}}
set fossilChangesCommand {fossil changes --chdir {${directory}}}
}
#
# NOTE: The regular expression pattern used when attempting to verify
# that the Fossil checkout has no changes staged. Generally, this
# pattern should only match an empty string.
#
variable fossilChangesPattern; # DEFAULT: {^$}
if {![info exists fossilChangesPattern]} then {
set fossilChangesPattern {^$}
}
#
# NOTE: The command to use when attempting to check the checkout status
# prior to staging files using Fossil.
#
variable fossilInfoCommand; # DEFAULT fossil info ...
if {![info exists fossilInfoCommand]} then {
set fossilInfoCommand {fossil info --chdir {${scriptDirectory}}}
set fossilInfoCommand {fossil info --chdir {${directory}}}
}
#
# NOTE: The regular expression pattern used when attempting to extract
# the root directory for the Fossil checkout.
#
variable fossilInfoLocalRootPattern; # DEFAULT: {^local-root:\s+(.*?)$}
|
︙ | | |
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
-
+
-
+
-
+
|
# NOTE: The command to use when attempting to reset the checkout to the
# default branch prior to staging files using Fossil.
#
variable fossilUpdateCommand; # DEFAULT fossil update trunk ...
if {![info exists fossilUpdateCommand]} then {
set fossilUpdateCommand \
{fossil update trunk --chdir {${checkoutDirectory}}}
{fossil update trunk --chdir {${directory}}}
}
#
# NOTE: The command to use when attempting to stage package files using
# Fossil.
#
variable fossilAddCommand; # DEFAULT fossil add ...
if {![info exists fossilAddCommand]} then {
set fossilAddCommand \
{fossil add --chdir {${targetDirectory}} {${fileName}}}
{fossil add --chdir {${directory}} {${fileName}}}
}
#
# NOTE: The command to use when attempting to commit package files using
# Fossil.
#
variable fossilCommitCommand; # DEFAULT fossil commit ...
if {![info exists fossilCommitCommand]} then {
set fossilCommitCommand {fossil commit -m {${comment}}\
--branch {${branch}} --user anonymous --chdir \
{${checkoutDirectory}} --no-prompt}
{${directory}} --no-prompt}
}
#
# NOTE: The regular expression pattern used when attempting to verify
# that Fossil committed a set of files.
#
variable fossilCommitPattern; # DEFAULT: {^New_Version: ([0-9a-f]{40})$}
|
︙ | | |
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
|
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
|
-
+
|
#
proc getCheckoutDirectory {} {
variable fossilInfoCommand
variable fossilInfoLocalRootPattern
variable scriptDirectory
if {[isEagle]} then {
set scriptDirectory [::PackageRepository::formatExecArgument \
set directory [::PackageRepository::formatExecArgument \
$scriptDirectory]
if {[catch {
eval exec -nocarriagereturns -stdout output -stderr error \
[subst $fossilInfoCommand]
} result] == 0} then {
set result [appendArgs $output $error]
|
︙ | | |
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
|
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
|
-
+
|
variable checkoutDirectory
variable fossilChangesCommand
variable fossilChangesPattern
verifyCheckoutDirectory
if {[isEagle]} then {
set checkoutDirectory [::PackageRepository::formatExecArgument \
set directory [::PackageRepository::formatExecArgument \
$checkoutDirectory]
if {[catch {
eval exec -nocarriagereturns -stdout output -stderr error \
[subst $fossilChangesCommand]
} result] == 0} then {
set result [appendArgs $output $error]
|
︙ | | |
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
|
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
|
-
+
|
proc verifyThisIsTheCorrectProject {} {
variable fossilInfoCommand
variable fossilInfoProjectCodePattern
variable projectCode
variable scriptDirectory
if {[isEagle]} then {
set scriptDirectory [::PackageRepository::formatExecArgument \
set directory [::PackageRepository::formatExecArgument \
$scriptDirectory]
if {[catch {
eval exec -nocarriagereturns -stdout output -stderr error \
[subst $fossilInfoCommand]
} result] == 0} then {
set result [appendArgs $output $error]
|
︙ | | |
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
|
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
|
-
+
|
#
proc verifyThisIsTheCorrectBranch {} {
variable fossilInfoCommand
variable fossilInfoTagsPattern
variable scriptDirectory
if {[isEagle]} then {
set scriptDirectory [::PackageRepository::formatExecArgument \
set directory [::PackageRepository::formatExecArgument \
$scriptDirectory]
if {[catch {
eval exec -nocarriagereturns -stdout output -stderr error \
[subst $fossilInfoCommand]
} result] == 0} then {
set result [appendArgs $output $error]
|
︙ | | |
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
|
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
|
-
+
|
proc changeToTheCorrectBranch {} {
variable checkoutDirectory
variable fossilUpdateCommand
verifyCheckoutDirectory
if {[isEagle]} then {
set checkoutDirectory [::PackageRepository::formatExecArgument \
set directory [::PackageRepository::formatExecArgument \
$checkoutDirectory]
if {[catch {
eval exec -success Success [subst $fossilUpdateCommand]
} error]} then {
error [appendArgs \
"could not change branch: " $error]
|
︙ | | |
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
|
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
|
-
+
|
# relative name of the file to be staged. This procedure may raise
# script errors.
#
proc stageOnePackageFile { targetDirectory fileName } {
variable fossilAddCommand
if {[isEagle]} then {
set targetDirectory [::PackageRepository::formatExecArgument \
set directory [::PackageRepository::formatExecArgument \
$targetDirectory]
set fileName [::PackageRepository::formatExecArgument $fileName]
if {[catch {
eval exec -success Success [subst $fossilAddCommand]
} error]} then {
|
︙ | | |
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
|
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
|
-
+
|
set branch [appendArgs pkg_ $package _ $patchLevel]
set comment [appendArgs \
"Add package " $package " v" $patchLevel " for " $language \
" v" $version .]
if {[isEagle]} then {
set checkoutDirectory [::PackageRepository::formatExecArgument \
set directory [::PackageRepository::formatExecArgument \
$checkoutDirectory]
set branch [::PackageRepository::formatExecArgument $branch]
set comment [::PackageRepository::formatExecArgument $comment]
if {[catch {
eval exec -nocarriagereturns -stdout output -stderr error \
|
︙ | | |