public void logTweakEntry(String name, String newURL, long newRevision) throws SVNException { SVNProperties attributes = new SVNProperties(); attributes.put(SVNProperty.shortPropertyName(SVNProperty.KIND), SVNProperty.KIND_FILE); attributes.put(SVNProperty.shortPropertyName(SVNProperty.REVISION), Long.toString(newRevision)); attributes.put(SVNProperty.shortPropertyName(SVNProperty.DELETED), Boolean.FALSE.toString()); attributes.put(SVNProperty.shortPropertyName(SVNProperty.ABSENT), Boolean.FALSE.toString()); attributes.put(SVNProperty.shortPropertyName(SVNProperty.WORKING_SIZE), Long.toString(SVNProperty.WORKING_SIZE_UNKNOWN)); attributes.put(SVNProperty.shortPropertyName(SVNProperty.TEXT_TIME), SVNDate.NULL.format()); if (newURL != null) { attributes.put(SVNProperty.shortPropertyName(SVNProperty.URL), newURL); } logChangedEntryProperties(name, attributes); }
public void logTweakEntry(String name, String newURL, long newRevision) throws SVNException { SVNProperties attributes = new SVNProperties(); attributes.put(SVNProperty.shortPropertyName(SVNProperty.KIND), SVNProperty.KIND_FILE); attributes.put(SVNProperty.shortPropertyName(SVNProperty.REVISION), Long.toString(newRevision)); attributes.put(SVNProperty.shortPropertyName(SVNProperty.DELETED), Boolean.FALSE.toString()); attributes.put(SVNProperty.shortPropertyName(SVNProperty.ABSENT), Boolean.FALSE.toString()); attributes.put(SVNProperty.shortPropertyName(SVNProperty.WORKING_SIZE), Long.toString(SVNProperty.WORKING_SIZE_UNKNOWN)); attributes.put(SVNProperty.shortPropertyName(SVNProperty.TEXT_TIME), SVNDate.NULL.format()); if (newURL != null) { attributes.put(SVNProperty.shortPropertyName(SVNProperty.URL), newURL); } logChangedEntryProperties(name, attributes); }
public void logTweakEntry(String name, String newURL, long newRevision) throws SVNException { SVNProperties attributes = new SVNProperties(); attributes.put(SVNProperty.shortPropertyName(SVNProperty.KIND), SVNProperty.KIND_FILE); attributes.put(SVNProperty.shortPropertyName(SVNProperty.REVISION), Long.toString(newRevision)); attributes.put(SVNProperty.shortPropertyName(SVNProperty.DELETED), Boolean.FALSE.toString()); attributes.put(SVNProperty.shortPropertyName(SVNProperty.ABSENT), Boolean.FALSE.toString()); attributes.put(SVNProperty.shortPropertyName(SVNProperty.WORKING_SIZE), Long.toString(SVNProperty.WORKING_SIZE_UNKNOWN)); attributes.put(SVNProperty.shortPropertyName(SVNProperty.TEXT_TIME), SVNDate.NULL.format()); if (newURL != null) { attributes.put(SVNProperty.shortPropertyName(SVNProperty.URL), newURL); } logChangedEntryProperties(name, attributes); }
protected void makeTextConflictEntry(SVNMergeFileSet files, String mineFilePath, String newFilePath, String oldFilePath) throws SVNException { SVNLog log = files.getLog(); if (log != null) { SVNProperties command = new SVNProperties(); command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_WRK), mineFilePath); command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_NEW), newFilePath); command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_OLD), oldFilePath); log.logChangedEntryProperties(files.getWCPath(), command); command.clear(); } }
protected void makeTextConflictEntry(SVNMergeFileSet files, String mineFilePath, String newFilePath, String oldFilePath) throws SVNException { SVNLog log = files.getLog(); if (log != null) { SVNProperties command = new SVNProperties(); command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_WRK), mineFilePath); command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_NEW), newFilePath); command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_OLD), oldFilePath); log.logChangedEntryProperties(files.getWCPath(), command); command.clear(); } }
protected void makeTextConflictEntry(SVNMergeFileSet files, String mineFilePath, String newFilePath, String oldFilePath) throws SVNException { SVNProperties command = new SVNProperties(); SVNLog log = files.getLog(); command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_WRK), mineFilePath); command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_NEW), newFilePath); command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_OLD), oldFilePath); log.logChangedEntryProperties(files.getWCPath(), command); command.clear(); }
public static void addProperties(SVNAdminArea dir, String fileName, Map properties, boolean base, SVNLog log) throws SVNException { if (properties == null || properties.isEmpty()) { return; } Map regularProps = new HashMap(); Map entryProps = new HashMap(); Map wcProps = new HashMap(); for (Iterator names = properties.keySet().iterator(); names.hasNext();) { String propName = (String) names.next(); String propValue = (String) properties.get(propName); if (SVNProperty.isEntryProperty(propName)) { entryProps.put(SVNProperty.shortPropertyName(propName), propValue); } else if (SVNProperty.isWorkingCopyProperty(propName)) { wcProps.put(propName, propValue); } else { regularProps.put(propName, propValue); } } SVNVersionedProperties props = base ? dir.getBaseProperties(fileName) : dir.getProperties(fileName); props.removeAll(); for (Iterator propNames = regularProps.keySet().iterator(); propNames.hasNext();) { String propName = (String) propNames.next(); String propValue = (String) regularProps.get(propName); props.setPropertyValue(propName, propValue); } dir.saveVersionedProperties(log, false); log.logChangedEntryProperties(fileName, entryProps); log.logChangedWCProperties(fileName, wcProps); }
protected void makeBinaryConflictEntry(SVNMergeFileSet files, String newFilePath, String oldFilePath) throws SVNException { SVNProperties command = new SVNProperties(); SVNLog log = files.getLog(); if (log != null) { command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_NEW), newFilePath); command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_OLD), oldFilePath); log.logChangedEntryProperties(files.getWCPath(), command); command.clear(); } files.getAdminArea().saveEntries(false); }
attributes.put(SVNProperty.shortPropertyName(SVNProperty.SCHEDULE), schedule); attributes.put(SVNProperty.shortPropertyName(SVNProperty.COPIED), copied ? Boolean.TRUE.toString() : null); if (!(dirEntry.isScheduledForAddition() && SVNProperty.SCHEDULE_DELETE.equals(schedule))) { if ((flags & SCHEDULE) != 0) { attributes.put(SVNProperty.shortPropertyName(SVNProperty.SCHEDULE), schedule); attributes.put(SVNProperty.shortPropertyName(SVNProperty.COPIED), copied ? Boolean.TRUE.toString() : null);
protected void makeBinaryConflictEntry(SVNMergeFileSet files, String newFilePath, String oldFilePath) throws SVNException { SVNProperties command = new SVNProperties(); SVNLog log = files.getLog(); command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_NEW), newFilePath); command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_OLD), oldFilePath); log.logChangedEntryProperties(files.getWCPath(), command); command.clear(); files.getAdminArea().saveEntries(false); }
protected void makeBinaryConflictEntry(SVNMergeFileSet files, String newFilePath, String oldFilePath) throws SVNException { SVNProperties command = new SVNProperties(); SVNLog log = files.getLog(); if (log != null) { command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_NEW), newFilePath); command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_OLD), oldFilePath); log.logChangedEntryProperties(files.getWCPath(), command); command.clear(); } files.getAdminArea().saveEntries(false); }
private void handlePropTime(SVNLog log, SVNEntry entry) throws SVNException { if (getFormatVersion() == SVNXMLAdminAreaFactory.WC_FORMAT) { return; } SVNProperties command = new SVNProperties(); command.put(SVNLog.NAME_ATTR, entry.getName()); command.put(SVNProperty.shortPropertyName(SVNProperty.PROP_TIME), SVNDate.formatDate(new Date(0), true)); log.addCommand(SVNLog.MODIFY_ENTRY, command, false); }
private void handlePropTime(SVNLog log, SVNEntry entry) throws SVNException { if (getFormatVersion() == SVNXMLAdminAreaFactory.WC_FORMAT) { return; } SVNProperties command = new SVNProperties(); command.put(SVNLog.NAME_ATTR, entry.getName()); command.put(SVNProperty.shortPropertyName(SVNProperty.PROP_TIME), SVNDate.formatDate(new Date(0), true)); log.addCommand(SVNLog.MODIFY_ENTRY, command, false); }
private void handlePropTime(SVNLog log, SVNEntry entry) throws SVNException { if (getFormatVersion() == SVNXMLAdminAreaFactory.WC_FORMAT) { return; } SVNProperties command = new SVNProperties(); command.put(SVNLog.NAME_ATTR, entry.getName()); command.put(SVNProperty.shortPropertyName(SVNProperty.PROP_TIME), SVNDate.formatDate(new Date(0), true)); log.addCommand(SVNLog.MODIFY_ENTRY, command, false); }
public static void addProperties(SVNAdminArea dir, String fileName, SVNProperties properties, boolean base, SVNLog log) throws SVNException { if (properties == null || properties.isEmpty()) { return; } SVNProperties regularProps = new SVNProperties(); SVNProperties entryProps = new SVNProperties(); SVNProperties wcProps = new SVNProperties(); for (Iterator names = properties.nameSet().iterator(); names.hasNext();) { String propName = (String) names.next(); SVNPropertyValue propValue = properties.getSVNPropertyValue(propName); if (SVNProperty.isEntryProperty(propName)) { entryProps.put(SVNProperty.shortPropertyName(propName), propValue); } else if (SVNProperty.isWorkingCopyProperty(propName)) { wcProps.put(propName, propValue); } else { regularProps.put(propName, propValue); } } SVNVersionedProperties props = base ? dir.getBaseProperties(fileName) : dir.getProperties(fileName); props.removeAll(); for (Iterator propNames = regularProps.nameSet().iterator(); propNames.hasNext();) { String propName = (String) propNames.next(); SVNPropertyValue propValue = regularProps.getSVNPropertyValue(propName); props.setPropertyValue(propName, propValue); } dir.saveVersionedProperties(log, false); log.logChangedEntryProperties(fileName, entryProps); log.logChangedWCProperties(fileName, wcProps); }
public static void addProperties(SVNAdminArea dir, String fileName, SVNProperties properties, boolean base, SVNLog log) throws SVNException { if (properties == null || properties.isEmpty()) { return; } SVNProperties regularProps = new SVNProperties(); SVNProperties entryProps = new SVNProperties(); SVNProperties wcProps = new SVNProperties(); for (Iterator names = properties.nameSet().iterator(); names.hasNext();) { String propName = (String) names.next(); SVNPropertyValue propValue = properties.getSVNPropertyValue(propName); if (SVNProperty.isEntryProperty(propName)) { entryProps.put(SVNProperty.shortPropertyName(propName), propValue); } else if (SVNProperty.isWorkingCopyProperty(propName)) { wcProps.put(propName, propValue); } else { regularProps.put(propName, propValue); } } SVNVersionedProperties props = base ? dir.getBaseProperties(fileName) : dir.getProperties(fileName); props.removeAll(); for (Iterator propNames = regularProps.nameSet().iterator(); propNames.hasNext();) { String propName = (String) propNames.next(); SVNPropertyValue propValue = regularProps.getSVNPropertyValue(propName); props.setPropertyValue(propName, propValue); } dir.saveVersionedProperties(log, false); log.logChangedEntryProperties(fileName, entryProps); log.logChangedWCProperties(fileName, wcProps); }
public static void addProperties(SVNAdminArea dir, String fileName, SVNProperties properties, boolean base, SVNLog log) throws SVNException { if (properties == null || properties.isEmpty()) { return; } SVNProperties regularProps = new SVNProperties(); SVNProperties entryProps = new SVNProperties(); SVNProperties wcProps = new SVNProperties(); for (Iterator names = properties.nameSet().iterator(); names.hasNext();) { String propName = (String) names.next(); SVNPropertyValue propValue = properties.getSVNPropertyValue(propName); if (SVNProperty.isEntryProperty(propName)) { entryProps.put(SVNProperty.shortPropertyName(propName), propValue); } else if (SVNProperty.isWorkingCopyProperty(propName)) { wcProps.put(propName, propValue); } else { regularProps.put(propName, propValue); } } SVNVersionedProperties props = base ? dir.getBaseProperties(fileName) : dir.getProperties(fileName); props.removeAll(); for (Iterator propNames = regularProps.nameSet().iterator(); propNames.hasNext();) { String propName = (String) propNames.next(); SVNPropertyValue propValue = regularProps.getSVNPropertyValue(propName); props.setPropertyValue(propName, propValue); } dir.saveVersionedProperties(log, false); log.logChangedEntryProperties(fileName, entryProps); log.logChangedWCProperties(fileName, wcProps); }
protected SVNMergeResult handleMarkBinaryConflicted(SVNMergeFileSet files) throws SVNException { SVNProperties command = new SVNProperties(); File root = files.getAdminArea().getRoot(); SVNLog log = files.getLog(); File oldFile = SVNFileUtil.createUniqueFile(root, files.getWCPath(), files.getBaseLabel(), false); File newFile = SVNFileUtil.createUniqueFile(root, files.getWCPath(), files.getRepositoryLabel(), false); SVNFileUtil.copyFile(files.getBaseFile(), oldFile, false); SVNFileUtil.copyFile(files.getRepositoryFile(), newFile, false); if (!files.getLocalPath().equals(files.getWCPath())) { File mineFile = SVNFileUtil.createUniqueFile(root, files.getWCPath(), files.getLocalLabel(), false); String minePath = SVNFileUtil.getBasePath(mineFile); command.put(SVNLog.NAME_ATTR, files.getLocalPath()); command.put(SVNLog.DEST_ATTR, minePath); log.addCommand(SVNLog.MOVE, command, false); command.clear(); command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_WRK), minePath); } else { command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_WRK), ""); } String newPath = SVNFileUtil.getBasePath(newFile); String oldPath = SVNFileUtil.getBasePath(oldFile); makeBinaryConflictEntry(files, newPath, oldPath); return SVNMergeResult.createMergeResult(SVNStatusType.CONFLICTED, null); }
protected SVNMergeResult handleMarkBinaryConflicted(SVNMergeFileSet files) throws SVNException { SVNProperties command = new SVNProperties(); File root = files.getAdminArea().getRoot(); SVNLog log = files.getLog(); File oldFile = SVNFileUtil.createUniqueFile(root, files.getWCPath(), files.getBaseLabel(), false); File newFile = SVNFileUtil.createUniqueFile(root, files.getWCPath(), files.getRepositoryLabel(), false); SVNFileUtil.copyFile(files.getBaseFile(), oldFile, false); SVNFileUtil.copyFile(files.getRepositoryFile(), newFile, false); if (!files.getLocalPath().equals(files.getWCPath())) { File mineFile = SVNFileUtil.createUniqueFile(root, files.getWCPath(), files.getLocalLabel(), false); String minePath = SVNFileUtil.getBasePath(mineFile); if (log != null) { command.put(SVNLog.NAME_ATTR, files.getLocalPath()); command.put(SVNLog.DEST_ATTR, minePath); log.addCommand(SVNLog.MOVE, command, false); command.clear(); } command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_WRK), minePath); } else { command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_WRK), ""); } String newPath = SVNFileUtil.getBasePath(newFile); String oldPath = SVNFileUtil.getBasePath(oldFile); makeBinaryConflictEntry(files, newPath, oldPath); return SVNMergeResult.createMergeResult(SVNStatusType.CONFLICTED, null); }
protected SVNMergeResult handleMarkBinaryConflicted(SVNMergeFileSet files) throws SVNException { SVNProperties command = new SVNProperties(); File root = files.getAdminArea().getRoot(); SVNLog log = files.getLog(); File oldFile = SVNFileUtil.createUniqueFile(root, files.getWCPath(), files.getBaseLabel(), false); File newFile = SVNFileUtil.createUniqueFile(root, files.getWCPath(), files.getRepositoryLabel(), false); SVNFileUtil.copyFile(files.getBaseFile(), oldFile, false); SVNFileUtil.copyFile(files.getRepositoryFile(), newFile, false); if (!files.getLocalPath().equals(files.getWCPath())) { File mineFile = SVNFileUtil.createUniqueFile(root, files.getWCPath(), files.getLocalLabel(), false); String minePath = SVNFileUtil.getBasePath(mineFile); if (log != null) { command.put(SVNLog.NAME_ATTR, files.getLocalPath()); command.put(SVNLog.DEST_ATTR, minePath); log.addCommand(SVNLog.MOVE, command, false); command.clear(); } command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_WRK), minePath); } else { command.put(SVNProperty.shortPropertyName(SVNProperty.CONFLICT_WRK), ""); } String newPath = SVNFileUtil.getBasePath(newFile); String oldPath = SVNFileUtil.getBasePath(oldFile); makeBinaryConflictEntry(files, newPath, oldPath); return SVNMergeResult.createMergeResult(SVNStatusType.CONFLICTED, null); }