hgsync /

Filename Size Date modified Message
317 B
921 B
4.9 KB
18.1 KB
2.0 KB
3.3 KB
159 B
34 B
0 B
518 B
=== hgsync ===

Synchronizing hg repositories in different locations.

In my working environment we still use DOS a lot to modify code hosted on 
Novell (with some arcane Linux distros) servers. Same project is hosted on 
different servers, and has to be synchronized to each other. All the projects 
are shared with Samba service. There is a Windows server connecting to all the 
Samba shares. The synchronizing script runs on the Windows Server. Currently we 
use a simple copy-to-all method to keep the projects synchronized.

This script is an attempt to integrate version control with directory 
synchronizing . It provides a simple way to turn the project directories into 
hg repos, synchronizing projects among different locations, and also tracks 
project changes. 

Since there is no way to communicate directly between DOS and Linux, simple flag 
files are used to exchange infomation. The server side script monitors for flag
changes, then takes action specified by the flags.

Currently only simple auto committing, synchronizing, and auto branching are 
supported.

=== Files ===

HgMon.py -- The main app
hgcmd.py -- mercurial commands
Config.yaml -- Project directory configurations
logconfig.ini -- logging configurations
hgrc.template -- hgrc used by all repos
hgignore.template -- .hgignore used by all repos

=== Usage ===

1. Modify Config.yaml to set project directories.
2. Run Hgmon.py on sync server
3. The project directories will be initiated as hg repos.
4. Now you can put certain flags the repos to control the synchronization.

Supported flags:

"SYNC!" -- Command Sync. If the flag is detected, the content of the flag is parsed
and then removed, then commit and sync will be executed. 

"LOCKED!" -- Command locked. If the flag is present in the project, the project will
not be updated or synchronized.

"DOING" -- Status synchronizing. The flag will appear during program sync, will be
disappeard after sync finished.
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.