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

Update svn2git logs that resulted from the git conversion #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "bfg-repo-cleaner"]
path = bfg-repo-cleaner
url = [email protected]:rtyley/bfg-repo-cleaner.git
[submodule "git_diet"]
path = git_diet
url = [email protected]:cmaitchison/git_diet.git
2 changes: 2 additions & 0 deletions common.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def call(command, *args, **kwargs):
"OpenSim project up through %s . This repository is not for "
"development; it is "
"only for reference." % datestr)
opensim_gui_description = ('SimTK OpenSim graphical user interface and '
'distribution.')

# To work in a different directory.
class cd(object):
Expand Down
1 change: 1 addition & 0 deletions git_diet
Submodule git_diet added at 242991
5 changes: 5 additions & 0 deletions large_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -497,3 +497,8 @@
1008644 OpenSim/Examples/Gait2392_Simbody/subject01_simbody_adjusted.osim
1008644 Models/Gait2392_Simbody/subject01_simbody_adjusted.osim
1003044 Applications/CMC/test/subject02_running_RRA_cycle02_07_v18.osim
19183841 svn2git_opensim_legacy_progress_log.txt
19155193 opensim_complete_history_svn2git_progress_log.txt
13869718 bfg-1.11.3.jar
1170658 opensim_core_svn2git_progress_log.txt
13 svn2git
238 changes: 238 additions & 0 deletions opensim_gui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@

import os
import time

from common import *

# Preliminaries.
# --------------
start_time = time.time()

# For debugging and development:
normalize_line_endings = True
opensim_gui_tag_prefix = 'v'

opensim_legacy_dir = os.path.join(git_repos_dir,
'opensim-legacy')

opensim_gui_dir = os.path.join(git_repos_dir, 'opensim-gui')

prompt_delete_dir(opensim_gui_dir)

myprint('Making a copy of opensim-gui.')

call('cp -r %s %s' % (opensim_legacy_dir,
opensim_gui_dir))

with cd(opensim_gui_dir):

# Edit 'description' file, which is used by GitWeb (run `$ git instaweb`).
call('echo "opensim-gui: %s" '
'> %s/.git/description' % (
opensim_gui_description, opensim_gui_dir))

myprint('Ripping out parts of the history.')


swig_java_path = os.path.join(opensim_gui_dir,
'Gui/opensim/modeling', 'src/org/opensim/modeling')

list_of_current_folders_to_gitrm = [
'Applications',
'OpenSim',
'Models',
'Documentation',
'Gui/Documentation',
'Vendors/lepton',
'Vendors/CFSQP',
'Vendors/vtk_dll',
]
list_of_folders_to_delete = [
'Examples',
'webstart',
'UI',
'SimtkUI',
'Simulation',
'OpenSimJNI',
'API',
'Applications',
'OpenSim',
'Models',
'Documentation',
'html',
'xerces-c*',
'Specs',
'lepton',
'CFSQP',
'NMBLTK',
'SimTK',
'Gait*',
'Arm26',
'Leg39',
'DemoFiles',
'vtk_dll',
]
list_of_files_to_delete = [
'ieee_fig03_OpenSim_SimTK_v2.ai',
'ApiDoxygen.cmake',
'CTestConfig.cmake',
'Doxyfile.in',
'FindSimbody.cmake',
'OpenSimAPI.html',
'*.psd',
'*.lib',
'*.dll',
'*.dylib',
'*.so',
#'*.jar',
'*.exe',
'SimTK*.dll',
'OpenSim*.dll',
'OpenSim',
'*_wrap.cxx',
'*_wrap.h',
] #+ swig_java_output
folders_to_delete = '{%s}' % ','.join(list_of_folders_to_delete)
files_to_delete = '{%s}' % ','.join(list_of_files_to_delete)

with cd(opensim_gui_dir):

for item in list_of_current_folders_to_gitrm:
call('git rm -rf --quiet %s' % item)
for item in list_of_files_to_delete:
call('git rm -rf --quiet *%s' % item)

call('git commit --quiet '
'-am"Normalize line endings."')
call("java -jar %s/bfg-1.11.3.jar "
"--delete-folders %s --delete-files %s" % (
homebase_dir, folders_to_delete, files_to_delete))

