[Bioc-devel] Unable to Push Error

Robert Castelo robert@c@@te|o @end|ng |rom up|@edu
Wed Feb 2 09:02:03 CET 2022


https://xkcd.com/1597 :)

On 2/1/22 23:42, James W. MacDonald wrote:
> Hi Max,
>
> The issue is a merge conflict with what you have on your local repository (and your GitHub) and what is on the Bioconductor server. So cloning your Github repo locally and looking for the <<< won’t help because the merge problems happen after that fact. It’s a difference between what is on the Bioc devel repo and your local. In other words, there is probably some commit on the Bioconductor repo that is ahead of your local commit, so when you try to push you get the merge error.
>
> I find Git to be completely mysterious, and all the things like cherry picking and whatnot never seem to work for me, so I just keep it simple. I have had problems like this before and my simple stupid solution is to consider the Bioconductor repo the gold standard and start with that. I have a particular directory on my local computer that has all my repos, so I first move my updated, local repo somewhere else. I then clone the Bioconductor repo in my normal ‘repo’ directory and copy the updated files from my updated repo (that I moved) into the newly cloned repo. After moving all the updated files into the new cloned repo I can then push the changes to the Bioconductor git repo without problems.
>
> This often causes problems with my GitHub repo, so I just go on GitHub, delete the repository, generate a new blank one, and then push my ‘fixed’ repo.
>
> I am sure there are way more sophisticated ways to fix things using cherry pick and whatnot, but I have never been able to get that to work and I find reading about Git to be both confusing and boring in the same measure, so I would rather just burn things to the ground and start over.
>
> Nitesh is the local Git expert, and he will probably have some suggestions that are not so dumb and brute force.
>
> Best,
>
> Jim
>
>
>
> From: McGrath, Max <MAX.MCGRATH using UCDENVER.EDU>
> Sent: Tuesday, February 01, 2022 4:22 PM
> To: James W. MacDonald <jmacdon using uw.edu>
> Cc: Hervé Pagès <bioc-devel using r-project.org>
> Subject: Re: [Bioc-devel] Unable to Push Error
>
> Hi Jim,
>
> Thanks for looking at this. The GitHub repo I've referenced is even with my local master branch (when I push I get the message "Everything up-to-date" with working tree clean), and you can see that I merged the most recent version bump in the commit history here: https://github.com/max-mcgrath/discordant/commit/bb3b4761b241d7eb5002b5342dfec2068772eb84. I did bump the DESCRIPTION version number to 1.19.1 to trigger a rebuild when I push, but I did so after I merged the October 1.19.0 bump. I've also tried pushing from a fresh clone of the GitHub repo (after syncing with BIOC), all with the same results. When I pull from BIOC master, I receive the message "Already up to date", and then the push fails. I've searched my local repository thoroughly for long strings of "<", "=", and ">" using both visual inspection and terminal commands like "grep -r "<<<<<<<" * .[^.]​*" but have been unable to locate any merge conflicts. I apologize if I'm missing something obvious here, but as far as I can tell all remote commits have been merged locally (and on the GitHub remote), so I'm at a loss.
>
> I'm not that experienced with python, but it appears that the pre-receive hook defined here https://github.com/Bioconductor/git-hooks/blob/master/prevent_merge_markers.py searches the git diff between the BIOC version and the new version for the string "<<<<<<< HEAD" (lines 93-96 and 67-77), and that string does appear in the git diff between the current BIOC version and my local copy (or a fresh clone of the GitHub repo) due to the deleted file containing the merge conflict. I've attempted a reproducible example below (for UNIX systems), but I'm pretty far out of my wheelhouse so I can provide any additional information if needed to resolve this issue.
>
>
> git clone git using github.com:max-mcgrath/discordant.git<mailto:git using github.com:max-mcgrath/discordant.git>
>
> cd discordant
>
> git diff -G "<<<<<<< HEAD" bb3b4761b241d7eb5002b5342dfec2068772eb84..1523b91eddb0bc46403438389a108e66efdb5c4e
>
>
>
> Again, I apologize if I'm missing something obvious, but I've been trying to resolve this issue for some time and am at a dead end.
>
>
>
> Thanks,
>
> Max
>
>
>
>
>
>
> ________________________________
> From: James W. MacDonald <jmacdon using uw.edu<mailto:jmacdon using uw.edu>>
> Sent: Tuesday, February 1, 2022 9:51 AM
> To: McGrath, Max <MAX.MCGRATH using UCDENVER.EDU<mailto:MAX.MCGRATH using UCDENVER.EDU>>; Hervé Pagès <bioc-devel using r-project.org<mailto:bioc-devel using r-project.org>>
> Subject: RE: [Bioc-devel] Unable to Push Error
>
> [External Email - Use Caution]
>
> The error you are seeing has to do with the files in your local repository, not what's on either GitHub or the Bioconductor repository.
>
> Usually this happens when you haven't first pulled any commits on the remote repositories before you make changes locally. For example, you could have version 1.2.0 or whatever, and the devel version on Bioconductor might be at 1.3.0, because it's meant to be an odd middle number. If that were true, then in the DESCRIPTION file in your local repository you would see the version line bracketed with a bunch of <<<<<<<<<<<<<<<<<< to indicate where the merge conflict arose.
>
> That's probably likely, as this is what is on Bioconductor:
>
> Package: discordant
> Version: 1.19.0
> Date: 2016-10-21
>
> And on your GitHub it's 1.19.1
>
> Best,
>
> Jim
>
>
>
> -----Original Message-----
> From: Bioc-devel <bioc-devel-bounces using r-project.org<mailto:bioc-devel-bounces using r-project.org>> On Behalf Of McGrath, Max
> Sent: Tuesday, February 01, 2022 11:01 AM
> To: Hervé Pagès <bioc-devel using r-project.org<mailto:bioc-devel using r-project.org>>
> Subject: [Bioc-devel] Unable to Push Error
>
> Hi all,
>
> I am the new maintainer for the package "discordant" and have an update I am trying to push to BIOC devel. However, after fetching and merging the version on BIOCs master branch, when I try to push I get the error:
>
>
> remote: Error: You cannot push without resolving merge conflicts.
>
> remote:
>
> remote: Please check the files in the commit pushed to the git-server
>
> remote: for merge conflict markers like '<<<<<<<', '========', '>>>>>>>'.
>
> remote:
>
> To git.bioconductor.org:packages/discordant
>
>   ! [remote rejected] master -> master (pre-receive hook declined)
>
> error: failed to push some refs to 'git.bioconductor.org:packages/discordant'
>
>
> Now, I've checked the files in the most updated version of the package (available at https://github.com/max-mcgrath/discordant ) both "manually" and with grep for the "<<<<<<< HEAD" string specified in BIOC's pre-receive hooks with no results. I do, however, get a result with the old version of the package currently available on BIOC. An unmerged commit was left in the old vignette when the package was made available on BIOC five years ago, see lines 104-108 here: https://github.com/siskac/discordant/blob/master/vignettes/Discordant_vignette.Rnw#L104 . I deleted this file during the update (switched to .Rmd), however it seems to still be causing issues (see deletion commit here: https://github.com/max-mcgrath/discordant/commit/f747838c6969bca4b63dd7f7d37ab458ac588812 ).
>
>
> I'm not positive this is the problem, but if it is I have no clue how to fix it. I'm hoping someone here could lend some insight into the source of this issue and a potential solution.
>
>
> Thank you for your time,
>
>
> Max
>
>
>
>
>          [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioc-devel using r-project.org<mailto:Bioc-devel using r-project.org> mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioc-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

-- 
Robert Castelo, PhD
Associate Professor
Dept. of Experimental and Health Sciences
Universitat Pompeu Fabra (UPF)
Barcelona Biomedical Research Park (PRBB)
Dr Aiguader 88
E-08003 Barcelona, Spain
telf: +34.933.160.514
fax: +34.933.160.550



More information about the Bioc-devel mailing list