##// END OF EJS Templates
fixed fetch command for git repos, now it properly fetches from remotes
marcink -
r3157:a73aca20 beta
parent child Browse files
Show More
@@ -606,10 +606,13 b' class GitRepository(BaseRepository):'
606 Tries to pull changes from external location.
606 Tries to pull changes from external location.
607 """
607 """
608 url = self._get_url(url)
608 url = self._get_url(url)
609 cmd = ['fetch']
609 so, se = self.run_git_command('ls-remote %s' % url)
610 cmd.append(url)
610 refs = []
611 cmd = ' '.join(cmd)
611 for line in (x for x in so.splitlines()):
612 # If error occurs run_git_command raises RepositoryError already
612 sha, ref = line.split('\t')
613 refs.append(ref)
614 refs = ' '.join(('+%s:%s' % (r, r) for r in refs))
615 cmd = '''ls-remote -h %s %s''' % (url, refs)
613 self.run_git_command(cmd)
616 self.run_git_command(cmd)
614
617
615 @LazyProperty
618 @LazyProperty
General Comments 0
You need to be logged in to leave comments. Login now