summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1540d38)
This is a fix for bug #10123.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
out.info('Ignoring already applied patch "%s"' % patch)
return
if options.replace and patch in crt_series.get_unapplied():
out.info('Ignoring already applied patch "%s"' % patch)
return
if options.replace and patch in crt_series.get_unapplied():
- crt_series.delete_patch(patch)
+ crt_series.delete_patch(patch, keep_log = True)
# refresh_patch() will invoke the editor in this case, with correct
# patch content
# refresh_patch() will invoke the editor in this case, with correct
# patch content
self.create_empty_field('bottom')
self.create_empty_field('top')
self.create_empty_field('bottom')
self.create_empty_field('top')
+ def delete(self, keep_log = False):
if os.path.isdir(self._dir()):
for f in os.listdir(self._dir()):
os.remove(os.path.join(self._dir(), f))
if os.path.isdir(self._dir()):
for f in os.listdir(self._dir()):
os.remove(os.path.join(self._dir(), f))
git.delete_ref(self.__top_ref)
except git.GitException, e:
out.warn(str(e))
git.delete_ref(self.__top_ref)
except git.GitException, e:
out.warn(str(e))
- if git.ref_exists(self.__log_ref):
+ if not keep_log and git.ref_exists(self.__log_ref):
git.delete_ref(self.__log_ref)
def get_name(self):
git.delete_ref(self.__log_ref)
def get_name(self):
- def delete_patch(self, name):
+ def delete_patch(self, name, keep_log = False):
"""Deletes a patch
"""
self.__patch_name_valid(name)
"""Deletes a patch
"""
self.__patch_name_valid(name)
# save the commit id to a trash file
write_string(os.path.join(self.__trash_dir, name), patch.get_top())
# save the commit id to a trash file
write_string(os.path.join(self.__trash_dir, name), patch.get_top())
+ patch.delete(keep_log = keep_log)
unapplied = self.get_unapplied()
unapplied.remove(name)
unapplied = self.get_unapplied()
unapplied.remove(name)