[cvsnt] Changing Commit Dialog

Gabriel Genellina gagsl-cvsnt at yahoo.com.ar
Mon Sep 18 21:57:39 BST 2006


At Monday 18/9/2006 11:50, Bryan Leber wrote:

>PATCH_NUMBER: 9999
>
>BUG_NUMBER: 2341
>
>FEATURE_AFFECTED: Admin logon
>
>OVERVIEW: The logon logo has been changed
>
>
>
>I don't know if this is how it is suppose to work(i.e. put what is in
>the comment file that I made also) or what, but im not sure how I can
>parse through this and make sure that just the FEATURE_AFFECTED and
>OVERVIEW are there, because if they are left out the FEATURE_AFFECTED
>and OVERVIEW words are still printed, so I assume that it would show
>that it is not empty.

This is actually a Python question. You should check that there are 
text AFTER that words. Something like this:

faOK = ovOK = False
for line in lines:
     line = line.strip()
     if line.startswith('FEATURE_AFFECTED:'): faOK = line[17:] != ''
     if line.startswith('OVERVIEW:'): ovOK = line[9:] != ''
if not faOK:
   print "Missing FEATURE AFFECTED"
   ret = 1
elif not ovOK:
   print "Missing OVERVIEW"
   ret = 1
else: ret=0
sys.exit(ret)


Gabriel Genellina
Softlab SRL 


	
	
		
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas



More information about the cvsnt mailing list