Ejemplo n.º 1
0
 def __init__(self, bus, path):
     self.bus = bus
     self.remotes = {}
     self._boxes = {}
     self.must_be_sync = threading.Event()
     Repo.__init__(self, path)
     dbus.service.Object.__init__(
         self, bus, "%s/%s_%s" %
         (BUS_PATH,
          dbus_clean_name(os.path.splitext(
              os.path.basename(path))[0]), dbus_uuid()))
     self.syncer = Syncer(self)
Ejemplo n.º 2
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)