On Mon, Aug 11, 2014 at 11:10:59AM +0200, Tom de Vries wrote:
> +use File::Temp;
> +use File::Copy qw(cp mv);
> + # Copy the permissions to the temp file (in perl 2.15 and later).
> + cp $diff, $tmp or die "Could not copy patch file to temp file: $!";
That's File::Copy 2.15, not Perl 2.15
On 11-08-14 10:18, Yury Gribov wrote:
On 08/11/2014 11:22 AM, Tom de Vries wrote:
I'm now using mktemp from File::Temp.
The script now relies on external Perl modules. This is probably fine because
AFAIK File::Temp and File::Copy are available included in all distributions.
+use File::Copy "c
On 08/11/2014 11:22 AM, Tom de Vries wrote:
+if ($#ARGV == 1 && ("$ARGV[0]" eq "-i" || "$ARGV[0]" eq "--inline")) {
I'd do >= 1 but that's a question of personal preference.
What is the purpose of that proposed change ?
Kind of laying foundation for adding more flags in the future. But as I
On 04-08-14 13:50, Yury Gribov wrote:
> thanks for the review.
Np, I'm personally happy to see that script is useful.
> I've now interpreted it such that --inline prints to stdout what it
> would print to the patch file otherwise, that is, both log and patch.
> Printing just the log to stdo
> +if ($inline && $diff ne "-") {
> + $tmp = `mktemp`;
> + if ($? != 0) {
> + die "Could not generate temp file";
> + }
>
> IMHO better use consistent style: system() or ticks with $?.
Or let Perl itself create the temporary file:
open(my $tmp_fh, "+>", undef) or
> thanks for the review.
Np, I'm personally happy to see that script is useful.
> I've now interpreted it such that --inline prints to stdout what it
> would print to the patch file otherwise, that is, both log and patch.
> Printing just the log to stdout can be already be achieved by not using
On 04-08-14 08:45, Yury Gribov wrote:
Thanks! My 2 (actually 4) cents below.
Hi Yuri,
thanks for the review.
> +if ($#ARGV == 1 && ("$ARGV[0]" eq "-i" || "$ARGV[0]" eq "--inline")) {
> +$diff = $ARGV[1];
Can we shift here and then just set $diff to $ARGV[0] unconditionally?
Done.
Thanks! My 2 (actually 4) cents below.
> +if ($#ARGV == 1 && ("$ARGV[0]" eq "-i" || "$ARGV[0]" eq "--inline")) {
> + $diff = $ARGV[1];
Can we shift here and then just set $diff to $ARGV[0] unconditionally?
> + if ($diff eq "-") {
> + die "Reading from - and using -i are not compatibl
On 01-08-14 09:18, Yury Gribov wrote:
On 08/01/2014 10:52 AM, Tom de Vries wrote:
This patch adds a script contrib/mklog-in-patch, which uses mklog to
generate the skeleton log, but generates the log at the start of the
patch as mklog did before (which is how I like to use it).
Yeah, we had so
On 08/01/2014 10:52 AM, Tom de Vries wrote:
This patch adds a script contrib/mklog-in-patch, which uses mklog to
generate the skeleton log, but generates the log at the start of the
patch as mklog did before (which is how I like to use it).
Yeah, we had some argument about this but kind of agre
On 01-08-14 06:21, Yury Gribov wrote:
Cc Diego.
---
From: Tom de Vries
Sent: Saturday, May 31, 2014 11:47AM
To: Geoff Keating
Cc: GCC Patches
Subject: [PATCH] Keep patch file permissions in mklog
On 05/31/2014 11:47 AM, Tom de Vries wrote:
Geoff
Cc Diego.
---
From: Tom de Vries
Sent: Saturday, May 31, 2014 11:47AM
To: Geoff Keating
Cc: GCC Patches
Subject: [PATCH] Keep patch file permissions in mklog
On 05/31/2014 11:47 AM, Tom de Vries wrote:
Geoff,
Currently, mklog resets the
Geoff,
Currently, mklog resets the permissions on a patch file:
...
$ touch tmp.patch
$ ls -la tmp.patch
-rw-rw-r-- 1 vries vries 0 mei 31 09:17 tmp.patch
$ ./contrib/mklog tmp.patch
$ ls -la tmp.patch
-rw--- 1 vries vries 59 mei 31 09:17 tmp.patch
$
...
This patch fixes that:
...
$ rm tmp.p
13 matches
Mail list logo