[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] [PATCH] lib/emacs: read QUILT_PC from config file

From: Дмитрий Монахов
Subject: Re: [Quilt-dev] [PATCH] lib/emacs: read QUILT_PC from config file
Date: Wed, 13 Mar 2019 14:53:38 +0300

13.03.2019, 14:13, "Jean Delvare" <address@hidden>:

Hi Dmitry,

On Sun, 10 Feb 2019 16:21:04 +0300, Dmitry Monakhov wrote:

 Read QUILT_PC from config instead of using hardcoded one.

We never documented QUILT_PC as being user-changeable, but sure, why
not. The test suite does not cover it but it should work.

Makes me curious... Are you actually changing QUILT_PC, and if so, why?

I use monorepo SCM which is actually FUSE-fs, idea is very similar to Facebook's EDEN
So it is not possible to store patches in standard place (because SCM may remove it during rebase and etc),
Our SCM has special directory '.native' where one can store data which is actually mirror to native fs.
So I set variable to QUILT_PC=.native/pc  and quilt works like charm even on virtual filesytem.
 Do it as we do with QUILT_PATCHES var.

This is reasonable, however I'm worried by 2 implementation details:

1* We read from ~/.quiltrc only. This is only one of three possible
   sources for QUILT_PATCHES (/etc/quilt.quiltrc and .pc/.quilt_patches
   are the other two), and one of two possible sources for QUILT_PC
   (/etc/quilt.quiltrc is the other one). Ideally the search logic
   should be the same as the one used internally by quilt.

2* The functions do not cache the result, so the expensive processing
   will be done over and over again, even though the result will be the
   same every time. And this is going to get worse if we fix issue #1

These problems are not added by your patch, they were present before
already, but your patch aggravates them, so it might be the right time
to look into them. I can't help though, not using emacs at all.

I wonder if it could help to add a pseudo-command (helper) to quilt
itself? Something like "quilt getenv QUILT_PATCHES" which would return
what quilt-patches-directory is currently returning, and same for
QUILT_PC to replace function quilt-pc-directory? It would be more
expensive than doing it manually, however this would guarantee that the
results match. If the result is cached then the extra cost should no
longer be an issue.

Jean Delvare
SUSE L3 Support

reply via email to

[Prev in Thread] Current Thread [Next in Thread]