forked from indymedia/epicyon
More debug
parent
0a2cf0e8b1
commit
7d390e6e72
7
git.py
7
git.py
|
@ -84,12 +84,15 @@ def receiveGitPatch(baseDir: str, nickname: str, domain: str,
|
|||
subject: str, content: str) -> bool:
|
||||
"""Receive a git patch
|
||||
"""
|
||||
print('Debug git 21')
|
||||
if not isGitPatch(baseDir, nickname, domain,
|
||||
subject, content):
|
||||
return False
|
||||
|
||||
print('Debug git 22')
|
||||
contentStr = gitFormatContent(content)
|
||||
|
||||
print('Debug git 23: ' + contentStr)
|
||||
patchLines = contentStr.split('\n')
|
||||
patchFilename = None
|
||||
projectDir = None
|
||||
|
@ -97,6 +100,7 @@ def receiveGitPatch(baseDir: str, nickname: str, domain: str,
|
|||
baseDir + '/accounts/' + nickname + '@' + domain + \
|
||||
'/patches'
|
||||
# get the subject line and turn it into a filename
|
||||
print('Debug git 24: ' + str(patchLines))
|
||||
for line in patchLines:
|
||||
if line.startswith('Subject:'):
|
||||
patchSubject = \
|
||||
|
@ -114,7 +118,9 @@ def receiveGitPatch(baseDir: str, nickname: str, domain: str,
|
|||
projectDir + '/' + patchSubject + '.patch'
|
||||
break
|
||||
if not patchFilename:
|
||||
print('Debug git 25')
|
||||
return False
|
||||
print('Debug git 26')
|
||||
with open(patchFilename, "w") as patchFile:
|
||||
patchFile.write(contentStr)
|
||||
patchNotifyFilename = \
|
||||
|
@ -123,4 +129,5 @@ def receiveGitPatch(baseDir: str, nickname: str, domain: str,
|
|||
with open(patchNotifyFilename, "w") as patchFile:
|
||||
patchFile.write(contentStr)
|
||||
return True
|
||||
print('Debug git 27')
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue