[GeoNetwork-devel] [GeoNetwork opensource Developer website] #932: new line issue with Oracle scripts

#932: new line issue with Oracle scripts
-----------------------+----------------------------------------------------
Reporter: ianwallen | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: trivial | Milestone: v2.7.0
Component: General | Version:
Keywords: |
-----------------------+----------------------------------------------------
Even thought the oracle create/migrate scripts (web\src\main\webapp\WEB-
INF\classes\setup\sql) are intended to run within the installer, when
there are issues, they can be executed manually. When executed via oracle
sql developer there are no issues however when executed via sqlplus it
fails to run due to some empty lines within multiline commands.

I'm including a simple patch to remove the empty lines within the commands
so that the scripts can be manually executed via sqlplus if desired.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/932&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#932: new line issue with Oracle scripts
-----------------------+----------------------------------------------------
Reporter: ianwallen | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: trivial | Milestone: v2.7.0
Component: General | Version:
Keywords: |
-----------------------+----------------------------------------------------

Comment(by heikki):

hi Ian,

I have merged your pull request to branch 2.8.x, but I'm not clear whether
it is already in the Master branch. If not, could you create a new pull
request for the Master branch ?

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/932#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

Sorry, I'm still learning the GIT process :slight_smile:

No, I don't believe the changes are on the Master - I can send a pull
request for that as well. However based on
http://osgeo-org.1560.n6.nabble.com/GeoNetwork-opensource-Developer-website-954-Not-translated-wrong-English-label-tc4981384.html
this discussion Jesse asked that I do a pull request for the 2.8 branch
rather than the Master and he can then easily merge the changes into the
Master.

Is it now suggested that we do a pull request for both the Master and the
branch? Do you still want me to do a pull request on the Master?

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GeoNetwork-opensource-Developer-website-932-new-line-issue-with-Oracle-scripts-tp4979808p4984187.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

So are most of us :slight_smile:

Good question: do we expect contributors to issue pull requests on a release branch only, or also on Master (formerly known as trunk) ?

Seems to me it would be less work for Geonetwork committers if the contributors do pull requests for both the current release branch and for Master. But from the description below it looks like Jesse plans on doing the pulling to Master himself.

What will be our strategy in this ?

Kind regards
Heikki Doeleman

On Wed, Jun 27, 2012 at 12:55 PM, ianwallen <ianwallen@anonymised.com> wrote:

Sorry, I’m still learning the GIT process :slight_smile:

No, I don’t believe the changes are on the Master - I can send a pull
request for that as well. However based on
http://osgeo-org.1560.n6.nabble.com/GeoNetwork-opensource-Developer-website-954-Not-translated-wrong-English-label-tc4981384.html
this discussion Jesse asked that I do a pull request for the 2.8 branch
rather than the Master and he can then easily merge the changes into the
Master.

Is it now suggested that we do a pull request for both the Master and the
branch? Do you still want me to do a pull request on the Master?


View this message in context: http://osgeo-org.1560.n6.nabble.com/GeoNetwork-opensource-Developer-website-932-new-line-issue-with-Oracle-scripts-tp4979808p4984187.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.


Live Security Virtual Conference
Exclusive live event will cover all the ways today’s security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

It looks like this change (5596eced8e084956bef69139135571a93e391be9) has not
been put on the Master - maybe missed - can someone with access do this.

Thanks.

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GeoNetwork-opensource-Developer-website-932-new-line-issue-with-Oracle-scripts-tp4979808p4984822.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

That commit seems to be the merge commit so I merged 7ed02dbaec, which is the commit with the fix as far as I can tell.

Jesse

On Fri, Jun 29, 2012 at 12:44 PM, ianwallen <ianwallen@anonymised.com> wrote:

It looks like this change (5596eced8e084956bef69139135571a93e391be9) has not
been put on the Master - maybe missed - can someone with access do this.

Thanks.


View this message in context: http://osgeo-org.1560.n6.nabble.com/GeoNetwork-opensource-Developer-website-932-new-line-issue-with-Oracle-scripts-tp4979808p4984822.html

Sent from the GeoNetwork developer mailing list archive at Nabble.com.


Live Security Virtual Conference
Exclusive live event will cover all the ways today’s security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Jesse,

I tried to do it also, but didn’t work. I did this:

heikki@anonymised.com /c/source/GEONETWORK/core-geonetwork (master)
$ git checkout master
M docs
M gast
M geoserver
M release
Already on ‘master’

heikki@anonymised.com3… /c/source/GEONETWORK/core-geonetwork (master)
$ git cherry-pick 5596eced8e
error: Commit 5596eced8e084956bef69139135571a93e391be9 is a merge but no -m option was given.
fatal: cherry-pick failed

