Migrate SVN to HG, splitting it into subrepos in the way (but keeping combined log)

佐手、 提交于 2019-12-04 19:52:00

Reporting revision history and individual file statuses get a little bit complex when it comes to Hg subrepos.

Revision history

The revision history of a subrepo is not visible from the parent repository. This makes sense when you think about it because each subrepo is literally a different repository - there is really no good way to overlay two separate histories, nor would that information be very useful. From the command line you would have to navigate into each subrepo directory and execute a hg log to see the history. From TortoiseHg 2.X.X, from the commit view, you can double click on anything marked with an S to open up that subrepo in the TortoiseHg GUI.

Local modifications

Local modifications to subrepos can be seen from the parent repo, but not necessarily in the same way for each command. For example, if I have a repository that looks like this (where sub is a subrepo):

/project
  |
  ----> foo.c
  |
  ----> sub/
         |
         ----> bar.c
         |
         ----> more.c

If I modify both bar.c and foo.c and then perform an hg status from the command line I will see the following:

> hg status
M    foo.c

But if I add the subrepo argument -S I would see:

> hg status -S
M    foo.c
M    sub/bar.c

If I am using TortoiseHg v2.X.X it will mark foo.c as modified and it will mark sub as modified, but I would have to double click the subrepo to view the actual file modifications.

Conversion notes:

In terms of performing the conversion itself - check out the convert repository extension. If you are performing a one time conversion and then abandoning the SVN repository this would probably be all you need. If you're going to try and work back and forth between SVN and HG you will probably have a few more issues.

Something I've done successfully in the past is overlay a Hg repository on top of an existing repository. I'm not sure if this would work well for SVN and Hg, however.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!