From: Mark Struberg <struberg@yahoo.de>
To: git@vger.kernel.org
Subject: [JGIT] exception while pushing if no objects/pack directory exists in origin repo
Date: Sat, 9 May 2009 22:40:50 +0200 (CEST) [thread overview]
Message-ID: <693615.98383.qm@web27802.mail.ukl.yahoo.com> (raw)
Hi!
I have problems with JGit pushing to an old origin repo in my TCK tests of
maven-scm-providers-git.
This 'old' bare repository does not have an object/pack folder, it only has unpacked objects lying
around. I created it in 2007-11 with git-1.5.3 so this is actually not so old, so I'm not sure why
there is no pack folder. Maybe that's caused by some 'prune empty directories' and stuff, I really
don't know.
If I use jgit to push to this repo it crashes because it cannot write to the pack folder. If I
mkdir the object/pack folder in my origin repo, everything runs smooth.
The test git repo checked-in in my git repo ;)
http://github.com/struberg/maven-scm-providers-git/tree/82e3021576e18a09fc04e1a5ac58368f598167b2/maven-scm-provider-jgit/src/test/resources/repository
The Exception I get when running my TCK test:
org.apache.maven.scm.ScmException: JGit checkin failure!
at
org.apache.maven.scm.provider.git.jgit.command.checkin.JGitCheckInCommand.executeCheckInCommand(JGitCheckInCommand.java:98)
at
org.apache.maven.scm.command.checkin.AbstractCheckInCommand.executeCommand(AbstractCheckInCommand.java:53)
at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59)
at
org.apache.maven.scm.provider.git.AbstractGitScmProvider.executeCommand(AbstractGitScmProvider.java:339)
at
org.apache.maven.scm.provider.git.AbstractGitScmProvider.checkin(AbstractGitScmProvider.java:265)
at org.apache.maven.scm.provider.AbstractScmProvider.checkIn(AbstractScmProvider.java:342)
at org.apache.maven.scm.provider.AbstractScmProvider.checkIn(AbstractScmProvider.java:326)
at org.apache.maven.scm.manager.AbstractScmManager.checkIn(AbstractScmManager.java:374)
at
org.apache.maven.scm.tck.command.checkin.CheckInCommandTckTest.testCheckInCommandTest(CheckInCommandTckTest.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.spearce.jgit.errors.TransportException:
file:///home/msx/develop/java/maven2/maven-scm/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/target/scm-test/repository:
error occurred during unpacking on the remote end: error Cannot move pack to
/home/msx/develop/java/maven2/maven-scm/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/target/scm-test/repository/objects/pack/pack-737c284d140709e1182fa00fa1a20d4e370cf2d5.pack
at
org.spearce.jgit.transport.BasePackPushConnection.readStatusReport(BasePackPushConnection.java:217)
at org.spearce.jgit.transport.BasePackPushConnection.doPush(BasePackPushConnection.java:134)
at org.spearce.jgit.transport.BasePackPushConnection.push(BasePackPushConnection.java:100)
at org.spearce.jgit.transport.PushProcess.execute(PushProcess.java:127)
at org.spearce.jgit.transport.Transport.push(Transport.java:713)
at org.spearce.jgit.simple.SimpleRepository.push(SimpleRepository.java:504)
at org.spearce.jgit.simple.SimpleRepository.push(SimpleRepository.java:436)
at
org.apache.maven.scm.provider.git.jgit.command.checkin.JGitCheckInCommand.executeCheckInCommand(JGitCheckInCommand.java:66)
... 26 more
Not sure if I only have a 'broken' repo (everything runs smooth on the shell) or if this is a
thing which should get fixed in JGit...
txs and LieGrue,
strub
next reply other threads:[~2009-05-09 20:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-09 20:40 Mark Struberg [this message]
2009-05-10 21:30 ` [PATCH] Create $GIT_DIR/objects/pack if missing during renameAndOpenPack Shawn O. Pearce
2009-05-10 22:59 ` Robin Rosenberg
2009-05-10 23:03 ` Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=693615.98383.qm@web27802.mail.ukl.yahoo.com \
--to=struberg@yahoo.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).