コード例 #1
0
 def __init__(self, *args):
     """
     Initialize git client to None (will be set later)
     All the real logic is in the setup_repo and create_working_copy methods
     """
     self.client = None
     FileRepository.__init__(self, *args)
コード例 #2
0
 def __init__(self, *args):
     """
     Initialize git client to None (will be set later)
     All the real logic is in the setupRepo and createWorkingCopy methods
     """
     self.client = None
     FileRepository.__init__(self, *args)
コード例 #3
0
ファイル: hgrepo.py プロジェクト: ULHPC/easybuild-framework
 def __init__(self, *args):
     """
     Initialize mercurial client to None (will be set later)
     All the real logic is in the setup_repo and create_working_copy methods
     """
     self.client = None
     FileRepository.__init__(self, *args)
コード例 #4
0
    def test_filerepo(self):
        """Test using FileRepository."""
        repo = FileRepository(self.path)
        repo.init()
        self.assertEqual(repo.wc, self.path)

        subdir = 'sub/dir'
        repo = FileRepository(self.path, subdir)
        repo.init()
        self.assertEqual(repo.wc, self.path)
        self.assertEqual(repo.subdir, subdir)
コード例 #5
0
ファイル: hgrepo.py プロジェクト: ULHPC/easybuild-framework
 def add_easyconfig(self, cfg, name, version, stats, append):
     """
     Add easyconfig to mercurial repository.
     """
     dest = FileRepository.add_easyconfig(self, cfg, name, version, stats, append)
     # add it to version control
     if dest:
         try:
             self.client.add(dest)
         except (HgCommandError, HgServerError, HgResponseError, ValueError), err:
             self.log.warning("adding %s to mercurial repository failed: %s" % (dest, err))
コード例 #6
0
 def add_easyconfig(self, cfg, name, version, stats, append):
     """
     Add easyconfig to git repository.
     """
     dest = FileRepository.add_easyconfig(self, cfg, name, version, stats, append)
     # add it to version control
     if dest:
         try:
             self.client.add(dest)
         except GitCommandError, err:
             self.log.warning("adding %s to git failed: %s" % (dest, err))
コード例 #7
0
 def add_easyconfig(self, cfg, name, version, stats, append):
     """
     Add easyconfig to git repository.
     """
     dest = FileRepository.add_easyconfig(self, cfg, name, version, stats, append)
     # add it to version control
     if dest:
         try:
             self.client.add(dest)
         except GitCommandError, err:
             self.log.warning("adding %s to git failed: %s" % (dest, err))
コード例 #8
0
 def add_easyconfig(self, cfg, name, version, stats, append):
     """
     Add easyconfig to mercurial repository.
     """
     dest = FileRepository.add_easyconfig(self, cfg, name, version, stats, append)
     # add it to version control
     if dest:
         try:
             self.client.add(dest)
         except (HgCommandError, HgServerError, HgResponseError, ValueError), err:
             self.log.warning("adding %s to mercurial repository failed: %s" % (dest, err))
コード例 #9
0
    def add_easyconfig(self, cfg, name, version, stats, append):
        """
        Add easyconfig to SVN repository.
        """
        dest = FileRepository.add_easyconfig(self, cfg, name, version, stats, append)
        self.log.debug("destination = %s" % dest)
        if dest:
            self.log.debug("destination status: %s" % self.client.status(dest))

            if self.client and not self.client.status(dest)[0].is_versioned:
                # add it to version control
                self.log.debug("Going to add %s (working copy: %s, cwd %s)" % (dest, self.wc, os.getcwd()))
                self.client.add(dest)
コード例 #10
0
    def test_filerepo(self):
        """Test using FileRepository."""
        repo = FileRepository(self.path)
        repo.init()
        self.assertEqual(repo.wc, self.path)

        subdir = 'sub/dir'
        repo = FileRepository(self.path, subdir)
        repo.init()
        self.assertEqual(repo.wc, self.path)
        self.assertEqual(repo.subdir, subdir)
コード例 #11
0
 def __init__(self, *args):
     """
     Set self.client to None. Real logic is in setup_repo and create_working_copy
     """
     self.client = None
     FileRepository.__init__(self, *args)
コード例 #12
0
 def __init__(self, *args):
     """
     Set self.client to None. Real logic is in setup_repo and create_working_copy
     """
     self.client = None
     FileRepository.__init__(self, *args)