Skip to content

Commit

Permalink
Reworking make_dot_patch.pl Remove make_snapshot.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultduponchelle authored and jkeenan committed Feb 18, 2025
1 parent f96e212 commit 8d462f6
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 177 deletions.
2 changes: 0 additions & 2 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -5897,7 +5897,6 @@ Porting/findrfuncs Find reentrant variants of functions used in an executable
Porting/git-deltatool Mark commits for perldelta in git notes
Porting/git-find-p4-change Find the change for a p4 change number
Porting/git-make-p4-refs Output git refs for each p4 change number, suitable for appending to .git/packed-refs
Porting/GitUtils.pm Generate the contents of a .patch file
Porting/Glossary Glossary of config.sh variables
Porting/harness-timer-report.pl Analyze the timings from the test harness
Porting/how_to_write_a_perldelta.pod Bluffer's guide to writing a perldelta.
Expand All @@ -5907,7 +5906,6 @@ Porting/Maintainers.pl Information about maintainers
Porting/Maintainers.pm Library to pretty print info in Maintainers.pl
Porting/make-rmg-checklist Generates a checklist 4 the release manager
Porting/make_dot_patch.pl Make a .patch file from a git WD
Porting/make_snapshot.pl Make a tgz snapshot of our tree with a .patch file in it
Porting/makemeta Create the top-level META.yml
Porting/makerel Release making utility
Porting/manicheck Check against MANIFEST
Expand Down
61 changes: 0 additions & 61 deletions Porting/GitUtils.pm

This file was deleted.

15 changes: 1 addition & 14 deletions Porting/README.pod
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,6 @@ id.

This script creates a tag for every p4raw-id.

=head2 F<GitUtils.pm>

This script contains the subroutine to generate a F<.patch file> for a
committish (the SHA1 checksum of a commit, a number made of 40 hexadecimal
digits which acts the internal unique identifier for this commit
(lilypond.org). Related file: F<make_dot_patch.pl>

=head2 F<Glossary>

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

=head2 F<make_dot_patch.pl>

Generate a F<.patch> file to STDOUT for a commit ID specified on the
command-line.
Generate a F<.patch> file to STDOUT.

=head2 F<makemeta>

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

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

=head2 F<make_snapshot.pl>

This script is a quick and dirty snapshot generator for the perl5.git.perl.org
web page to use to generate the snapshot files.

=head2 F<manicheck>

This script outputs a list of files in F<MANIFEST> which don't exist and a
Expand Down
1 change: 0 additions & 1 deletion Porting/exec-bit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ Porting/harness-timer-report.pl
Porting/findrfuncs
Porting/makerel
Porting/make_dot_patch.pl
Porting/make_snapshot.pl
Porting/mksample
Porting/newtests-perldelta.pl
Porting/perlhist_calculate.pl
Expand Down
38 changes: 18 additions & 20 deletions Porting/make_dot_patch.pl
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
#!/usr/bin/perl
use strict;
use warnings;
use POSIX qw(strftime);

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

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

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

my $branch = `git rev-parse --abbrev-ref HEAD`;
chomp $branch;

my $tstamp = iso_time_with_dot(`git log -1 --pretty="format:%ct" HEAD`);
my $describe= `git describe HEAD`;
chomp $describe;
my $dot_patch = join(" ", $branch, $tstamp, $sha1, $describe);

print $dot_patch, -t STDOUT ? "\n" : "";
79 changes: 0 additions & 79 deletions Porting/make_snapshot.pl

This file was deleted.

0 comments on commit 8d462f6

Please sign in to comment.