Hi Bruno,
On 4/16/24 8:09 AM, Bruno Haible wrote:
> I'm talking about this piece of code:
>
> filetable = []
> for src in filelist:
> dest = self.rewrite_files([src])[-1]
> filetable.append(tuple([dest, src]))
>
> which can be written as
>
> filet
Hi Collin,
> But I think the idea of the patch is still
> correct. Since it doesn't make sense to accept a list and then only
> use it with one element lists.
Sure. This code structure comes from the fact that in the shell
implementation, the rewriting of file names is done through a 'sed' invoca
Hi Bruno,
On 4/15/24 7:58 AM, Bruno Haible wrote:
> Patch 0002 is not applicable because it relies on 0001, which was not good.
Yes, I need to rewrite it. But I think the idea of the patch is still
correct. Since it doesn't make sense to accept a list and then only
use it with one element lists.
Hi Collin,
> Patch 0002 does this. GLTestDir also has this rewrite_files() function
> so I did the same there. Maybe it is worth making that a helper
> function or using a base class in the future.
>
> Also, the set() and list() calls around zip(...) are important since
> zip() returns an iterato
Hi Bruno,
On 4/15/24 4:47 AM, Bruno Haible wrote:
> No. I'm adding 3 unit tests that prove that the patch is wrong,
> one for each of docbase, sourcebase, testsbase. (For auxdir and m4base
> gnulib-tool.{sh,py} does not support changing the value while preserving
> the rest: For auxdir the old fil
Collin Funk wrote:
> The GLImport class has two functions that are the same,
> GLImport.rewrite_old_files() and GLImport.rewrite_new_files().
No. When I copy these functions into separate text files and use 'diff'
on them:
$ diff -u 1 2
--- 1 2024-04-15 06:34:45.441369330 +0200
+++ 2 2024-04-
e duplicates.
+ (GLTestDir.execute): Pass the the file list to rewrite_files and zip
+ it together the result.
+
2024-04-14 Collin Funk
gnulib-tool.py: Remove a redundant function.
diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py
index 430691efbd..ceacfbb232 100644
--- a/pygnulib
hat since it requires
some sorting changes.
CollinFrom ec3d2f70a06e93b6cd730dd1f3629d5a6ad386fc Mon Sep 17 00:00:00 2001
From: Collin Funk
Date: Sun, 14 Apr 2024 18:09:39 -0700
Subject: [PATCH] gnulib-tool.py: Remove a redundant function.
* pygnulib/GLImport.py (GLImport.rewrite_old_files): Remove function.
(GLImport.rewrite_new_f