Hi > The attached patch adds support for 'progress_indicator' on SCP uploads
Updated patch attached; it was not adding '-v' when changing the file modes.
(On a side note, why are two SSH connections being made? Why couldn't it be
done with a single one?)
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [EMAIL PROTECTED]
`-
diff -urNd dput-0.9.2.35.orig/dput dput-0.9.2.35/dput
--- dput-0.9.2.35.orig/dput 2008-09-27 16:02:13.000000000 +0100
+++ dput-0.9.2.35/dput 2008-09-27 16:02:36.000000000 +0100
@@ -872,7 +872,8 @@
if debug:
print "D: ssh config options:\n "+'\n
'.join(ssh_config_options)
upload_methods[method](fqdn, login, incoming, \
- files_to_upload, debug, scp_compress, ssh_config_options)
+ files_to_upload, debug, scp_compress, ssh_config_options,
+ progress=progress)
else:
upload_methods[method](fqdn, login, incoming, \
files_to_upload, debug, 0, progress=progress)
diff -urNd dput-0.9.2.35.orig/scp.py dput-0.9.2.35/scp.py
--- dput-0.9.2.35.orig/scp.py 2008-09-27 16:02:13.000000000 +0100
+++ dput-0.9.2.35/scp.py 2008-09-27 16:03:46.000000000 +0100
@@ -15,6 +15,8 @@
command = ['scp', '-p']
if compress:
command.append('-C')
+ for _ in xrange(min(progress, 2)):
+ command.append('-v')
for anopt in ssh_config_options:
command += ['-o', anopt]
# TV-Note: Are these / Should these be escaped?
@@ -37,6 +39,8 @@
sys.exit(1)
if change_mode:
fix_command = ['ssh']
+ for _ in xrange(min(progress, 2)):
+ fix_command.append('-v')
for anopt in ssh_config_options:
fix_command += ['-o', anopt]
fix_command += ['%s%s' % (login_spec, fqdn), 'chmod', '0644'] \
signature.asc
Description: PGP signature

