From 3c8dea1f8d7c4257d080f9f34159cdb2fffb81e6 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Fri, 29 May 2009 18:38:17 -0700 Subject: 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 --- subcmds/sync.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'subcmds/sync.py') 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): warning: Cannot automatically authenticate repo.""" return True - remote = project.GetRemote(project.remote.name) - ref = remote.ToLocal(project.revision) - try: - cur = project.bare_git.describe(ref) + cur = project.bare_git.describe(project.GetRevisionId()) except GitError: cur = None if not cur \ or re.compile(r'^.*-[0-9]{1,}-g[0-9a-f]{1,}$').match(cur): - rev = project.revision + rev = project.revisionExpr if rev.startswith(R_HEADS): rev = rev[len(R_HEADS):] -- cgit v1.2.3-54-g00ecf