diff options
author | Shawn O. Pearce <sop@google.com> | 2009-05-29 18:38:17 -0700 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2009-05-29 18:45:20 -0700 |
commit | 3c8dea1f8d7c4257d080f9f34159cdb2fffb81e6 (patch) | |
tree | 2a5e48ce93bc913076034f88f8878e4bfffef4dc /subcmds/sync.py | |
parent | 8ad8a0e61d919e76f521f3124c91bd46fbaa84e2 (diff) | |
download | git-repo-3c8dea1f8d7c4257d080f9f34159cdb2fffb81e6.tar.gz |
Change project.revision to revisionExpr and revisionId
The revisionExpr field now holds an expression from the manifest,
such as "refs/heads/master", while revisionId holds the current
commit-ish SHA-1 of the revisionExpr. Currently that is only
filled in if the manifest points directly to a SHA-1.
Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r-- | subcmds/sync.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index c61c3bb4..9c9a3b78 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -207,17 +207,14 @@ def _VerifyTag(project): | |||
207 | warning: Cannot automatically authenticate repo.""" | 207 | warning: Cannot automatically authenticate repo.""" |
208 | return True | 208 | return True |
209 | 209 | ||
210 | remote = project.GetRemote(project.remote.name) | ||
211 | ref = remote.ToLocal(project.revision) | ||
212 | |||
213 | try: | 210 | try: |
214 | cur = project.bare_git.describe(ref) | 211 | cur = project.bare_git.describe(project.GetRevisionId()) |
215 | except GitError: | 212 | except GitError: |
216 | cur = None | 213 | cur = None |
217 | 214 | ||
218 | if not cur \ | 215 | if not cur \ |
219 | or re.compile(r'^.*-[0-9]{1,}-g[0-9a-f]{1,}$').match(cur): | 216 | or re.compile(r'^.*-[0-9]{1,}-g[0-9a-f]{1,}$').match(cur): |
220 | rev = project.revision | 217 | rev = project.revisionExpr |
221 | if rev.startswith(R_HEADS): | 218 | if rev.startswith(R_HEADS): |
222 | rev = rev[len(R_HEADS):] | 219 | rev = rev[len(R_HEADS):] |
223 | 220 | ||