# Clean up OpenSim branches.
# --------------------------
# 1. Convert previous branches to tags.
# 2. Delete branches that we are not interested in.

def convert_branch_to_tag(branch_name, tag_name):
call('git checkout %s' % branch_name)
call('git tag %s' % tag_name)
call('git checkout master')
call('git branch %s -D' % branch_name)
def delete_branch(branch_name):
call('git branch %s -D' % branch_name)
def delete_tag(tag_name):
call('git tag -d %s' % tag_name)
def rename_tag(old, new):
call('git tag %s %s' % (new, old))
delete_tag(old)

with cd(opensim_gui_dir):
# TODO take care of pre-r6663 branches.
# TODO just rename existing tags.
# TODO convert_branch_to_tag('CableWrapping', 'cable-wrapping')
# TODO convert_branch_to_tag('ModelBuilding', 'model-building')
# TODO try to remove these branches beforehand.
rename_tag('Release_02_04_00', '%s2.4.0' % opensim_gui_tag_prefix)
rename_tag('Release_03_00_00', '%s3.0.0' % opensim_gui_tag_prefix)
rename_tag('Release_03_01_00', '%s3.1.0' % opensim_gui_tag_prefix)
rename_tag('Release_03_02_00', '%s3.2.0' % opensim_gui_tag_prefix)

delete_branch('1728Branch')
delete_branch('CableWrapping')
delete_branch('Engines')
delete_branch('Integrator')
delete_branch('Integrator@1105')
delete_branch('JasonEmel485Project')
delete_branch('JasonEmel485Project@1683')
delete_branch('JasonEmel485Project@1741')
delete_branch('JasonEmel485Project@1755')
delete_branch('JasonEmel485Project@4133')
delete_branch('ModelBuilding')
delete_branch('OpenSim')
delete_branch('OpenSim15')
delete_branch('OpenSim18')
delete_branch('OpenSim19')
delete_branch('OpenSim20')
delete_branch('OpenSim21')
delete_branch('OpenSim22')
delete_branch('OpenSim23')
delete_branch('OpenSim23_1')
delete_branch('OpenSim23_1_NB7')
delete_branch('OpenSim24')
delete_branch('OpenSim30')
delete_branch('OpenSim30GUI')
delete_branch('OpenSim31')
delete_branch('OpenSimGUIProto')
delete_branch('OpenSimWW01')
delete_branch('OpenSim_BuiltOn_SimTK_1_1')
delete_branch('OpenSim_BuiltOn_SimTK_1_1@1683')
delete_branch('OpenSim_BuiltOn_SimTK_1_1@1741')
delete_branch('OpenSim_BuiltOn_SimTK_1_1@1755')
delete_branch('OpenSim_BuiltOn_SimTK_1_1@4056')
delete_branch('OpenSim_exhibit')
delete_branch('Remove_Xerces')
delete_branch('Restructure')
delete_branch('UseSimTKLibs')
delete_branch('migrate2NmbltkBr')

delete_tag('NMBLTK')
delete_tag('NMBLTK@1095')
delete_tag('Release0.1')
delete_tag('Release0.1@1096')
delete_tag('Release_00_00')
delete_tag('Release_00_06_00')
delete_tag('Release_00_07_08')
delete_tag('Release_00_08_02')
delete_tag('Release_01_00_00')
delete_tag('Release_01_01_00')
delete_tag('Release_01_05_05')
delete_tag('Release_01_06_Jamboree')
delete_tag('Release_01_07_00')
delete_tag('Release_02_00')
delete_tag('Release_02_00_01')
delete_tag('Release_02_00_02')
delete_tag('Release_02_00_Jamboree')
delete_tag('Release_02_02_00')
delete_tag('Release_02_02_01')
delete_tag('Release_02_03_02')
delete_tag('Release_03_00_Dev')
delete_tag('Before_Directory_Restructure_2007-03-16')

active_branches = ['master', 'Visualizer', 'OpenSim32']
if normalize_line_endings:
filter_branch_tasks(opensim_gui_dir, active_branches)

