Skip to content

Commit 8d462f6

Browse files
thibaultduponchellejkeenan
authored andcommitted
Reworking make_dot_patch.pl Remove make_snapshot.pl
1 parent f96e212 commit 8d462f6

File tree

6 files changed

+19
-177
lines changed

6 files changed

+19
-177
lines changed

MANIFEST

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5897,7 +5897,6 @@ Porting/findrfuncs Find reentrant variants of functions used in an executable
58975897
Porting/git-deltatool Mark commits for perldelta in git notes
58985898
Porting/git-find-p4-change Find the change for a p4 change number
58995899
Porting/git-make-p4-refs Output git refs for each p4 change number, suitable for appending to .git/packed-refs
5900-
Porting/GitUtils.pm Generate the contents of a .patch file
59015900
Porting/Glossary Glossary of config.sh variables
59025901
Porting/harness-timer-report.pl Analyze the timings from the test harness
59035902
Porting/how_to_write_a_perldelta.pod Bluffer's guide to writing a perldelta.
@@ -5907,7 +5906,6 @@ Porting/Maintainers.pl Information about maintainers
59075906
Porting/Maintainers.pm Library to pretty print info in Maintainers.pl
59085907
Porting/make-rmg-checklist Generates a checklist 4 the release manager
59095908
Porting/make_dot_patch.pl Make a .patch file from a git WD
5910-
Porting/make_snapshot.pl Make a tgz snapshot of our tree with a .patch file in it
59115909
Porting/makemeta Create the top-level META.yml
59125910
Porting/makerel Release making utility
59135911
Porting/manicheck Check against MANIFEST

Porting/GitUtils.pm

Lines changed: 0 additions & 61 deletions
This file was deleted.

Porting/README.pod

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,6 @@ id.
177177

178178
This script creates a tag for every p4raw-id.
179179

180-
=head2 F<GitUtils.pm>
181-
182-
This script contains the subroutine to generate a F<.patch file> for a
183-
committish (the SHA1 checksum of a commit, a number made of 40 hexadecimal
184-
digits which acts the internal unique identifier for this commit
185-
(lilypond.org). Related file: F<make_dot_patch.pl>
186-
187180
=head2 F<Glossary>
188181

189182
This file is built by F<metaconfig>. This file contains a description of all
@@ -225,8 +218,7 @@ associated with maintainers. Related files: F<Maintainers>, F<Maintainers.pl>
225218

226219
=head2 F<make_dot_patch.pl>
227220

228-
Generate a F<.patch> file to STDOUT for a commit ID specified on the
229-
command-line.
221+
Generate a F<.patch> file to STDOUT.
230222

231223
=head2 F<makemeta>
232224

@@ -240,11 +232,6 @@ This script builds a Perl release tarball.
240232

241233
This script creates a release checklist as a simple HTML document.
242234

243-
=head2 F<make_snapshot.pl>
244-
245-
This script is a quick and dirty snapshot generator for the perl5.git.perl.org
246-
web page to use to generate the snapshot files.
247-
248235
=head2 F<manicheck>
249236

250237
This script outputs a list of files in F<MANIFEST> which don't exist and a

Porting/exec-bit.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ Porting/harness-timer-report.pl
6464
Porting/findrfuncs
6565
Porting/makerel
6666
Porting/make_dot_patch.pl
67-
Porting/make_snapshot.pl
6867
Porting/mksample
6968
Porting/newtests-perldelta.pl
7069
Porting/perlhist_calculate.pl

Porting/make_dot_patch.pl

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
#!/usr/bin/perl
22
use strict;
33
use warnings;
4+
use POSIX qw(strftime);
45

5-
# This is a quickie script which I wrote to generate the .patch file for
6-
# an arbitrary commit. It takes on sha1 as an argument, or saving that
7-
# uses the sha1 associated to HEAD.
8-
# It tries to find which of our primary branches the sha1 can be found on,
9-
# and then prints to standard out something similar to what our rsync feed
10-
# would produce for that situation. The main difference being, in that case
11-
# we KNOW what branch we are on, and in this one we don't, and in that case
12-
# the $tstamp field holds the time the snapshot was generated (so that multiple
13-
# fetches will always have an increasing tstamp field), however in this case
14-
# we use the commit date of the sha1.
15-
#
16-
# This is more or less intended to be used as a utility to generated .patch
17-
# files for other processes, like gitweb and snapshots.
18-
#
19-
# The script assumes it is being run from a git WD.
20-
#
21-
# Yves
6+
# Generate .patch for later usage by smokers that are not synching via git
227

23-
use lib "Porting";
24-
use GitUtils qw(gen_dot_patch);
25-
print gen_dot_patch(@ARGV), -t STDOUT ? "\n" : "";
8+
# Format date
9+
sub iso_time_with_dot {
10+
return strftime "%Y-%m-%d.%H:%M:%S", gmtime(shift || time)
11+
}
2612

13+
# Generate the content of .patch for HEAD
14+
chomp(my ($git_dir, $sha1) = `git rev-parse --git-dir HEAD`);
15+
die "Not in a git repository!" if !$git_dir;
2716

17+
my $branch = `git rev-parse --abbrev-ref HEAD`;
18+
chomp $branch;
19+
20+
my $tstamp = iso_time_with_dot(`git log -1 --pretty="format:%ct" HEAD`);
21+
my $describe= `git describe HEAD`;
22+
chomp $describe;
23+
my $dot_patch = join(" ", $branch, $tstamp, $sha1, $describe);
24+
25+
print $dot_patch, -t STDOUT ? "\n" : "";

Porting/make_snapshot.pl

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)