diff options
author | Shawn O. Pearce <sop@google.com> | 2009-06-25 16:47:30 -0700 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2009-06-25 16:47:30 -0700 |
commit | 21c5c34ee28036e595aab3cfc72e58c6c8f526b3 (patch) | |
tree | f40717343efa47e15535172cf0b4bf776a870891 | |
parent | 54fccd71fbdc60adf99b9a9bf4712c121d4312ba (diff) | |
download | git-repo-21c5c34ee28036e595aab3cfc72e58c6c8f526b3.tar.gz |
Support detached HEAD in manifest repositoryv1.6.8.5
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 <sop@google.com>
-rw-r--r-- | manifest_xml.py | 2 |
1 files changed, 1 insertions, 1 deletions
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): | |||
183 | if not self._loaded: | 183 | if not self._loaded: |
184 | m = self.manifestProject | 184 | m = self.manifestProject |
185 | b = m.GetBranch(m.CurrentBranch).merge | 185 | b = m.GetBranch(m.CurrentBranch).merge |
186 | if b.startswith(R_HEADS): | 186 | if b is not None and b.startswith(R_HEADS): |
187 | b = b[len(R_HEADS):] | 187 | b = b[len(R_HEADS):] |
188 | self.branch = b | 188 | self.branch = b |
189 | 189 | ||