Skip to content

Commit 7abe22e

Browse files
author
Jared Murrell
authored
Merge pull request #4 from primetheus/primetheus/update-defaults
enable clean cutover and no submodules
2 parents baefd65 + 2d1a094 commit 7abe22e

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ GITHUB_ORG=GitHub-Demo
9494
AUTHORS_FILE=/tmp/authors.txt
9595
SVN_USERNAME=anonymous
9696
SVN_PASSWORD=anonymous
97+
ENABLE_SUBMODULES=true
98+
MIGRATE_HISTORY=true
9799
```
98100

99101
## Caveats

_functions.sh

+3
Original file line numberDiff line numberDiff line change
@@ -457,9 +457,12 @@ function _initialize_lfs()
457457
EXTENSION=$(echo ${FILE}|awk -F'.' {'print " *."$3'})
458458
git lfs track ${EXTENSION}
459459
git add ${EXTENSION}
460+
git lfs migrate --include="*.${EXTENSION}"
460461
done
461462
git add .gitattributes
462463
git commit -m "Initialized Git-LFS"
464+
git reflog expire --expire-unreachable=now --all
465+
git gc --prune=now
463466
fi
464467
}
465468

settings.ini

+2
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ SVN_PASSWORD=anonymous
1616
CONVERT_HISTORY=true
1717
## Max file size for the repo. Default=100MB
1818
MAX_FILE_SIZE=100
19+
## Find and migrate nested repositories?
20+
ENABLE_SUBMODULES=false

svn2github.sh

+17-4
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,28 @@ fi
1111
_welcome
1212
_setup
1313
_svn_sizer
14-
_discover_submodules
15-
_process_submodules
16-
_git_svn_clone
14+
## Process submodules
15+
if [[ ${ENABLE_SUBMODULES} ]]
16+
then
17+
_discover_submodules
18+
_process_submodules
19+
else
20+
_get_svn_layout
21+
fi
22+
## Perform a clean cutover or migrate history
23+
if [[ ${MIGRATE_HISTORY} ]]
24+
then
25+
_git_svn_clone
26+
else
27+
_clean_cutover
28+
fi
29+
## Migrate trunk, branches, tags, submodules
1730
(
1831
cd ${REPO_NAME}
1932
git config http.sslVerify false
2033
_prepare_github
2134
_migrate_trunk
22-
_add_git_submodules
35+
[[ ${ENABLE_SUBMODULES} ]] && _add_git_submodules
2336
_migrate_tags
2437
_migrate_branches
2538
)

0 commit comments

Comments
 (0)