Fix failure of retrieving git hash from a hg-git enabled repository#1138
Conversation
…nd improve messaging This re-integrates 3ef03cd back.
|
Uff, I just wanted to started reviewing this. |
| error_txt = "%d: %s" % (proc0.returncode, error_txt_b.decode("UTF-8").strip().lower()) | ||
|
|
||
| proc1 = Popen(['git', '--git-dir=.hg/git', 'describe', '--tags', '--always','--dirty', node], stdout=PIPE, stderr=PIPE) | ||
| proc1 = Popen(['git', '--git-dir=.hg/git', 'describe', '--long', '--tags','--always', node], stdout=PIPE, stderr=PIPE, cwd=root) |
There was a problem hiding this comment.
Thanks for the fixes, here are some notes/questions:
Why are the git flags changed? If I remember correctly I removed the -long to prevent a commit hash string on a tagged commit (the actual release).
Uncrustify-0.64 vs Uncrustify-0.64-something
The -dirty flag should not be removed as it is useful information when we receive bug reports. It could be that the uncommitted dirty changes are causing bugs.
E: Ohh I see its in the hg branch. Still wouldn't hurt right?
EE: Ok, It seems there is a problem somewhere.
Fix failure of retrieving git hash from a hg-git enabled repository ...
I am not sure why cwd=root was added. Did it cause problems without it somewhere?
There was a problem hiding this comment.
It's a special setup as I'm not under git but it's an hg repository with a git remote using hggit extension.
I'll try without --long but -dirty doesn't work in my case. It fails with a strange error (iirc something about comittish, was funny).
There was a problem hiding this comment.
I think this is the closest I ended up matching the git version but indeed, maybe some things have changed. Sorry not taking this into account.
It also improves a bit the messaging when there is a failure retrieving the hash from a VCS which can be at times confusing #1137.
This re-integrates 3ef03cd back.