Exemple #1
0
def assert_no_uncommitted_changes():
    repository = LocalRepository(curdir)
    changes = repository.getChangedFiles() + repository.getStagedFiles()
    if changes:
        message = "There are changes pending commit, cannot continue. please commit or stash them:\n"
        logger.error(message + repr(changes))
        raise SystemExit(1)
def assert_no_uncommitted_changes():
    repository = LocalRepository(curdir)
    changes = repository.getChangedFiles() + repository.getStagedFiles()
    if changes:
        message = "There are changes pending commit, cannot continue. please commit or checkout those changes:\n"
        logger.error(message+repr(changes))
        raise AssertionError()
def assert_no_uncommitted_changes():
    repository = LocalRepository(curdir)
    changes = repository.getChangedFiles() + repository.getStagedFiles()
    if changes:
        message = "There are changes pending commit, cannot continue. please commit or checkout those changes:\n"
        logger.error(message + repr(changes))
        raise AssertionError()
Exemple #4
0
def assert_no_uncommitted_changes():
    repository = LocalRepository(curdir)
    changes = repository.getChangedFiles() + repository.getStagedFiles()
    if changes:
        message = "There are changes pending commit, cannot continue. please commit or stash them:\n"
        logger.error(message+repr(changes))
        raise SystemExit(1)
Exemple #5
0
def commit_changes_to_buildout(message):
    from os import curdir
    from gitpy import LocalRepository
    repository = LocalRepository(curdir)
    if "buildout.cfg" not in [modified_file.filename for modified_file in repository.getChangedFiles()]:
        return
    repository.add("buildout.cfg")
    repository.commit("buildout.cfg: " + message)
Exemple #6
0
def commit_changes_to_buildout(message):
    import os
    from gitpy import LocalRepository
    repository = LocalRepository(os.curdir)
    # workaround https://github.com/msysgit/git/issues/79
    os.system("git status")
    if "buildout.cfg" not in [modified_file.filename for modified_file in repository.getChangedFiles()]:
        return
    repository.add("buildout.cfg")
    repository.commit("buildout.cfg: " + message)
Exemple #7
0
def commit_changes_to_buildout(message):
    import os
    from gitpy import LocalRepository
    repository = LocalRepository(os.curdir)
    # workaround https://github.com/msysgit/git/issues/79
    os.system("git status")
    if "buildout.cfg" not in [
            modified_file.filename
            for modified_file in repository.getChangedFiles()
    ]:
        return
    repository.add("buildout.cfg")
    repository.commit("buildout.cfg: " + message)