# Make opensim-gui a standalone project with a reasonably clean install.
with cd(opensim_gui_dir):

# TODO for branch in active_branches:
# TODO myprint('Applying patch to %s' % branch)
# TODO call('git checkout %s' % branch)
# TODO call('git apply %s/opensim-core.patch' % homebase_dir)
# TODO call('git commit -am"Edit CMake files to reflect split from SVN."')
for branch in active_branches:
call('git checkout %s' % branch)
swig_java_output = []
for fname in os.listdir(swig_java_path):
if fname.endswith('java'):
with open(os.path.join(swig_java_path, fname)) as f:
if f.read().find('automatically generated by SWIG') != -1:
swig_java_output += [fname]
for fname in swig_java_output:
call('git rm -rf --quiet %s/%s' % (swig_java_path, fname))
call('git commit -am"Remove SWIG java output."')

call('git checkout master')

git_garbage_collection(opensim_gui_dir)

with cd(opensim_gui_dir):
call("%s/git_diet/bin/find_fattest_objects.sh -n 100 " % (
homebase_dir))

repository_size(opensim_gui_dir)

# Tell the user how long opensim2git ran for.
elapsed_time = time.time() - start_time
myprint("Took %.1f minutes." % (elapsed_time / 60.0))

17 changes: 9 additions & 8 deletions push_repositories_to_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def push_to_github(local_relpath, description, private):
github_name = local_relpath

# Delete the repository on GitHub, in case it already exists.
call("curl -u {0} -X DELETE "
"'https://api.github.com/repos/opensim-org/{1}'".format(github_username,
github_name))
#call("curl -u {0} -X DELETE "
# "'https://api.github.com/repos/opensim-org/{1}'".format(github_username,
# github_name))

# Create the new repository.
# http://developer.github.com/guides/getting-started/#create-a-repository
Expand All @@ -57,8 +57,9 @@ def push_to_github(local_relpath, description, private):
call('git push opensim-org --all')
call('git push opensim-org --tags')

push_to_github('cfsqp', cfsqp_description, 'true')
push_to_github('opensim-core', opensim_core_description, 'true')
push_to_github('opensim-legacy',
opensim_legacy_description, 'true')
push_to_github('opensim-models', opensim_models_description, 'true')
#push_to_github('cfsqp', cfsqp_description, 'true')
#push_to_github('opensim-core', opensim_core_description, 'true')
#push_to_github('opensim-legacy',
# opensim_legacy_description, 'true')
#push_to_github('opensim-models', opensim_models_description, 'true')
push_to_github('opensim-gui', opensim_gui_description, 'true')
8 changes: 4 additions & 4 deletions svn2git_cfsqp_progress_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ Running command: git svn fetch -r 1053:HEAD
branch_from: /Vendors => /Vendors/CFSQP
Found possible branch point: file:///home/fitze/opensim2git_local/svn_mirror/Vendors/CFSQP => file:///home/fitze/opensim2git_local/svn_mirror/Trunk/Vendors/CFSQP, 1052
Initializing parent: refs/remotes/svn/trunk@1052
A cfsqp.c
A cfsqpusr.h
A readme
A cfsqp.c
A qld.c
A suCFSQPDLL.cpp
A suCFSQPDLL.h
Expand All @@ -16,14 +17,13 @@ Initializing parent: refs/remotes/svn/trunk@1052
A sampl1.c
A sampl2a.c
A sampl3.c
A samplePerfOnly.cpp
A sampl4.c
A sampl2b.c
A sampl4.c
A samplePerfOnly.cpp
A sampl5.c
A sampl1CC.cpp
A suCFSQP/suCFSQP.vcproj
A suCFSQP/suCFSQP.dsp
A cfsqpusr.h
r1053 = 49b25ee5de4308cb81ccd0b24c93fa9bad2e7e71 (refs/remotes/svn/trunk)
M suCFSQP/suCFSQP.vcproj
r1093 = ff0455a45ab08fd39e27cc4f4e404e1b470e0fec (refs/remotes/svn/trunk)
Expand Down
Empty file.
Loading