[Bioc-devel] Pre-receive hook on git.bioconductor.org to prevent merge conflict markers enabled

Pages, Herve hp@ge@ @end|ng |rom |redhutch@org
Sat May 11 22:49:22 CEST 2019


I worked around this by replacing my ===== lines with -------- lines.

Note that you cannot exclude the possibility that legit code contains things like ======= or <<<<<<< so whatever regex the hook is using at the moment should probably be made more stringent in order to avoid these false positives.

Thanks,

H.


On 5/11/19 13:37, Pages, Herve wrote:

Hi Nitesh,

I'm running into some problems today when trying to push a commit to BiocGenerics:

  hpages using spectre:~/git.bioconductor.org/software/BiocGenerics$<mailto:hpages using spectre:~/git.bioconductor.org/software/BiocGenerics$> git remote -v
  origin    git using git.bioconductor.org:packages/BiocGenerics.git<mailto:git using git.bioconductor.org:packages/BiocGenerics.git> (fetch)
  origin    git using git.bioconductor.org:packages/BiocGenerics.git<mailto:git using git.bioconductor.org:packages/BiocGenerics.git> (push)

  hpages using spectre:~/git.bioconductor.org/software/BiocGenerics$<mailto:hpages using spectre:~/git.bioconductor.org/software/BiocGenerics$> git status
  On branch master
  Your branch is ahead of 'origin/master' by 1 commit.
    (use "git push" to publish your local commits)
  nothing to commit, working directory clean

  hpages using spectre:~/git.bioconductor.org/software/BiocGenerics$<mailto:hpages using spectre:~/git.bioconductor.org/software/BiocGenerics$> git push
  Counting objects: 12, done.
  Delta compression using up to 8 threads.
  Compressing objects: 100% (12/12), done.
  Writing objects: 100% (12/12), 2.69 KiB | 0 bytes/s, done.
  Total 12 (delta 7), reused 1 (delta 0)
  remote: Error: You cannot commit without resolving merge conflicts.
  remote: Unresolved merge conflicts in these files:
  remote: R/mean.R, R/t.R
  To git using git.bioconductor.org:packages/BiocGenerics.git<mailto:git using git.bioconductor.org:packages/BiocGenerics.git>
   ! [remote rejected] master -> master (pre-receive hook declined)
  error: failed to push some refs to 'git using git.bioconductor.org:packages/BiocGenerics.git<mailto:git using git.bioconductor.org:packages/BiocGenerics.git>'

I don't see merge conflicts in these files though:

  hpages using spectre:~/git.bioconductor.org/software/BiocGenerics$<mailto:hpages using spectre:~/git.bioconductor.org/software/BiocGenerics$> cat R/mean.R
  ### =========================================================================
  ### The mean() generic
  ### -------------------------------------------------------------------------
  ###

  setGeneric("mean")

  hpages using spectre:~/git.bioconductor.org/software/BiocGenerics$<mailto:hpages using spectre:~/git.bioconductor.org/software/BiocGenerics$> cat R/t.R
  ### =========================================================================
  ### The t() generic
  ### -------------------------------------------------------------------------
  ###

  setGeneric("t")

Can you help? Thanks!

H.


On 5/10/19 09:03, Turaga, Nitesh wrote:

Dear Maintainers,

A new "pre-receive hook" on git.bioconductor.org server has been enabled to keep the repositories in good shape. The new hook prevents "merge conflict markers". Please note that the hook is now enabled as of 11:45 AM May 10th 2019.

Git merges sometimes result in conflicts within files which lead to markers like

        • <<<<<<< HEAD
        • =======
        • >>>>>>> new_branch

These cause issues for the repository and leave it in a bad state. We've noticed a few repositories with such issues over the last release.

If any of you notice issues/errors in your "push" to the bioconductor git server as a result of this hook, please let me know. Note that, the hook acts as the first defense against bad commits, before our other hooks come into play.

The hook will allow all commits to go through if there are no merge conflict markers. For more information on this, check our documentation on our website, https://urldefense.proofpoint.com/v2/url?u=http-3A__bioconductor.org_developers_how-2Dto_git_resolve-2Dconflicts_&d=DwIGaQ&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=qid2ArsLYpg_q85nYw_AMhLvNlH5eFEfOJwfF2x2FF0&s=PsdZ3g55BPew_TUsGI7pZ2lo47yYEeQuw_AnVrgDrfo&e=. Other resources,

1. What are merge conflicts -  https://urldefense.proofpoint.com/v2/url?u=https-3A__www.atlassian.com_git_tutorials_using-2Dbranches_merge-2Dconflicts&d=DwIGaQ&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=qid2ArsLYpg_q85nYw_AMhLvNlH5eFEfOJwfF2x2FF0&s=Ihr5SU83Z1Qr9vfxTHhxE5Zdvn65rlMe-472crxPrb8&e=

2. Resolving merge conflicts - https://urldefense.proofpoint.com/v2/url?u=https-3A__help.github.com_en_articles_resolving-2Da-2Dmerge-2Dconflict-2Dusing-2Dthe-2Dcommand-2Dline&d=DwIGaQ&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=qid2ArsLYpg_q85nYw_AMhLvNlH5eFEfOJwfF2x2FF0&s=8Wa9lQ_di5auvcBw1AwQsK4DgDODW6MBjvES5FO3vrk&e=

Best,

Nitesh Turaga
Bioconductor Core Team



This email message may contain legally privileged and/or confidential information.  If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or use of this email message is prohibited.  If you have received this message in error, please notify the sender immediately by e-mail and delete this email message from your computer. Thank you.

--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages using fredhutch.org<mailto:hpages using fredhutch.org>
Phone:  (206) 667-5791
Fax:    (206) 667-1319


--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages using fredhutch.org<mailto:hpages using fredhutch.org>
Phone:  (206) 667-5791
Fax:    (206) 667-1319


	[[alternative HTML version deleted]]



More information about the Bioc-devel mailing list