cantWrite=Can't write {0}
changesNotStagedForCommit=Changes not staged for commit:
changesToBeCommitted=Changes to be committed:
+checkoutConflict=error: Your local changes to the following files would be overwritten by checkout:
+checkoutConflictPathLine=\t{0}
commitLabel=commit
configFileNotFound=configuration file {0} not found
conflictingUsageOf_git_dir_andArguments=conflicting usage of --git-dir and arguments
/*
* Copyright (C) 2010, 2012 Chris Aniszczyk <caniszczyk@gmail.com>
+ * Copyright (C) 2013, Obeo
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
import org.eclipse.jgit.api.CheckoutCommand;
import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.api.errors.CheckoutConflictException;
import org.eclipse.jgit.api.errors.RefAlreadyExistsException;
import org.eclipse.jgit.api.errors.RefNotFoundException;
import org.eclipse.jgit.lib.Constants;
} catch (RefAlreadyExistsException e) {
throw die(MessageFormat.format(CLIText.get().branchAlreadyExists,
name));
+ } catch (CheckoutConflictException e) {
+ outw.println(CLIText.get().checkoutConflict);
+ for (String path : e.getConflictingPaths())
+ outw.println(MessageFormat.format(
+ CLIText.get().checkoutConflictPathLine, path));
}
}
}
/*
* Copyright (C) 2010, 2013 Sasa Zivkov <sasa.zivkov@sap.com>
+ * Copyright (C) 2013, Obeo
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
/***/ public String cantWrite;
/***/ public String changesNotStagedForCommit;
/***/ public String changesToBeCommitted;
+ /***/ public String checkoutConflict;
+ /***/ public String checkoutConflictPathLine;
/***/ public String commitLabel;
/***/ public String conflictingUsageOf_git_dir_andArguments;
/***/ public String couldNotCreateBranch;