-
Notifications
You must be signed in to change notification settings - Fork 863
cli: fix version test when @ has multiple parents #6311
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
base: main
Are you sure you want to change the base?
Conversation
The `jj log` command ran by the build script returns the commit IDs concatenated together, while the test expects only one ID in the version string.
|
This has hit people before (normally I don't run into it, because when I do a mega-merge I always make my |
ilyagr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This has bothered me a few times, I think it's worth the quick fix.
| "--color=never", | ||
| "log", | ||
| "--no-graph", | ||
| "-r=@-", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could be slightly more deterministic and do -r=latest(@-).
My initial idea was to include all the commits with a separator, but I guess this is simpler.
There are still many things wrong with it, e.g. it doesn't detect whether @ is non-empty, I believe, so I think the loss of precision is OK.
|
Some less actionable and more wishful thoughts. I wonder if we should implement In an ideal world, I think
It's somewhat tedious to do, though. The reason for |
There is @thoughtpolice PR which brings some of these features here, #3638 imo longterm its still the correct fix, even though nothing has happened with it for half a year. |
This makes the `test_version` test failure when run at a merge commit less confusing. The test could be fixed, but I'm not sure it's worth it, as we probably don't want to release a version of `jj` compiled at a merge commit. Admittedly, this is a bit of a quick hack, but I've been confused by `jj --version` output when compiled at a merge commit enough times to want it. Prior art: #6311 and #4033 both pick one commit id hash to print. I think I prefer printing all of them, even if it will fail tests at a merge commit. After this commit, the failure will at least be easy to understand. However, if we prefer to merge one of the others, I'm OK with that too.
This makes the `test_version` test failure when run at a merge commit less confusing. The test could be fixed, but I'm not sure it's worth it, as we probably don't want to release a version of `jj` compiled at a merge commit. Now, if `jj` is compiled at a merge commit, this would print: ``` $ jj --version jj 0.31.0-fb10a78cb359d52c0eda518a42ab07f117909004-ff9c9d0d8b4e929843eb683709fc1717645796df-99e035c5054e71906d7293ed98b542a9055057ef ``` Admittedly, this is a bit of a quick hack, but I've been confused by `jj --version` output when compiled at a merge commit enough times to want it. Prior art: #6311 and #4033 both pick one commit id hash to print. I think I prefer printing all of them, even if it will fail tests at a merge commit. After this commit, the failure will at least be easy to understand. However, if we prefer to merge one of the others, I'm OK with that too.
This makes the `test_version` test failure when run at a merge commit less confusing. The test could be fixed, but I'm not sure it's worth it, as we probably don't want to release a version of `jj` compiled at a merge commit. Now, if `jj` is compiled at a merge commit, this would print: ``` $ jj --version jj 0.31.0-fb10a78cb359d52c0eda518a42ab07f117909004-ff9c9d0d8b4e929843eb683709fc1717645796df-99e035c5054e71906d7293ed98b542a9055057ef ``` Admittedly, this is a bit of a quick hack, but I've been confused by `jj --version` output when compiled at a merge commit enough times to want it. Prior art: #6311 and #4033 both pick one commit id hash to print. I think I prefer printing all of them, even if it will fail tests at a merge commit. After this commit, the failure will at least be easy to understand. However, if we prefer to merge one of the others, I'm OK with that too.
This makes the `test_version` test failure when run at a merge commit less confusing. The test could be fixed, but I'm not sure it's worth it, as we probably don't want to release a version of `jj` compiled at a merge commit. Now, if `jj` is compiled at a merge commit, this would print: ``` $ jj --version jj 0.31.0-fb10a78cb359d52c0eda518a42ab07f117909004-ff9c9d0d8b4e929843eb683709fc1717645796df-99e035c5054e71906d7293ed98b542a9055057ef ``` Admittedly, this is a bit of a quick hack, but I've been confused by `jj --version` output when compiled at a merge commit enough times to want it. Prior art: #6311 and #4033 both pick one commit id hash to print. I think I prefer printing all of them, even if it will fail tests at a merge commit. After this commit, the failure will at least be easy to understand. However, if we prefer to merge one of the others, I'm OK with that too.
This makes the `test_version` test failure when run at a merge commit less confusing. The test could be fixed, but I'm not sure it's worth it, as we probably don't want to release a version of `jj` compiled at a merge commit. Now, if `jj` is compiled at a merge commit, this would print: ``` $ jj --version jj 0.31.0-fb10a78cb359d52c0eda518a42ab07f117909004-ff9c9d0d8b4e929843eb683709fc1717645796df-99e035c5054e71906d7293ed98b542a9055057ef ``` Admittedly, this is a bit of a quick hack, but I've been confused by `jj --version` output when compiled at a merge commit enough times to want it. Prior art: #6311 and #4033 both pick one commit id hash to print. I think I prefer printing all of them, even if it will fail tests at a merge commit. After this commit, the failure will at least be easy to understand. However, if we prefer to merge one of the others, I'm OK with that too.
This makes the `test_version` test failure when run at a merge commit less confusing. The test could be fixed, but I'm not sure it's worth it, as we probably don't want to release a version of `jj` compiled at a merge commit. Now, if `jj` is compiled at a merge commit, this would print: ``` $ jj --version jj 0.31.0-fb10a78cb359d52c0eda518a42ab07f117909004-ff9c9d0d8b4e929843eb683709fc1717645796df-99e035c5054e71906d7293ed98b542a9055057ef ``` Admittedly, this is a bit of a quick hack, but I've been confused by `jj --version` output when compiled at a merge commit enough times to want it. Prior art: #6311 and #4033 both pick one commit id hash to print. I think I prefer printing all of them, even if it will fail tests at a merge commit. After this commit, the failure will at least be easy to understand. However, if we prefer to merge one of the others, I'm OK with that too.
This makes the `test_version` test failure when run at a merge commit less confusing. The test could be fixed, but I'm not sure it's worth it, as we probably don't want to release a version of `jj` compiled at a merge commit. Now, if `jj` is compiled at a merge commit, this would print: ``` $ jj --version jj 0.31.0-fb10a78cb359d52c0eda518a42ab07f117909004-ff9c9d0d8b4e929843eb683709fc1717645796df-99e035c5054e71906d7293ed98b542a9055057ef ``` Admittedly, this is a bit of a quick hack, but I've been confused by `jj --version` output when compiled at a merge commit enough times to want it. Prior art: #6311 and #4033 both pick one commit id hash to print. I think I prefer printing all of them, even if it will fail tests at a merge commit. After this commit, the failure will at least be easy to understand. However, if we prefer to merge one of the others, I'm OK with that too.
This makes the `test_version` test failure when run at a merge commit less confusing. The test could be fixed, but I'm not sure it's worth it, as we probably don't want to release a version of `jj` compiled at a merge commit. Now, if `jj` is compiled at a merge commit, this would print: ``` $ jj --version jj 0.31.0-fb10a78cb359d52c0eda518a42ab07f117909004-ff9c9d0d8b4e929843eb683709fc1717645796df-99e035c5054e71906d7293ed98b542a9055057ef ``` Admittedly, this is a bit of a quick hack, but I've been confused by `jj --version` output when compiled at a merge commit enough times to want it. Prior art: #6311 and #4033 both pick one commit id hash to print. I think I prefer printing all of them, even if it will fail tests at a merge commit. After this commit, the failure will at least be easy to understand. However, if we prefer to merge one of the others, I'm OK with that too.
This makes the `test_version` test failure when run at a merge commit less confusing. The test could be fixed, but I'm not sure it's worth it, as we probably don't want to release a version of `jj` compiled at a merge commit. Now, if `jj` is compiled at a merge commit, this would print: ``` $ jj --version jj 0.31.0-fb10a78cb359d52c0eda518a42ab07f117909004-ff9c9d0d8b4e929843eb683709fc1717645796df-99e035c5054e71906d7293ed98b542a9055057ef ``` Admittedly, this is a bit of a quick hack, but I've been confused by `jj --version` output when compiled at a merge commit enough times to want it. Prior art: #6311 and #4033 both pick one commit id hash to print. I think I prefer printing all of them, even if it will fail tests at a merge commit. After this commit, the failure will at least be easy to understand. However, if we prefer to merge one of the others, I'm OK with that too.
This makes the `test_version` test failure when run at a merge commit less confusing. The test could be fixed, but I'm not sure it's worth it, as we probably don't want to release a version of `jj` compiled at a merge commit. Now, if `jj` is compiled at a merge commit, this would print: ``` $ jj --version jj 0.31.0-fb10a78cb359d52c0eda518a42ab07f117909004-ff9c9d0d8b4e929843eb683709fc1717645796df-99e035c5054e71906d7293ed98b542a9055057ef ``` Admittedly, this is a bit of a quick hack, but I've been confused by `jj --version` output when compiled at a merge commit enough times to want it. Prior art: #6311 and #4033 both pick one commit id hash to print. I think I prefer printing all of them, even if it will fail tests at a merge commit. After this commit, the failure will at least be easy to understand. However, if we prefer to merge one of the others, I'm OK with that too.
This makes the `test_version` test failure when run at a merge commit less confusing. The test could be fixed, but I'm not sure it's worth it, as we probably don't want to release a version of `jj` compiled at a merge commit. Now, if `jj` is compiled at a merge commit, this would print: ``` $ jj --version jj 0.31.0-fb10a78cb359d52c0eda518a42ab07f117909004-ff9c9d0d8b4e929843eb683709fc1717645796df-99e035c5054e71906d7293ed98b542a9055057ef ``` Admittedly, this is a bit of a quick hack, but I've been confused by `jj --version` output when compiled at a merge commit enough times to want it. Prior art: #6311 and #4033 both pick one commit id hash to print. I think I prefer printing all of them, even if it will fail tests at a merge commit. After this commit, the failure will at least be easy to understand. However, if we prefer to merge one of the others, I'm OK with that too.
The
jj logcommand ran by the build script returns the commit IDs concatenated together, while the test expects only one ID in the version string.Checklist
If applicable:
CHANGELOG.md