* bin/loginfo-handler
Add some more debugging, and consume stdin so CVS's pipe doesn't back up (which causes an abort()). git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1518 8cb11bc2-c004-0410-86c3-e597b4017df7remotes/options-overhaul
parent
7e0d117de8
commit
b7af5fc568
|
@ -51,7 +51,11 @@ DEBUG_FLAG = 0
|
|||
## output functions
|
||||
def debug(text):
|
||||
if DEBUG_FLAG:
|
||||
print 'DEBUG(viewvc-loginfo):', text
|
||||
if type(text) != (type([])):
|
||||
text = [text]
|
||||
for line in text:
|
||||
line = line.rstrip('\n\r')
|
||||
print 'DEBUG(viewvc-loginfo):', line
|
||||
|
||||
def warning(text):
|
||||
print 'WARNING(viewvc-loginfo):', text
|
||||
|
@ -256,7 +260,8 @@ if __name__ == '__main__':
|
|||
## parse arguments
|
||||
|
||||
argc = len(sys.argv)
|
||||
debug('Got %d arguments: %s' % (argc, str(sys.argv)))
|
||||
debug('Got %d arguments:' % (argc))
|
||||
debug(map(lambda x: ' ' + x, sys.argv))
|
||||
|
||||
# if we have more than 3 arguments, we are likely using the
|
||||
# newer loginfo format introduced in CVS 1.12:
|
||||
|
@ -293,6 +298,9 @@ if __name__ == '__main__':
|
|||
|
||||
directory, files = fun(arg, repository)
|
||||
|
||||
debug('Discarded from stdin:')
|
||||
debug(map(lambda x: ' ' + x, sys.stdin.readlines())) # consume stdin
|
||||
|
||||
repository = cvsdb.CleanRepository(repository)
|
||||
|
||||
debug('Repository: %s' % (repository))
|
||||
|
|
Loading…
Reference in New Issue