changeset 141:a989866eead8

Make it possible to limit what branches are imported
author Sverre Rabbelier <sverre@rabbelier.nl>
date Mon, 25 May 2009 04:20:44 +0200
parents 6701ab807bf5
children ed884cfe3fa3
files git_handler.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/git_handler.py	Mon May 25 01:44:38 2009 +0200
+++ b/git_handler.py	Mon May 25 04:20:44 2009 +0200
@@ -57,6 +57,8 @@
         else:
             self.gitdir = self.repo.join('git')
 
+        self.importbranch = ui.config('git', 'importbranch')
+
         self.init_if_missing()
         self.load_git()
         self.load_map()
@@ -494,6 +496,9 @@
 
         if remote_name:
             todo = self.git.remote_refs(remote_name).values()[:]
+        elif self.importbranch:
+            branches = self.importbranch.split(',')
+            todo = [self.git.ref(i.strip()) for i in branches]
         else:
             todo = self.git.heads().values()[:]