Created
January 17, 2012 18:25
-
-
Save mgax/1627973 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
from subprocess import check_call | |
def sync_git_svn(repo_path): | |
check_call(['git', 'svn', 'rebase', '-qq'], cwd=repo_path) | |
check_call(['git', 'gc', '-q'], cwd=repo_path) | |
check_call(['git', 'push', '-q'], cwd=repo_path) | |
def main(): | |
import sys | |
for repo_path in sys.argv[1:]: | |
sync_git_svn(repo_path) | |
# git remote add github [email protected]:eaudeweb/<repo-name>.git | |
# git push github master | |
# git branch --set-upstream master github/master | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment