History not coming as expected

There is need to migrate different subfolders under master and branches from SVN repository. But history is not coming properly.
Parent SVN Repo path: /ecdit/ (Attached is the screenshot - SVNParentRepo)
The path /ecdit/Data/Production/Application/ECD_DF needs to be the master and /ecdit/Data/Archived/Application/ECD4.6/ECD_DF should be under branches.

Below are the mappings that we have used-
SVN URL was set to https://svn.dts.fm.rbsgrp.net/ecdit/

trunk = Data/Production/Application:refs/heads/master
includePath = /ECD_DF
branches = Data/Archived/Application:refs/heads/ECD_DF4.6
includePath = /ECD4.6/ECD_DF

On doing this, the history is visible from Data/Production/Application and Data/Archived/Application level and not for the sub folders specifically included.
In this case if we are doing similar migration for many sub-folders, all of these have same history.

Also attaching logs for the parent repo.

Bitbucket history snapshot attached
SVN History snapshot attached

Also, we are not able to attach file. Please let us know from where we can do that.

Hello,

could you please advise, how do you check the history for the subfolders and what is the output of the command you use? May I ask you provide an example of what you see for the Data/Production/Application and what for its subfolder?
Regarding files, indeed, there are no files attached which is strange as the forum is configured to allows attachments. Could you please advise how big are those files? Could you please try to add them to an archive (ZIP, for example) and try to upload once again? Also, may I ask you to collect the SVN Mirror add-on logs in Bitbucket? It can be done in the repository UI, on the Support tab on the SVN Mirror page (Create ZIP feature).

(upload://tbEfuy2UKP5MzM5xFVdGQgpXRlO.gz) (3.5 MB)
Attaching the files here.
We are facing issues in generating the add on log zip from UI. Can we send the svnmirror logs from the server?

ecdit_svnlogs.tar.gz (3.5 MB)

We were able to get the add-on logs as well but it is of 666 MB and we are not able to upload it. Is there any other way to share the zip?

Hello,

thank you for the SVN logs.
Regarding the add-on files – I’m afraid, we don’t have a service to upload such a big file at this time. Could it be possible to share it using a third-party service? If not, svnmirror.log files from the repository would be OK.

We do not have any other option to upload files.
I have also noticed that the svnmirror.log hasn’t updated after 2020-04-14. I tried to get the svnmirror.log for this repository but i do not see the subgit folder being creatd and there is no svnmirror.log for this repo.

Can we use https://transfer.atlassian.com/ to upload the zip file?

Hello!

In the latest version SubGit folder has been moved out from the the repository, since versions 3.4.6/4.0 that folder resides in ‘repositories’ directory, so repository-specific ann-on logs can be at the following path:

$BITBUCKETHOME/data/subgit/repositories/REPO_ID/subgit/logs

REPO_ID here stands for the repository ID.

I’m afraid we don’t have access to the transfer.atlassian.com, so this would not work.

Attaching the svnmirror.log for the repo.svn_mirror.log (456.9 KB)

Hello,

thank you for the logs.
Judging from the logs, the SVN Mirror add-on works as expected translating the whole history according to the mapping configuration (and even a little more as it creates commits for files that are not present in the Bitbucket repository). Namely, you have set the following configuration:

trunk = Data/Production/Application:refs/heads/master
includePath = /ECD_DF
includePath = /ECD4.6/ECD_DF
branches = Data/Archived/Application:refs/heads/ECD_DF4.6

With this configuration the add-on imports Data/Production/Application SVN directory to the master branch and Data/Archived/Application to the ECD_DF4.6 branch; and it only imports two directories ECD_DF and ECD4.6/ECD_DF from this SVN directories. The history of master branch shown on the screenshot matches the the configuration completely – that is, the add-on only translated those revisions, that are in the mapping configuration. It additionally created empty commits for revisions that changed files in the Data/Production/Application and Data/Archived/Application even if those files were not translated to Git. For example, in the revision r33652 the /Data/Production/Application/ResourcePlanner/DataFeeds/app.config was changed. The file itself is not being imported to Git as it’s not in ECD_DF or ECD4.6/ECD_DF, but the add-on reflected that revision in Git history creating the f4bb6dfee43 commit. If you don’t need such a commits to be created, this behaviour can be changed by adding

createEmptyGitCommits = false

setting to the mapping configuration, in this case add-on will only create commits for the revisions that change file imported to Git.
The add-on only imports history of the SVN directories that are being imported to Git, omitting the rest directories. So if you need to get the whole history of the repository, the whole repository should be imported.

Hi,

The mappings that we added were-
trunk = Data/Production/Application:refs/heads/master
includePath = /ECD_DF
branches = Data/Archived/Application:refs/heads/ECD_DF4.6
includePath = /ECD4.6/ECD_DF

So, we are actually trying to get /Data/Production/Application/ECD_DF as the master branch and Data/Archived/Application/ECD4.6/ECD_DF as a separate branch ECD_DF4.6. Can we achieve this by the mapping provided?
We do not want any history for /Data/Production/Application or /Data/Archived/Application completely, we need it only for the folders that we have included in each case.

Hi.

To get /Data/Production/Application/ECD_DF to master and Data/Archived/Application/ECD4.6/ECD_DF to ECD_DF4.6 branch, you can set them mapped directly, without using includePath settings:

trunk = Data/Production/Application/ECD_DF:refs/heads/master
branches = Data/Archived/Application/ECD4.6/ECD_DF:refs/heads/ECD_DF4.6

With this configuration, ECD_DF’s content will appear in the master branch and the content of ECD4.6/ECD_DF will appear in the ECD_DF4.6 branch. The configuration you set initially does a different this: it sends content of the /Data/Production/Application to master and content of Data/Archived/Application to ECD_DF4.6 branch, but it limit the content of both branches to only /ECD_DF and /ECD4.6/ECD_DF directories. If there’s no ECD_DF directory in Data/Archived/Application and no ECD4.6/ECD_DF directory in /Data/Production/Application, then the result would be almost the same, only the content would be placed in the appropriate directories, not right in the root in the branches.

From the history point of view the result would be similar, too. The only difference is that if the add-on is set to create empty Git commits, then it would create commits for all the revisions that change files in /Data/Production/Application (or Data/Archived/Application for the ECD_DF4.6 branch) thus tracking history of the Application directories. If it’s not set to create empty commits, then it will only create commits for files that matches the mapping configuration, thus only importing history for Data/Production/Application/ECD_DF and Data/Archived/Application/ECD4.6/ECD_DF directories.

Hi,

We have tried below mentioned two mappings as suggested but the history is not completely for master and for branch we only see one commit on bitbucket side whereas it has many commits on SVN(please refer the screenshots).

Mapping 1-
trunk = Data/Production/Application/ECD_DF:refs/heads/master
branches = Data/Archived/Application/ECD4.6/ECD_DF:refs/heads/ECD_DF4.6

Attached svnmirror logs with name svnmirror2.log
Attaching screenshot of history from SVN and bitbucket (the screenshots with ecdit2*)

Mapping 2
trunk = Data/Production/Application/ECD_DF:refs/heads/master
branches = Data/Archived/Application/ECD4.6/ECD_DF:refs/heads/ECD_DF4.6
createEmptyGitCommits = false

Attached svnmirror logs with name svnmirror3.log
Attaching screenshot of history from bitbucket (the screenshots with ecdit3*)

svnmirror2.log (86.0 KB) svnmirror3.log (84.0 KB)