diff options
| author | Conley Owens <cco3@android.com> | 2012-10-09 14:29:46 -0700 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2012-10-09 14:29:46 -0700 |
| commit | 3a6cd4200e42fbb5a21b3fb8d3c9738c0320cc63 (patch) | |
| tree | 68ae5094d6530453887fb35a73fd5fa55f55a034 /git_refs.py | |
| parent | 25f17682ca4ecd8acc887462d4bebc7c429cf110 (diff) | |
| parent | 8a68ff96057ec58e524a3e41a2d8dca7b5d016bc (diff) | |
| download | git-repo-3a6cd4200e42fbb5a21b3fb8d3c9738c0320cc63.tar.gz | |
Merge "Coding style cleanup"
Diffstat (limited to 'git_refs.py')
| -rw-r--r-- | git_refs.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/git_refs.py b/git_refs.py index 11241438..18c9230c 100644 --- a/git_refs.py +++ b/git_refs.py | |||
| @@ -115,10 +115,10 @@ class GitRefs(object): | |||
| 115 | 115 | ||
| 116 | line = line[:-1] | 116 | line = line[:-1] |
| 117 | p = line.split(' ') | 117 | p = line.split(' ') |
| 118 | id = p[0] | 118 | ref_id = p[0] |
| 119 | name = p[1] | 119 | name = p[1] |
| 120 | 120 | ||
| 121 | self._phyref[name] = id | 121 | self._phyref[name] = ref_id |
| 122 | finally: | 122 | finally: |
| 123 | fd.close() | 123 | fd.close() |
| 124 | self._mtime['packed-refs'] = mtime | 124 | self._mtime['packed-refs'] = mtime |
| @@ -144,18 +144,18 @@ class GitRefs(object): | |||
| 144 | try: | 144 | try: |
| 145 | try: | 145 | try: |
| 146 | mtime = os.path.getmtime(path) | 146 | mtime = os.path.getmtime(path) |
| 147 | id = fd.readline() | 147 | ref_id = fd.readline() |
| 148 | except: | 148 | except: |
| 149 | return | 149 | return |
| 150 | finally: | 150 | finally: |
| 151 | fd.close() | 151 | fd.close() |
| 152 | 152 | ||
| 153 | if not id: | 153 | if not ref_id: |
| 154 | return | 154 | return |
| 155 | id = id[:-1] | 155 | ref_id = ref_id[:-1] |
| 156 | 156 | ||
| 157 | if id.startswith('ref: '): | 157 | if ref_id.startswith('ref: '): |
| 158 | self._symref[name] = id[5:] | 158 | self._symref[name] = ref_id[5:] |
| 159 | else: | 159 | else: |
| 160 | self._phyref[name] = id | 160 | self._phyref[name] = ref_id |
| 161 | self._mtime[name] = mtime | 161 | self._mtime[name] = mtime |
