summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
Diffstat (limited to 'project.py')
-rw-r--r--project.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/project.py b/project.py
index 24254676..4f560bd6 100644
--- a/project.py
+++ b/project.py
@@ -306,6 +306,32 @@ class Project(object):
306 """ 306 """
307 return self.config.GetBranch(name) 307 return self.config.GetBranch(name)
308 308
309 def GetBranches(self):
310 """Get all existing local branches.
311 """
312 current = self.CurrentBranch
313 all = self.bare_git.ListRefs()
314 heads = {}
315 pubd = {}
316
317 for name, id in all.iteritems():
318 if name.startswith(R_HEADS):
319 name = name[len(R_HEADS):]
320 b = self.GetBranch(name)
321 b.current = name == current
322 b.published = None
323 b.revision = id
324 heads[name] = b
325
326 for name, id in all.iteritems():
327 if name.startswith(R_PUB):
328 name = name[len(R_PUB):]
329 b = heads.get(name)
330 if b:
331 b.published = id
332
333 return heads
334
309 335
310## Status Display ## 336## Status Display ##
311 337