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

commit -> continue leads to missing file warnings #3

Open
bdrewery opened this issue Aug 3, 2016 · 2 comments
Open

commit -> continue leads to missing file warnings #3

bdrewery opened this issue Aug 3, 2016 · 2 comments

Comments

@bdrewery
Copy link

bdrewery commented Aug 3, 2016

What is the intended next command after a mergify commit?

Using mergify start yields "merge in progress, you must 'abort' or 'continue'".

Using mergify conitnue yields the following:

[bdrewery@bdrewery-sea1][pts/5][zsh/2][Wed 08/03/2016 11:27:33 PDT][0?4&] (git)-[BR_PIPE_BSDMERGE_UPSTREAM_REFRESH|merge]- 
~/git/onefs3 % mergify commit                                                                                              
mergify: Found an in-progress merge, trying to commit                                                                      
Recorded resolution for 'sys/kern/makesyscalls.sh'.                                                                        
[BR_PIPE_BSDMERGE_UPSTREAM_REFRESH 673fb3e] Add support for COMPAT10 keywords in syscalls.master.                          
 Author: brooks                                                                                        
 Date: Wed Jun 22 21:12:53 2016 +0000                                                                                      
mergify: recording conflicts                                                                                               
[BR_PIPE_BSDMERGE_UPSTREAM_REFRESH 6686ce5] Add support for COMPAT10 keywords in syscalls.master.                          
 Author: brooks                                                                                        
 Date: Wed Jun 22 21:12:53 2016 +0000                                                                                      
mergify: commit of a11d117db18f7dc7ed2f1ff5b24a3518017f058b succeeded                                                      
[bdrewery@bdrewery-sea1][pts/5][zsh/2][Wed 08/03/2016 11:29:58 PDT][0?4&] (git)-[BR_PIPE_BSDMERGE_UPSTREAM_REFRESH]-       
~/git/onefs3 % mergify continue                                                                                            
cat: /local/ssd/bdrewery/git/onefs/.git/worktrees/onefs3/MERGIFY_CURRENT_HASH: No such file or directory                   
mergify: resuming merge at                                                                                                 
mv: cannot stat ‘/local/ssd/bdrewery/git/onefs/.git/worktrees/onefs3/MERGIFY_CURRENT_HASH’: No such file or directory      
mergify: attemping to merge e4ef2142c85cd9081fd589ffbefec3915f814669                                                       
e4ef2142c85cd9081fd589ffbefec3915f814669 Mark the pipe() system call as COMPAT10.                                          
Auto-merging sys/kern/syscalls.master                                                                                      
CONFLICT (content): Merge conflict in sys/kern/syscalls.master                                                             
Auto-merging sys/compat/freebsd32/syscalls.master                                                                          
Recorded preimage for 'sys/kern/syscalls.master'                                                                           
Automatic merge failed; fix conflicts and then commit the result.                                                          
mergify: automerge of e4ef2142c85cd9081fd589ffbefec3915f814669 unsuccessful                                                
mergify: resolve conflicts and 'continue', or 'abort'                                                                      
mergify: recording SVN revision 302094 into upstream/.base                                                                 
                                                                                                                           
mergify: sending Prowl alert                                                                                               

The problem is that MERGIFY_CURRENT_HASH was moved to MERGIFY_LAST_MERGED_HASH on mergify commit. It then tries to find it and fails with a cat warning. It then runs
hashes=git log --pretty=format:%H --reverse --first-parent ${lasthash}..${srcbranch}``
with an emptylasthashwhich results in`HEAD..${srcbranch}` and it actually continues on just fine.

If mergify commit is intended to stop then it needs to also clean up all leftover MERGIFY files as
mergify abort does. Otherwise continue needs to handle the missing file case better by avoiding the cat warning and setting a proper lasthash. mergify commit also needs to be protected against a double run.

@brooksdavis
Copy link
Owner

After mergify commit the expectation is that the user will do something mergify doesn't support (for example do a test build or amend the commit) then then the user will run mergify continue.

@bdrewery
Copy link
Author

bdrewery commented Aug 3, 2016

Great. I'll send a patch to fix the problem I'm seeing then.

@bdrewery bdrewery changed the title commit -> continue or start? commit -> continue leads to missing file warnings Aug 3, 2016
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