Beispiel #1
0
 def __init__(self, root, remote_uri, branch='develop', reset=False):
     if reset:
         if os.path.exists(root):
             shutil.rmtree(root)
     if not os.path.isdir(root):
         dulwich.file.ensure_dir_exists(root)
         controldir = os.path.join(root, ".git")
         os.mkdir(controldir)
         Repo._init_maybe_bare(controldir, False)
     Repo.__init__(self,root)
     self.remote_uri = remote_uri
     self.client, self.host_path = get_transport_and_path(self.remote_uri)
     self.want_branch = branch
     self.want_reset = reset
     print "#  Remote repo %s @ %s => %s"%(self.remote_uri,self._branch_ref(),self.path)