You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mark Rutz <ma...@comtechmobile.com> on 2021/02/01 19:21:06 UTC

Migrate from StarTeam to Subversion

Hello,

Does anyone have procedures or tools for converting Micro Focus StarTeam repositories to Subversion?  We would like to convert the main branch with history for each repository.  The team is small enough there is no need to port the existing permissions scheme, etc.  The branches can be left for cold storage, as I don't expect them to be needed by any of the developers going forward.  We have a few perpetual licenses for StarTeam to keep it in the attic just in case.

I'm aware of the svn-importer tool from Polarion (https://polarion.plm.automation.siemens.com/products/svn/svn_importer), but as far as I know that hasn't been updated since 2011.  I was hoping to find something more current.  Recently StarTeam added interfaces to work with Git, but I have yet to see a way to use that angle for the conversion either.

Thanks in advance for any recommended strategies and tools.

Mark Rutz<ma...@comtechmobile.com>
Test Engineering Manager
Comtech Mobile Datacom Corporation<http://www.comtechmobile.com/>
(240) 686-3362 (w)
(202) 843-4678 (c)

NOTICE TO RECIPIENT: This email, including attachments, may contain information which is confidential, proprietary, attorney-client privileged and / or controlled under U.S. export laws and regulations and may be restricted from disclosure by applicable State and Federal law. Nothing in this email shall create any legal binding agreement between the parties unless expressly stated herein and provided by an authorized representative of Comtech Telecommunications Corp. or its subsidiaries. If you are not the intended recipient of this message, be advised that any dissemination, distribution, or use of the contents of this message is strictly prohibited. If you received this message in error, please notify us immediately by return email and permanently delete all copies of the original email and any attached documentation from any computer or other media.

RE: Migrate from StarTeam to Subversion

Posted by Mark Rutz <ma...@comtechmobile.com>.
Nathan,

Thank you for the very detailed response.  I will look into these.

Much appreciated!

Mark Rutz<ma...@comtechmobile.com>

From: Nathan Hartman <ha...@gmail.com>
Sent: Monday, February 1, 2021 3:58 PM
To: Mark Rutz <ma...@comtechmobile.com>
Cc: users@subversion.apache.org
Subject: Re: Migrate from StarTeam to Subversion


WARNING: External Email: Exercise Caution

On Mon, Feb 1, 2021 at 2:21 PM Mark Rutz <ma...@comtechmobile.com>> wrote:
Hello,

Does anyone have procedures or tools for converting Micro Focus StarTeam repositories to Subversion?  We would like to convert the main branch with history for each repository.  The team is small enough there is no need to port the existing permissions scheme, etc.  The branches can be left for cold storage, as I don't expect them to be needed by any of the developers going forward.  We have a few perpetual licenses for StarTeam to keep it in the attic just in case.

I'm aware of the svn-importer tool from Polarion (https://polarion.plm.automation.siemens.com/products/svn/svn_importer<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpolarion.plm.automation.siemens.com%2Fproducts%2Fsvn%2Fsvn_importer&data=04%7C01%7Cmark.rutz%40comtechmobile.com%7C3e9745f323e84bf9f3ce08d8c6f40dfc%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637478098801710048%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Fv8jp76hGSHCmEhtEp60Kk1rmvcCawrbes5SS6QLg9o%3D&reserved=0>), but as far as I know that hasn't been updated since 2011.  I was hoping to find something more current.  Recently StarTeam added interfaces to work with Git, but I have yet to see a way to use that angle for the conversion either.

Thanks in advance for any recommended strategies and tools

Hi Mark,

With the caveat that I haven't worked with StarTeam nor the above
svn-importer tool:

Since the svn-importer tool is no-cost and claims to do the trick,
that is the first avenue I would investigate, even though the tool
appears not to have been updated in a while. If it can migrate the
data to Subversion successfully, even if it generates an older
Subversion format, you should be able to then use Subversion to update
the data format to the latest.

If that avenue doesn't get the job done for whatever reason, I would
then check whether StarTeam can export a dumpstream that Subversion
can import directly (though I think this is unlikely).

