I just installed TortoiseHG v2.11 with Mercurial-2.9
I am attempting to convert my local Subversion repositories created with TortoiseSVN 1.8. 4, Subversion 1.8.5
To be sure that my old Subversion repositories don't have any weird quirks I created a new SVN repo called test_repo with the default folder structure, performed a Checkout to test_repowc, then added some text files to the trunk, then modified and committed the files a few times to provide some history.
I then opened cmd.exe, navigated to the folder and tried
hg convert test_repo
and got the following:
assuming destination test_repo-hg
initializing destination test_repo-hg repository
test_repo does not look like a CVS checkout
test_repo does not look like a Git repository
file:///C:/Users/xxxxxx/Documents/Subversion/test_repo does not look like a Subversion repository
test_repo is not a local Mercurial repository
test_repo does not look like a darcs repository
test_repo does not look like a monotone repository
test_repo does not look like a GNU Arch repository
test_repo does not look like a Bazaar repository
cannot find required "p4" tool
abort: test_repo: missing or unsupported repository
As you can see, Mercurial did the file:/// protocol for me, but was unable to recognize the subversion repository. I've tried doing the file:/// protocol myself, specifying the repository type with the -s flag, running Mongoose in the folder and accessing the repository as a URL, and none of it seems to work. I've also tried converting from the working copy instead of from the repository, but that doesn't work either.
I'm wondering if it has to do with the new SVN file structure that SVN 1.7 or 1.8 introduced (which some SVN clients were incompatible with for a while)?
Has anyone else had luck with this using current versions of TortoiseSVN and TortoiseHG?
I was intending on this being a super quick thing to transition, getting all excited about DVCS and Mercurial, and I've already hit a wall. I read lots of people saying it was dead simple, but either I've got a bizarre edge case or it's not as easy as the rumors sound.
I've read about other tools like HGSubversion where I could clone my SVN as an HG repo, but since these are solo repositories I'd rather just convert the SVN, make sure everything works, then delete and uninstall SVN. I'd rather my HG repository not still be "connected" to the SVN (HGSubversion allows "push" from the cloned HG repo to the parent SVN repo right?). Other tools have mixed reviews so I was hoping to get the convert extension working.
Thanks in advance - looking forward to Mercurial!
EDIT:
Documenting a solution for Windows:
svnserve -r .\ -d
where hg
... if TortoiseHg version isn't first, edit the path to make it first - this version includes the SVN python bindings which are necessary to use svn://
protocol. Restart your cmd prompt after editing the path.run hg convert -s svn svn://localhost .\hg_repo_name
svn://
slash direction is like http://
and file:///
not like C:\
hg --config config.svn.trunk= convert -s svn svn:\\localhost .\hg_repo_name
`hg convert svn://%computername%.domain.com/code_folder .\hg_repo_name
Good luck!
As the Convert wiki states
Prerequisites:
Subversion's Python bindings
and it seems Python bindings are not updated yet (at least) for using ra_local with 1.8+ repositories.
You have two choices
OldRepo>svnadmin create --compatible-version "1.7" .
>svn log file:///Z:/OldRepo
------------------------------------------------------------------------
r1 | Badger | 2014-02-15 00:30:22 +0600 (Сб, 15 фев 2014) | 1 line
Create initial state
------------------------------------------------------------------------
>hg convert file:///Z:/OldRepo HG2-Repo
initializing destination HG2-Repo repository
scanning source...
sorting...
converting...
1 Create initial state
0 Create initial state
The same result after cloning OldRepo using HGSubversion
>hg clone file:///Z:/OldRepo HG-Repo
[r1] Badger: Create initial state
pulled 2 revisions
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Just sample
hg clone https://subversion.assembla.com/....
...
25 files updated, 0 files merged, 0 files removed, 0 files unresolved
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