I used 5596eced8e because that’s the hash of my integrating this pull request into 2.8.x (https://github.com/geonetwork/core-geonetwork/commit/5596eced8e084956bef69139135571a93e391be9).

Two question: why did it fail to be cherry-picked to master ? And why did you use a different hash ?

Then, I asked Jose to try to do this. He uses SmartGit so I can’t say what exactly that did, but in the end he succeeded. Then he pushed it to master on the origin. But this was after you just integrated this pull request to master on the origin. How come Jose did not get a conflict ?

thanks and kind regards
Heikki Doeleman

On Fri, Jun 29, 2012 at 1:35 PM, Jesse Eichar <jesse.eichar@anonymised.com…189…> wrote:

That commit seems to be the merge commit so I merged 7ed02dbaec, which is the commit with the fix as far as I can tell.

Jesse

On Fri, Jun 29, 2012 at 12:44 PM, ianwallen <ianwallen@anonymised.com> wrote:

It looks like this change (5596eced8e084956bef69139135571a93e391be9) has not
been put on the Master - maybe missed - can someone with access do this.

Thanks.


View this message in context: http://osgeo-org.1560.n6.nabble.com/GeoNetwork-opensource-Developer-website-932-new-line-issue-with-Oracle-scripts-tp4979808p4984822.html

Sent from the GeoNetwork developer mailing list archive at Nabble.com.


Live Security Virtual Conference
Exclusive live event will cover all the ways today’s security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


Live Security Virtual Conference
Exclusive live event will cover all the ways today’s security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Lots of questions :slight_smile:

On Fri, Jun 29, 2012 at 1:52 PM, heikki <tropicano@anonymised.com> wrote:

Jesse,

I tried to do it also, but didn’t work. I did this:

heikki@anonymised.com /c/source/GEONETWORK/core-geonetwork (master)
$ git checkout master
M docs
M gast
M geoserver
M release
Already on ‘master’

heikki@anonymised.com3… /c/source/GEONETWORK/core-geonetwork (master)
$ git cherry-pick 5596eced8e
error: Commit 5596eced8e084956bef69139135571a93e391be9 is a merge but no -m option was given.
fatal: cherry-pick failed

I used 5596eced8e because that’s the hash of my integrating this pull request into 2.8.x (https://github.com/geonetwork/core-geonetwork/commit/5596eced8e084956bef69139135571a93e391be9).

Two question: why did it fail to be cherry-picked to master ? And why did you use a different hash ?

This failed because the commit you tried to cherry pick does not represent any changes. It represents the merge you did not of the commit containing the changes.

1 thing about git is that objects in the repository are not all code changes they can be several things. Merges, rollbacks, tags, trees, and probably other things as well. What I did was I used

gitk 5596eced8e

At the top was your commit. then was the merge that Ian made of 2.8.x, several commits (along a different line) that represented the actual changes merged from 2.8.x for Ian, then finally the commit with the changes. So I just cherry-picked that last change.

We made a mistake on 2.8.x by committing things to it that we don’t want on trunk like changing the version number to 2.8.0.RC0 and other changes. So we have to cherry-pick from 2.8.x rather than just doing a merge. If we want I can do a merge change back all the things we don’t want but I might miss something. The advantage is that if we make changes to 2.8.x then we will not have to cherry pick but instead just merge.

Then, I asked Jose to try to do this. He uses SmartGit so I can’t say what exactly that did, but in the end he succeeded. Then he pushed it to master on the origin. But this was after you just integrated this pull request to master on the origin. How come Jose did not get a conflict ?

Jose didn’t get a conflict because git saw that the commit was already merged and therefore was able to resolve the conflict easily.

Jesse

Hi Jesse

About this:

We made a mistake on 2.8.x by committing things to it that we don’t want on trunk like changing the version number to 2.8.0.RC0 and other changes. So we have to cherry-pick from 2.8.x rather than just doing a merge.

It’s not clear to me. I think 2.8.x should have different changes from trunk, indeed the pom.xml should be different as the version numbers differ.

But maybe it’s not committed in the right way? How should we manage these changes that for sure are required between 2.8.x and master branches?

Regards,
Jose García

On Fri, Jun 29, 2012 at 2:01 PM, Jesse Eichar <jesse.eichar@anonymised.com> wrote:

Lots of questions :slight_smile:

On Fri, Jun 29, 2012 at 1:52 PM, heikki <tropicano@anonymised.com> wrote:

Jesse,

I tried to do it also, but didn’t work. I did this:

heikki@anonymised.com /c/source/GEONETWORK/core-geonetwork (master)
$ git checkout master
M docs
M gast
M geoserver
M release
Already on ‘master’

heikki@anonymised.com3… /c/source/GEONETWORK/core-geonetwork (master)
$ git cherry-pick 5596eced8e
error: Commit 5596eced8e084956bef69139135571a93e391be9 is a merge but no -m option was given.
fatal: cherry-pick failed

I used 5596eced8e because that’s the hash of my integrating this pull request into 2.8.x (https://github.com/geonetwork/core-geonetwork/commit/5596eced8e084956bef69139135571a93e391be9).

Two question: why did it fail to be cherry-picked to master ? And why did you use a different hash ?

This failed because the commit you tried to cherry pick does not represent any changes. It represents the merge you did not of the commit containing the changes.

1 thing about git is that objects in the repository are not all code changes they can be several things. Merges, rollbacks, tags, trees, and probably other things as well. What I did was I used

gitk 5596eced8e

At the top was your commit. then was the merge that Ian made of 2.8.x, several commits (along a different line) that represented the actual changes merged from 2.8.x for Ian, then finally the commit with the changes. So I just cherry-picked that last change.

We made a mistake on 2.8.x by committing things to it that we don’t want on trunk like changing the version number to 2.8.0.RC0 and other changes. So we have to cherry-pick from 2.8.x rather than just doing a merge. If we want I can do a merge change back all the things we don’t want but I might miss something. The advantage is that if we make changes to 2.8.x then we will not have to cherry pick but instead just merge.

Then, I asked Jose to try to do this. He uses SmartGit so I can’t say what exactly that did, but in the end he succeeded. Then he pushed it to master on the origin. But this was after you just integrated this pull request to master on the origin. How come Jose did not get a conflict ?

Jose didn’t get a conflict because git saw that the commit was already merged and therefore was able to resolve the conflict easily.

Jesse


Live Security Virtual Conference
Exclusive live event will cover all the ways today’s security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork


GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.


Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net

On Fri, Jun 29, 2012 at 2:16 PM, Jose Garcia <jose.garcia@anonymised.com> wrote:

Hi Jesse

About this:

We made a mistake on 2.8.x by committing things to it that we don’t want on trunk like changing the version number to 2.8.0.RC0 and other changes. So we have to cherry-pick from 2.8.x rather than just doing a merge.

It’s not clear to me. I think 2.8.x should have different changes from trunk, indeed the pom.xml should be different as the version numbers differ.

But maybe it’s not committed in the right way? How should we manage these changes that for sure are required between 2.8.x and master branches?

I can think of 2 methods of allowing 2.8 and master to diverge.

If you want a change on 2.8.x that you do not want on master then make the change on 2.8.x. Then merge to master then perform a git revert on master. Revert applied the reverse diff it does not undo the change. What this does is it shows git that the merge has been merged to master and it doesn’t care that it was reverted, it just cares that it was merged. So that way next time you merge 2.8x onto master that commit will not be merged again.

Jesse

this is only one method, not two ?

Though if this works like you describe, it should be OK, methinks.

On Fri, Jun 29, 2012 at 2:27 PM, Jesse Eichar <jesse.eichar@anonymised.com> wrote:

On Fri, Jun 29, 2012 at 2:16 PM, Jose Garcia <jose.garcia@anonymised.com437…> wrote:

Hi Jesse

About this:

We made a mistake on 2.8.x by committing things to it that we don’t want on trunk like changing the version number to 2.8.0.RC0 and other changes. So we have to cherry-pick from 2.8.x rather than just doing a merge.

It’s not clear to me. I think 2.8.x should have different changes from trunk, indeed the pom.xml should be different as the version numbers differ.

But maybe it’s not committed in the right way? How should we manage these changes that for sure are required between 2.8.x and master branches?

I can think of 2 methods of allowing 2.8 and master to diverge.

If you want a change on 2.8.x that you do not want on master then make the change on 2.8.x. Then merge to master then perform a git revert on master. Revert applied the reverse diff it does not undo the change. What this does is it shows git that the merge has been merged to master and it doesn’t care that it was reverted, it just cares that it was merged. So that way next time you merge 2.8x onto master that commit will not be merged again.

Jesse

On Fri, Jun 29, 2012 at 2:41 PM, heikki <tropicano@anonymised.com> wrote:

this is only one method, not two ?

I decided that my other thought wasn’t as good because it restricts how different 2.8.x can be so probably not as useful.

#932: new line issue with Oracle scripts
------------------------+---------------------------------------------------
  Reporter: ianwallen | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: trivial | Milestone: v2.7.0
Component: General | Version:
Resolution: fixed | Keywords:
------------------------+---------------------------------------------------
Changes (by ianwallen):

  * status: new => closed
  * resolution: => fixed

Comment:

It was committed properly.

Commit 7ed02dbaec28cef8d742e584619f339a2cb5fc7f

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/932#comment:2&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.