Want to exclude few paths from the TRUNK at the time of migration

There is need to exclude few path from TRUNK at the time of migration.
Below are the setting which we did during the migration but didn’t get success, excluded paths are coming in the migrated code.
Could you please validate whether syntax is correct or not? Attached is the directory structure of our SVN repo.
In case you need any further information then please let me know.

  1. Source URL: https://svn.dts.fm.rbsgrp.net/ecdit/
  2. Opted Automatic Configuration Option
  3. EDIT configuration by adding -
    excludetrunk = trunk/main/DeploymentAuxilliaryActions
    excludetrunk = trunk/main/E2ETests

Thanks & Regards,
Namit Narang

Hello Namit.

To exclude paths in mirrored branches use ‘excludePath’ option. Here is the documentation on this option:

https://subgit.com/documentation/config-options.html#svn.excludePath
https://subgit.com/documentation/branches-mapping.html#svn_exclude_paths

To exclude the directories you mentioned, use the following exclude settings:

…
excludePath = /main/DeploymentAuxilliaryActions
excludePath = /main/E2ETests

@ildarhm : Thanks for looking into this issue.
We tried as per your suggestion but those folders are still coming in the master after migration.
Attached is the screen shot after migration. Also please suggest we want to include one more path in TRUNK (Master) which lies under root level i.e. https://svn.dts.fm.rbsgrp.net/ecdit/ and we opted path for TRUNK is
https://svn.dts.fm.rbsgrp.net/ecdit/trunk/main/.

We include this string in our configuration “trunk = StaticData:refs/heads/master/StaticData” but that didn’t bring StaticData under master after migration. Please let us know what thing we are missing here.

trunk = trunk/main:refs/heads/master
trunk = StaticData:refs/heads/master/StaticData
excludePath = main/DeploymentAuxilliaryActions
excludePath = main/E2ETests
excludePath = main/Emailer
excludePath = main/HeadcountTargetAdmin
excludePath = main/Tools
excludePath = main/MakeSvnRevisionInfoFile.bat
excludePath = main/PS20%20Generate%20Database%20Enums.ps1
excludePath = main/Power-Scripts.ps1
excludePath = main/REPLY.COM
excludePath = main/XX%20Common.bat
excludePath = main/sonar-project.properties
excludePath = main/xx_Autosys
branches = branches/*:refs/heads/*
tags = tags/*:refs/tags/*
shelves = shelves/*/main:refs/shelves/*

Thanks & Regards,
Namit Narang

Hello Namit.

The SVN Mirror add-on is no ability to combine different directories during the import, it can only exclude some subdirectories from the translation. So it’s not possible to get the ‘StaticData’ directory into master branch in Git while it is not in trunk in SVN.
The only way to get the ‘StaticData’ to Git is to translate is to a separate Git branch. It can be done by adding the line for ‘StaticData’ to the mapping configuration:

branches = StaticData:refs/heads/StaticData

It won’t put the ‘StaticData’ directory inside ‘master’, it will import the ‘StaticData’ into its own branch in Git.

The add-on requires the ‘trunk’ setting to be present in mapping configuration, but it supports only one ‘trunk’ setting, so if you need additional branches, add them as additional ‘branches’ settings in the configuration, there may be more than one ‘branches’ line.

As fo the excludePath issue – it looks that I overlooked that the trunk setting already point to ‘trunk/main’, sorry for that. In this case, ‘main’ is superfluous in the ‘excludePath’ setting. Thus the configuration should look like this:

trunk = trunk/main:refs/heads/master
excludePath = /DeploymentAuxilliaryActions
excludePath = /E2ETests
excludePath = /Emailer
excludePath = /HeadcountTargetAdmin
excludePath = /Tools
excludePath = /MakeSvnRevisionInfoFile.bat
excludePath = /PS20%20Generate%20Database%20Enums.ps1
excludePath = /Power-Scripts.ps1
excludePath = /REPLY.COM
excludePath = /XX%20Common.bat
excludePath = /sonar-project.properties
excludePath = /xx_Autosys
branches = branches/*:refs/heads/*
branches = StaticData:refs/heads/StaticData
tags = tags/*:refs/tags/*
shelves = shelves/*/main:refs/shelves/*

Note, that leading slash ("/") in excludePaht is meaningful: with leading slash the pattern is not recursive that means that it only applies to the directories in Git branches root directories, while without leading slashes the addon will be seeking the patterns everywhere in the repostiory.

@ildarhm : Thanks for your suggestion. I will try this approach and let you know in case of any concern.

Thanks,
Namit