Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rules in the form /project/tags/([^/]+)/dir_name/ are not being fetched into the new git-repository #83

Open
mono-princess opened this issue Nov 12, 2019 · 1 comment
Labels

Comments

@mono-princess
Copy link

mono-princess commented Nov 12, 2019

The structure of my svn repository looks similar to this:

/Poject/
    trunk/
        dir1/
        dir2/
        dir3/
         ...
         dir<n>/
    branches/
        branch_1/
            dir1/           
            dir2/           
            dir3/    
        branch_2/
            dir1/           
            dir2/           
            dir3/        
            ...
            dir<n>/ 
    tags/
        tag_1/
            dir1/           
            dir2/           
            dir3/    
        tag_2/
            dir1/           
            dir2/           
            dir3/     
            ...      
            dir<n>/

In reality there are several branches and several tags. Most of the tags were generated after the branches and the name of these tags is the same as the corresponding branch. The repository has over 26000 revisions.

The svn-repository is splitted into several git repositories (in total 8) where some of the directories (dir1, ..., dir<n>) were grouped together, for example:

  • git_repo_1 = dir1 + dir4 +dir5
  • git_repo_2 = dir2
  • git_repo_3 = dir6 + dir10
    ...

Here is the rules file for this repository:

# Declare the repositories we know about:
#

create repository git_repo_1 
end repository
create repository git_repo_2
end repository
create repository git_repo_3
end repository


#
# git_repo_1 
#
# git_repo_1 = dir1 + dir4 +dir5
#

match /Project/trunk/(dir1|dir4|dir5)/
  repository git_repo_1 
  prefix \1/
  branch master
end match
match /Project/branches/([^/]+)/(dir1|dir4|dir5)/
  repository git_repo_1 
  prefix \2/
  branch \1
end match
match /Project/tags/([^/]+)/(dir1|dir4|dir5)/
  repository git_repo_1 
  prefix \2/
  branch refs/tags/v\1
  annotated true
end match

#
# git_repo_2 = dir2
#

match /Project/trunk/dir2/
  repository git_repo_2
  branch master
end match
match /Project/branches/([^/]+)/dir2/
  repository git_repo_2 
  branch \1
end match
match /Project/tags/([^/]+)/dir2/
  repository git_repo_2
  branch refs/tags/v\1
  annotated true
end match


#
# git_repo_3
#
# git_repo_3= dir6 + dir10
#

match /Project/trunk/(dir6 |dir10)/
  repository git_repo_3
  prefix \1/
  branch master
end match
match /Project/branches/([^/]+)/(dir6 |dir10)/
  repository git_repo_3
  prefix \2/
  branch \1
end match
match /Project/tags/([^/]+)/(dir6 |dir10)/
  repository git_repo_3
  prefix \2/
  branch refs/tags/v\1
  annotated true
end match

match /
end match

Results:

  • After performing the migration not all the tags were fetched into the corresponding git-repositories.

  • In the logs there was found a message the following message for some repositories: recursiveDumpDir: "/Project/tags/tag_1/dir2/" skip entry for different/ignored repository

Questions:

Why are the tags not fetched?

Why did the message recursiveDumpDir appear in the logs even though none of the match definitions contains the parameter action export and all them have defined the parameter repository?

@mono-princess mono-princess changed the title Rules in the form /project/tags/()/dir_name Rules in the form /project/tags/([^/]+)/dir_name/ are not being fetched into git-repo Nov 12, 2019
@mono-princess mono-princess changed the title Rules in the form /project/tags/([^/]+)/dir_name/ are not being fetched into git-repo Rules in the form /project/tags/([^/]+)/dir_name/ are not being fetched into the new git-repository Nov 12, 2019
@Vampire
Copy link
Contributor

Vampire commented Jul 12, 2020

You probably need a rule before the other tag rules for /Project/tags/([^/]+)/$ with action recurse.
A tag is usually a copy of the entire directory like /Project/trunk => /Project/tags/tag-1.
In this case svn2git does only see these paths and your tag rules do not match.
You have to tell it to recurse into the directories to identify the actual rules to apply.

As for the skip message, I have no idea without a reproduction script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants