|
|
|
|
|
|
|
|
public class CheckoutConflictException extends IOException { |
|
|
public class CheckoutConflictException extends IOException { |
|
|
private static final long serialVersionUID = 1L; |
|
|
private static final long serialVersionUID = 1L; |
|
|
|
|
|
|
|
|
|
|
|
private final String[] conflicting; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Construct a CheckoutConflictException for the specified file |
|
|
* Construct a CheckoutConflictException for the specified file |
|
|
* |
|
|
* |
|
|
|
|
|
|
|
|
*/ |
|
|
*/ |
|
|
public CheckoutConflictException(String file) { |
|
|
public CheckoutConflictException(String file) { |
|
|
super(MessageFormat.format(JGitText.get().checkoutConflictWithFile, file)); |
|
|
super(MessageFormat.format(JGitText.get().checkoutConflictWithFile, file)); |
|
|
|
|
|
conflicting = new String[] { file }; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
|
|
|
|
|
|
*/ |
|
|
*/ |
|
|
public CheckoutConflictException(String[] files) { |
|
|
public CheckoutConflictException(String[] files) { |
|
|
super(MessageFormat.format(JGitText.get().checkoutConflictWithFiles, buildList(files))); |
|
|
super(MessageFormat.format(JGitText.get().checkoutConflictWithFiles, buildList(files))); |
|
|
|
|
|
conflicting = files; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @return the relative paths of the conflicting files (relative to the |
|
|
|
|
|
* working directory root). |
|
|
|
|
|
* @since 4.4 |
|
|
|
|
|
*/ |
|
|
|
|
|
public String[] getConflictingFiles() { |
|
|
|
|
|
return conflicting; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private static String buildList(String[] files) { |
|
|
private static String buildList(String[] files) { |