Open igreenbride opened 10 years ago
I have this issue too. I almost wish there wasn't some regex trickery in going from svn2git's --exclude
to git svn's --ignore-paths
.
I use --exclude Vendors/ABC
, to remove a folder at Trunk/Vendors/ABC. But this doesn't get excluded, even though the regex that svn2git creates DOES match Trunk/Vendors/ABC.
Same issue here. A bugfix would be great!
Okay, using --exclude '.*ABC.*'
worked for me (to remove Vendors/ABC
).
Nice! So the documentation is just bad?
On Thu, Jan 9, 2014 at 4:42 PM, Christopher Dembia <notifications@github.com
wrote:
Okay, using --exclude '.ABC.' worked for me (to remove Vendors/ABC).
— Reply to this email directly or view it on GitHubhttps://github.com/nirvdrum/svn2git/issues/147#issuecomment-31993106 .
I don't think so...I'm excluding multiple directories using the normal expected syntax; its just this one path that is funky for some reason.
Exclude didn't work properly for me either. I've posted a question on StackOverflow: http://stackoverflow.com/questions/24123667/cloning-subversion-repo-into-git-gives-a-http-400-response-bad-request-with-re
I'm having this issue too. Did anyone figure out how to exclude folders and their subfolders? This doesn't seem to work --exclude '.*folder/.*'
I can't get it to work either.. The real issue I'm trying to work around is: branches/project-NUM-work/.../file.c was not found in commit hash (r18996)
on MacOS. so I tried various options mentioned here, including --exclude '.*project-NUM-work.*'
and in a simplified command (to narrow down where the original problem happens), I get: command failed: git svn fetch -r 18990:19100 --ignore-paths='^(?:trunk[/]|tags[/][^/]+[/]|branches[/][^/]+[/])(?:.project-NUM-work.)'
Same here, using svn2git --exclude ".*docs.*"
and it doesn't remove contents of "svn/path/trunk/project/src/docs"
. Though, if a docs folder is in the root - it works, i.e. it removed when it was here "svn/path/trunk/project/docs"
.
+1
The string that svn2git is concatenating with the excluding regex must start with a /, which is probably wrong, and stops any other strings matching.
But you can get round that by adding the following, which closes off the first capture and begins a new alternative one --exclude '.*)|(?:.^'
Then you can supply all your exclusions in one more exclude parameter:
--exclude 'pattern1|pattern2'
@jimshawx what do you mean with "the excluding regex must start with a /"? Unfortunately I think this bug is still there, I am having troubles while using --exclude "test/.*" as regex. However if I try to use the solution you suggest, the pattern
.*)
excludes everything.
I'm trying to convert a standard format SVN repo to git using svn2git, but I can't seem to exclude a folder at the top level of the trunk folder.
At this point I've dialed the conversion down to --nobranches --notags, but I'm also trying to use: --exclude folderName to exclude a folder and all of its subfolders and contents from our trunk directory.
But folderName is still pulled into the converted directory from SVN. What am I doing wrong?