Created
July 19, 2011 07:01
-
-
Save yuanchuan/1091528 to your computer and use it in GitHub Desktop.
更新并显示日志
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#不想每次用TortoiseSVN 时都用鼠标右击更新 | |
import os | |
import sys | |
def run_command(commands): | |
op_os = lambda x: os.system(x) | |
op_ms = lambda x: sys.stdout.write(x+'\n') | |
for cmd in commands: | |
c = cmd.split('>') | |
{'os': op_os, 'ms': op_ms}[c[0]](c[1]) | |
svn_path = 'e:\\ProjectHL' | |
run_command([ | |
'ms>fetching..', | |
'os>svn update ' + svn_path, | |
'ms>LOG -3', | |
'os>svn log -l 3 ' + svn_path, | |
'os>pause' | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment