[SCM] Samba Shared Repository - branch v4-14-test updated
Stefan Metzmacher
metze at samba.org
Thu Aug 12 11:50:01 UTC 2021
The branch, v4-14-test has been updated
via a8b40f15f90 wscript: fix installing pre-commit with 'git worktree'
via e393635ab82 script/bisect-test.py: add support git worktree
via 87b8e7f39be wafsamba: add support git worktree to vcs_dir_contents()
from 25f3cb8c973 libcli/smb: allow unexpected padding in SMB2 READ responses
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-14-test
- Log -----------------------------------------------------------------
commit a8b40f15f907cef89075dba368ec611e4cdbb099
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Aug 11 13:26:41 2021 +0200
wscript: fix installing pre-commit with 'git worktree'
.git is not always a directory, with 'git worktree' it's a file.
'git rev-parse --git-path hooks' is the generic way to find the
patch for the githooks.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(master): Thu Aug 12 08:56:13 UTC 2021 on sn-devel-184
(cherry picked from commit 8858cf72af1cc15784749e58f184559a839dd4ef)
Autobuild-User(v4-14-test): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(v4-14-test): Thu Aug 12 11:49:18 UTC 2021 on sn-devel-184
commit e393635ab82dbca1d6fee9279a81e274e743b118
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Aug 11 13:26:41 2021 +0200
script/bisect-test.py: add support git worktree
.git is not always a directory, with 'git worktree' it's a file.
Note we could also use 'git rev-parse --show-toplevel', but that's
a patch for another day.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit c7f85146cb50795afcbb1c607e87d163d241c79a)
commit 87b8e7f39be6b9b513ed97a150fe814d35108d4c
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Aug 11 13:26:41 2021 +0200
wafsamba: add support git worktree to vcs_dir_contents()
.git is not always a directory, with 'git worktree' it's a file.
Note we could also use 'git rev-parse --show-toplevel', but that's
a patch for another day.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit 2e2d2eaa10499537c9af07dd866ac8e613c3da02)
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_dist.py | 2 +-
script/bisect-test.py | 2 +-
wscript | 20 +++++++++++++++-----
3 files changed, 17 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_dist.py b/buildtools/wafsamba/samba_dist.py
index c211a94d3db..0218cad6271 100644
--- a/buildtools/wafsamba/samba_dist.py
+++ b/buildtools/wafsamba/samba_dist.py
@@ -109,7 +109,7 @@ def vcs_dir_contents(path):
"""
repo = path
while repo != "/":
- if os.path.isdir(os.path.join(repo, ".git")):
+ if os.path.exists(os.path.join(repo, ".git")):
ls_files_cmd = [ 'git', 'ls-files', '--full-name',
os.path.relpath(path, repo) ]
cwd = None
diff --git a/script/bisect-test.py b/script/bisect-test.py
index b87df54ac09..7c5cd635f58 100755
--- a/script/bisect-test.py
+++ b/script/bisect-test.py
@@ -48,7 +48,7 @@ def find_git_root():
'''get to the top of the git repo'''
p = os.getcwd()
while p != '/':
- if os.path.isdir(os.path.join(p, ".git")):
+ if os.path.exists(os.path.join(p, ".git")):
return p
p = os.path.abspath(os.path.join(p, '..'))
return None
diff --git a/wscript b/wscript
index 83d94211338..262f1bf8d86 100644
--- a/wscript
+++ b/wscript
@@ -148,11 +148,21 @@ def configure(conf):
conf.env.DEVELOPER = True
# if we are in a git tree without a pre-commit hook, install a
# simple default.
- pre_commit_hook = os.path.join(Context.g_module.top, '.git/hooks/pre-commit')
- if (os.path.isdir(os.path.dirname(pre_commit_hook)) and
- not os.path.exists(pre_commit_hook)):
- shutil.copy(os.path.join(Context.g_module.top, 'script/git-hooks/pre-commit-hook'),
- pre_commit_hook)
+ # we need git for 'waf dist'
+ githooksdir = None
+ conf.find_program('git', var='GIT')
+ if 'GIT' in conf.env:
+ githooksdir = conf.CHECK_COMMAND('%s rev-parse --git-path hooks' % conf.env.GIT[0],
+ msg='Finding githooks directory',
+ define=None,
+ on_target=False)
+ if githooksdir and os.path.isdir(githooksdir):
+ pre_commit_hook = os.path.join(githooksdir, 'pre-commit')
+ if not os.path.exists(pre_commit_hook):
+ Logs.info("Installing script/git-hooks/pre-commit-hook as %s" %
+ pre_commit_hook)
+ shutil.copy(os.path.join(Context.g_module.top, 'script/git-hooks/pre-commit-hook'),
+ pre_commit_hook)
conf.ADD_EXTRA_INCLUDES('#include/public #source4 #lib #source4/lib #source4/include #include #lib/replace')
--
Samba Shared Repository
More information about the samba-cvs
mailing list