All pastes #286320 Raw Edit

Untitled

public text v1 · immutable
#286320 ·published 2006-12-20 15:55 UTC
rendered paste body
#!/usr/bin/python
import sys
import os.path
from svn import repos, fs, core

if len(sys.argv) < 2:
    print "Usage: %s REPOS-NAME"
    sys.exit()
R = repos.open(core.svn_path_canonicalize(sys.argv[1]))
F = repos.fs(R)
youngest = fs.youngest_rev(F)
txn = fs.begin_txn(F, youngest)
txnname = fs.txn_name(txn)
print "Created transaction '%s' based on revision %d" % (txnname, youngest)