-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Specify "-ib" options in "hg id" call to fix lua error on hg projects #1989
Conversation
"hg id" by itself is not specific enough and appears to only work when the current revision is not tagged and is not on the default branch. When the current revision is on the default branch and isn't the tip, there is a "attempt to concatenate field '?' (a nil value)" error. If the revision was the tip, then the branch would appear as "tip" rather than "(default)". Also, remove hg related functions which are no longer used.
@cmderdev/trusted-contributors Can anyone verify this works as stated and does not break anything. |
@b0bh00d How about you? Can you confirm this works as expected? |
FWIW, attached is a small hg repo to reproduce this issue - hg-test.zip And here some output from Cmder 1.3.8.793 and hg 4.8.1
The above output shows that the current |
It's not exactly the same thing.
whereas
only after including the file in the repo, the output changes:
|
If |
On 12/20/2018 11:52 PM, Su-Shing Chen wrote:
If |hg id|doesn't give the information that |hg status|provides, then
perhaps we should revert #1834
<#1834>completely. Thoughts on this?
I was going for speed. "hg status" processes /all/pending changes in a repo,
and can produces tons of useless output just to reach a point where you know
whether or not there /are/pending changes.
"hg id" tells you with far less overhead whether or not there are pending
changes, and thus, if the prompt should reflect that.
It's not exactly the same thing. |hg status|shows new files (not added to
the repository):
Technically, those are "unmanaged" files, not "new" files; the latter being
files that have been added to the repository, but not yet committed. You
could literally have tens of thousands of "unmanaged" files in a repo (think
object files) that "hg status" would have to plow through and report in the
output in order to reach the end.
Again, speed. I don't want to wait 60 seconds for my prompt to come back
after executing *every single command *(or just hitting the "Enter" key)
because "hg status" is plowing through every single file in the repository
root, managed, changed, added or generated.
As for the Lua issue, I'll try to look at it after the holidays (apologies for
the late reply; I had to button up the next major release of LightWave 3D).
|
If that's the case, then I think adding the |
Obsolete now that we merged #2002 right? |
I guess so, though I don't quite understand why the additional changes were required from my quick test. This PR also deletes code that is no longer used but I'll leave it to you guys to decide what you want to do with that. Thanks. |
"hg id" by itself is not specific enough and appears to only work when the current revision is not tagged and is not on the default branch. When the current revision is on the default branch and isn't the tip, there is a "attempt to concatenate field '?' (a nil value)" error. If the revision was the tip, then the branch would appear as "tip" rather than "(default)".
Also, remove hg related functions which are no longer used.
This resolves #1978 and builds on some of the work done in #1834.