Я работаю с репозиторием, корень которого несколько перемещался в его истории (начался в trunk /, перемещен в подпроект / trunk).Прямо сейчас я могу либо использовать hgsubversion для работы со всей историей вплоть до момента ее перемещения в подпроект / транк (см. https://bitbucket.org/durin42/hgsubversion/issue/135/move-tracking), или . Я могу использовать hg convertили перебазируем, чтобы объединить истории в один связный репозиторий.
После объединения и вызова hg svn rebuildmeta все hgsubversion сбивается с толку. Новые ревизии в репозитории svn переносятся в ветвь с именем "../".
По сути, мне интересно, можно ли сказать hgsubversion использовать определенную ревизию svn в качестве своей контрольной точки, пытаясь синхронизировать истории только с этой точки?
Вот небольшойтест, иллюстрирующий проблему (извините за команды DOS)
C:\hgtest>svnadmin create svnrepo
C:\hgtest>svn co file:///C:/hgtest/svnrepo svncheckout
Checked out revision 0.
C:\hgtest>cd svncheckout
C:\hgtest\svncheckout>mkdir trunk/
The syntax of the command is incorrect.
C:\hgtest\svncheckout>svn mkdir trunk
A trunk
C:\hgtest\svncheckout>cd trunk
C:\hgtest\svncheckout\trunk>echo "Test file version 1" > testfile.txt
C:\hgtest\svncheckout\trunk>cd ..
C:\hgtest\svncheckout>svn add trunk\testfile.txt
A trunk\testfile.txt
C:\hgtest\svncheckout>svn ci -m "Original version in trunk configuration"
Adding trunk
Adding trunk\testfile.txt
Transmitting file data .
Committed revision 1.
C:\hgtest\svncheckout>svn mkdir subproject
A subproject
C:\hgtest\svncheckout>svn mv trunk subproject
A subproject\trunk
D trunk
D trunk\testfile.txt
C:\hgtest\svncheckout>svn ci -m "Moved trunk to subproject/trunk"
Adding subproject
Adding subproject\trunk
Deleting trunk
Committed revision 2.
C:\hgtest\svncheckout>echo ". Adding some text to distinguish the subproject/trunk version of this file" >> subproject\trunk\testfile.txt
C:\hgtest\svncheckout>svn ci -m "Final version of testfile.txt"
Sending subproject\trunk\testfile.txt
Transmitting file data .
Committed revision 3.
C:\hgtest\svncheckout>svn log subproject\trunk\testfile.txt
------------------------------------------------------------------------
r3 | kmahan | 2012-02-17 09:18:23 -0800 (Fri, 17 Feb 2012) | 1 line
Final version of testfile.txt
------------------------------------------------------------------------
r2 | kmahan | 2012-02-17 09:17:40 -0800 (Fri, 17 Feb 2012) | 1 line
Moved trunk to subproject/trunk
------------------------------------------------------------------------
r1 | kmahan | 2012-02-17 09:14:46 -0800 (Fri, 17 Feb 2012) | 1 line
Original version in trunk configuration
------------------------------------------------------------------------
C:\hgtest>hg clone svn://localhost:22222/subproject/trunk hgrepo
[r2] kmahan: Moved trunk to subproject/trunk
[r3] kmahan: Final version of testfile.txt
pulled 2 revisions
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
C:\hgtest>cd hgrepo
C:\hgtest\hgrepo>dir
Volume in drive C is OSDisk
Volume Serial Number is 74C7-4865
Directory of C:\hgtest\hgrepo
02/17/2012 09:30 AM <DIR> .
02/17/2012 09:30 AM <DIR> ..
02/17/2012 09:30 AM <DIR> .hg
02/17/2012 09:30 AM 104 testfile.txt
1 File(s) 104 bytes
3 Dir(s) 1,705,932,423,168 bytes free
C:\hgtest\hgrepo>hg log --follow testfile.txt
changeset: 1:eae92a250a90
tag: tip
user: kmahan@b3f284a4-0405-ad4c-b974-dac5aa90a095
date: Fri Feb 17 17:18:23 2012 +0000
summary: Final version of testfile.txt
changeset: 0:10c6ad198001
user: kmahan@b3f284a4-0405-ad4c-b974-dac5aa90a095
date: Fri Feb 17 17:17:40 2012 +0000
summary: Moved trunk to subproject/trunk
C:\hgtest>hg clone svn://localhost:22222/trunk -r 1 original-location
[r1] kmahan: Original version in trunk configuration
pulled 1 revisions
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
C:\hgtest>cd hgrepo
C:\hgtest\hgrepo>hg pull -f ..\original-location
pulling from ..\original-location
searching for changes
warning: repository is unrelated
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 0 changes to 1 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge)
C:\hgtest\hgrepo>hg log
changeset: 2:f968692b6301
tag: tip
parent: -1:000000000000
user: kmahan@b3f284a4-0405-ad4c-b974-dac5aa90a095
date: Fri Feb 17 17:14:46 2012 +0000
summary: Original version in trunk configuration
changeset: 1:eae92a250a90
user: kmahan@b3f284a4-0405-ad4c-b974-dac5aa90a095
date: Fri Feb 17 17:18:23 2012 +0000
summary: Final version of testfile.txt
changeset: 0:10c6ad198001
user: kmahan@b3f284a4-0405-ad4c-b974-dac5aa90a095
date: Fri Feb 17 17:17:40 2012 +0000
summary: Moved trunk to subproject/trunk
C:\hgtest\hgrepo>hg rebase -s 0 -d 2
saved backup bundle to C:\hgtest\hgrepo\.hg\strip-backup\10c6ad198001-backup.hg
C:\hgtest\hgrepo>hg log
changeset: 1:ee10af28394f
tag: tip
user: kmahan@b3f284a4-0405-ad4c-b974-dac5aa90a095
date: Fri Feb 17 17:18:23 2012 +0000
summary: Final version of testfile.txt
changeset: 0:f968692b6301
user: kmahan@b3f284a4-0405-ad4c-b974-dac5aa90a095
date: Fri Feb 17 17:14:46 2012 +0000
summary: Original version in trunk configuration
C:\hgtest\hgrepo>hg svn rebuildmeta
C:\hgtest\hgrepo>hg pull
pulling from svn://localhost:22222/subproject/trunk
[r2] kmahan: Moved trunk to subproject/trunk
Marked branch ../ as closed.
[r3] kmahan: Final version of testfile.txt
no changes found
C:\hgtest\hgrepo>echo "Here's some more text" >> testfile.txt
C:\hgtest\hgrepo>hg ci -m "Test commit from mercurial side"
C:\hgtest\hgrepo>hg glog
o changeset: 5:a0e38c8fcfaf
| branch: ../
| tag: tip
| user: kmahan@b3f284a4-0405-ad4c-b974-dac5aa90a095
| date: Fri Feb 17 17:43:38 2012 +0000
| summary: Added new text from the svn side
|
o changeset: 4:39fe2d8d743c
| branch: ../
| parent: 0:f968692b6301
| user: kmahan@b3f284a4-0405-ad4c-b974-dac5aa90a095
| date: Fri Feb 17 17:18:23 2012 +0000
| summary: Final version of testfile.txt
|
| o changeset: 3:4a494fcf85f1
|/ branch: ../
| parent: 0:f968692b6301
| user: kmahan@b3f284a4-0405-ad4c-b974-dac5aa90a095
| date: Fri Feb 17 17:17:40 2012 +0000
| summary: Moved trunk to subproject/trunk
|
| @ changeset: 2:547ed469c516
| | user: Kyle Mahan <kmahan@redacted.com>
| | date: Fri Feb 17 09:33:07 2012 -0800
| | summary: Test commit from mercurial side
| |
| o changeset: 1:ee10af28394f
|/ user: kmahan@b3f284a4-0405-ad4c-b974-dac5aa90a095
| date: Fri Feb 17 17:18:23 2012 +0000
| summary: Final version of testfile.txt
|
o changeset: 0:f968692b6301
user: kmahan@b3f284a4-0405-ad4c-b974-dac5aa90a095
date: Fri Feb 17 17:14:46 2012 +0000
summary: Original version in trunk configuration