rmtree(tmpdir)
return res
-def editmsg(argv):
+def edit(argv, remove=False):
commit = argv[0]
fp = os.popen("git log --pretty=oneline --reverse %s~1..HEAD" % commit)
commits = []
raise ValueError, "git-reset"
first = True
for commit in commits:
+ if remove and first:
+ first = False
+ continue
res = extpick(['.', commit], edit=first)
if type(res) == type('') and res == "nochanges":
print "No changes, resetting back to %s..." % head
first = False
rmtree(tmpdir)
+def remove(argv):
+ edit(argv, remove=True)
+
OPTS=[
['h', 'help', usage, '', 'Print this help'],
['r', 'root', root, '<GIT root dir>', 'Set GIT root directory (default is %s)' % ROOT],
['release', release, 'tag [repo]', 'Do an ALSA release (auto = automatic change control)'],
['changes', changes, 'oldtag newtag', 'Show changes between oldtag and newtag'],
['extpick', extpick, 'local-repo-path commit', 'Pick and merge a patch from another repository'],
- ['edit', editmsg, 'commit', 'Edit a message for commit']
+ ['edit', edit, 'commit', 'Edit a message for commit'],
+ ['remove', remove, 'commit', 'Remove a commit']
]
def main():