aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMichael Albinus2009-08-28 14:36:53 +0000
committerMichael Albinus2009-08-28 14:36:53 +0000
commitb59329e062ff932753112bee77771083cfd4770a (patch)
treeabde7eda79112d8aab2e2ceea0717c0a424de7de /doc
parente7adeadcd334ddad26ba45d84d43e0acf25e7e20 (diff)
downloademacs-b59329e062ff932753112bee77771083cfd4770a.tar.gz
emacs-b59329e062ff932753112bee77771083cfd4770a.zip
* tramp.texi (Version Control): Remove.
(Obtaining Tramp): Update cvs checkout command. Remove nightly tarballs reference. (External methods): Correct `scpc' concept index entries. New method `rsyncc'. (External packages): New subsections "Filename completion" and "File attributes cache".
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/ChangeLog10
-rw-r--r--doc/misc/tramp.texi215
2 files changed, 52 insertions, 173 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 0b07c43a408..87efed613e5 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,13 @@
12009-08-28 Michael Albinus <michael.albinus@gmx.de>
2
3 * tramp.texi (Version Control): Remove.
4 (Obtaining Tramp): Update cvs checkout command. Remove nightly tarballs
5 reference.
6 (External methods): Correct `scpc' concept index entries. New method
7 `rsyncc'.
8 (External packages): New subsections "Filename completion" and "File
9 attributes cache".
10
12009-08-27 Jay Belanger <jay.p.belanger@gmail.com> 112009-08-27 Jay Belanger <jay.p.belanger@gmail.com>
2 12
3 * calc.texi (Rewrite Rules): Improve the example. 13 * calc.texi (Rewrite Rules): Improve the example.
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 1536bd49553..20be7a2870f 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -157,7 +157,6 @@ For the end user:
157 157
158For the developer: 158For the developer:
159 159
160* Version Control:: The inner workings of remote version control.
161* Files directories and localnames:: How file names, directories and localnames are mangled and managed. 160* Files directories and localnames:: How file names, directories and localnames are mangled and managed.
162* Traces and Profiles:: How to Customize Traces. 161* Traces and Profiles:: How to Customize Traces.
163* Issues:: Debatable Issues and What Was Decided. 162* Issues:: Debatable Issues and What Was Decided.
@@ -208,19 +207,6 @@ Using @value{tramp}
208* Remote processes:: Integration with other @value{emacsname} packages. 207* Remote processes:: Integration with other @value{emacsname} packages.
209* Cleanup remote connections:: Cleanup remote connections. 208* Cleanup remote connections:: Cleanup remote connections.
210 209
211The inner workings of remote version control
212
213* Version Controlled Files:: Determining if a file is under version control.
214* Remote Commands:: Executing the version control commands on the remote machine.
215* Changed workfiles:: Detecting if the working file has changed.
216* Checking out files:: Bringing the workfile out of the repository.
217* Miscellaneous Version Control:: Things related to Version Control that don't fit elsewhere.
218
219Things related to Version Control that don't fit elsewhere
220
221* Remote File Ownership:: How VC determines who owns a workfile.
222* Back-end Versions:: How VC determines what release your RCS is.
223
224How file names, directories and localnames are mangled and managed 210How file names, directories and localnames are mangled and managed
225 211
226* Localname deconstruction:: Breaking a localname into its components. 212* Localname deconstruction:: Breaking a localname into its components.
@@ -416,7 +402,7 @@ Or follow the example session below:
416@example 402@example
417] @strong{cd ~/@value{emacsdir}} 403] @strong{cd ~/@value{emacsdir}}
418] @strong{export CVS_RSH="ssh"} 404] @strong{export CVS_RSH="ssh"}
419] @strong{cvs -z3 -d:ext:anoncvs@@savannah.gnu.org:/cvsroot/tramp co tramp} 405] @strong{cvs -z3 -d:pserver:anonymous@@cvs.savannah.gnu.org:/sources/tramp co tramp}
420@end example 406@end example
421 407
422@noindent 408@noindent
@@ -440,11 +426,6 @@ script:
440] @strong{autoconf} 426] @strong{autoconf}
441@end example 427@end example
442 428
443People who have no direct CVS access (maybe because sitting behind a
444blocking firewall), can try the
445@uref{http://savannah.gnu.org/cvs-backup/tramp-sources.tar.gz, Nightly
446CVS Tree Tarball} instead of.
447
448 429
449@node History 430@node History
450@chapter History of @value{tramp} 431@chapter History of @value{tramp}
@@ -896,10 +877,10 @@ This method supports the @samp{-p} argument.
896 877
897 878
898@item @option{scpc} --- @command{ssh} and @command{scp} 879@item @option{scpc} --- @command{ssh} and @command{scp}
899@cindex method scpx 880@cindex method scpc
900@cindex scpx method 881@cindex scpc method
901@cindex scp (with scpx method) 882@cindex scp (with scpc method)
902@cindex ssh (with scpx method) 883@cindex ssh (with scpc method)
903 884
904Newer versions of @option{ssh} (for example OpenSSH 4) offer an option 885Newer versions of @option{ssh} (for example OpenSSH 4) offer an option
905@option{ControlMaster}. This allows @option{scp} to reuse an existing 886@option{ControlMaster}. This allows @option{scp} to reuse an existing
@@ -915,6 +896,20 @@ ssh localhost -o ControlMaster=yes
915This method supports the @samp{-p} argument. 896This method supports the @samp{-p} argument.
916 897
917 898
899@item @option{rsyncc} --- @command{ssh} and @command{rsync}
900@cindex method rsyncc
901@cindex rsyncc method
902@cindex rsync (with rsyncc method)
903@cindex ssh (with rsyncc method)
904
905Like the @option{scpc} method, @option{rsyncc} improves the underlying
906@command{ssh} connection by the option @option{ControlMaster}. This
907allows @command{rsync} to reuse an existing @command{ssh} channel,
908which increases performance.
909
910This method supports the @samp{-p} argument.
911
912
918@item @option{pscp} --- @command{plink} and @command{pscp} 913@item @option{pscp} --- @command{plink} and @command{pscp}
919@cindex method pscp 914@cindex method pscp
920@cindex pscp method 915@cindex pscp method
@@ -2302,7 +2297,8 @@ Filename completion works with @value{tramp} for completion of method
2302names, of user names and of machine names as well as for completion of 2297names, of user names and of machine names as well as for completion of
2303file names on remote machines. 2298file names on remote machines.
2304@ifset emacs 2299@ifset emacs
2305In order to enable this, Partial Completion mode must be set on. 2300In order to enable this, partial completion must be activated in your
2301@file{.emacs}.
2306@ifinfo 2302@ifinfo
2307@xref{Completion Options, , , @value{emacsdir}}. 2303@xref{Completion Options, , , @value{emacsdir}}.
2308@end ifinfo 2304@end ifinfo
@@ -3257,153 +3253,6 @@ This resets also the @value{ftppackagename} plugins.
3257 3253
3258 3254
3259@c For the developer 3255@c For the developer
3260@node Version Control
3261@chapter The inner workings of remote version control
3262@cindex Version Control
3263
3264Unlike @value{ftppackagename}, @value{tramp} has full shell access to the
3265remote machine. This makes it possible to provide version control for
3266files accessed under @value{tramp}.
3267
3268The actual version control binaries must be installed on the remote
3269machine, accessible in the directories specified in
3270@code{tramp-remote-path}.
3271
3272This transparent integration with the version control systems is one of
3273the most valuable features provided by @value{tramp}, but it is far from perfect.
3274Work is ongoing to improve the transparency of the system.
3275
3276@menu
3277* Version Controlled Files:: Determining if a file is under version control.
3278* Remote Commands:: Executing the version control commands on the remote machine.
3279* Changed workfiles:: Detecting if the working file has changed.
3280* Checking out files:: Bringing the workfile out of the repository.
3281* Miscellaneous Version Control:: Things related to Version Control that don't fit elsewhere.
3282@end menu
3283
3284
3285@node Version Controlled Files
3286@section Determining if a file is under version control
3287
3288The VC package uses the existence of on-disk revision control master
3289files to determine if a given file is under revision control. These file
3290tests happen on the remote machine through the standard @value{tramp} mechanisms.
3291
3292
3293@node Remote Commands
3294@section Executing the version control commands on the remote machine
3295
3296There are no hooks provided by VC to allow intercepting of the version
3297control command execution. The calls occur through the
3298@code{call-process} mechanism, a function that is somewhat more
3299efficient than the @code{shell-command} function but that does not
3300provide hooks for remote execution of commands.
3301
3302To work around this, the functions @code{vc-do-command} and
3303@code{vc-simple-command} have been advised to intercept requests for
3304operations on files accessed via @value{tramp}.
3305
3306In the case of a remote file, the @code{shell-command} interface is
3307used, with some wrapper code, to provide the same functionality on the
3308remote machine as would be seen on the local machine.
3309
3310
3311@node Changed workfiles
3312@section Detecting if the working file has changed
3313
3314As there is currently no way to get access to the mtime of a file on a
3315remote machine in a portable way, the @code{vc-workfile-unchanged-p}
3316function is advised to call an @value{tramp} specific function for remote files.
3317
3318The @code{tramp-vc-workfile-unchanged-p} function uses the functioning VC
3319diff functionality to determine if any changes have occurred between the
3320workfile and the version control master.
3321
3322This requires that a shell command be executed remotely, a process that
3323is notably heavier-weight than the mtime comparison used for local
3324files. Unfortunately, unless a portable solution to the issue is found,
3325this will remain the cost of remote version control.
3326
3327
3328@node Checking out files
3329@section Bringing the workfile out of the repository
3330
3331VC will, by default, check for remote files and refuse to act on them
3332when checking out files from the repository. To work around this
3333problem, the function @code{vc-checkout} knows about @value{tramp} files and
3334allows version control to occur.
3335
3336
3337@node Miscellaneous Version Control
3338@section Things related to Version Control that don't fit elsewhere
3339
3340Minor implementation details, &c.
3341
3342@menu
3343* Remote File Ownership:: How VC determines who owns a workfile.
3344* Back-end Versions:: How VC determines what release your RCS is.
3345@end menu
3346
3347
3348@node Remote File Ownership
3349@subsection How VC determines who owns a workfile
3350
3351@value{emacsname} provides the @code{user-login-name} function to
3352return the login name of the current user as well as mapping from
3353arbitrary user id values back to login names. The VC code uses this
3354functionality to map from the uid of the owner of a workfile to the
3355login name in some circumstances.
3356
3357This will not, for obvious reasons, work if the remote system has a
3358different set of logins. As such, it is necessary to delegate to the
3359remote machine the job of determining the login name associated with a
3360uid.
3361
3362Unfortunately, with the profusion of distributed management systems such
3363as @code{NIS}, @code{NIS+} and @code{NetInfo}, there is no simple,
3364reliable and portable method for performing this mapping.
3365
3366Thankfully, the only place in the VC code that depends on the mapping of
3367a uid to a login name is the @code{vc-file-owner} function. This returns
3368the login of the owner of the file as a string.
3369
3370This function has been advised to use the output of @command{ls} on the
3371remote machine to determine the login name, delegating the problem of
3372mapping the uid to the login to the remote system which should know more
3373about it than I do.
3374
3375
3376@node Back-end Versions
3377@subsection How VC determines what release your RCS is
3378
3379VC needs to know what release your revision control binaries you are
3380running as not all features VC supports are available with older
3381versions of @command{rcs(1)}, @command{cvs(1)} or @command{sccs(1)}.
3382
3383The default implementation of VC determines this value the first time it
3384is needed and then stores the value globally to avoid the overhead of
3385executing a process and parsing its output each time the information is
3386needed.
3387
3388Unfortunately, life is not quite so easy when remote version control
3389comes into the picture. Each remote machine may have a different version
3390of the version control tools and, while this is painful, we need to
3391ensure that unavailable features are not used remotely.
3392
3393To resolve this issue, @value{tramp} currently takes the sledgehammer
3394approach of making the release values of the revision control tools
3395local to each @value{tramp} buffer, forcing VC to determine these values
3396again each time a new file is visited.
3397
3398This has, quite obviously, some performance implications. Thankfully,
3399most of the common operations performed by VC do not actually require
3400that the remote version be known. This makes the problem far less
3401apparent.
3402
3403Eventually these values will be captured by @value{tramp} on a system by
3404system basis and the results cached to improve performance.
3405
3406
3407@node Files directories and localnames 3256@node Files directories and localnames
3408@chapter How file names, directories and localnames are mangled and managed. 3257@chapter How file names, directories and localnames are mangled and managed.
3409 3258
@@ -3434,6 +3283,7 @@ effect while preserving the @value{tramp} file name information.
3434@ifset emacs 3283@ifset emacs
3435@node External packages 3284@node External packages
3436@section Integration with external Lisp packages. 3285@section Integration with external Lisp packages.
3286@subsection Filename completion.
3437 3287
3438While reading filenames in the minibuffer, @value{tramp} must decide 3288While reading filenames in the minibuffer, @value{tramp} must decide
3439whether it completes possible incomplete filenames, or not. Imagine 3289whether it completes possible incomplete filenames, or not. Imagine
@@ -3449,12 +3299,31 @@ remote host @option{ssh}.
3449External packages, which use other characters for completing filenames 3299External packages, which use other characters for completing filenames
3450in the minibuffer, must signal this to @value{tramp}. For this case, 3300in the minibuffer, must signal this to @value{tramp}. For this case,
3451the variable @code{tramp-completion-mode} can be bound temporarily to 3301the variable @code{tramp-completion-mode} can be bound temporarily to
3452a non-nil value. 3302a non-@code{nil} value.
3453 3303
3454@lisp 3304@lisp
3455(let ((tramp-completion-mode t)) 3305(let ((tramp-completion-mode t))
3456 ...) 3306 ...)
3457@end lisp 3307@end lisp
3308
3309
3310@subsection File attributes cache.
3311
3312When @value{tramp} runs remote processes, files on the remote host
3313could change their attributes. Consequently, @value{tramp} must flush
3314its complete cache keeping attributes for all files of the remote host
3315it has seen so far.
3316
3317This is a performance degradation, because the lost file attributes
3318must be recomputed, when needed again. In cases the caller of
3319@code{process-file} knows that there are file attribute changes, it
3320shall let-bind the variable @code{process-file-side-effects} to
3321@code{nil}. @value{tramp} wouldn't flush the file attributes cache then.
3322
3323@lisp
3324(let (process-file-side-effects)
3325 ...)
3326@end lisp
3458@end ifset 3327@end ifset
3459 3328
3460 3329