Who we are

We are the developers of Plastic SCM, a full version control stack (not a Git variant). We work on the strongest branching and merging you can find, and a core that doesn't cringe with huge binaries and repos. We also develop the GUIs, mergetools and everything needed to give you the full version control stack.

If you want to give it a try, download it from here.

We also code SemanticMerge, and the gmaster Git client.

RepliKate

Thursday, December 13, 2012 Ma Nu 4 Comments

After accidentally cloning a sexy repository, two college grad students decide to educate the newly created script and turn it into the perfect Plastic SCM replication command. (Source: Repli-Kate)

CmdRunner background

Using the CmdRunner library, we created a small application for replicating a complete Plastic SCM repository. You can find the RepliKate code here.

What RepliKate does

You can use repliKate for two purposes:

  1. Replicate a complete repository from one server to another.
  2. Replicate all the changes done inside a repository in a period of time.

Replicate a repository from zero

You can use the following command to migrate all the source repository content into a new one, all your branches, changesets, permissions, labels and so on will be replicated to the destination repository.

replikate srcrepos@srcserver dstrepos@dstserver

Remember that if you are a GUI guy you can always use the Sync view to achieve the same result.

Keeping your repositories synced

Here is where RepliKate can help you more, let's work with an example.

I have my central code repository in my OmicronPersei8 server and I want to push periodically my new changes to my Amphibios9 server, in order to keep Amphibios9 server as a mirror/backup server.

First I need to replicate all the OmicronPersei8 code repository to the Amphibios9 server using repliKate, just like we did up there.


Now that I have the repository synced I need to replicate everyday all the new changes made into the Amphibios9 repository, it's easy using the Sync view, but it's also too much manually.

With repliKate you can use a Windows scheduled task (or Linux cron) to issue the following command every night:

replikate srcrepos@srcserver dstrepos@dstserver --syncdate=yesterday

As you can imagine this command will replicate all the branches with changesets created since yesterday. Running this command everyday will keep my mirror server updated.

Instead of the "yesterday" key word you can use a certain initial date, for example:

replikate srcrepos@srcserver dstrepos@dstserver --syncdate=initialdate(Month/Day/Year)

Run repliKate.exe to get the full help.

RepliKate log

You can use the log4net configuration file to get the log info from the repliKate application, you need to place it in the same location as the replikate.exe file, it will generate a replicate.txt log file.

What is next

In a future blogpost I will explain you how to configure it to reveive email notifications when repliKate is not able to push the new changes.


Enjoy and customize it!

Manuel Lucio
I'm in charge of the Customer Support area.
I deal with complex setups, policies and working methodologies on a daily basis.
Prior to taking full responsibility of support, I worked as software engineer. I have been in charge of load testing for quite some time, so if you want to know how well Plastic compares to SVN or P4 under a really heavy load, I'm your guy.
I like to play with Arduino GPS devices, mountain biking and playing tennis.
You can find me hooked to my iPhone, skate-boarding or learning Korean... and also here @mrcatacroquer.

4 comments:

  1. When will you add this functionality to the cm command? Why should I need to build my own version of Replikate and CmdRunner to do this? This would be a great addition to the cm command already.

    ReplyDelete
  2. Hi Anon!

    good point, there is not an especial reason about having the repliKate as an external program.

    It's just a 1 hour coding session and a good example of how to use the CmdRunner library.

    I'm sure that in the future we will have a better command to do what the Sync view does.

    ReplyDelete
  3. I appreciate the Futurama reference...

    ReplyDelete
  4. I appreciate the Futurama reference...

    ReplyDelete