fix merge subcommand

This commit is contained in:
Josh Holtrop 2011-01-25 11:45:45 -05:00
parent 74ed9ecdec
commit 302485901d

5
jsvn
View File

@ -137,7 +137,8 @@ def merge(argv, svn):
branches = getSVNBranchList(svn)
if not argv[1] in branches:
return -3
lines = Popen([svn, 'log', '--stop-on-copy', root + '/branches/' + argv[1]])
lines = Popen([svn, 'log', '--stop-on-copy', root + '/branches/' + argv[1]],
stdout=PIPE).communicate()[0].split('\n')
rev = 0
for line in lines:
m = re.match(r'^r(\d+)\s', line)
@ -149,7 +150,7 @@ def merge(argv, svn):
path = getSVNRelPath(svn)
Popen([svn, 'merge', '-r%s:HEAD' % rev,
root + '/branches/' + argv[1] + path, '.']).wait()
return -2
return 0
def main(argv):
realsvn = findInPath('svn')