|
|
Change By:
|
Andre Dietisheim
(13/Jun/12 11:07 AM)
|
|
Description:
|
Steps to reproduce:
1) EXEC: create myapp in tools with openshift in ~/git/myapp 2) EXEC: take the git url and clone the app into
If happens that when importing
a
separate directory (
new application
to
simulate other changes) mkdir temp cd temp git clone ssh:<specifichost>/myapp.git/ cd myapp 3) EXEC: edit README or some other existing file 4) EXEC: git commit -m "external change" README 5) EXEC: git push <ton of output>
6) ASSERT: push now fails: cd ~/git/myapp git push will now fail with something like:
$ git push ~/git/appmy To ssh://b8ab8a46a2984d16b1666f3b172c4199@appmy-man.rhcloud.com/~/git/appmy.git/ ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'ssh://b8ab8a46a2984d16b1666f3b172c4199@appmy-man.rhcloud.com/~/git/appmy.git/' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (e.g. 'git pull') before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details.
Thus when trying to publish from tools it should not let you push and it should ask you before pushing with force.
7) EXEC: Publish
your
app with the server adapter: After [https://issues.jboss.org/browse/JBIDE-12138] has been fixed
workspace
,
user is prompted with a dialog that proposes to perform a "push force". While
the
operation seems to execute correctly, the following error is reported in the Error Log:
{code} org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of push command at org.eclipse.jgit.api.PushCommand.call
resulting
(
PushCommand.java:156
cloned
)
at org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:194) at org.jboss.tools.openshift.egit.core.EGitUtils.push(EGitUtils.java:429) at org.jboss.tools.openshift.egit.core.EGitUtils.pushForce(EGitUtils.java:418) at org.jboss.tools.openshift.express.internal.core.behaviour.ExpressPublishMethod.commitAndPushProject(ExpressPublishMethod.java:237) at org.jboss.tools.openshift.express.internal.core.behaviour.ExpressPublishMethod.publishFinish(ExpressPublishMethod.java:80) at org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior.publishFinish(DeployableServerBehavior.java:94) at org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior.publishFinish(DelegatingServerBehavior.java:147) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:974) at org.jboss.tools.openshift.express.internal.core.behaviour.ExpressBehaviour.publish(ExpressBehaviour.java:27) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774) at org.jboss.tools.openshift.express.internal.core.behaviour.ExpressBehaviour.publish(ExpressBehaviour.java:34) at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3087) at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: org.eclipse.jgit.errors.TransportException: ssh://7ddb1e3809e54c969a568dd03889e90f@as-minipaas.example.com/~/
git
/as.git/: Missing tree ecdd261c53993ae777f379662b52ceec35c2f7ed at org.eclipse.jgit.transport.BasePackPushConnection.doPush(BasePackPushConnection.java:186) at org.eclipse.jgit.transport.BasePackPushConnection.push(BasePackPushConnection.java:126) at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:141) at org.eclipse.jgit.transport.Transport.push(Transport.java:1120) at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:152) ... 14 more Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing tree ecdd261c53993ae777f379662b52ceec35c2f7ed at org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:126) at org.eclipse.jgit.revwalk.ObjectWalk.newTreeVisit(ObjectWalk.java:726) at org.eclipse.jgit.revwalk.ObjectWalk.nextObject(ObjectWalk.java:378) at org.eclipse.jgit.storage.pack.PackWriter.findObjectsToPack(PackWriter.java:1706) at org.eclipse.jgit.storage.pack.PackWriter.preparePack(PackWriter.java:707) at org.eclipse.jgit.storage.pack.PackWriter.preparePack(PackWriter.java:670) at org.eclipse.jgit.transport.BasePackPushConnection.writePack(BasePackPushConnection.java:265) at org.eclipse.jgit.transport.BasePackPushConnection.doPush(BasePackPushConnection.java:168) ... 18 more {code}
Result: Going back to cmdline, it seems that the git
repository is corrupted
: {code} $ git fsck broken link from commit 70b2d1cf4705c118e5cac62d0c754df69f09fa32 to tree b0e5eab13c7d5ca0d3e5b22418234bfb2b57e91e missing blob 244cfe40684de36646d426ace17041cd25605cb2 missing tree b0e5eab13c7d5ca0d3e5b22418234bfb2b57e91e {code}
In the UI you'll see the following: The *
.
settings* folder is not tracked, while the *.jsdtscope* within it is added & committed:
!settings-untracked-jsdtscope-committed.png!
|
|
Steps to Reproduce:
|
1) EXEC: launch the *New OpenShift Application* wizard and create a new OpenShift application that you import to your workspace. (ex. call the applicatino *as*) 2) ASSERT: Your application gets imported to your workspace (ex. project *as*) 3) EXEC: delete the new project, kill the OpenShift application 4) EXEC: create the very same application again and have it imported to your workspace
5) EXEC: Go to the *Git Perspective* and double click some file, so that it gets opened in a editor. You'll very soon get the following error:
!MissingObjectException.png!
5) EXEC: Go to the command-line and do *git fsck*. You'll spot something very similar to this:
{quote} [adietish@adietish-thinkpad as2]$ git fsck broken link from commit 6410005677d35ea202df51097c4077f36d8b9ac1 to tree 0a2127cf741ef75aa1d807ad8931366cf63fc579 missing tree 0a2127cf741ef75aa1d807ad8931366cf63fc579 missing blob ef669b78c38fa1317bc89d5d93cd3205c615130f {quote}
|
|
Workaround Description:
|
Dont resuse project names in the same Eclipse session: Dont kill local projects and use the very same name as project name. Either restart Eclipse or use a new project/application name. when importing an OpenShift application to your workspace
|
|
|