Show More
@@ -944,17 +944,22 b' class GitRemote(RemoteBase):' | |||
|
944 | 944 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
945 | 945 | region = self._region(wire) |
|
946 | 946 | |
|
947 | head = self.head(wire) | |
|
948 | ||
|
947 | 949 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
948 | 950 | def _children(_repo_id, _commit_id): |
|
951 | ||
|
949 | 952 | output, __ = self.run_git_command( |
|
950 | wire, ['rev-list', '--all', '--children']) | |
|
953 | wire, ['rev-list', '--all', '--children', f'{commit_id}^..{head}']) | |
|
951 | 954 | |
|
952 | 955 | child_ids = [] |
|
953 |
pat = re.compile(r'^ |
|
|
954 | for l in output.splitlines(): | |
|
955 |
|
|
|
956 | found_ids = l.split(' ')[1:] | |
|
956 | pat = re.compile(r'^{}'.format(commit_id)) | |
|
957 | for line in output.splitlines(): | |
|
958 | line = safe_str(line) | |
|
959 | if pat.match(line): | |
|
960 | found_ids = line.split(' ')[1:] | |
|
957 | 961 | child_ids.extend(found_ids) |
|
962 | break | |
|
958 | 963 | |
|
959 | 964 | return child_ids |
|
960 | 965 | return _children(repo_id, commit_id) |
General Comments 0
You need to be logged in to leave comments.
Login now