Commits

Oben Sonne committed a142967

  • Participants
  • Parent commits be25a57

Comments (0)

Files changed (1)

 both repositories stay in sync (as long as they are no conflicting
 changes).
 
-Errors and merge conflicts which cannot be resolved automatically are
-highlighted in the output. Additionally an alerter tool can be specified
-to run on errors and conflicts. This tool can be set (1) by using option
-//--alerter//, (2) by placing it in the repository root as a file called
-//.hgalert// or (3) in an HGRC file using options //alerter// in section
-//autosync// (locations are evaluated in that order). The alerter is supposed
-to notify errors to a human. The repository path is given as first
-argument, an error message as the second one. Independent of this, on erros
-and conflicts the command keeps running and retries after the next
-interval, hoping things get fixed externally.
+Errors and merge conflicts which cannot be resolved automatically are highlighted in the output. Additionally an alerter tool can be specified to run on errors and conflicts ([[#Error_and_conflict_alerter|details below]]). The alerter is supposed to notify errors to a human. In any case the command keeps running and retries after the next interval, hoping things get fixed externally.
     
 When running in daemon mode, any output gets logged into the file
 //autosync.log// within the repository's //.hg// directory (use //--daemon-log//
 ...
 }}}
 
+==== Configuration ====
+
+===== Merge tool =====
+
+By default the //autosync// command forces the Mercurial internal merger (//internal:merge//) to be used for automatic merges. To set another merger (e.g. //inernal:local// to let local changes automatically win on conflicts), use the //merge// option in the //ui// section of the HGRC file in the repository where //autosync// runs:
+
+{{{
+...
+[ui]
+merge = ...
+...
+}}}
+
+===== Error and conflict alerter =====
+
+On errors and conflicts the command keeps running and simply tries to synchronize again after the next interval. However, sometimes problems can only be fixed by a human. To notify problems, //autosync// may run an alerter program. To enable //autosync// to use an alerter, either
+
+# use the command option //--alerter//,
+# put an alerter program into the repository's root directory and name it //.hgalert// or
+# specify it in an HGRC file:\\
+{{{
+...
+[autosync]
+alerter = path/to/program
+...
+}}}
+
+An alerter is searched in that order.
+
+The repository path and an error message are passed as arguments to the alerter program.
+
+
 ==== Usage ====
 
 Typically you run //hg autosync -D// in each repository clone you want to be synchronized.