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

validate fails with commit hash #271

Open
FabienDanieau opened this issue Feb 29, 2024 · 4 comments
Open

validate fails with commit hash #271

FabienDanieau opened this issue Feb 29, 2024 · 4 comments

Comments

@FabienDanieau
Copy link

With the example file repos.test :

repositories:
  vcs:
    type: git
    url: https://github.com/dirk-thomas/vcstool.git
    version: daf389377310f7f31b2171f51a79af82c31bf3e2

The validate command fails

$ vcs validate --input repos.test
=== vcs (git) ===
Invocation of command 'validate' on client 'git' failed: UnboundLocalError: cannot access local variable 'version_type' where it is not associated with a value (/usr/lib/python3/dist-packages/vcstool/clients/git.py:744)

While a clone works just fine

$ vcs import --input repos.test test/
=== test/vcs (git) ===
Clonage dans '.'...
Note : basculement sur 'daf389377310f7f31b2171f51a79af82c31bf3e2'.

Note that the validate works with tags if the commit hash is changed by 0.3.0

$ vcs validate --input repos.test
=== vcs (git) ===
Found git repository 'https://github.com/dirk-thomas/vcstool.git' with tag '0.3.0'
@christophebedard
Copy link
Contributor

#239 might fix this. Can you try it out? You should be able to install the version from that PR like this:

pip3 install git+https://github.com/furushchev/vcstool@fix-validate-git-hash

@FabienDanieau
Copy link
Author

#239 might fix this. Can you try it out? You should be able to install the version from that PR like this:

pip3 install git+https://github.com/furushchev/vcstool@fix-validate-git-hash

Yes it works thank you. Any plan to merge this soon?

@christophebedard
Copy link
Contributor

I don't know. vcstool is in no/low maintenance mode (see #242), so I don't know when that will get merged.

@MaxandreOgeret
Copy link

MaxandreOgeret commented Aug 25, 2024

This was solved in vcstool2, my fork of vcs.

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

No branches or pull requests

3 participants