diff options
| author | Michael Albinus | 2009-08-28 14:36:53 +0000 |
|---|---|---|
| committer | Michael Albinus | 2009-08-28 14:36:53 +0000 |
| commit | b59329e062ff932753112bee77771083cfd4770a (patch) | |
| tree | abde7eda79112d8aab2e2ceea0717c0a424de7de /doc | |
| parent | e7adeadcd334ddad26ba45d84d43e0acf25e7e20 (diff) | |
| download | emacs-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/ChangeLog | 10 | ||||
| -rw-r--r-- | doc/misc/tramp.texi | 215 |
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 @@ | |||
| 1 | 2009-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 | |||
| 1 | 2009-08-27 Jay Belanger <jay.p.belanger@gmail.com> | 11 | 2009-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 | ||
| 158 | For the developer: | 158 | For 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 | ||
| 211 | The 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 | |||
| 219 | Things 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 | |||
| 224 | How file names, directories and localnames are mangled and managed | 210 | How 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 | ||
| 443 | People who have no direct CVS access (maybe because sitting behind a | ||
| 444 | blocking firewall), can try the | ||
| 445 | @uref{http://savannah.gnu.org/cvs-backup/tramp-sources.tar.gz, Nightly | ||
| 446 | CVS 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 | ||
| 904 | Newer versions of @option{ssh} (for example OpenSSH 4) offer an option | 885 | Newer 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 | |||
| 915 | This method supports the @samp{-p} argument. | 896 | This 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 | |||
| 905 | Like the @option{scpc} method, @option{rsyncc} improves the underlying | ||
| 906 | @command{ssh} connection by the option @option{ControlMaster}. This | ||
| 907 | allows @command{rsync} to reuse an existing @command{ssh} channel, | ||
| 908 | which increases performance. | ||
| 909 | |||
| 910 | This 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 | |||
| 2302 | names, of user names and of machine names as well as for completion of | 2297 | names, of user names and of machine names as well as for completion of |
| 2303 | file names on remote machines. | 2298 | file names on remote machines. |
| 2304 | @ifset emacs | 2299 | @ifset emacs |
| 2305 | In order to enable this, Partial Completion mode must be set on. | 2300 | In 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 | |||
| 3264 | Unlike @value{ftppackagename}, @value{tramp} has full shell access to the | ||
| 3265 | remote machine. This makes it possible to provide version control for | ||
| 3266 | files accessed under @value{tramp}. | ||
| 3267 | |||
| 3268 | The actual version control binaries must be installed on the remote | ||
| 3269 | machine, accessible in the directories specified in | ||
| 3270 | @code{tramp-remote-path}. | ||
| 3271 | |||
| 3272 | This transparent integration with the version control systems is one of | ||
| 3273 | the most valuable features provided by @value{tramp}, but it is far from perfect. | ||
| 3274 | Work 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 | |||
| 3288 | The VC package uses the existence of on-disk revision control master | ||
| 3289 | files to determine if a given file is under revision control. These file | ||
| 3290 | tests 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 | |||
| 3296 | There are no hooks provided by VC to allow intercepting of the version | ||
| 3297 | control command execution. The calls occur through the | ||
| 3298 | @code{call-process} mechanism, a function that is somewhat more | ||
| 3299 | efficient than the @code{shell-command} function but that does not | ||
| 3300 | provide hooks for remote execution of commands. | ||
| 3301 | |||
| 3302 | To work around this, the functions @code{vc-do-command} and | ||
| 3303 | @code{vc-simple-command} have been advised to intercept requests for | ||
| 3304 | operations on files accessed via @value{tramp}. | ||
| 3305 | |||
| 3306 | In the case of a remote file, the @code{shell-command} interface is | ||
| 3307 | used, with some wrapper code, to provide the same functionality on the | ||
| 3308 | remote 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 | |||
| 3314 | As there is currently no way to get access to the mtime of a file on a | ||
| 3315 | remote machine in a portable way, the @code{vc-workfile-unchanged-p} | ||
| 3316 | function is advised to call an @value{tramp} specific function for remote files. | ||
| 3317 | |||
| 3318 | The @code{tramp-vc-workfile-unchanged-p} function uses the functioning VC | ||
| 3319 | diff functionality to determine if any changes have occurred between the | ||
| 3320 | workfile and the version control master. | ||
| 3321 | |||
| 3322 | This requires that a shell command be executed remotely, a process that | ||
| 3323 | is notably heavier-weight than the mtime comparison used for local | ||
| 3324 | files. Unfortunately, unless a portable solution to the issue is found, | ||
| 3325 | this 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 | |||
| 3331 | VC will, by default, check for remote files and refuse to act on them | ||
| 3332 | when checking out files from the repository. To work around this | ||
| 3333 | problem, the function @code{vc-checkout} knows about @value{tramp} files and | ||
| 3334 | allows version control to occur. | ||
| 3335 | |||
| 3336 | |||
| 3337 | @node Miscellaneous Version Control | ||
| 3338 | @section Things related to Version Control that don't fit elsewhere | ||
| 3339 | |||
| 3340 | Minor 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 | ||
| 3352 | return the login name of the current user as well as mapping from | ||
| 3353 | arbitrary user id values back to login names. The VC code uses this | ||
| 3354 | functionality to map from the uid of the owner of a workfile to the | ||
| 3355 | login name in some circumstances. | ||
| 3356 | |||
| 3357 | This will not, for obvious reasons, work if the remote system has a | ||
| 3358 | different set of logins. As such, it is necessary to delegate to the | ||
| 3359 | remote machine the job of determining the login name associated with a | ||
| 3360 | uid. | ||
| 3361 | |||
| 3362 | Unfortunately, with the profusion of distributed management systems such | ||
| 3363 | as @code{NIS}, @code{NIS+} and @code{NetInfo}, there is no simple, | ||
| 3364 | reliable and portable method for performing this mapping. | ||
| 3365 | |||
| 3366 | Thankfully, the only place in the VC code that depends on the mapping of | ||
| 3367 | a uid to a login name is the @code{vc-file-owner} function. This returns | ||
| 3368 | the login of the owner of the file as a string. | ||
| 3369 | |||
| 3370 | This function has been advised to use the output of @command{ls} on the | ||
| 3371 | remote machine to determine the login name, delegating the problem of | ||
| 3372 | mapping the uid to the login to the remote system which should know more | ||
| 3373 | about it than I do. | ||
| 3374 | |||
| 3375 | |||
| 3376 | @node Back-end Versions | ||
| 3377 | @subsection How VC determines what release your RCS is | ||
| 3378 | |||
| 3379 | VC needs to know what release your revision control binaries you are | ||
| 3380 | running as not all features VC supports are available with older | ||
| 3381 | versions of @command{rcs(1)}, @command{cvs(1)} or @command{sccs(1)}. | ||
| 3382 | |||
| 3383 | The default implementation of VC determines this value the first time it | ||
| 3384 | is needed and then stores the value globally to avoid the overhead of | ||
| 3385 | executing a process and parsing its output each time the information is | ||
| 3386 | needed. | ||
| 3387 | |||
| 3388 | Unfortunately, life is not quite so easy when remote version control | ||
| 3389 | comes into the picture. Each remote machine may have a different version | ||
| 3390 | of the version control tools and, while this is painful, we need to | ||
| 3391 | ensure that unavailable features are not used remotely. | ||
| 3392 | |||
| 3393 | To resolve this issue, @value{tramp} currently takes the sledgehammer | ||
| 3394 | approach of making the release values of the revision control tools | ||
| 3395 | local to each @value{tramp} buffer, forcing VC to determine these values | ||
| 3396 | again each time a new file is visited. | ||
| 3397 | |||
| 3398 | This has, quite obviously, some performance implications. Thankfully, | ||
| 3399 | most of the common operations performed by VC do not actually require | ||
| 3400 | that the remote version be known. This makes the problem far less | ||
| 3401 | apparent. | ||
| 3402 | |||
| 3403 | Eventually these values will be captured by @value{tramp} on a system by | ||
| 3404 | system 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 | ||
| 3438 | While reading filenames in the minibuffer, @value{tramp} must decide | 3288 | While reading filenames in the minibuffer, @value{tramp} must decide |
| 3439 | whether it completes possible incomplete filenames, or not. Imagine | 3289 | whether it completes possible incomplete filenames, or not. Imagine |
| @@ -3449,12 +3299,31 @@ remote host @option{ssh}. | |||
| 3449 | External packages, which use other characters for completing filenames | 3299 | External packages, which use other characters for completing filenames |
| 3450 | in the minibuffer, must signal this to @value{tramp}. For this case, | 3300 | in the minibuffer, must signal this to @value{tramp}. For this case, |
| 3451 | the variable @code{tramp-completion-mode} can be bound temporarily to | 3301 | the variable @code{tramp-completion-mode} can be bound temporarily to |
| 3452 | a non-nil value. | 3302 | a 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 | |||
| 3312 | When @value{tramp} runs remote processes, files on the remote host | ||
| 3313 | could change their attributes. Consequently, @value{tramp} must flush | ||
| 3314 | its complete cache keeping attributes for all files of the remote host | ||
| 3315 | it has seen so far. | ||
| 3316 | |||
| 3317 | This is a performance degradation, because the lost file attributes | ||
| 3318 | must be recomputed, when needed again. In cases the caller of | ||
| 3319 | @code{process-file} knows that there are file attribute changes, it | ||
| 3320 | shall 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 | ||