Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When project revision is a tag, ToLocal() incorrectly converts to refs/remotes/... #192

Open
GoogleCodeExporter opened this issue Apr 8, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Affected Version: v1.12.16
Environment: Ubuntu 14.04.1, git 2.1.3

To reproduce:
1. Modify project revision in manifest.xml to be a tag
2. repo init -m manifest.xml

Expected output:
Fetching project <project name>
Fetching projects: 100%

Instead I see:
Fetching project <project name>
error: in `sync`: revision <revision name> in <project name> not found

Tracing through .repo/repo/project.py, I found that GetRevisionId() is 
transforming self.revisionExpr with Remote.ToLocal(). In my case, this 
produces: '<revision name>' -> 'refs/remotes/<remote name>/<revision name>', 
which is not found in the all_refs dictionary. However the dictionary *does* 
have the tag in question, formatted as 'refs/tags/<revision name>'.

I'm pretty sure the "bug" is really in Remote.ToLocal(), but I've found a 
work-around that works for me is to manually prepend 'refs/remotes/' (using the 
R_TAGS global) to self.revisionExpr and trying again to find it in all_tags. 
See attached patch.

Original issue reported on code.google.com by j...@sroz.net on 14 Jan 2015 at 12:54

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant