From: Catalin Marinas <catalin.marinas@gmail.com>
To: git@vger.kernel.org
Cc: "Karl Hasselström" <kha@treskal.com>
Subject: [StGit PATCH] Do not crash if a patch log ref is missing
Date: Fri, 12 Sep 2008 22:54:58 +0100 [thread overview]
Message-ID: <20080912215449.10270.38860.stgit@localhost.localdomain> (raw)
Since we'll get rid of the individual patch logs, StGit should ignore if
such a ref is missing when deleting the compatibility patch files.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
---
stgit/lib/stack.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/stgit/lib/stack.py b/stgit/lib/stack.py
index 9cb3967..1059955 100644
--- a/stgit/lib/stack.py
+++ b/stgit/lib/stack.py
@@ -68,7 +68,11 @@ class Patch(object):
for f in os.listdir(self.__compat_dir):
os.remove(os.path.join(self.__compat_dir, f))
os.rmdir(self.__compat_dir)
- self.__stack.repository.refs.delete(self.__log_ref)
+ try:
+ # this compatibility log ref might not exist
+ self.__stack.repository.refs.delete(self.__log_ref)
+ except KeyError:
+ pass
def set_commit(self, commit, msg):
self.__write_compat_files(commit, msg)
self.__stack.repository.refs.set(self.__ref, commit, msg)
next reply other threads:[~2008-09-12 21:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-12 21:54 Catalin Marinas [this message]
2008-09-14 8:08 ` [StGit PATCH] Do not crash if a patch log ref is missing Karl Hasselström
2008-09-14 21:01 ` Catalin Marinas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080912215449.10270.38860.stgit@localhost.localdomain \
--to=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
--cc=kha@treskal.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).