I am using Mercurial to develop a client project. After I've been working on this for 2 weeks, the client has now requested that I keep all code in their SVN repo.
I want to continue to use Mercurial for development, but to keep the client happy, export all commits (w/ messages) into SVN as well.
Is this possible?
Mercurial is a distributed revision control tool for software developers. It is supported on Microsoft Windows and Unix-like systems, such as FreeBSD, macOS, and Linux.
svnsync is the Subversion remote repository mirroring tool. Put simply, it allows you to replay the revisions of one repository into another one. In any mirroring scenario, there are two repositories: the source repository, and the mirror (or “sink”) repository.
It doesn't make complete copies of nodes; instead, it stores the latest revision as a full text, and previous revisions as a succession of reverse diffs (the word "diff" is used loosely here – for files, it means vdeltas, for directories, it means a format that expresses changes to directories).
Here are three ways to create a full mirror of a Subvrsion repository: File Copy: treat the repository like any other filesystem and recursively copy it to the mirror location. Dump/Load: Use svnadmin dump and svnadmin load. Hotcopy: Use svnadmin hotcopy. All these ways have their own advantage and disadvantage.
The command line of copy a subversion repository is Svnadmin dump is designed to create a portable repository dump. The resulting dumpfile can be loaded into a new Subversion repository – even if the new repository is using a different database backend, or even a different revision of Subverson.
Once the destination repository has been initialised as a mirror, it can be brought into synchronisation with the source repository at any time by means of the svnsync sync command: It is a good idea to issue the first synchronisation command manually in order to check that the mirror has been configured correctly.
svnsync cannot lose connectivity to the destination repository, therefore there is less chance of the repository being left in a locked state. Create an empty Subversion repository in the normal manner. svnsync makes the assumption that it has exclusive control of the destination repository.
You can use Mercurial as client to their subversion repository.
Have you checked out hgsubversion yet? This allows you to have complete history in Mercurial.
See the details at : https://www.mercurial-scm.org/wiki/WorkingWithSubversion
It provides three ways of working with Subversion. Make sure that you use one and do not mix them.
[Personal Experience]
I have found hgsubversion better how ever it may have issues while converting the suversion repo to a Mercurial repo.
# This usually fails for a svn repo with
# large history or large files in revchanges
hg clone svn+http://.../svn local-hg
# If the above has any issues and dies before converting the repo, use hg pull
hg pull
Issue: You have an existing repo already.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With