Overview
Comment: | When storing the directory portion of 'info script', normalize it first. Fixes to the checkout directory handling for staging files in the package uploader client. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
25cb98f2fe8e4f81246641d67744a596 |
User & Date: | mistachkin on 2016-12-23 00:15:46 |
Other Links: | manifest | tags |
Context
2016-12-23
| ||
00:33 | In the package uploader client, make sure the language argument is in title case for the repository server metadata and in lower case for the file server directory. check-in: bf5a5e46de user: mistachkin tags: trunk | |
00:15 | When storing the directory portion of 'info script', normalize it first. Fixes to the checkout directory handling for staging files in the package uploader client. check-in: 25cb98f2fe user: mistachkin tags: trunk | |
2016-12-22
| ||
22:56 | The 'getRelativeFileNames' procedure requires the maximumLevels argument. check-in: ee4b2e75a2 user: mistachkin tags: trunk | |
Changes
Modified client/1.0/neutral/pkgd.eagle from [c1156a1489] to [f4bc5e5781].
︙ | |||
178 179 180 181 182 183 184 | 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | - + | # # NOTE: What is the fully qualified path to the directory containing the # package downloader client? # variable clientDirectory if {![info exists clientDirectory]} then { |
︙ |
Modified client/1.0/neutral/pkgd.eagle.asc from [fc55c91d88] to [097b0d6b3c].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - - - - - - - - - - - - - + + + + + + + + + + + + + | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Eagle Package Repository |
Modified client/1.0/neutral/pkgd.eagle.harpy from [67e18415a4] to [d8560754b2].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED. --> <Certificate xmlns="https://eagle.to/2011/harpy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Protocol>None</Protocol> <Vendor>Mistachkin Systems</Vendor> |
Modified client/1.0/neutral/pkgd.eagle.harpy.asc from [5ccaa40c80] to [0e8a373a08].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - - - - - - - - - - - - - + + + + + + + + + + + + + | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Eagle Package Repository |
Modified client/1.0/neutral/pkgr_upload.eagle from [e3a8e2742f] to [965d609d81].
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - - + + - - + + + + + + + + + + + - - + + - + - - + + | \[language\] \[version\] \[platform\] \[fileName1\] ... \[fileNameN\]" exit 1 } # # NOTE: This procedure sets up the default values for all configuration |
︙ | |||
88 89 90 91 92 93 94 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - + + + + + + + + + + + | # # 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 { |
︙ | |||
131 132 133 134 135 136 137 | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | - + | # 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 \ |
︙ | |||
165 166 167 168 169 170 171 172 173 174 175 176 177 178 | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | + + + + + + + + + + + + + + + + + + | # variable verboseMetadataSubmit; # DEFAULT: false if {![info exists verboseMetadataSubmit]} then { set verboseMetadataSubmit false } } # # NOTE: This procedure sets up the default values for all configuration # parameters used by the package uploader client that require the # location of the checkout directory. There are no arguments. # proc setupCheckoutVars {} { # # NOTE: What is the fully qualified path to the root directory of the # Fossil checkout containing the package client toolset? This # procedure may raise script errors. # variable checkoutDirectory; # DEFAULT: <checkoutDir> if {![info exists checkoutDirectory]} then { set checkoutDirectory [getCheckoutDirectory] } } # # NOTE: This procedure returns a string value, formatted for use within a # script block being processed by the [string map] command. The # value argument is the string value to format. No return value is # reserved to indicate an error. This procedure may not raise any # script errors. |
︙ | |||
530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 | 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | return [eval ::PackageRepository::getFileViaHttp \ [list $uri] [list 20] [list stdout] [list \ [expr {!$verboseMetadataSubmit}]] $options] } } # # NOTE: This procedure attempts to query the root directory of the Fossil # checkout. There are no arguments. An empty string is returned if # the root directory of the Fossil checkout cannot be determined. # proc getCheckoutDirectory {} { variable fossilInfoCommand variable fossilInfoLocalRootPattern variable scriptDirectory if {[isEagle]} then { if {[catch { eval exec -nocarriagereturns -stdout output -stderr error \ [subst $fossilInfoCommand] } result] == 0} then { set result [appendArgs $output $error] } else { return false } } else { if {[catch { eval exec [subst $fossilInfoCommand] } result]} then { return false } } if {![info exists result] || ![regexp -line -- \ $fossilInfoLocalRootPattern $result dummy directory]} then { return "" } return [string trim $directory] } # # NOTE: This procedure attempts to verify that the root directory of the # Fossil checkout is present, valid, and is actually a directory. # There are no arguments. Script errors will be raised if any of # the checks fail. # proc verifyCheckoutDirectory {} { variable checkoutDirectory if {![info exists checkoutDirectory]} then { error "checkout directory is missing" } if {[string length $checkoutDirectory] == 0} then { error "checkout directory is invalid" } if {![file isdir $checkoutDirectory]} then { error [appendArgs \ "checkout directory \"" $checkoutDirectory \ "\" is not really a directory"] } } # # NOTE: This procedure attempts to verify that the checkout directory does # not contain any (stray) changes. There are no arguments. Non-zero # is returned if the verification is successful. # proc verifyThereAreNoChanges {} { variable checkoutDirectory variable fossilChangesCommand variable fossilChangesPattern verifyCheckoutDirectory if {[isEagle]} then { if {[catch { eval exec -nocarriagereturns -stdout output -stderr error \ [subst $fossilChangesCommand] } result] == 0} then { set result [appendArgs $output $error] |
︙ | |||
571 572 573 574 575 576 577 | 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 | - + | # # NOTE: This procedure attempts to verify that the checkout directory does # belong to the correct project. There are no arguments. Non-zero # is returned if the verification is successful. # proc verifyThisIsTheCorrectProject {} { |
︙ | |||
607 608 609 610 611 612 613 | 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 | - + | # # NOTE: This procedure attempts to verify that the checkout directory does # belong to the correct branch. There are no arguments. Non-zero # is returned if the verification is successful. # proc verifyThisIsTheCorrectBranch {} { |
︙ | |||
645 646 647 648 649 650 651 652 653 654 655 656 657 658 | 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 | + + | # directory. There are no arguments. This procedure may raise # script errors. # proc changeToTheCorrectBranch {} { variable checkoutDirectory variable fossilUpdateCommand verifyCheckoutDirectory if {[isEagle]} then { if {[catch { eval exec -success Success [subst $fossilUpdateCommand] } error]} then { error [appendArgs \ "could not change branch: " $error] } |
︙ | |||
671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 | 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 | + + - - + - - - - - - + - - - + - - + - + - - + + + - - + + + + + + + + | # Fossil. The fileNames argument is a list of (fully?) qualified # local file names to stage. # # <public> proc stagePackageFiles { language version platform fileNames } { variable checkoutDirectory variable fossilAddCommand verifyCheckoutDirectory if {![verifyThereAreNoChanges]} then { error "cannot stage files: there are pending changes" } if {![verifyThisIsTheCorrectProject]} then { error "cannot stage files: wrong project" } if {![verifyThisIsTheCorrectBranch]} then { changeToTheCorrectBranch if {![verifyThisIsTheCorrectBranch]} then { error "cannot stage files: still on wrong branch" } } |
︙ | |||
743 744 745 746 747 748 749 750 751 752 753 754 755 756 | 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 | + + | # caller that will receive the resulting Fossil check-in identifier. # # <public> proc commitPackageFiles { package patchLevel language version varName } { variable checkoutDirectory variable fossilCommitCommand variable fossilCommitPattern verifyCheckoutDirectory set branch [appendArgs pkg_ $package _ $patchLevel] set comment [appendArgs \ "Add package " $package " v" $patchLevel " for " $language \ " v" $version .] |
︙ | |||
1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 | 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 | + | # and Tk. The existing argument data, if any, will be used to # populate it. There are no arguments. # proc setupTkUserInterface {} { variable widgets package require Tk catch {console show} catch {wm withdraw .}; set toplevel [toplevel .uploader] set widgets(toplevel) $toplevel ########################################################################### set widgets(label,apiKey) [label [appendArgs \ |
︙ | |||
1427 1428 1429 1430 1431 1432 1433 | 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 | - + + | # one or more of the variable setup in the next step. # ::PackageRepository::maybeReadSettingsFile [info script] # # NOTE: Setup the variables, within this namespace, used by this script. # |
︙ |
Modified client/1.0/neutral/pkgr_upload.eagle.asc from [394d6989b0] to [f3ce902234].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - - - - - - - - - - - - - + + + + + + + + + + + + + | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Eagle Package Repository |
Modified client/1.0/neutral/pkgr_upload.eagle.harpy from [5f684facb7] to [3beb1aadec].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED. --> <Certificate xmlns="https://eagle.to/2011/harpy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Protocol>None</Protocol> <Vendor>Mistachkin Systems</Vendor> |
Modified client/1.0/neutral/pkgr_upload.eagle.harpy.asc from [e080d5dfec] to [8ae3346a0c].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - - - - - - - - - - - - - + + + + + + + + + + + + + | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Eagle Package Repository |