problem while pushing using jgit [message #582258] |
Thu, 22 July 2010 06:41 |
Pitamber Sharma Messages: 2 Registered: July 2010 |
Junior Member |
|
|
I am facing problem while pushing to a reomte git repository.
I am using Transport class's open and push method to push from my local repo to a remote repo, but not able to push it properly.
my code:
private void pushToGerrit() throws Exception{
log.info("transport opening...");
Transport t = Transport.open(repo, new URIish("ssh://pitamber@localhost:29418/testproject"));
log.info("transport opened..." + t + " with " + new URIish("ssh://pitamber@localhost:29418/testproject"));
RemoteRefUpdate rru = new RemoteRefUpdate(repo, "HEAD", "refs/heads/master", true, null, null);
log.info("RRU is " + rru);
List<RemoteRefUpdate> list = new ArrayList<RemoteRefUpdate>();
list.add(rru);
log.info("push start...");
PushResult pr = t.push(new TextProgressMonitor(), list);
log.info("PushResult is : ", pr.getMessages());
}
and the logging tweaks are as follows:
2010-07-22 11:50:37,906 INFO server.jgit.GitManager.pushToGerrit(GitManager.jav
a:128) - transport opening...
2010-07-22 11:50:37,984 INFO server.jgit.GitManager.pushToGerrit(GitManager.jav
a:130) - transport mailto:opened...org.eclipse.jgit.transport.TransportGitSsh@150818a w
ith ssh://pitamber@localhost:29418/testproject
2010-07-22 11:50:38,000 INFO server.jgit.GitManager.pushToGerrit(GitManager.jav
a:132) - RRU is RemoteRefUpdate[remoteName=refs/heads/master, NOT_ATTEMPTED, (nu
ll)...a6a6386d, srcRef=HEAD, forceUpdate, message=null, target\issue-repo\testpr
oject\.git]
2010-07-22 11:50:38,000 INFO server.jgit.GitManager.pushToGerrit(GitManager.jav
a:135) - push start...
Counting objects: 4
Compressing objects: 100% (4/4)
Writing objects: 100% (4/4)
2010-07-22 11:50:39,328 INFO server.jgit.GitManager.pushToGerrit(GitManager.jav
a:137) - PushResult is :
It shows me that changes pushed succesfully but PushResult is empty. and remote repo's log doesn't reflect any push too.
No exception is there.
Am i missing something?
Any suggestion/help...
|
|
|
Powered by
FUDForum. Page generated in 0.03127 seconds