A Scalable, User-Friendly Source Control System.
Go to file
Dan Villiom Podlaski Christiansen d5600d0016 Get rid of .hg/svn/last_rev:
We now calculate the last known revision by iterating over all known
revisions and finding the highest number. Theoretically, we might be
able to simply read the latest entry, but in practice, that's a bug
waiting to happen. For instance, we might want to achieve
compatibility with '.hg/shamap' as generated by the
ConvertExtension, and it not only cannot offer a guarantee of
linearity, but it also allows more than one conversion to source exists.

I'd say we have other problems to care about until this turns up as a
hotspot in profiling. Such as why we leak circa 100MB of memory per
1000 revisions converted ;)
2009-03-27 01:09:36 +01:00
notes utility_commands: Implement rebuildmeta so that metadata can be rebuilt. 2008-12-23 22:19:26 -06:00
svnwrap Exception clean-ups; use symbolic names & avoid Python 2.6 deprecations. 2009-03-19 21:27:39 +01:00
tests Get rid of .hg/svn/last_rev: 2009-03-27 01:09:36 +01:00
tools Add a shell script to verify the conversion result for all heads in a multi-branch repo. 2009-03-16 23:19:00 -05:00
__init__.py Exception clean-ups; use symbolic names & avoid Python 2.6 deprecations. 2009-03-19 21:27:39 +01:00
.hgignore .hgignore: ignore nose coverage html. 2008-12-11 19:21:05 -06:00
diff_cmd.py Creating patch for documention messages. 2009-01-17 15:30:37 -06:00
fetch_command.py Get rid of .hg/svn/last_rev: 2009-03-27 01:09:36 +01:00
hg_delta_editor.py Get rid of .hg/svn/last_rev: 2009-03-27 01:09:36 +01:00
push_cmd.py push: Converted a magic number to an actual constant, and catch another apr_err that appears to also mean base text out of date. 2009-03-03 10:13:40 -06:00
README Promote first heading to a real title. 2009-01-21 20:38:10 -06:00
rebuildmeta.py Get rid of .hg/svn/last_rev: 2009-03-27 01:09:36 +01:00
svncommand.py Exception clean-ups; use symbolic names & avoid Python 2.6 deprecations. 2009-03-19 21:27:39 +01:00
svnexternals.py Support svn:externals changes via .hgsvnexternals updates 2009-01-02 15:54:05 -06:00
tag_repo.py Import cleanup thanks to pyflakes. 2008-12-24 11:17:50 -06:00
util.py Output consolidation; decrease the ‘Fetching...’ message to debug level. 2009-02-12 15:10:42 +01:00
utility_commands.py info: produce canonical URLs more of the time. 2009-03-17 15:11:03 -05: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.1.1 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 svnclone <svn URI> [destination]

Real example::

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

Note, you should pull from the root subversion directory, not specific
folders (such as trunk).

Pull new revisions into an already-converted repo::

 $ hg svn 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.