From 21c5c34ee28036e595aab3cfc72e58c6c8f526b3 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Thu, 25 Jun 2009 16:47:30 -0700 Subject: Support detached HEAD in manifest repository If the manifest repository is on a detached HEAD and we are parsing an XML formatted manifest we should simply set the branch property to None, rather than crash with an AttributeError. Signed-off-by: Shawn O. Pearce --- manifest_xml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifest_xml.py') diff --git a/manifest_xml.py b/manifest_xml.py index 51e653ed..7d02f9d6 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -183,7 +183,7 @@ class XmlManifest(object): if not self._loaded: m = self.manifestProject b = m.GetBranch(m.CurrentBranch).merge - if b.startswith(R_HEADS): + if b is not None and b.startswith(R_HEADS): b = b[len(R_HEADS):] self.branch = b -- cgit v1.2.3-54-g00ecf