Commit e278c46e authored by Filippos Giannakos's avatar Filippos Giannakos
Browse files

Edit changelog after ending a feature

parent b7e05a72
......@@ -158,6 +158,7 @@ class GitManager(object):
if not feature_upstream in repo.branches:
raise ValueError("Branch %s does not exist." % feature_upstream)
feature_debian = "debian-%s" % feature_upstream
self.edit_changelog(feature_upstream)
repo.git.checkout("develop")
with conflicts():
repo.git.merge(feature_upstream)
......@@ -171,6 +172,22 @@ class GitManager(object):
if feature_debian in repo.branches:
print "git branch -D %s" % feature_debian
def edit_changelog(self, branch):
repo = self.repo
if not branch in repo.branches:
raise ValueError("Branch %s does not exist." % branch)
repo.git.checkout(branch)
topdir = repo.working_dir
changelog = os.path.join(topdir, "Changelog")
editor = os.getenv('EDITOR')
if not editor:
editor = 'vim'
call("%s %s" % (editor, changelog))
repo.git.add(changelog)
repo.git.commit(m="Update changelog")
print "Updated changelog on branch %s" % branch
def end_common(self, mode, version):
pass
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment