Permalink
Browse files

Status codes I don't know about don't cause an error anymore.

git-svn-id: http://svn.textmate.org/trunk/Bundles/Darcs.tmbundle@1913 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent d98dce0 commit e4bd3d6d1d28c155423d13a4e8b5150d8a010e38 @bnmnetp bnmnetp committed Oct 7, 2005
Showing with 5 additions and 2 deletions.
  1. +5 −2 Commands/Whats New.plist
View
@@ -14,7 +14,7 @@ echo "<h3>Summary of Changes in ${TM_PROJECT_DIRECTORY}</h3>"
import os
import re
from struct import *
-cl = {'a':'added', 'M':'modified', 'D':'deleted', 'C':'conflict', '?':'unknown'}
+cl = {'a':'unknown', 'M':'modified', 'D':'deleted', 'C':'conflict', '?':'unknown', 'A':'added'}
def percent_escape(str):
return re.sub('[\x80-\xff /&]', lambda x: '%%%02X' % unpack('B', x.group(0))[0], str)
@@ -32,8 +32,11 @@ def removeNums(s):
res = os.popen('darcs whatsnew -s -l')
print '<table cellpadding="3"><tr>'
for line in res:
+ statClass = ""
+ if cl.has_key(line[0]):
+ statClass = cl[line[0]]
print '<tr>',
- print '<td class="'+cl[line[0]]+'\">',
+ print '<td class="'+statClass+'\">',
print line[0], '</td><td><a href="',
fname = removeNums(line[1:-1])
print make_link(os.getcwd()+fname[2:]),'">',fname, '</a></td></tr>'

0 comments on commit e4bd3d6

Please sign in to comment.