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