diff options
Diffstat (limited to 'git_config.py')
| -rw-r--r-- | git_config.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/git_config.py b/git_config.py index 0ad01f5ff..f3f1e5b8c 100644 --- a/git_config.py +++ b/git_config.py | |||
| @@ -28,9 +28,7 @@ import urllib.request | |||
| 28 | 28 | ||
| 29 | import error | 29 | import error |
| 30 | import git_command | 30 | import git_command |
| 31 | from git_refs import R_CHANGES | 31 | import git_refs |
| 32 | from git_refs import R_HEADS | ||
| 33 | from git_refs import R_TAGS | ||
| 34 | import platform_utils | 32 | import platform_utils |
| 35 | import repo_trace | 33 | import repo_trace |
| 36 | 34 | ||
| @@ -45,7 +43,7 @@ REVIEW_CACHE = {} | |||
| 45 | 43 | ||
| 46 | 44 | ||
| 47 | def IsChange(rev): | 45 | def IsChange(rev): |
| 48 | return rev.startswith(R_CHANGES) | 46 | return rev.startswith(git_refs.R_CHANGES) |
| 49 | 47 | ||
| 50 | 48 | ||
| 51 | def IsId(rev: str) -> bool: | 49 | def IsId(rev: str) -> bool: |
| @@ -53,7 +51,7 @@ def IsId(rev: str) -> bool: | |||
| 53 | 51 | ||
| 54 | 52 | ||
| 55 | def IsTag(rev): | 53 | def IsTag(rev): |
| 56 | return rev.startswith(R_TAGS) | 54 | return rev.startswith(git_refs.R_TAGS) |
| 57 | 55 | ||
| 58 | 56 | ||
| 59 | def IsImmutable(rev): | 57 | def IsImmutable(rev): |
| @@ -741,13 +739,13 @@ class Remote: | |||
| 741 | return rev | 739 | return rev |
| 742 | 740 | ||
| 743 | if not rev.startswith("refs/"): | 741 | if not rev.startswith("refs/"): |
| 744 | rev = R_HEADS + rev | 742 | rev = git_refs.R_HEADS + rev |
| 745 | 743 | ||
| 746 | for spec in self.fetch: | 744 | for spec in self.fetch: |
| 747 | if spec.SourceMatches(rev): | 745 | if spec.SourceMatches(rev): |
| 748 | return spec.MapSource(rev) | 746 | return spec.MapSource(rev) |
| 749 | 747 | ||
| 750 | if not rev.startswith(R_HEADS): | 748 | if not rev.startswith(git_refs.R_HEADS): |
| 751 | return rev | 749 | return rev |
| 752 | 750 | ||
| 753 | raise error.GitError( | 751 | raise error.GitError( |
