You can find the full article here.

Normally I'd just focus on what we do with Plastic SCM, but since GIT is big among OSS developers (and Monologue readers), I thought it could be good to explain how it works there too.
Enjoy





$ cm find changesets where date >= ‘2009/03/18 19:30:00’ --format={branch} --nototal
$ cm replicate br:/main/task00X@master@dragon:9090 replica@pendergast:7074
if ARGV.size < 2
puts "Usage: synchservers srcrepspec dstrepspec"
end
srcrep = ARGV[0]
dstrep = ARGV[1]
# find all changes since last replication (one hour)
date = Time.new - 60*60
branchescommand = sprintf(
'cm find "changeset where date >= \'%s\'" --format={branch} --nototal on repository \'%s\'',
date.strftime('%Y/%m/%d %H:%M:%S'), srcrep )
output = `#{branchescommand}`
# build an array of branches
branches = Array.new
output.each { |branch| branches << branch.chomp}
# run removing duplicates
branches.uniq.sort.each { |branch|
replicatecmd = sprintf(
'cm replicate br:%s@%s rep:%s',
branch, srcrep, dstrep);
puts replicatecmd
system(replicatecmd)
}
$ synchservers.rb master@dragon:6060 replica@pendergast:9090



