Skip to main content

A simple script & library to handle syncing remote mercuial repositories

Project description

When developing a cross platform application it can be neccesary to transfer changes between different machines in order to test changes out. Mercurials push & pull help to make this process simpler, however keeping your repositories in sync is not neccesarily a single step process. Particularly if you rebase and collapse changesets quite frequently, and especially if you like to make use of the mq extension.

This script intends to make the process of syncing two mercurial repositories to exactly the same point as easy as possible, by taking care of all the steps neccesary in a single command.

Currently it can:

  • Clone a new remote repository

  • Refresh the local mq patch

  • Strip superflous changesets from the remote repository

  • Push to and update the remote repository

  • Commit to the local mq repository

  • Push to and update the remote mq repository

  • Ensure the remote repository has the correct mq patches pushed

Requirements

Python 2.7 & Mercurial 2.3 are recommended, though others may work.

Synchg depends on these python packages:

It also requires the mq mercurial extension is enabled on any remote machines it is used with.

Installation

Synchg and it’s python dependencies can be installed via pip:

pip install synchg

Preparing Repositories

Prior to running synchg for the first time it is recommended that you delete any remote repositories you intend to use it with, and allow synchg to perform the initial clone. If you intend to use mq patches with synchg, you should also ensure you have run hg init --mq on your local repositories.

It should be noted that synchg regards remote repositories as “slaves” and will strip out any changesets it finds that are not in the local repository. You will be prompted before this happens, but the script will be unable to continue if you don’t answer yes. This is to avoid creating additional heads on the remote.

Usage

Synchg should be run from the command line:

synchg remote_host [local_path=None]

Where remote_host is the host you wish to sync with and local_path is the optional path to the local mercurial repository (if missing, the current directory will be assumed)

More options can be found by running:

synchg --help

On first run, you will be prompted for some configuration options:

  • Remote source directory - this is the path on the remote under which all your repositories should be found

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SyncHg-0.9.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

SyncHg-0.9-py2.7.egg (21.4 kB view details)

Uploaded Source

File details

Details for the file SyncHg-0.9.tar.gz.

File metadata

  • Download URL: SyncHg-0.9.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for SyncHg-0.9.tar.gz
Algorithm Hash digest
SHA256 d35aabcda842e4321c3a9026def4d3bc0733220853b4eed0adffe3825832d602
MD5 34c367b3785f726ae65a1961cb9f6a4d
BLAKE2b-256 33e8fe2a4bc96388985559d217afcf94b528861da0b023626dd682140c069808

See more details on using hashes here.

File details

Details for the file SyncHg-0.9-py2.7.egg.

File metadata

  • Download URL: SyncHg-0.9-py2.7.egg
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for SyncHg-0.9-py2.7.egg
Algorithm Hash digest
SHA256 051bf1366bc95d904137abfecbc062df4bf0b4ca8e8ee4b3e2e780e4b0435c34
MD5 1d552eed3e07da4a75be85b7eb2f8bc8
BLAKE2b-256 f45f0ff2e26729d4c93ad762ad7b85d9b49e2db63c2438a47ed71ce36e16b8ba

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page