From 1a2db96c79f3e6fdf402ffa9f85f8e48303ac8ff Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Sun, 20 Jan 2019 15:12:45 +0900 Subject: Stop using deprecated methods of RemoteSetUrlCommand/RemoteRemoveCommand Change-Id: I5234474b359a32bdae501b181f0726be2af1ec6a Signed-off-by: David Pursehouse --- org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'org.eclipse.jgit.pgm/src') diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java index 63eba15abc..efd61fae16 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java @@ -53,6 +53,7 @@ import org.eclipse.jgit.api.RemoteAddCommand; import org.eclipse.jgit.api.RemoteListCommand; import org.eclipse.jgit.api.RemoteRemoveCommand; import org.eclipse.jgit.api.RemoteSetUrlCommand; +import org.eclipse.jgit.api.RemoteSetUrlCommand.UriType; import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.pgm.internal.CLIText; import org.eclipse.jgit.pgm.opt.CmdLineParser; @@ -99,13 +100,13 @@ class Remote extends TextBuiltin { cmd.call(); } else if ("remove".equals(command) || "rm".equals(command)) { //$NON-NLS-1$ //$NON-NLS-2$ RemoteRemoveCommand cmd = git.remoteRemove(); - cmd.setName(name); + cmd.setRemoteName(name); cmd.call(); } else if ("set-url".equals(command)) { //$NON-NLS-1$ RemoteSetUrlCommand cmd = git.remoteSetUrl(); - cmd.setName(name); - cmd.setUri(new URIish(uri)); - cmd.setPush(push); + cmd.setRemoteName(name); + cmd.setRemoteUri(new URIish(uri)); + cmd.setUriType(push ? UriType.PUSH : UriType.FETCH); cmd.call(); } else if ("update".equals(command)) { //$NON-NLS-1$ // reuse fetch command for basic implementation of remote update -- cgit v1.2.3