If not, then StarTeam's interfaces to Git that you mentioned may be
useful as an intermediate step. Occasionally we get questions about
how to migrate from Git to Subversion. You may want to search the list
archives, see [1], for such questions. We just recently had a question
about Git to Subversion migration, see [2]. I'll mention here that Git
has a git-svn bridge that can push a linear sequence of git commits to
Subversion. Note that you may have to do some manipulation of the
intermediate git repository's history to get it into a state that will
push cleanly to a Subversion repository. This might take a little
experimentation, or it might just work. The git-svn bridge is part of
Git; see [3] and [4].

It's possible others will chime in with more thoughts/experiences.

Feel free to ask more questions if you need to, and it would be great
if you could circle back later and tell us what ultimately did the
trick. That will help others who have the same question in the future.

[1] https://subversion.apache.org/mailing-lists.html<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsubversion.apache.org%2Fmailing-lists.html&data=04%7C01%7Cmark.rutz%40comtechmobile.com%7C3e9745f323e84bf9f3ce08d8c6f40dfc%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637478098801710048%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=dBCE3ByLMoGmOFNn120%2B%2BZshBdygwWwOnIy5BsaGLt4%3D&reserved=0>

[2] https://lists.apache.org/thread.html/ref1c000c9d34869f6785cddd38d1e054c8007c0bc56905476e288b3d%40%3Cusers.subversion.apache.org%3E<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.apache.org%2Fthread.html%2Fref1c000c9d34869f6785cddd38d1e054c8007c0bc56905476e288b3d%2540%253Cusers.subversion.apache.org%253E&data=04%7C01%7Cmark.rutz%40comtechmobile.com%7C3e9745f323e84bf9f3ce08d8c6f40dfc%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637478098801720002%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2BuMVKYgObupXoaqwlVK4QgAdUxBTIvDaqYJSCavzC9E%3D&reserved=0>

[3] https://git-scm.com/book/en/v2/Git-and-Other-Systems-Git-as-a-Client<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit-scm.com%2Fbook%2Fen%2Fv2%2FGit-and-Other-Systems-Git-as-a-Client&data=04%7C01%7Cmark.rutz%40comtechmobile.com%7C3e9745f323e84bf9f3ce08d8c6f40dfc%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637478098801720002%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=dI5r0QlpU%2F3yGq7CQzgWPnJfUL7HrvSfGGGfDKi1C50%3D&reserved=0>

[4] https://git-scm.com/docs/git-svn<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit-scm.com%2Fdocs%2Fgit-svn&data=04%7C01%7Cmark.rutz%40comtechmobile.com%7C3e9745f323e84bf9f3ce08d8c6f40dfc%7Ca9a26e696ae040c1bd801ca6cc677828%7C0%7C0%7C637478098801720002%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8FzL3F9MCfbm%2Fb49LJmfJNqJrdoypnDmNfofBeU9JXA%3D&reserved=0>

Cheers,
Nathan

NOTICE TO RECIPIENT: This email, including attachments, may contain information which is confidential, proprietary, attorney-client privileged and / or controlled under U.S. export laws and regulations and may be restricted from disclosure by applicable State and Federal law. Nothing in this email shall create any legal binding agreement between the parties unless expressly stated herein and provided by an authorized representative of Comtech Telecommunications Corp. or its subsidiaries. If you are not the intended recipient of this message, be advised that any dissemination, distribution, or use of the contents of this message is strictly prohibited. If you received this message in error, please notify us immediately by return email and permanently delete all copies of the original email and any attached documentation from any computer or other media.

Re: Migrate from StarTeam to Subversion

Posted by Nathan Hartman <ha...@gmail.com>.
On Mon, Feb 1, 2021 at 2:21 PM Mark Rutz <ma...@comtechmobile.com>
wrote:

