Skip to content

Commit

Permalink
Merge pull request #4 from primetheus/primetheus/update-defaults
Browse files Browse the repository at this point in the history
enable clean cutover and no submodules
  • Loading branch information
Jared Murrell authored Jun 27, 2018
2 parents baefd65 + 2d1a094 commit 7abe22e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ GITHUB_ORG=GitHub-Demo
AUTHORS_FILE=/tmp/authors.txt
SVN_USERNAME=anonymous
SVN_PASSWORD=anonymous
ENABLE_SUBMODULES=true
MIGRATE_HISTORY=true
```

## Caveats
Expand Down
3 changes: 3 additions & 0 deletions _functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,12 @@ function _initialize_lfs()
EXTENSION=$(echo ${FILE}|awk -F'.' {'print " *."$3'})
git lfs track ${EXTENSION}
git add ${EXTENSION}
git lfs migrate --include="*.${EXTENSION}"
done
git add .gitattributes
git commit -m "Initialized Git-LFS"
git reflog expire --expire-unreachable=now --all
git gc --prune=now
fi
}

Expand Down
2 changes: 2 additions & 0 deletions settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ SVN_PASSWORD=anonymous
CONVERT_HISTORY=true
## Max file size for the repo. Default=100MB
MAX_FILE_SIZE=100
## Find and migrate nested repositories?
ENABLE_SUBMODULES=false
21 changes: 17 additions & 4 deletions svn2github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,28 @@ fi
_welcome
_setup
_svn_sizer
_discover_submodules
_process_submodules
_git_svn_clone
## Process submodules
if [[ ${ENABLE_SUBMODULES} ]]
then
_discover_submodules
_process_submodules
else
_get_svn_layout
fi
## Perform a clean cutover or migrate history
if [[ ${MIGRATE_HISTORY} ]]
then
_git_svn_clone
else
_clean_cutover
fi
## Migrate trunk, branches, tags, submodules
(
cd ${REPO_NAME}
git config http.sslVerify false
_prepare_github
_migrate_trunk
_add_git_submodules
[[ ${ENABLE_SUBMODULES} ]] && _add_git_submodules
_migrate_tags
_migrate_branches
)
Expand Down

0 comments on commit 7abe22e

Please sign in to comment.