Skydio / revup

Effortlessly create and manage pull requests without changing branches. Powers a stacked diffs workflow with python and git "plumbing" commands.
https://github.com/Skydio/revup
MIT License
310 stars 61 forks source link

[Need Help] Upload failed with "E: UNPROCESSABLE" (but actually uploaded?) #89

Closed myocytebd closed 8 months ago

myocytebd commented 1 year ago

I was trying to uploading several dependent commits and ran into "E: UNPROCESSABLE" errors.

Version: 0.1.5 (from pip)

  1. I tries to upload all and ran into confliction: You must specify relative branches to prevent this conflict!.
    It is normal, but revup stores metadata in commits -- that is to rollback and amend commits chain. It would be better if revup can take metadata from other sources like command line.

  2. So I created a branch, set to the commit before the confliction, but got error. (with fork; --trim-tags)

    $ revup upload
    ...
    E: UNPROCESSABLE: Head sha can't be blank, Base sha can't be blank, No commits between master and 9634838+myocytebd/revup/master/JComic.impl, Head ref must be a branch                                    
    E: UNPROCESSABLE: Head sha can't be blank, Base sha can't be blank, No commits between master and 9634838+myocytebd/revup/master/proxy.switch, Head ref must be a branch                                   
    E: UNPROCESSABLE: Head sha can't be blank, Base sha can't be blank, No commits between master and 9634838+myocytebd/revup/master/ui.download_confirmation, Head ref must be a branch                       
    E: UNPROCESSABLE: Head sha can't be blank, Base sha can't be blank, No commits between master and 9634838+myocytebd/revup/master/paste, Head ref must be a branch                                          
    W: 4 operations failed! 

    Looking at github web ui, it seems that the commits are already uploaded to github.
    e.g. https://github.com/manga-download/hakuneko/compare/master...myocytebd:hakuneko-tmp:9634838+myocytebd/revup/master/proxy.switch Is something wrong with the upload?

  3. Then I try to amend and upload the conflicted commit with relative branch.
    revup probably treats previous 4 commit uploads failed and re-upload them. So revup tries to upload 5 commits, and got 5 "E: UNPROCESSABLE:".

    $ revup upload
    E: UNPROCESSABLE: Head sha can't be blank, Base sha can't be blank, No commits between master and 9634838+myocytebd/revup/master/JComic.impl, Head ref must be a branch                                    
    E: UNPROCESSABLE: Head sha can't be blank, Base sha can't be blank, No commits between master and 9634838+myocytebd/revup/master/proxy.switch, Head ref must be a branch                                   
    E: UNPROCESSABLE: Head sha can't be blank, Base sha can't be blank, No commits between master and 9634838+myocytebd/revup/master/ui.download_confirmation, Head ref must be a branch                       
    E: UNPROCESSABLE: Head sha can't be blank, Base sha can't be blank, No commits between master and 9634838+myocytebd/revup/master/paste, Head ref must be a branch                                          
    E: UNPROCESSABLE: Head sha can't be blank, Base sha can't be blank, No commits between 9634838+myocytebd/revup/master/paste and 9634838+myocytebd/revup/master/batch_download, Head ref must be a branch,  
    Base ref must be a branch                                                                                                                                                                               
    W: 5 operations failed!   

    Looking at github web ui, it seems that the commit is uploaded to github.
    https://github.com/myocytebd/hakuneko-tmp/tree/9634838+myocytebd/revup/master/batch_download

Log: https://pastebin.com/cfhzTxUt

jerry-skydio commented 1 year ago

This is because your git user is configured as "9634838+myocytebd" which probably comes from your email. revup creates branches using your email name + branch name + topic name, but its not accounting for characters that are valid in emails but not valid in git branches. I recommend you work around this for now by configuring an email that doesn't contain special characters.

for reference see https://docs.github.com/en/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names



The English alphabet (a to z and A to Z)
Numbers (0 to 9)
A limited set of punctuation characters:
period (.)
hyphen (-)
underscore (_)
forward slash (/)
To avoid confusion, you should start branch names with a letter.```