コード例 #1
0
def create_deb_branch(branch_name, source_debian_dir):
    """Create a debian branch from a source debian directory."""
    # Make sure the repo is clean, since we run git clean later
    # without confirmation.
    git.assert_clean_repository()
    local("git symbolic-ref HEAD refs/heads/{0}".format(branch_name))
    local("rm .git/index")
    local("git clean -fdx")
    local("cp -r {0} debian".format(source_debian_dir))
    local(r"""sed -i "/export DH_VERBOSE/ a\
           export OSLO_PACKAGE_VERSION=\$(shell dpkg-parsechangelog """
           """| sed -n -e 's/^Version: //p')" debian/rules""")
    local("git add debian")
    local('git commit -m "Initial import of debian package"')
コード例 #2
0
def create_deb_branch(branch_name, source_debian_dir):
    """Create a debian branch from a source debian directory."""
    # Make sure the repo is clean, since we run git clean later
    # without confirmation.
    git.assert_clean_repository()
    local("git symbolic-ref HEAD refs/heads/{0}".format(branch_name))
    local("rm .git/index")
    local("git clean -fdx")
    local("cp -r {0} debian".format(source_debian_dir))
    local("""sed -i "/export DH_VERBOSE/ a\
             export OSLO_PACKAGE_VERSION=\$(shell dpkg-parsechangelog """
          """| sed -n -e 's/^Version: //p')" debian/rules""")
    local("git add debian")
    local('git commit -m "Initial import of debian package"')
コード例 #3
0
def refresh_patches():
    git.assert_clean_repository()
    current_branch = git.current_branch()
    os_release = parse_openstack_release(current_branch)
    version = git_version()
    deb_branch = discover_debian_branch(current_branch, version, os_release)
    with settings(warn_only=True):
        local("git checkout %s -- debian" % deb_branch)
        more_patches = True
        while more_patches:
            rv = local("quilt push && quilt refresh")
            more_patches = rv.return_code == 0
        local("quilt pop -a")
        local("git checkout %s" % deb_branch)
        local("git add -u")
        local('git commit -m "Refreshed patches"')
        local("git checkout %s" % current_branch)
        local("git clean -fdx")
コード例 #4
0
def refresh_patches():
    git.assert_clean_repository()
    current_branch = git.current_branch()
    os_release = parse_openstack_release(current_branch)
    version = git_version()
    deb_branch = discover_debian_branch(current_branch, version, os_release)
    with settings(warn_only=True):
        local("git checkout %s -- debian" % deb_branch)
        more_patches = True
        while more_patches:
            rv = local("quilt push && quilt refresh")
            more_patches = rv.return_code == 0
        local("quilt pop -a")
        local("git checkout %s" % deb_branch)
        local("git add -u")
        local('git commit -m "Refreshed patches"')
        local("git checkout %s" % current_branch)
        local("git clean -fdx")