[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99867: * net/tramp.el (tramp-do-copy
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99867: * net/tramp.el (tramp-do-copy-or-rename-file): Add progress reporter. |
Date: |
Sat, 10 Apr 2010 17:51:46 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99867
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Sat 2010-04-10 17:51:46 +0200
message:
* net/tramp.el (tramp-do-copy-or-rename-file): Add progress reporter.
modified:
lisp/ChangeLog
lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-04-10 12:50:31 +0000
+++ b/lisp/ChangeLog 2010-04-10 15:51:46 +0000
@@ -1,5 +1,9 @@
2010-04-10 Michael Albinus <address@hidden>
+ * net/tramp.el (tramp-do-copy-or-rename-file): Add progress reporter.
+
+2010-04-10 Michael Albinus <address@hidden>
+
Synchronize with Tramp repository.
* net/tramp.el (tramp-completion-function-alist)
=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2010-04-10 12:50:31 +0000
+++ b/lisp/net/tramp.el 2010-04-10 15:51:46 +0000
@@ -3524,7 +3524,8 @@
(unless (memq op '(copy rename))
(error "Unknown operation `%s', must be `copy' or `rename'" op))
(let ((t1 (tramp-tramp-file-p filename))
- (t2 (tramp-tramp-file-p newname)))
+ (t2 (tramp-tramp-file-p newname))
+ pr tm)
(when (and (not ok-if-already-exists) (file-exists-p newname))
(with-parsed-tramp-file-name (if t1 filename newname) nil
@@ -3534,7 +3535,16 @@
(with-parsed-tramp-file-name (if t1 filename newname) nil
(tramp-message v 0 "Transferring %s to %s..." filename newname))
- (prog1
+ ;; We start a pulsing progress reporter. Introduced in Emacs 24.1.
+ (when (> (nth 7 (file-attributes filename)) tramp-copy-size-limit)
+ (condition-case nil
+ (setq pr (funcall
+ 'make-progress-reporter
+ (format "Transferring %s to %s..." filename newname))
+ tm (run-at-time 0 0.1 'progress-reporter-update pr))
+ (error nil)))
+
+ (unwind-protect
(cond
;; Both are Tramp files.
((and t1 t2)
@@ -3604,6 +3614,8 @@
(tramp-flush-file-property v (file-name-directory localname))
(tramp-flush-file-property v localname)))
+ ;; Stop progress reporter.
+ (if tm (cancel-timer tm))
(with-parsed-tramp-file-name (if t1 filename newname) nil
(tramp-message v 0 "Transferring %s to %s...done" filename newname)))))
@@ -8569,7 +8581,6 @@
;; * Remove unneeded parameters from methods.
;; * Make it work for different encodings, and for different file name
;; encodings, too. (Daniel Pittman)
-;; * Progress reports while copying files. (Michael Kifer)
;; * Don't search for perl5 and perl. Instead, only search for perl and
;; then look if it's the right version (with `perl -v').
;; * When editing a remote CVS controlled file as a different user, VC
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99867: * net/tramp.el (tramp-do-copy-or-rename-file): Add progress reporter.,
Michael Albinus <=