[sysadmin-bin: 83/168] Fix bug where check for importing got moved to the wrong place
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin: 83/168] Fix bug where check for importing got moved to the wrong place
- Date: Thu, 24 May 2012 19:58:25 +0000 (UTC)
commit 0a65a769023501cafd7b1c9f1801342ab97956f7
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Thu Apr 16 19:52:11 2009 -0400
Fix bug where check for importing got moved to the wrong place
The check for importing should have stayed in gnome-post-receive-email
instead of moving to the get_module_name() function in git.py.
git.py | 4 ----
gnome-post-receive-email | 5 +++++
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/git.py b/git.py
index 19f8c4a..63b09d1 100644
--- a/git.py
+++ b/git.py
@@ -181,10 +181,6 @@ def get_module_name():
except CalledProcessError:
die("GIT_DIR not set")
- # No emails for a repository in the process of being imported
- if os.path.exists(os.path.join(git_dir, 'pending')):
- return
-
# Use the directory name with .git stripped as a short identifier
absdir = os.path.abspath(git_dir)
projectshort = os.path.basename(absdir)
diff --git a/gnome-post-receive-email b/gnome-post-receive-email
index 1d55034..65dbd0f 100755
--- a/gnome-post-receive-email
+++ b/gnome-post-receive-email
@@ -819,6 +819,11 @@ def main():
global user_fullname
global recipients
+ # No emails for a repository in the process of being imported
+ git_dir = git.rev_parse(git_dir=True, _quiet=True)
+ if os.path.exists(os.path.join(git_dir, 'pending')):
+ return
+
projectshort = get_module_name()
try:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]