convert_svn ("release early" edition)

Shun-ichi GOTO shunichi.goto at gmail.com
Tue Apr 3 18:43:32 UTC 2007


2007/2/12, Daniel Holth <dholth at fastmail.fm>:
>
> convert-repo patched to convert from Subversion.

It's cool!

I've tried, patched and have some comments.
(Attached patch is to work with subversion 1.4 binding
 and python 2.3)

> fast, but you will probably need to compile the latest Subversion
> bindings from Subversion since the Python interface has only recently
> become capable enough. I hear the ones in Ubuntu have the enhancements
> (because the bzr developers did the work) but I have not tried them
> myself.

I'm interesting in what feature of latest binding (1.5?) is
required. I tried it to work with 1.4.x binding with attached
patch and it seems ok. (not yet checked enough against converted
repos)


> The Subversion Repository and converted that.
>
> "convert-repo file:///subversionrepo/trunk trunk-hg"
>
> Features:
>
> - - Converts from any SVN URL to a hg repository

With svn 1.4, I should remove heading '/' from path
passed to API on the case of http: url.
See attached a patch.


> Known Bugs:
>
> - - No +x bit or symlinks

+x can be get as svn:external in return value of ra.get_file().

> - - Move, rename info not propagated from SVN

I hope it would be in future version!

> - - Always requests whole file from SVN instead of diffs

# I doubt svn delta editor in python binding doesn't work...

> - - Probably loses files if an entire directory is moved (since the svn
> log doesn't list each file individually in this case)

Sure, but it can be found tracking directory change.


> - - Loses empty directories
> - - Ugly first-draft code


And more suggestion (for convert-repo, not only for svn):
 * Progress display on each stage will help us on converting
   non-small repo.
 * Create target repo if not exist.
 * When optional second arg is omitted, convert-repo try to
   use url + '-hg' as dest. It's not good.


And attached patch is a change not using ra access in
callback of ra.get_log(). It is required for svn 1.4 binding
at least.
I've successed converting small repository with
file:/http:/svn+ssh: urls.

But failed on another middle size repo. I didn't figure out the
reason yet, but maybe move/copy related thing.

Anyway, I'm grad to see this tool.
Thanks!

-- 
Shun-ichi GOTO
-------------- next part --------------
A non-text attachment was scrubbed...
Name: svn-work-with-1.4-and-python-2.3
Type: application/octet-stream
Size: 4196 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20070404/676ed527/attachment.obj>


More information about the Mercurial-devel mailing list