diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-03-12 17:00:50 -0800 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-03-12 17:00:54 -0800 |
commit | 23bd331cb2ce9c387eac377b244a7d9285cf3d25 (patch) | |
tree | d2d9edfefbd06e17aee9674a39be4c863bca3047 /org.eclipse.jgit.pgm | |
parent | d42603578cd1f656ea8bb2cb949a5e5d3ad8e037 (diff) | |
parent | 89cdc3b713c214a8f7142ef0d0df714027ad9876 (diff) | |
download | jgit-23bd331cb2ce9c387eac377b244a7d9285cf3d25.tar.gz jgit-23bd331cb2ce9c387eac377b244a7d9285cf3d25.zip |
Merge branch 'push-sideband' into stable-0.7
* push-sideband:
Reuse the line buffer between strings in PacketLineIn
http.server: Use TemporaryBuffer and compress some responses
Reduce multi-level buffered streams in transport code
Fix smart HTTP client buffer alignment
Use "ERR message" for early ReceivePack problems
Catch and report "ERR message" during remote advertisements
Wait for EOF on stderr before finishing SSH channel
Capture non-progress side band #2 messages and put in result
ReceivePack: Enable side-band-64k capability for status reports
Use more restrictive patterns for sideband progress scraping
Prefix remote progress tasks with "remote: "
Decode side-band channel number as unsigned integer
Refactor SideBandInputStream construction
Refactor SideBandOutputStream to be buffered
Change-Id: Ic9689e64e8c87971f2fd402cb619082309d5587f
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java | 30 | ||||
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java | 1 |
2 files changed, 30 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java index f5e3c504c2..1e03567500 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java @@ -1,6 +1,6 @@ /* * Copyright (C) 2008, Charles O'Farrell <charleso@charleso.org> - * Copyright (C) 2008-2009, Google Inc. + * Copyright (C) 2008-2010, Google Inc. * Copyright (C) 2008, Marek Zawirski <marek.zawirski@gmail.com> * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org> * and other copyright owners as documented in the project's IP log. @@ -79,6 +79,34 @@ abstract class AbstractFetchCommand extends TextBuiltin { out.format(" %c %-17s %-10s -> %s", type, longType, src, dst); out.println(); } + + showRemoteMessages(r.getMessages()); + } + + static void showRemoteMessages(String pkt) { + while (0 < pkt.length()) { + final int lf = pkt.indexOf('\n'); + final int cr = pkt.indexOf('\r'); + final int s; + if (0 <= lf && 0 <= cr) + s = Math.min(lf, cr); + else if (0 <= lf) + s = lf; + else if (0 <= cr) + s = cr; + else { + System.err.println("remote: " + pkt); + break; + } + + if (pkt.charAt(s) == '\r') + System.err.print("remote: " + pkt.substring(0, s) + "\r"); + else + System.err.println("remote: " + pkt.substring(0, s)); + + pkt = pkt.substring(s + 1); + } + System.err.flush(); } private String longTypeOf(final TrackingRefUpdate u) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java index 6248ec2991..2c02545639 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java @@ -162,6 +162,7 @@ class Push extends TextBuiltin { printRefUpdateResult(uri, result, rru); } + AbstractFetchCommand.showRemoteMessages(result.getMessages()); if (everythingUpToDate) out.println("Everything up-to-date"); } |