On 30/03/2023 03:37, Manuel Jacob wrote:
# HG changeset patch
# User Manuel Jacob <m...@manueljacob.de>
# Date 1680139355 -7200
#      Thu Mar 30 03:22:35 2023 +0200
# Node ID 4933600c49883dfc142f97a32dd08f9dd82b0d31
# Parent  2304f8da62b03f6cfd966b72eec70c38c4d52e37
# EXP-Topic tests-git
tests: prevent Git system and global configuration from loading

This reduces differences between different testing environments. Something 
similar is already done for Mercurial (in the lines directly above this change).

The parent changeset has originally been added to support user.useconfigonly. 
With this changeset, the original motivation for it becomes obsolete. However, 
it is still necessary to set the committer name via a environment variable, at 
least on my machine.

diff --git a/kallithea/tests/other/test_vcs_operations.py 
b/kallithea/tests/other/test_vcs_operations.py
--- a/kallithea/tests/other/test_vcs_operations.py
+++ b/kallithea/tests/other/test_vcs_operations.py
@@ -150,6 +150,8 @@
          testenv['LANGUAGE'] = 'en_US:en'
          testenv['HGPLAIN'] = ''
          testenv['HGRCPATH'] = ''
+        testenv['GIT_CONFIG_SYSTEM'] = ''
+        testenv['GIT_CONFIG_GLOBAL'] = ''


Looking at the git man page, I wonder why not using /dev/null?

(I don't like how Mercurial put different semantics to undefined and empty environment variables. That used to cause problems on some almost-extinct unices. But it seems to work...)


/Mads


          testenv.update(environ)
          p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE, 
cwd=self.cwd, env=testenv)
          stdout, stderr = p.communicate()

_______________________________________________
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general


_______________________________________________
kallithea-general mailing list
kallithea-general@sfconservancy.org
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general

Reply via email to