convert_svn ("release early" edition)
Daniel Holth
dholth at fastmail.fm
Wed Apr 4 03:12:57 UTC 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Shun-ichi GOTO wrote:
> 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)
Thanks! I will incorporate that into my work soon.
>
>> 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)
I read the ra layer wasn't fully functional. The bzr folks found they
needed to enhance the bindings to make bzr-svn, but bzr-svn also goes
in both directions. I don't know either, but it crashed for me with
the older 1.4.x bindings. Maybe 1.5 is simply more tolerant of my
mistakes :-)
>
>
>> 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().
We probably also can get a "propset" event from the SVN bindings when
we are replaying the revisions.
>
>> - - Move, rename info not propagated from SVN
>
> I hope it would be in future version!
I don't think the internal convert-repo data structures store this.
They will need to be extended to store move/rename information.
>
>> - - Always requests whole file from SVN instead of diffs
>
> # I doubt svn delta editor in python binding doesn't work...
It does work. bzr-svn uses it, but my code borrows more from Tailor.
I was concerned that I had no way to get the previous revision of the
file (on the filesystem) as the source of the conversion.
>
>> - - 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.
I hope I can just say "this directory was moved" and the conversion
target can deal with it. Otherwise, it isn't too hard to do a
recursive listing on the SVN side to get each file that is moved as
part of a directory move.
>
>
>> - - 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!
Thanks for the patch. I'm sure more people will be interested now that
they don't have to download and compile an unreleased Subversion just
to convert a repository.
- - Daniel Holth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGExe5Vh4W2pVfoMsRAmoqAKDoqPG0RHDjglTippRcju9bxnKRBwCfVLc/
zLgqb24kY+CajlHKyeKljzo=
=H2Bm
-----END PGP SIGNATURE-----
More information about the Mercurial-devel
mailing list