src/Doc/System/Misc.thy
changeset 75476 1148c190eb9b
parent 75161 95612f330c93
child 75479 4363ad65ad36
equal deleted inserted replaced
75475:f1d204a4d795 75476:1148c190eb9b
   298   Both variants require SSH access to the target server, via public key
   298   Both variants require SSH access to the target server, via public key
   299   without password.
   299   without password.
   300 \<close>
   300 \<close>
   301 
   301 
   302 
   302 
       
   303 section \<open>Mercurial repository synchronization\<close>
       
   304 
       
   305 text \<open>
       
   306   The @{tool_def hg_sync} tool synchronizes the working directory of a local
       
   307   Mercurial repository with a target directory, using
       
   308   \<^verbatim>\<open>rsync\<close>\<^footnote>\<open>\<^url>\<open>https://linux.die.net/man/1/rsync\<close>\<close> notation for destinations.
       
   309 
       
   310   @{verbatim [display]
       
   311 \<open>Usage: isabelle hg_sync [OPTIONS] TARGET
       
   312 
       
   313   Options are:
       
   314     -C           clean all unknown/ignored files on target
       
   315                  (implies -n for testing; use option -f to confirm)
       
   316     -P NAME      protect NAME within TARGET from deletion
       
   317     -R ROOT      explicit repository root directory
       
   318                  (default: implicit from current directory)
       
   319     -f           force changes: no dry-run
       
   320     -n           no changes: dry-run
       
   321     -v           verbose
       
   322 
       
   323   Synchronize Mercurial repository working directory with other TARGET,
       
   324   which can be local or remote (using notation of rsync).\<close>}
       
   325 
       
   326   The \<^verbatim>\<open>TARGET\<close> specification can be a local or remote directory (via ssh),
       
   327   using \<^verbatim>\<open>rsync\<close> notation (see examples below). The content is written
       
   328   directly into the target, \<^emph>\<open>without\<close> creating a separate sub-directory.
       
   329 
       
   330   \<^medskip> Option \<^verbatim>\<open>-v\<close> enables verbose mode. Option \<^verbatim>\<open>-n\<close> enables ``dry-run'' mode:
       
   331   operations are only simulated and printed as in verbose mode. Option \<^verbatim>\<open>-f\<close>
       
   332   disables ``dry-run'' mode and thus forces changes to be applied.
       
   333 
       
   334   \<^medskip> Option \<^verbatim>\<open>-C\<close> causes deletion of all unknown/ignored files on the target.
       
   335   This is potentially dangerous: giving a wrong target directory will cause
       
   336   its total destruction! For robustness, option \<^verbatim>\<open>-C\<close> implies option \<^verbatim>\<open>-n\<close>,
       
   337   for ``dry-run'' with verbose output. A subsequent option \<^verbatim>\<open>-f\<close> is required
       
   338   to force actual deletions on the target.
       
   339 
       
   340   \<^medskip> Option \<^verbatim>\<open>-P\<close> protects a given file or directory from deletion; multiple
       
   341   \<^verbatim>\<open>-P\<close> options may be given to accumulate protected entries.
       
   342 
       
   343   \<^medskip> Option \<^verbatim>\<open>-R\<close> specifies an explicit repository root directory. The default
       
   344   is to derive it from the current working directory, searching upwards until
       
   345   a suitable \<^verbatim>\<open>.hg\<close> directory is found.
       
   346 \<close>
       
   347 
       
   348 subsubsection \<open>Examples\<close>
       
   349 
       
   350 text \<open>
       
   351   Synchronize the Isabelle repository onto a remote host, while
       
   352   protecting a copy of AFP inside of it (without changing that):
       
   353   @{verbatim [display] \<open>  isabelle hg_sync -R '$ISABELLE_HOME' -P AFP -C testmachine:test/isabelle\<close>}
       
   354 
       
   355   So far, this is only a dry run. In a realistic situation, it requires
       
   356   consecutive options \<^verbatim>\<open>-C -f\<close> as confirmation.
       
   357 \<close>
       
   358 
       
   359 
   303 section \<open>Installing standalone Isabelle executables \label{sec:tool-install}\<close>
   360 section \<open>Installing standalone Isabelle executables \label{sec:tool-install}\<close>
   304 
   361 
   305 text \<open>
   362 text \<open>
   306   By default, the main Isabelle binaries (@{executable "isabelle"} etc.) are
   363   By default, the main Isabelle binaries (@{executable "isabelle"} etc.) are
   307   just run from their location within the distribution directory, probably
   364   just run from their location within the distribution directory, probably