[Svnmerge] Request --username/--password options, and candidate [PATCH]
Paul Cook
pcook at caltech.edu
Fri Aug 11 17:23:35 PDT 2006
Hi,
A feature request for svnmerge: the ability to specify --username and
--password options, to be passed on to svn calls.
I'm very new to subversion and svnmerge.py, but I've managed to get a
working system going to achieve this. My patch (hopefully formatted
correctly) is below. It may do something stupid, but it seems to be
working for me at least.
Thanks for some very useful software!
Paul
Index: svnmerge.py
===================================================================
--- svnmerge.py (revision 21055)
+++ svnmerge.py (working copy)
@@ -57,7 +57,7 @@
# TODO:
# - Add "svnmerge avail -R": show logs in reverse order
-import sys, os, getopt, re, types, popen2, tempfile
+import sys, os, getopt, re, types, popen2, tempfile, types
from bisect import bisect
NAME = "svnmerge"
@@ -232,7 +232,17 @@
def launchsvn(s, show=False, pretend=False, **kwargs):
"""Launch SVN and grab its output."""
- cmd = opts["svn"] + " " + s
+ username = opts.get("username", None)
+ password = opts.get("password", None)
+ if username != None:
+ username = " --username " + username
+ else:
+ username =""
+ if password != None:
+ password = " --password " + password
+ else:
+ password = ""
+ cmd = opts["svn"] + username + password + " " + s
if show or opts["verbose"] >= 2:
print cmd
if pretend:
@@ -1643,6 +1653,12 @@
help="show subversion commands that make changes"),
Option("-v", "--verbose",
help="verbose mode: output more information about progress"),
+ OptionArg("-u", "--username",
+ default=None,
+ help="use subversion commands with the given username"),
+ OptionArg("-p", "--password",
+ default=None,
+ help="use subversion commands with the given password"),
]
common_opts = [
More information about the Svnmerge
mailing list