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

tests/tags.t output is nondeterministic #344

Closed
riastradh opened this issue Dec 15, 2024 · 2 comments
Closed

tests/tags.t output is nondeterministic #344

riastradh opened this issue Dec 15, 2024 · 2 comments

Comments

@riastradh
Copy link

I hit this failure once while running tests for #342, out of probably a dozen or two runs of the test suite:

--- tests/tags.t
+++ tests/tags.t.err
@@ -409,9 +409,9 @@
   remote: adding changesets
   remote: adding manifests
   remote: adding file changes
+  To hg::/tmp/riastradh/cramtests-wyn6pbnq/tags.t/repo
+   * [new branch]      tags -> branches/default/tip
   remote: added 0 changesets with 0 changes to 1 files
-  To hg::(.*)/tags.t/repo (re)
-   * [new branch]      tags -> branches/default/tip
 
   $ set_date
   $ git -C repo-git3 cinnabar tag -m "remove tag d" -d TAG_D

I only saw it once -- have not reproduced it.

Does part of the push finish asynchronously in the background, rather than synchronously before the git output about the results of the push?

@glandium
Copy link
Owner

This comes from this output being handled in a separate thread here: https://github.com/glandium/git-cinnabar/blob/master/src/hg_connect_stdio.rs#L258-L268 and there is no synchronization between that and sending output to git in https://github.com/glandium/git-cinnabar/blob/master/src/main.rs#L4948 or https://github.com/glandium/git-cinnabar/blob/master/src/main.rs#L4495. The only way to fix this would be to assume that git is not going to do anything with the remote after sending its import or push commands.

@glandium
Copy link
Owner

I actually found a convoluted way to make it work. Fixed in c55ffbc.

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

2 participants