Oben Sonne avatar Oben Sonne committed 63bf162

Comments (0)

Files changed (1)

-== Welcome ==
-
-Welcome to your wiki! This is the default page we've installed for your convenience. Go ahead and edit it.
-
-=== Wiki features ===
-
-This wiki uses the [[http://www.wikicreole.org/|Creole]] syntax, and is fully compatible with the 1.0 specification.
-
-The wiki itself is actually a hg repository, which means you can clone it, edit it locally/offline, add images or any other file type, and push it back to us. It will be live immediately.
-
-Go ahead and try:
-
-{{{
-$ hg clone http://bitbucket.org/obensonne/hg-autosync/wiki/
-}}}
-
-Wiki pages are normal files, with the .wiki extension. You can edit them locally, as well as creating new ones.
-
-=== Syntax highlighting ===
-
-You can also highlight snippets of text, we use the excellent [[http://www.pygments.org/|Pygments]] library.
-
-Here's an example of some Python code:
-
-{{{
-#!python
-
-def wiki_rocks(text):
-	formatter = lambda t: "funky"+t
-	return formatter(text)
-}}}
-
-You can check out the source of this page to see how that's done, and make sure to bookmark [[http://pygments.org/docs/lexers/|the vast library of Pygment lexers]], we accept the 'short name' or the 'mimetype' of anything in there.
-
-Have fun!
+== Mercurial autosync extension ==
+
+Commit changes in the working copy, fetch (pull, merge and commit) changes
+from the other repository and push local changes back to the other
+repository - either continuously (default) or once only.
+
+The idea of this command is to use Mercurial as a back-end to synchronize
+a set of files across different machines. Think of configuration files or
+to-do lists as examples for things to synchronize. On a higher level one
+can say this command synchronizes not only repositories but also working
+directories. A central repository (usually without a working copy) must be
+used as synchronization hub:
+
+{{{
+repo1 <--sync--> hub <--sync--> repo2
+}}}
+
+Running this command in //repo1// and //repo2// ensures the working copies (!) of
+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.
+    
+When running in daemon mode, any output gets logged into the file
+//autosync.log// within the repository's //.hg// directory (use //--daemon-log//
+to set a different file).
+
+This command denies to run in a virgin repository as this may unrelate
+repositories which were supposed to get synchronized. Before running
+autosync, pull or commit something first manually.
+
+==== Installation ====
+
+Download or clone //hg-autosync// to some place, then enable the extension in your //hgrc// file:
+
+{{{
+...
+[extensions]
+autosync = path/to/autosync.py
+...
+}}}
+
+==== Usage ====
+
+Suppose you have two workstations, //home// and //work//, and you want your to-do-list stay synchronized on these machines.
+
+... TODO ..
+
+Run //hg help autosync// to get more detailed information.
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.