[Svnmerge] Interactivity of 'svn' command-line client transitive to svnmerge.py?

Daniel Rall dlr at collab.net
Thu Apr 13 10:45:45 PDT 2006


On Thu, 13 Apr 2006, Giovanni Bajo wrote:

> Madan U S <madan at collab.net> wrote:
...
> > How does svnmerge handle the interactiveness of the commandline
> > commands (like svn) that are being invoked by svnmerge?
> 
> I'm not aware of any case in which svnmerge triggers interaction in
> svn. I heard svn has a --non-interactive option which could be used
> in these cases.  Notice that I'm uncomfortable thinking that
> somewhere, somehow, svn might go to interactive mode, and it's not
> clear when or how. I don't think we should fall into the same trap
> with svnmerge.

By default, the 'svn' command-line client operates in interactive
mode.  Any operation which involves repository access (especially over
the network, rather that local disk), can trigger interactive prompts
for user input (e.g. for acceptance of SSL certificate, for auth
credentials like user name and password, etc.).  This mode can be
switched off by passing the --non-interactive flag to the command-line
client.

My analysis of the launchsvn() commands in the svnmerge.py source code
shows at least the following commands which could result in
interactivity by the 'svn' command-line binary, by way of triggering
network access:

svnmerge.py:240:    out = launchsvn(s, show=opts["show-changes"] or opts["dry-run"],
svnmerge.py:260:    for L in launchsvn("status -u %s" % dir):
svnmerge.py:299:        for line in launchsvn("log %s" % log_opts):
svnmerge.py:559:    out = launchsvn('propget %s' % args, split_lines=False)
svnmerge.py:647:    for L in launchsvn('info "%s"' % path):
svnmerge.py:680:                launchsvn('proplist "%s"' % temp)
svnmerge.py:698:    out = launchsvn('log -v --xml --stop-on-copy "%s"' % dir,
svnmerge.py:716:        L = launchsvn('proplist --revprop -r HEAD "%s"' % opts["head-url"])[0]
svnmerge.py:724:    out = launchsvn("log --incremental -r%d %s" % (revnum, url))
svnmerge.py:1012:        lines = launchsvn("log -r 1:HEAD --limit=1 -q " + src_url)
svnmerge.py:1015:        lines = launchsvn("log -r 1:HEAD -q " + src_url)

The 'propget' and 'proplist' commands only go over the network when
invoked with a remote URI (e.g. https://, svn://, etc.).  At least one
status command is not invoked with the -u or -v option, so does not
trigger network access.

Perhaps launchsvn() should be taught about --non-interactive?
-- 

Daniel Rall
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : /pipermail/svnmerge/attachments/20060413/b927865f/attachment.pgp 


More information about the Svnmerge mailing list