def simulateCreationAndRenameInGitRepo(self, originalfilename, newfilename): open(originalfilename, 'a').close() # create file Initializer.initialcommit() Commiter.pushmaster() os.rename(originalfilename, newfilename) # change capitalization shell.execute("git add -A") Commiter.handle_captitalization_filename_changes()
def initialize(): config = configuration.get() directory = config.workDirectory if os.path.exists(directory): sys.exit("Configured directory already exists, please make sure to use a non-existing directory") shouter.shout("Migration will take place in " + directory) os.makedirs(directory) os.chdir(directory) config.deletelogfolder() git = Initializer() git.initalize() RTCInitializer.initialize() if Differ.has_diff(): git.initialcommit() Commiter.pushmaster()