本文整理汇总了Java中org.apache.subversion.javahl.types.Status类的典型用法代码示例。如果您正苦于以下问题:Java Status类的具体用法?Java Status怎么用?Java Status使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Status类属于org.apache.subversion.javahl.types包,在下文中一共展示了Status类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JhlStatus
import org.apache.subversion.javahl.types.Status; //导入依赖的package包/类
/**
* Constructor
* @param status
*/
public JhlStatus(Status status, ISVNClient client) {
// note that status.textStatus must be different than 0 (the resource must exist)
super();
_s = status;
// This is a workaround for an SVNKit bug that results in _s.isConflicted == false for an old format
// working copy, even if the file is text conflicted.
boolean textConflicted = _s.getTextStatus() != null && _s.getTextStatus().equals(Status.Kind.conflicted);
try {
if (client != null && (_s.isConflicted() || textConflicted))
populateInfo(client, _s.getPath());
} catch (ClientException e) {
// Ignore
}
}
示例2: convert
import org.apache.subversion.javahl.types.Status; //导入依赖的package包/类
public static SVNStatus convert(final String path, Status status, final Convertor<String, SVNInfo> infoGetter) throws SVNException {
// no locks
return new PortableStatus(createUrl(status.getUrl()), new File(path), NodeKindConvertor.convert(status.getNodeKind()),
RevisionConvertor.convert(status.getRevision()), RevisionConvertor.convert(status.getLastChangedRevision()),
status.getLastChangedDate(), status.getLastCommitAuthor(), convert(status.getTextStatus()),
convert(status.getPropStatus()), convert(status.getRepositoryTextStatus()),
convert(status.getRepositoryPropStatus()), status.isLocked(), status.isCopied(), status.isSwitched(),
status.isFileExternal(), null, null, null, status.getChangelist(), WorkingCopyFormat.ONE_DOT_SEVEN.getFormat(),
status.isConflicted(),
new Getter<SVNInfo>() {
@Override
public SVNInfo get() {
return infoGetter.convert(path);
}
});
}
示例3: getStatus
import org.apache.subversion.javahl.types.Status; //导入依赖的package包/类
public ISVNStatus[] getStatus(File path, boolean descend, boolean getAll, boolean contactServer, boolean ignoreExternals, boolean noIgnore, ISVNStatusCallback callback) throws SVNClientException {
notificationHandler.setCommand(ISVNNotifyListener.Command.STATUS);
String filePathSVN = fileToSVNPath(path, false);
Depth depth = Depth.unknownOrImmediates(descend); // If descend is true, recurse fully, else do only immediate children.
notificationHandler.logCommandLine("status" + (contactServer?" -u":"")+ depthCommandLine(depth) + " " + filePathSVN);
notificationHandler.setBaseDir(SVNBaseDir.getBaseDir(path));
try {
StatusCallback statusCallback;
if (callback == null) {
statusCallback = new MyStatusCallback();
}
else {
statusCallback = new JhlStatusCallback(callback);
}
svnClient.status(
filePathSVN,
depth,
contactServer, // If update is set, contact the repository and augment the status structures with information about out-of-dateness
getAll,noIgnore, // retrieve all entries; otherwise, retrieve only "interesting" entries (local mods and/or out-of-date).
ignoreExternals, null, statusCallback);
List<Status> statusList = null;
if (statusCallback instanceof MyStatusCallback) {
statusList = ((MyStatusCallback)statusCallback).getStatusList();
}
else {
statusList = ((JhlStatusCallback)statusCallback).getStatusList();
}
return processFolderStatuses(processExternalStatuses(JhlConverter.convertStatus(
statusList, svnClient)), getAll, contactServer); // if yes the svn:externals will be ignored
} catch (ClientException e) {
if (e.getAprError() == ErrorCodes.wcNotDirectory || e.getAprError() == ErrorCodes.wcPathNotFound) {
// when folder is unversioned, an exception is thrown ...
return new ISVNStatus[] {new SVNStatusUnversioned(path)};
} else {
notificationHandler.logException(e);
throw new SVNClientException(e);
}
}
}
示例4: doStatus
import org.apache.subversion.javahl.types.Status; //导入依赖的package包/类
public void doStatus(String path, Status status) {
// Status can be null, in which case you are supposed to use the
// String to construct an otherwise null status object. I am not sure
// of the use-case for this right now, so I am just going to discard them
if (status != null)
statuses.add(status);
}
示例5: convertStatusKind
import org.apache.subversion.javahl.types.Status; //导入依赖的package包/类
public static SVNStatusKind convertStatusKind(Status.Kind kind) {
if (kind == null) {
return null;
}
switch (kind) {
case none :
return SVNStatusKind.NONE;
case normal :
return SVNStatusKind.NORMAL;
case added :
return SVNStatusKind.ADDED;
case missing :
return SVNStatusKind.MISSING;
case incomplete :
return SVNStatusKind.INCOMPLETE;
case deleted :
return SVNStatusKind.DELETED;
case replaced :
return SVNStatusKind.REPLACED;
case modified :
return SVNStatusKind.MODIFIED;
case merged :
return SVNStatusKind.MERGED;
case conflicted :
return SVNStatusKind.CONFLICTED;
case obstructed :
return SVNStatusKind.OBSTRUCTED;
case ignored :
return SVNStatusKind.IGNORED;
case external:
return SVNStatusKind.EXTERNAL;
case unversioned :
return SVNStatusKind.UNVERSIONED;
default : {
log.severe("unknown status kind :"+kind);
return SVNStatusKind.NONE;
}
}
}
示例6: convertStatus
import org.apache.subversion.javahl.types.Status; //导入依赖的package包/类
public static JhlStatus[] convertStatus(List<Status> status, ISVNClient client) {
JhlStatus[] jhlStatus = new JhlStatus[status.size()];
int i=0;
for (Status stat : status) {
jhlStatus[i] = new JhlStatus(stat, client);
i++;
}
return jhlStatus;
}
示例7: doStatus
import org.apache.subversion.javahl.types.Status; //导入依赖的package包/类
public void doStatus(String path, Status status) {
// Status can be null, in which case you are supposed to use the
// String to construct an otherwise null status object. I am not
// sure
// of the use-case for this right now, so I am just going to discard
// them
if (status != null)
statuses.add(status);
}
示例8: create
import org.apache.subversion.javahl.types.Status; //导入依赖的package包/类
public static StatusCallback create(final ISVNStatusHandler handler, final Convertor<String, SVNInfo> infoGetter,
final Consumer<SVNException> exceptionConsumer) {
return new StatusCallback() {
@Override
public void doStatus(String path, Status status) {
if (handler == null) return;
try {
handler.handleStatus(convert(path, status, infoGetter));
}
catch (SVNException e) {
exceptionConsumer.consume(e);
}
}
};
}
示例9: doStatus
import org.apache.subversion.javahl.types.Status; //导入依赖的package包/类
public void doStatus(String path, Status status) {
worker.doStatus(path, new JhlStatus(status, null));
if (status != null) {
statusList.add(status);
}
}
示例10: getStatusList
import org.apache.subversion.javahl.types.Status; //导入依赖的package包/类
public List<Status> getStatusList() {
return statusList;
}
示例11: getStatusList
import org.apache.subversion.javahl.types.Status; //导入依赖的package包/类
public List<Status> getStatusList()
{
return statuses;
}
示例12: convert
import org.apache.subversion.javahl.types.Status; //导入依赖的package包/类
public static JhlStatus convert(Status status, ISVNClient client) {
return new JhlStatus(status, client);
}
示例13: getStatusList
import org.apache.subversion.javahl.types.Status; //导入依赖的package包/类
public List<Status> getStatusList() {
return statuses;
}
示例14: doStatus
import org.apache.subversion.javahl.types.Status; //导入依赖的package包/类
/**
* the method will be called for each status item
* @param path the path of the object
* @param status the status object, may be null
*/
public void doStatus(String path, Status status);