[Bioc-devel] Duplicate commit error on and off

Turaga, Nitesh Nitesh.Turaga at RoswellPark.org
Fri Sep 8 15:34:04 CEST 2017


Hi Thomas,

So, you do actually have a “duplicate” commit and you should NOT be pushing this to the bioc-git server. Notice that the body of both those commits is the same. 

If you want to check the rest of your commit history, please try `git log - -oneline` . And you will see that you will have multiple duplicate commits. This compromises your commit history on both your Github repo, and on the bioc-git server.

As suggested in the error message,

remote: Take a look at the documentation to fix this,
remote: https://bioconductor.org/developers/how-to/git/sync-existing-repositories/,
	     particularly, point  #8 (force Bioconductor master to Github master).

I would advice you to take a look at that. If you have other thoughts on how to solve this problem, I’d be happy to listen.

Best,

Nitesh



> On Sep 7, 2017, at 11:02 PM, Thomas Girke <thomas.girke at ucr.edu> wrote:
> 
> Sure, it’s pretty long but here it is:
> 
> git show 8210e1e04e8dc6819b84820077293d8d61914cf5
> commit 8210e1e04e8dc6819b84820077293d8d61914cf5
> Author: Kevin Horan <
> khoran at cs.ucr.edu
> >
> Date:   Fri Jun 
> 30 21:37:15 2017 +0000
> 
> 
>     fix 
> for RSQLite 2
> 
> 
>     git-svn-id: file:///home/git/
> hedgehog.fhcrc.org/bioconductor/branches/RELEASE_3_5/madman/Rpacks/ChemmineR at 130824 bc3139a8-67e5-0310
> -9ffc-ced21a209358
> 
> diff --git a/DESCRIPTION b/DESCRIPTION
> index 4b4d514..c96da6e 
> 100644
> 
> --- a/DESCRIPTION
> +++ b/DESCRIPTION
> @@ -
> 1,8 +1,8
>  @@
>  Package: ChemmineR
>  Type: Package
>  Title: Cheminformatics Toolkit 
> for
>  R
> -Version: 
> 2.28.0
> 
> -Date: 
> 2016-11-30
> 
> +Version: 
> 2.28.1
> 
> +Date: 
> 2017-6-30
> 
>  Author: Y. Eddie Cao, Kevin Horan, Tyler Backman, Thomas Girke
>  Maintainer: Thomas Girke <
> thomas.girke at ucr.edu
> >
>  Description: ChemmineR is a cheminformatics package 
> for analyzing drug-like small molecule data in R. Its latest version contains functions for
>  efficient processing of large numbers of molecules, physicochemical
> diff --git a/R/compound_db.R b/R/compound_db.R
> index 76d1f6c..970c4a2 
> 100644
> 
> --- a/R/compound_db.R
> +++ b/R/compound_db.R
> @@ -
> 38,7 +38,7 @@ initDb <- function
> (handle){
>                                                           collapse=
> ""),";",fixed=TRUE
> ))
>                 
> #print(statements)
> 
> 
> -               Map(
> function
> (sql) dbOp(dbGetQuery(conn,sql)),statements)
> +               Map(
> function
> (sql) dbOp(dbExecute(conn,sql)),statements)
>         }
>         conn
>  }
> @@ -
> 54,7 +54,7 @@ dbTransaction <- function
> (conn,expr){
>                 
> # be paranoid about setting this as bad things will happen if its not set
> 
>                 enableForeignKeys(conn)
> 
> -               dbGetQuery(conn,
> "BEGIN TRANSACTION"
> )
> +               dbExecute(conn,
> "BEGIN TRANSACTION"
> )
>                 ret=expr
>                 dbCommit(conn)
>                 ret
> @@ -
> 64,8 +64,11 @@ dbTransaction <- function
> (conn,expr){
>                 
> stop(paste("db error inside transaction: "
> ,e$message))
>         })
>  }
> 
> -dbGetQueryChecked <- 
> function(conn,statement,...
> ){
> -       ret=dbGetQuery(conn,statement)
> +dbGetQueryChecked <- 
> function(conn,statement,execute=FALSE,...
> ){
> +       
> if(execute == TRUE
> )
> +               ret=dbExecute(conn,statement)
> +       
> else
> 
> 
> +               ret=dbGetQuery(conn,statement)
>         err=dbGetException(conn)
>         
> if(err$errorMsg[1] != "OK"
> )
>                 
> stop("error in dbGetQuery: ",err$errorMsg,"  "
> ,traceback())
> @@ -
> 895,10 +898,10 @@ createFeature <- function
> (conn,name, isNumeric){
>         dbGetQueryChecked(conn,
>                 paste(
> "CREATE TABLE feature_",name,
> " (
>                         compound_id INTEGER PRIMARY KEY REFERENCES compounds(compound_id) ON DELETE CASCADE ON UPDATE CASCADE, "
> ,
> -                       
> "",name," ",sqlType," )",sep=""
> ))
> +                       
> "",name," ",sqlType," )",sep=""),execute=TRUE
> )
> 
>         
> #print("made table")
> 
> -       dbGetQuery(conn,paste(
> "CREATE INDEX feature_",name,
> "_index ON
> +       dbExecute(conn,paste("
> CREATE INDEX feature_",name,"
> _index ON
>                                                                  feature_
> ",name,"(\"",name,"\")",sep=""
> ))
>         
> #print("made index")
> 
> 
> @@ -
> 913,7 +916,7 @@ insertDef <- function
> (conn,data)  {
>                                                                  
> "VALUES(:definition,:definition_checksum,:format)",sep=""
> ), bind.data=data[fields])
>         }
> else if(inherits(conn,"PostgreSQLConnection"
> )){
>                 
> if(debug) print(data[,"definition_checksum"
> ])
> -               apply(data[,fields],
> 1,function
> (row) dbOp(dbGetQuery(conn, 
> +               apply(data[,fields],
> 1,function
> (row) dbOp(dbExecute(conn, 
>                                                  
> "INSERT INTO compounds(definition,definition_checksum,format) VALUES($1,$2,$3)"
> ,
>                                                  row)))
>         }
> else
> {
> @@ -
> 990,7 +993,7 @@ insertDescriptor <- function
> (conn,data){
>                         })
>                 apply(data[,fields2],
> 1,function
> (row) {
>                         row[
> 2] = descTypes[row[2]] #translate descriptor_type to descriptor_type_id
> 
> -                       dbTransaction(conn,dbGetQuery(conn, paste(
> "INSERT INTO compound_descriptors(compound_id,
> +                       dbTransaction(conn,dbExecute(conn, paste("
> INSERT INTO compound_descriptors(compound_id,
>                                                                                   descriptor_id) 
> ",
>                                         "
> VALUES( (SELECT compound_id FROM compounds WHERE definition_checksum = $1
> ),
>                                                                 (SELECT descriptor_id FROM descriptors
> @@ -
> 1006,7 +1009,7 @@ insertDescriptorType <- function
> (conn,data){
>                                                                  bind.data=data)
>         }
> else if(inherits(conn,"PostgreSQLConnection"
> )){
>                 apply(data,
> 1,function
> (row)
> -                               dbGetQuery(conn,paste(
> "INSERT INTO descriptor_types(descriptor_type) VALUES($1)"
> ),row))
> +                               dbExecute(conn,paste(
> "INSERT INTO descriptor_types(descriptor_type) VALUES($1)"
> ),row))
>         }
> else
> {
>                 
> stop("database ",class(conn)," unsupported"
> )
>         }
> @@ -
> 1019,7 +1022,7 @@ updatePriorities <- function
> (conn,data){
>                                                                  descriptor_id=:descriptor_id
> ", bind.data=data)
>         }else if(inherits(conn,"
> PostgreSQLConnection
> ")){
>                 apply(data[,c("
> compound_id","descriptor_id","priority
> ")],1,function(row)
> -                               dbGetQuery(conn,paste("
> UPDATE compound_descriptors SET priority = $3 WHERE compound_id=$1
>  AND
> +                               dbExecute(conn,paste(
> "UPDATE compound_descriptors SET priority = $3 WHERE compound_id=$1 AND
>                                                                  descriptor_id=$2"
> ),row))
>         }
> else
> {
> 
>                 
> stop("database ",class(conn)," unsupported"
> )
> @@ -
> 1036,13 +1039,12 @@ getPreparedQuery <- function
> (conn,statement,bind.data){
>         
> #dbSendPreparedQuery(conn,statement,bind.data)
> 
> 
>         
> #print("sending query")
> 
> -       res <- dbSendQuery(conn,statement)
> +       res <- dbSendStatement(conn,statement)
>         
> #print("after sendQuery")
> 
>         on.exit(dbClearResult(res)) 
> #clear result set when this function exits
> 
>         
> #print("after exit callback registered")
> 
> -       dbBind(res,bind.data)
> +       suppressWarnings(dbBind(res,bind.data))
>         
> #print("after dbBind")
> 
> -       dbFetch(res)
>  }
> 
> git show f514d35b793e1d9462b899bf3c76cc06ab4dcc91
> commit f514d35b793e1d9462b899bf3c76cc06ab4dcc91
> Author: Kevin Horan <
> khoran at cs.ucr.edu
> >
> Date:   Fri Jun 
> 30 21:37:15 2017 +0000
> 
> 
>     fix 
> for RSQLite 2
> 
> 
>     git-svn-id: file:///home/git/
> hedgehog.fhcrc.org/bioconductor/branches/RELEASE_3_5/madman/Rpacks/ChemmineR at 130824 bc3139a8-67e5-0310
> -9ffc-ced21a209358
> 
> diff --git a/DESCRIPTION b/DESCRIPTION
> index 4b4d514..c96da6e 
> 100644
> 
> --- a/DESCRIPTION
> +++ b/DESCRIPTION
> @@ -
> 1,8 +1,8
>  @@
>  Package: ChemmineR
>  Type: Package
>  Title: Cheminformatics Toolkit 
> for
>  R
> -Version: 
> 2.28.0
> 
> -Date: 
> 2016-11-30
> 
> +Version: 
> 2.28.1
> 
> +Date: 
> 2017-6-30
> 
>  Author: Y. Eddie Cao, Kevin Horan, Tyler Backman, Thomas Girke
>  Maintainer: Thomas Girke <
> thomas.girke at ucr.edu
> >
>  Description: ChemmineR is a cheminformatics package 
> for analyzing drug-like small molecule data in R. Its latest version contains functions for
>  efficient processing of large numbers of molecules, physicochemical
> diff --git a/R/compound_db.R b/R/compound_db.R
> index 76d1f6c..970c4a2 
> 100644
> 
> --- a/R/compound_db.R
> +++ b/R/compound_db.R
> @@ -
> 38,7 +38,7 @@ initDb <- function
> (handle){
>                                                           collapse=
> ""),";",fixed=TRUE
> ))
>                 
> #print(statements)
> 
> 
> -               Map(
> function
> (sql) dbOp(dbGetQuery(conn,sql)),statements)
> +               Map(
> function
> (sql) dbOp(dbExecute(conn,sql)),statements)
>         }
>         conn
>  }
> @@ -
> 54,7 +54,7 @@ dbTransaction <- function
> (conn,expr){
>                 
> # be paranoid about setting this as bad things will happen if its not set
> 
>                 enableForeignKeys(conn)
> 
> -               dbGetQuery(conn,
> "BEGIN TRANSACTION"
> )
> +               dbExecute(conn,
> "BEGIN TRANSACTION"
> )
>                 ret=expr
>                 dbCommit(conn)
>                 ret
> @@ -
> 64,8 +64,11 @@ dbTransaction <- function
> (conn,expr){
>                 
> stop(paste("db error inside transaction: "
> ,e$message))
>         })
>  }
> -dbGetQueryChecked <- 
> function(conn,statement,...
> ){
> -       ret=dbGetQuery(conn,statement)
> +dbGetQueryChecked <- 
> function(conn,statement,execute=FALSE,...
> ){
> +       
> if(execute == TRUE
> )
> +               ret=dbExecute(conn,statement)
> +       
> else
> 
> 
> +               ret=dbGetQuery(conn,statement)
>         err=dbGetException(conn)
>         
> if(err$errorMsg[1] != "OK"
> )
>                 
> stop("error in dbGetQuery: ",err$errorMsg,"  "
> ,traceback())
> @@ -
> 895,10 +898,10 @@ createFeature <- function
> (conn,name, isNumeric){
>         dbGetQueryChecked(conn,
>                 paste(
> "CREATE TABLE feature_",name,
> " (
>                         compound_id INTEGER PRIMARY KEY REFERENCES compounds(compound_id) ON DELETE CASCADE ON UPDATE CASCADE, "
> ,
> -                       
> "",name," ",sqlType," )",sep=""
> ))
> +                       
> "",name," ",sqlType," )",sep=""),execute=TRUE
> )
> 
>         
> #print("made table")
> 
> -       dbGetQuery(conn,paste(
> "CREATE INDEX feature_",name,
> "_index ON
> +       dbExecute(conn,paste("
> CREATE INDEX feature_",name,"
> _index ON
>                                                                  feature_
> ",name,"(\"",name,"\")",sep=""
> ))
>         
> #print("made index")
> 
> 
> @@ -
> 913,7 +916,7 @@ insertDef <- function
> (conn,data)  {
>                                                                  
> "VALUES(:definition,:definition_checksum,:format)",sep=""
> ), bind.data=data[fields])
>         }
> else if(inherits(conn,"PostgreSQLConnection"
> )){
>                 
> if(debug) print(data[,"definition_checksum"
> ])
> -               apply(data[,fields],
> 1,function
> (row) dbOp(dbGetQuery(conn, 
> +               apply(data[,fields],
> 1,function
> (row) dbOp(dbExecute(conn, 
>                                                  
> "INSERT INTO compounds(definition,definition_checksum,format) VALUES($1,$2,$3)"
> ,
>                                                  row)))
>         }
> else
> {
> @@ -
> 990,7 +993,7 @@ insertDescriptor <- function
> (conn,data){
>                         })
>                 apply(data[,fields2],
> 1,function
> (row) {
>                         row[
> 2] = descTypes[row[2]] #translate descriptor_type to descriptor_type_id
> 
> -                       dbTransaction(conn,dbGetQuery(conn, paste(
> "INSERT INTO compound_descriptors(compound_id,
> +                       dbTransaction(conn,dbExecute(conn, paste("
> INSERT INTO compound_descriptors(compound_id,
>                                                                                   descriptor_id) 
> ",
>                                         "
> VALUES( (SELECT compound_id FROM compounds WHERE definition_checksum = $1
> ),
>                                                                 (SELECT descriptor_id FROM descriptors
> @@ -
> 1006,7 +1009,7 @@ insertDescriptorType <- function
> (conn,data){
>                                                                  bind.data=data)
>         }
> else if(inherits(conn,"PostgreSQLConnection"
> )){
>                 apply(data,
> 1,function
> (row)
> -                               dbGetQuery(conn,paste(
> "INSERT INTO descriptor_types(descriptor_type) VALUES($1)"
> ),row))
> +                               dbExecute(conn,paste(
> "INSERT INTO descriptor_types(descriptor_type) VALUES($1)"
> ),row))
>         }
> else
> {
>                 
> stop("database ",class(conn)," unsupported"
> )
>         }
> @@ -
> 1019,7 +1022,7 @@ updatePriorities <- function
> (conn,data){
>                                                                  descriptor_id=:descriptor_id
> ", bind.data=data)
>         }else if(inherits(conn,"
> PostgreSQLConnection
> ")){
>                 apply(data[,c("
> compound_id","descriptor_id","priority
> ")],1,function(row)
> -                               dbGetQuery(conn,paste("
> UPDATE compound_descriptors SET priority = $3 WHERE compound_id=$1
>  AND
> +                               dbExecute(conn,paste(
> "UPDATE compound_descriptors SET priority = $3 WHERE compound_id=$1 AND
>                                                                  descriptor_id=$2"
> ),row))
>         }
> else
> {
>                 
> stop("database ",class(conn)," unsupported"
> )
> @@ -
> 1036,13 +1039,12 @@ getPreparedQuery <- function
> (conn,statement,bind.data){
> 
>         
> #dbSendPreparedQuery(conn,statement,bind.data)
> 
> 
>         
> #print("sending query")
> 
> -       res <- dbSendQuery(conn,statement)
> +       res <- dbSendStatement(conn,statement)
>         
> #print("after sendQuery")
> 
>         on.exit(dbClearResult(res)) 
> #clear result set when this function exits
> 
>         
> #print("after exit callback registered")
> 
> -       dbBind(res,bind.data)
> +       suppressWarnings(dbBind(res,bind.data))
>         
> #print("after dbBind")
> 
> -       dbFetch(res)
>  }
> 
> Thomas
> 
> 
> On Thu, Sep 7, 2017 at 7:39 PM Turaga, Nitesh <Nitesh.Turaga at roswellpark.org> wrote:
> Dear Thomas,
> 
> Can you please send me the output of the two `git show` commands?
> 
> > git show 8210e1e04e8dc6819b84820077293d8d61914cf5
> > git show f514d35b793e1d9462b899bf3c76cc06ab4dcc91
> 
> 
> I’ll need to take a look at those to advice accordingly.
> 
> 
> Best,
> 
> Nitesh
> 
> 
> > On Sep 7, 2017, at 7:04 PM, Thomas Girke <thomas.girke at ucr.edu> wrote:
> >
> > Dear Nitesh,
> >
> > In the release branch of our ChemmineR package I am getting a duplicate commit error. Last week we had a similar error across several of our packages but then you made some changes in response to a similar problem reported on the bioc-developer site which eliminated the problem by itself. Now the problem is back again and it is not clear to me how to resolve it. The suggestions given here https://goo.gl/5mk8vV sound a bit harsh.
> >
> > tgirke at tgirke-XPS-13-9343
> > :~/Dropbox/Software/ChemmineR/ChemmineR$ git push upstream RELEASE_3_5
> > Counting objects:
> > 26
> > , done.
> > Delta compression using up to
> > 4
> >  threads.
> > Compressing objects:
> > 100% (4/4
> > ), done.
> > Writing objects:
> > 100% (4/4), 387 bytes | 0
> >  bytes/s, done.
> > Total
> > 4 (delta 3), reused 0 (delta 0
> > )
> > remote: Error: duplicate commits.
> > remote:
> > remote: There are duplicate commits
> > in
> >  your commit history, These cannot be
> > remote: pushed to the Bioconductor git server. Please make sure that this is
> > remote: resolved.
> > remote:
> > remote: Take a look at the documentation to fix this,
> > remote:
> > https://bioconductor.org/developers/how-to/git/sync-existing-repositories/
> > ,
> > remote: particularly, point
> > #8 (force Bioconductor master to Github master).
> >
> > remote:
> > remote: For more information, or help resolving this issue, contact
> > remote: <
> > bioc-devel at r-project.org
> > >. Provide the error, the package name and
> > remote: any other details we might need.
> > remote:
> > remote: Use
> > remote:
> > remote:     git show 8210e1e04e8dc6819b84820077293d8d61914cf5
> > remote:     git show f514d35b793e1d9462b899bf3c76cc06ab4dcc91
> > remote:
> > remote: to see body of commits.
> > remote:
> > To git at git.bioconductor.org:packages/ChemmineR.git
> >  ! [remote rejected] RELEASE_3_5 -> RELEASE_3_5 (pre-receive hook declined)
> > error: failed to push some refs to
> > 'git at git.bioconductor.org:packages/ChemmineR.git'
> > Thanks,
> >
> > Thomas
> >
> > --
> >
> > Thomas Girke, Ph.D.
> >
> > Professor of Bioinformatics
> >
> > Director of HPC Center
> >
> > 1207F Genomics Building
> >
> > University of California
> >
> > Riverside, CA 92521
> >
> >
> >
> >
> > E-mail: thomas.girke at ucr.edu
> >
> > Phone/Cell/Text: 951-732-7072
> 
> 
> 
> 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.



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.


More information about the Bioc-devel mailing list