Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/curl/scripts/delta @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 #!/usr/bin/perl | |
| 2 #*************************************************************************** | |
| 3 # _ _ ____ _ | |
| 4 # Project ___| | | | _ \| | | |
| 5 # / __| | | | |_) | | | |
| 6 # | (__| |_| | _ <| |___ | |
| 7 # \___|\___/|_| \_\_____| | |
| 8 # | |
| 9 # Copyright (C) 2018-2019, Daniel Stenberg, <daniel@haxx.se>, et al. | |
| 10 # | |
| 11 # This software is licensed as described in the file COPYING, which | |
| 12 # you should have received as part of this distribution. The terms | |
| 13 # are also available at https://curl.haxx.se/docs/copyright.html. | |
| 14 # | |
| 15 # You may opt to use, copy, modify, merge, publish, distribute and/or sell | |
| 16 # copies of the Software, and permit persons to whom the Software is | |
| 17 # furnished to do so, under the terms of the COPYING file. | |
| 18 # | |
| 19 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | |
| 20 # KIND, either express or implied. | |
| 21 # | |
| 22 ########################################################################### | |
| 23 | |
| 24 # Display changes done in the repository from [tag] until now. | |
| 25 # | |
| 26 # Uses git for repo data. | |
| 27 # Uses docs/THANKS and RELEASE-NOTES for current status. | |
| 28 # | |
| 29 # In the git clone root, invoke 'scripts/delta [release tag]' | |
| 30 | |
| 31 $start = $ARGV[0]; | |
| 32 | |
| 33 if($start eq "") { | |
| 34 print "Usage: summary [tag]\n"; | |
| 35 exit; | |
| 36 } | |
| 37 | |
| 38 $commits = `git log --oneline $start.. | wc -l`; | |
| 39 $committers = `git shortlog -s $start.. | wc -l`; | |
| 40 $bcommitters = `git shortlog -s $start | wc -l`; | |
| 41 | |
| 42 $acommits = `git log --oneline | wc -l`; | |
| 43 $acommitters = `git shortlog -s | wc -l`; | |
| 44 | |
| 45 # delta from now compared to before | |
| 46 $ncommitters = $acommitters - $bcommitters; | |
| 47 | |
| 48 # number of contributors right now (according to THANKS) | |
| 49 $acontribs = `cat docs/THANKS | grep -c '^[^ ]'`; | |
| 50 # number when the tag tag was set | |
| 51 $bcontribs = `git show $start:docs/THANKS | grep -c '^[^ ]'`; | |
| 52 # delta | |
| 53 $contribs = $acontribs - $bcontribs; | |
| 54 | |
| 55 # number of setops: | |
| 56 $asetopts=`grep "^ CINIT" include/curl/curl.h | grep -cv OBSOLETE`; | |
| 57 $bsetopts=`git show $start:include/curl/curl.h | grep "^ CINIT" | grep -cv OBSOLETE`; | |
| 58 $nsetopts = $asetopts - $bsetopts; | |
| 59 | |
| 60 # Number of command line options: | |
| 61 $aoptions=`grep -c '{"....--' src/tool_help.c`; | |
| 62 $boptions=`git show $start:src/tool_help.c | grep -c '{"....--'`; | |
| 63 $noptions=$aoptions - $boptions; | |
| 64 | |
| 65 # Number of files in git | |
| 66 $afiles=`git ls-files | wc -l`; | |
| 67 $deletes=`git diff-tree --diff-filter=A -r --summary origin/master $start | wc -l`; | |
| 68 $creates=`git diff-tree --diff-filter=D -r --summary origin/master $start | wc -l`; | |
| 69 | |
| 70 # Time since that tag | |
| 71 $tagged=`git for-each-ref --format="%(refname:short) | %(taggerdate:unix)" refs/tags/* | grep ^$start | cut "-d|" -f2`; # unix timestamp | |
| 72 $taggednice=`git for-each-ref --format="%(refname:short) | %(creatordate)" refs/tags/* | grep ^$start | cut '-d|' -f2`; # human readable time | |
| 73 chomp $taggednice; | |
| 74 $now=`date +%s`; | |
| 75 $elapsed=$now - $tagged; # number of seconds since tag | |
| 76 | |
| 77 # Number of public functions in libcurl | |
| 78 $apublic=`git grep ^CURL_EXTERN -- include/curl | wc -l`; | |
| 79 $bpublic=`git grep ^CURL_EXTERN $start -- include/curl | wc -l`; | |
| 80 $public = $apublic - $bpublic; | |
| 81 | |
| 82 # Changes/bug-fixes currently logged | |
| 83 open(F, "<RELEASE-NOTES"); | |
| 84 while(<F>) { | |
| 85 if($_ =~ /following changes:/) { | |
| 86 $mode=1; | |
| 87 } | |
| 88 elsif($_ =~ /following bugfixes:/) { | |
| 89 $mode=2; | |
| 90 } | |
| 91 elsif($_ =~ /known bugs:/) { | |
| 92 $mode=3; | |
| 93 } | |
| 94 elsif($_ =~ /like these:/) { | |
| 95 $mode=4; | |
| 96 } | |
| 97 if($_ =~ /^ o /) { | |
| 98 if($mode == 1) { | |
| 99 $numchanges++; | |
| 100 } | |
| 101 elsif($mode == 2) { | |
| 102 $numbugfixes++; | |
| 103 } | |
| 104 } | |
| 105 if(($mode == 4) && ($_ =~ /^ \((\d+) contributors/)) { | |
| 106 $numcontributors = $1; | |
| 107 } | |
| 108 } | |
| 109 close(F); | |
| 110 | |
| 111 ######################################################################## | |
| 112 # Produce the summary | |
| 113 | |
| 114 print "== Since $start ==\n"; | |
| 115 printf "Commits: %d (out of %d)\n", | |
| 116 $commits, $acommits; | |
| 117 printf "Commit authors: %d out of which %d are new (out of %d)\n", | |
| 118 $committers, $ncommitters, $acommitters; | |
| 119 printf "Contributors in RELEASE-NOTES: %d\n", | |
| 120 $numcontributors; | |
| 121 printf "New contributors (in THANKS): %d (out of %d)\n", | |
| 122 $contribs, $acontribs; | |
| 123 printf "New curl_easy_setopt() options: %d (out of %d)\n", | |
| 124 $nsetopts, $asetopts; | |
| 125 printf "New command line options: %d (out of %d)\n", | |
| 126 $noptions, $aoptions; | |
| 127 | |
| 128 printf "Deleted %d files, added %d files (total %d)\n", | |
| 129 $deletes, $creates, $afiles; | |
| 130 | |
| 131 printf "Elapsed time: %.1f days (since$taggednice)\n", | |
| 132 $elapsed / 3600 / 24; | |
| 133 printf "Changes logged: %d\n", $numchanges; | |
| 134 printf "Bugfixes logged: %d\n", $numbugfixes; | |
| 135 | |
| 136 printf "New public functions: %d (out of %d)\n", | |
| 137 $public, $apublic; |
