1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
/**
* Renvoie des informations concernant le repository passé dans l'instance ScmFileSet.
*
* @param scmFileSet contient la valeur basedir et le ficher à analyser
* @param user login utilisateur SVN
* @param password mot de passe de SVN
* @return une liste d'objets de type SvnInfoItem
équilvalente à :
* svn --username XXXXX --password ***** --non-interactive info FICHIER_A_ANALYSER
*/
@SuppressWarnings("unchecked")
public List<SvnInfoItem> getInfo(ScmFileSet scmFileSet, String user,
String password) {
SvnInfoCommand svnInfo = new SvnInfoCommand();
svnInfo.setLogger(new DefaultLog());
ScmProviderRepository scmProviderRepository = getRepository()
.getProviderRepository();
scmProviderRepository.setPassword(user);
scmProviderRepository.setUser(password);
CommandParameters commandParameters = new CommandParameters();
try {
return ((SvnInfoScmResult) svnInfo.execute(scmProviderRepository,
scmFileSet, commandParameters)).getInfoItems();
} catch (ScmException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
return null;
} |
Partager