Пример #1
0
 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()
Пример #2
0
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()