protected SVNCommitItem[] filterSkippedItemsAndLockTokens(Collection<SVNCommitItem> items, Map<String, ?> lockTokens) { for (int i = 0; myCommitItems != null && i < myCommitItems.length; i++) { SVNCommitItem commitItem = myCommitItems[i]; if (!myIsSkipped[i]) { items.add(commitItem); } else if (lockTokens != null) { lockTokens.remove(commitItem.getURL().toString()); } } return (SVNCommitItem[]) items.toArray(new SVNCommitItem[items.size()]); }
SVNCommitPacket removeSkippedItems() { if (this == EMPTY) { return EMPTY; } Collection items = new ArrayList(); Map lockTokens = myLockTokens == null ? null : new HashMap(myLockTokens); for (int i = 0; myCommitItems != null && i < myCommitItems.length; i++) { SVNCommitItem commitItem = myCommitItems[i]; if (!myIsSkipped[i]) { items.add(commitItem); } else if (lockTokens != null) { lockTokens.remove(commitItem.getURL().toString()); } } SVNCommitItem[] filteredItems = (SVNCommitItem[]) items.toArray(new SVNCommitItem[items.size()]); return new SVNCommitPacket(null, filteredItems, lockTokens); }
SVNCommitPacket removeSkippedItems() { if (this == EMPTY) { return EMPTY; } Collection items = new ArrayList(); Map lockTokens = myLockTokens == null ? null : new SVNHashMap(myLockTokens); for (int i = 0; myCommitItems != null && i < myCommitItems.length; i++) { SVNCommitItem commitItem = myCommitItems[i]; if (!myIsSkipped[i]) { items.add(commitItem); } else if (lockTokens != null) { lockTokens.remove(commitItem.getURL().toString()); } } SVNCommitItem[] filteredItems = (SVNCommitItem[]) items.toArray(new SVNCommitItem[items.size()]); return new SVNCommitPacket(null, filteredItems, lockTokens); }
SVNCommitPacket removeSkippedItems() { if (this == EMPTY) { return EMPTY; } Collection items = new ArrayList(); Map lockTokens = myLockTokens == null ? null : new SVNHashMap(myLockTokens); for (int i = 0; myCommitItems != null && i < myCommitItems.length; i++) { SVNCommitItem commitItem = myCommitItems[i]; if (!myIsSkipped[i]) { items.add(commitItem); } else if (lockTokens != null) { lockTokens.remove(commitItem.getURL().toString()); } } SVNCommitItem[] filteredItems = (SVNCommitItem[]) items.toArray(new SVNCommitItem[items.size()]); return new SVNCommitPacket(null, filteredItems, lockTokens); }
result.append(commitItem.getRevision()); result.append(" "); result.append(commitItem.getURL()); if (commitItem.isCopied()) { result.append("\n");
result.append(commitItem.getRevision()); result.append(" "); result.append(commitItem.getURL()); if (commitItem.isCopied()) { result.append("\n");
for (int i = 0; i < items.length; i++) { SVNCommitItem item = items[i]; String path = item.getPath() != null ? item.getPath() : item.getURL().toString(); if ("".equals(path) || path == null) { path = ".";
for (int i = 0; i < items.length; i++) { SVNCommitItem item = items[i]; String path = item.getPath() != null ? item.getPath() : item.getURL().toString(); if ("".equals(path) || path == null) { path = ".";
result.append(commitItem.getRevision()); result.append(" "); result.append(commitItem.getURL()); if (commitItem.isCopied()) { result.append("\n");
result.append(commitItem.getRevision()); result.append(" "); result.append(commitItem.getURL()); if (commitItem.isCopied()) { result.append("\n");
for (int i = 0; i < items.length; i++) { SVNCommitItem item = items[i]; if (itemsMap.containsKey(item.getURL().toString())) { SVNCommitItem oldItem = (SVNCommitItem) itemsMap.get(item.getURL().toString()); SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_DUPLICATE_COMMIT_URL, "Cannot commit both ''{0}'' and ''{1}'' as they refer to the same URL", SVNErrorManager.error(err); itemsMap.put(item.getURL().toString(), item);
for (int i = 0; i < items.length; i++) { SVNCommitItem item = items[i]; if (itemsMap.containsKey(item.getURL())) { SVNCommitItem oldItem = (SVNCommitItem) itemsMap.get(item.getURL()); SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_DUPLICATE_COMMIT_URL, "Cannot commit both ''{0}'' and ''{1}'' as they refer to the same URL", SVNErrorManager.error(err, SVNLogType.WC); itemsMap.put(item.getURL(), item);
for (int i = 0; i < items.length; i++) { SVNCommitItem item = items[i]; if (itemsMap.containsKey(item.getURL())) { SVNCommitItem oldItem = (SVNCommitItem) itemsMap.get(item.getURL()); SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_DUPLICATE_COMMIT_URL, "Cannot commit both ''{0}'' and ''{1}'' as they refer to the same URL", SVNErrorManager.error(err, SVNLogType.WC); itemsMap.put(item.getURL(), item);
for (int i = 0; i < items.length; i++) { SVNCommitItem item = items[i]; if (itemsMap.containsKey(item.getURL())) { SVNCommitItem oldItem = (SVNCommitItem) itemsMap.get(item.getURL()); SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_DUPLICATE_COMMIT_URL, "Cannot commit both ''{0}'' and ''{1}'' as they refer to the same URL", SVNErrorManager.error(err, SVNLogType.WC); itemsMap.put(item.getURL(), item);
public static SvnCommitItem commitItem(SVNCommitItem item) { SvnCommitItem i = new SvnCommitItem(); i.setPath(item.getFile()); i.setUrl(item.getURL()); i.setKind(item.getKind()); if (item.getCopyFromRevision() != null) {