> Hello,
>
>
>
> Does anyone have procedures or tools for converting Micro Focus StarTeam
> repositories to Subversion?  We would like to convert the main branch with
> history for each repository.  The team is small enough there is no need to
> port the existing permissions scheme, etc.  The branches can be left for
> cold storage, as I don’t expect them to be needed by any of the developers
> going forward.  We have a few perpetual licenses for StarTeam to keep it in
> the attic just in case.
>
>
>
> I’m aware of the svn-importer tool from Polarion (
> https://polarion.plm.automation.siemens.com/products/svn/svn_importer),
> but as far as I know that hasn’t been updated since 2011.  I was hoping to
> find something more current.  Recently StarTeam added interfaces to work
> with Git, but I have yet to see a way to use that angle for the conversion
> either.
>
>
>
> Thanks in advance for any recommended strategies and tools
>

Hi Mark,

With the caveat that I haven't worked with StarTeam nor the above
svn-importer tool:

Since the svn-importer tool is no-cost and claims to do the trick,
that is the first avenue I would investigate, even though the tool
appears not to have been updated in a while. If it can migrate the
data to Subversion successfully, even if it generates an older
Subversion format, you should be able to then use Subversion to update
the data format to the latest.

If that avenue doesn't get the job done for whatever reason, I would
then check whether StarTeam can export a dumpstream that Subversion
can import directly (though I think this is unlikely).

If not, then StarTeam's interfaces to Git that you mentioned may be
useful as an intermediate step. Occasionally we get questions about
how to migrate from Git to Subversion. You may want to search the list
archives, see [1], for such questions. We just recently had a question
about Git to Subversion migration, see [2]. I'll mention here that Git
has a git-svn bridge that can push a linear sequence of git commits to
Subversion. Note that you may have to do some manipulation of the
intermediate git repository's history to get it into a state that will
push cleanly to a Subversion repository. This might take a little
experimentation, or it might just work. The git-svn bridge is part of
Git; see [3] and [4].

It's possible others will chime in with more thoughts/experiences.

Feel free to ask more questions if you need to, and it would be great
if you could circle back later and tell us what ultimately did the
trick. That will help others who have the same question in the future.

[1] https://subversion.apache.org/mailing-lists.html

[2]
https://lists.apache.org/thread.html/ref1c000c9d34869f6785cddd38d1e054c8007c0bc56905476e288b3d%40%3Cusers.subversion.apache.org%3E

[3] https://git-scm.com/book/en/v2/Git-and-Other-Systems-Git-as-a-Client

[4] https://git-scm.com/docs/git-svn

Cheers,
Nathan

Re: Migrate from StarTeam to Subversion

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Mark Rutz wrote on Mon, 01 Feb 2021 19:21 +00:00:
> Does anyone have procedures or tools for converting Micro Focus 
> StarTeam repositories to Subversion?  We would like to convert the main 
> branch with history for each repository.

For converting a single branch from any external VCS, the fallback
strategy (if no preëxisting tool is available) is a plain old "checkout
each commit in the history in sequence and re-commit it" loop.  I hope
you won't need to resort to it in your case, but I don't think we have a
write-up of it, so I'll outline it here.

The basic idea is (using svn syntax for both the old and new
VCS's, since that's the only syntax everyone on this list is
guaranteed to speak):

% mkdir wc
% $oldvcs checkout -r0 $oldURL wc
% svnadmin create foo
% printf '#!/bin/sh\ntrue\n' > foo/hooks/pre-revprop-change
% chmod +x foo/hooks/pre-revprop-change
% svn co file://$PWD/foo wc --force # --force suppresses a "Directory not empty" error
% cd wc
% # At this point, wc/ is a working copy of both $oldvcs and svn, both of them at r0 (an empty tree).
% i=0
% while [ $i -le `$oldvcs info --show-item=revision ./` ]; do
    svn cleanup && # purge pristines
    $oldvcs up -r $((++i)) &&
    svn-addremove &&
    svn revert -R ./.$oldvcs &&
    svn ci -m "Re-committing r$i" &&
    for propname in svn:date svn:author ; do svn ps --revprop -r $i -- $propname "$($oldvcs pg --revprop -r $i -- $propname)" ; done
done
% 

where svn-addremove(1) should be a script that does «svn add»
for all files that are '?' in `svn status` (= unversioned) and «svn rm»
for all files that are '!' in `svn status` (= missing), like the
eponymous hg(1) subcommand.  There's an implementation in
https://svn.apache.org/repos/asf/subversion/branches/addremove, but I
don't know its status, and in any case it may be easier to find a script
implementation or write one.

There is no requirement to use file:// syntax; I only did that to make
the example self-contained.

Cheers,

Daniel