jsvn: color current branch green in "branch" output

This commit is contained in:
Josh Holtrop 2012-02-22 16:54:41 -05:00
parent c6c6309520
commit 0abd536d0e

8
jsvn
View File

@ -248,8 +248,14 @@ def branch(argv, svn, out):
current = getSVNTopLevel(svn).split('/')[-1] current = getSVNTopLevel(svn).split('/')[-1]
bl.sort() bl.sort()
for b in bl: for b in bl:
sys.stdout.write('*' if b == current else ' ') if b == current:
out.write('*')
ansi_color(out, 'green')
else:
out.write(' ')
sys.stdout.write(b + '\n') sys.stdout.write(b + '\n')
if b == current:
ansi_reset(out)
return RET_OK return RET_OK
branch_name = argv[-1] branch_name = argv[-1]
origin = getSVNTopLevel(svn) origin = getSVNTopLevel(svn)