Beispiel #1
0
    def _git_follow_url(self, git_url, heads_to_follow):
        human_name = human_name_for_git_url(git_url)
        if human_name in self:
            self.fetch_all_heads(human_name)
            current_entry = self[human_name]
        else:
            human_name = self.clone(git_url)
            current_entry = []

        current_entry_dict = dict(current_entry)
        current_entry = [pair for pair in self.get_heads_revisions(human_name) if pair[0] in heads_to_follow or pair[0] in current_entry_dict] if heads_to_follow else self.get_heads_revisions(human_name)
        self[human_name] = current_entry
        return self.git_following(None, None)
Beispiel #2
0
    def _git_follow_url(self, git_url, heads_to_follow):
        human_name = human_name_for_git_url(git_url)
        if human_name in self:
            self.fetch_all_heads(human_name)
            current_entry = self[human_name]
        else:
            human_name = self.clone(git_url)
            current_entry = []

        current_entry_dict = dict(current_entry)
        current_entry = (
            [
                pair
                for pair in self.get_heads_revisions(human_name)
                if pair[0] in heads_to_follow or pair[0] in current_entry_dict
            ]
            if heads_to_follow
            else self.get_heads_revisions(human_name)
        )
        self[human_name] = current_entry
        return self.git_following(None, None)
Beispiel #3
0
def test_git_url_name_guessing():
    assert (repo_manager.human_name_for_git_url(
        "https://github.com/errbotio/err-imagebot.git") ==
            "errbotio/err-imagebot")
Beispiel #4
0
 def test_git_url_name_guessing(self):
     self.assertEqual(repo_manager.human_name_for_git_url('https://github.com/errbotio/err-imagebot.git'),
                      'errbotio/err-imagebot')
def test_git_url_name_guessing():
    assert repo_manager.human_name_for_git_url('https://github.com/errbotio/err-imagebot.git') \
           == 'errbotio/err-imagebot'
Beispiel #6
0
 def clone(self, url):
     human_name = human_name_for_git_url(url)
     g = Git()
     g.clone(url, self.human_to_path(human_name), bare=True)
     return human_name
Beispiel #7
0
 def test_git_url_name_guessing(self):
     self.assertEqual(
         repo_manager.human_name_for_git_url(
             'https://github.com/errbotio/err-imagebot.git'),
         'errbotio/err-imagebot')
Beispiel #8
0
def test_git_url_name_guessing():
    assert repo_manager.human_name_for_git_url('https://github.com/errbotio/err-imagebot.git') \
           == 'errbotio/err-imagebot'
Beispiel #9
0
 def clone(self, url):
     human_name = human_name_for_git_url(url)
     g = Git()
     g.clone(url, self.human_to_path(human_name), bare=True)
     return human_name