A Scalable, User-Friendly Source Control System.
Go to file
Dan Villiom Podlaski Christiansen dab1411f87 Put authormap into a separate file, and make it much better too.
See the doc-strings in maps.py for details.
2009-05-03 15:28:43 +02:00
notes Adding an icon made from the logos of Mercurial & Subversion. 2009-03-20 12:58:03 +01:00
svnwrap svn_swig_wrapper: remove explicit invocation of the garbage collector 2009-05-01 13:01:20 +02:00
tests First merge, totally untested. 2009-05-01 10:28:59 +02:00
tools tools: bash script to convert tags as a stopgap until the tags refactor 2009-04-24 22:33:54 -05:00
__init__.py Fix the nourl check to use the command name, instead of the function 2009-04-23 01:33:38 -04:00
.hgignore Also ignore .pyo files. 2009-03-19 18:12:06 +01:00
cmdutil.py cmdutil: fix islocalrepo() under Windows 2009-04-28 21:16:35 +02:00
hg_delta_editor.py Put authormap into a separate file, and make it much better too. 2009-05-03 15:28:43 +02:00
maps.py Put authormap into a separate file, and make it much better too. 2009-05-03 15:28:43 +02:00
README BitBucket supports having the ReST declaration in a comment. 2009-04-27 19:11:00 -05:00
stupid.py Put authormap into a separate file, and make it much better too. 2009-05-03 15:28:43 +02:00
svncommands.py Put authormap into a separate file, and make it much better too. 2009-05-03 15:28:43 +02:00
svnexternals.py Replace mercurial.util.sort with sorted buildin (after mercurial cb38f4a2b698) 2009-04-27 09:39:39 -05:00
tag_repo.py Import cleanup thanks to pyflakes. 2008-12-24 11:17:50 -06:00
util.py Implement parseurl support (#revision in repository urls) 2009-04-27 09:39:39 -05:00
utility_commands.py Put authormap into a separate file, and make it much better too. 2009-05-03 15:28:43 +02:00
wrappers.py Put authormap into a separate file, and make it much better too. 2009-05-03 15:28:43 +02:00

.. -*-restructuredtext-*-

============
hgsubversion
============

hgsubversion is an extension for Mercurial that allows using Mercurial
as a Subversion client.

Right now it is *not* ready for production use. You should only be
using this if you're ready to hack on it, and go diving into the
internals of Mercurial and/or Subversion.

Installation
------------
You need to have Subversion installed with the SWIG Python bindings
from Subversion 1.5 or later. You need Mercurial 1.3 (currently in development)
or later.

.. _mercurial: http://selenic.com/repo/hg
.. _mercurial-stable: http://selenic.com/repo/hg-stable
.. _crew: http://hg.intevation.org/mercurial/crew
.. _crew-stable: http://hg.intevation.org/mercurial/crew-stable

If you are unfamiliar with installing Mercurial extensions, please see
the UsingExtensions_ page in the Mercurial wiki. Look at the example
for specifying an absolute path near the bottom of the page. You want
to give the path to the top level of your clone of this repository.

.. _UsingExtensions: http://www.selenic.com/mercurial/wiki/index.cgi/
                     UsingExtensions

Before using hgsubversion, I *strongly* encourage you to run the
automated tests. Just use nose_ if you have it (or ``easy_install
nose`` if you want it), or use ``python tests/run.py`` to run the
suite with the conventional test runner. Note that because I use nose,
there's a lot of stdout spew in the tests right now. The important
part is that all the tests pass.

.. _nose: http://code.google.com/p/python-nose/

Basic Use
-----------
Get a new clone of an svn server::

 $ hg clone <svn URI> [destination]

Real example::

 $ hg clone svn+http://python-nose.googlecode.com/svn nose-hg

Note, you should pull from the root subversion directory, not specific
folders (such as trunk). Also, you only need to modify http:// urls as shown.
This is a side effect of Mercurial and Subversion both claiming the http
protocol, so svn+http is used to work around that.

Pull new revisions into an already-converted repo::

 $ hg pull

For more information, see ``hg help svn`` while in a converted repo.

Support for ``svn:externals``
-----------------------------
All ``svn:externals`` properties are serialized into a single
``.hgsvnexternals`` file, with the following syntax::

  [.]
   external_reference_line1_1
   external_reference_line1_2
  [dir2]
   external_reference_line2_1
   external_reference_line2_2

A header line gives the directory the property applies on, '.' for the
project root directory. The property content follows, *every line
being prefixed by a single space*.

The creation or modification of this file will trigger ``svn:externals``
updates on the related subversion repository.