diff options
author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2010-08-08 16:09:24 +0200 |
---|---|---|
committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2010-08-08 16:09:24 +0200 |
commit | d8b048d42dd7f0151a53132c04631e4fb84764fe (patch) | |
tree | 97a8c7ad8842d6e8f94e00158499e718de2de974 /src/pyfedpkg/initial_merge.py | |
parent | 61a6c4bd06e945cec8cd60ce61bcba60ff7ec10b (diff) | |
download | fedora-packager-d8b048d42dd7f0151a53132c04631e4fb84764fe.tar.gz fedora-packager-d8b048d42dd7f0151a53132c04631e4fb84764fe.tar.xz fedora-packager-d8b048d42dd7f0151a53132c04631e4fb84764fe.zip |
Consistently use pyfedpkg.switch_branch() function
Diffstat (limited to 'src/pyfedpkg/initial_merge.py')
-rwxr-xr-x | src/pyfedpkg/initial_merge.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/pyfedpkg/initial_merge.py b/src/pyfedpkg/initial_merge.py index be5782f..5bc119f 100755 --- a/src/pyfedpkg/initial_merge.py +++ b/src/pyfedpkg/initial_merge.py @@ -15,12 +15,14 @@ the branches will be a lot easier: Easier to follow in the dependency graph, and easier to perform without conflicts. """ -# TODO: Use more pyfedpkg.* functions instead of direct calls to git. +# TODO: Use more pyfedpkg.* functions and/or git.* functions instead +# of direct calls to git. import argparse import sys import os import subprocess +import pyfedpkg __all__ = [ @@ -80,26 +82,21 @@ class Branch: return "%(sha)s %(origbranch)s" % self.__dict__ -def switch_branch(branch): - ret = run_cmd(['fedpkg', 'switch-branch', branch], dry_run=False) - assert(ret == 0) - - def do_initial_merge(into, to_merge): print print "######## Merging", [ x.localbranch for x in to_merge ], \ "into", into.localbranch, "########" - switch_branch(into.localbranch) + pyfedpkg.switch_branch(into.localbranch) ret = run_cmd(['git', 'merge', '-m', '"Initial peudo merge for dist-git setup"', '-s', 'ours'] + [ x.origbranch for x in to_merge]) assert(ret == 0) for t in to_merge: - switch_branch(t.localbranch) + pyfedpkg.switch_branch(t.localbranch) ret = run_cmd(['git', 'merge', into.localbranch]) assert(ret == 0) - switch_branch(into.localbranch) + pyfedpkg.switch_branch(into.localbranch) class Consumer: |