/** * Recursively removes all DAV-specific <span class="javakeyword">"svn:wc:"</span> properties * from the <code>directory</code> and beneath. * * <p> * This method does not connect to a repository, it's a local operation only. Nor does it change any user's * versioned data. Changes are made only in administrative version control files. * * @param directory working copy path * @throws SVNException * @since 1.2 */ public void doCleanupWCProperties(File directory) throws SVNException { SVNWCAccess wcAccess = SVNWCAccess.newInstance(this); try { SVNAdminArea dir = wcAccess.open(directory, true, true, -1); if (dir != null) { SVNPropertiesManager.deleteWCProperties(dir, null, true); } } finally { wcAccess.close(); } }
/** * Recursively removes all DAV-specific <span * class="javakeyword">"svn:wc:"</span> properties from the * <code>directory</code> and beneath. * <p> * This method does not connect to a repository, it's a local operation * only. Nor does it change any user's versioned data. Changes are made only * in administrative version control files. * * @param directory * working copy path * @throws SVNException * @since 1.2 */ public void doCleanupWCProperties(File directory) throws SVNException { SVNWCAccess wcAccess = SVNWCAccess.newInstance(this); try { SVNAdminArea dir = wcAccess.open(directory, true, true, -1); if (dir != null) { SVNPropertiesManager.deleteWCProperties(dir, null, true); } } finally { wcAccess.close(); } }
/** * Recursively removes all DAV-specific <span class="javakeyword">"svn:wc:"</span> properties * from the <code>directory</code> and beneath. * * <p> * This method does not connect to a repository, it's a local operation only. Nor does it change any user's * versioned data. Changes are made only in administrative version control files. * * @param directory working copy path * @throws SVNException * @since 1.2 */ public void doCleanupWCProperties(File directory) throws SVNException { SVNWCAccess wcAccess = SVNWCAccess.newInstance(this); try { SVNAdminArea dir = wcAccess.open(directory, true, true, -1); if (dir != null) { SVNPropertiesManager.deleteWCProperties(dir, null, true); } } finally { wcAccess.close(); } }
public static void markEntry(SVNAdminArea dir, SVNEntry entry, String schedule, boolean copied, boolean keepLocal, int flags) throws SVNException { if (dir.getThisDirName().equals(entry.getName())) { return; } Map attributes = new SVNHashMap(); File path = dir.getFile(entry.getName()); if (entry.getKind() == SVNNodeKind.DIR) { SVNAdminArea childDir = dir.getWCAccess().retrieve(path); markTree(childDir, schedule, copied, keepLocal, flags); } if ((flags & SCHEDULE) != 0) { attributes.put(SVNProperty.SCHEDULE, schedule); } if ((flags & COPIED) != 0) { attributes.put(SVNProperty.COPIED, copied ? Boolean.TRUE.toString() : null); } dir.modifyEntry(entry.getName(), attributes, true, false); if (copied) { SVNPropertiesManager.deleteWCProperties(dir, entry.getName(), false); } if (SVNProperty.SCHEDULE_DELETE.equals(schedule)) { SVNEvent event = SVNEventFactory.createSVNEvent(path, SVNNodeKind.UNKNOWN, null, 0, SVNEventAction.DELETE, null, null, null); dir.getWCAccess().handleEvent(event); } }
private static void postCopyCleanup(SVNAdminArea dir) throws SVNException { SVNPropertiesManager.deleteWCProperties(dir, null, false); SVNFileUtil.setHidden(dir.getAdminDirectory(), true); Map attributes = new SVNHashMap();
private static void postCopyCleanup(SVNAdminArea dir) throws SVNException { SVNPropertiesManager.deleteWCProperties(dir, null, false); SVNFileUtil.setHidden(dir.getAdminDirectory(), true); Map attributes = new SVNHashMap();
public static void markEntry(SVNAdminArea dir, SVNEntry entry, String schedule, boolean copied, boolean keepLocal, int flags) throws SVNException { if (dir.getThisDirName().equals(entry.getName())) { return; } Map attributes = new SVNHashMap(); File path = dir.getFile(entry.getName()); if (entry.getKind() == SVNNodeKind.DIR) { SVNAdminArea childDir = dir.getWCAccess().retrieve(path); markTree(childDir, schedule, copied, keepLocal, flags); } if ((flags & SCHEDULE) != 0) { attributes.put(SVNProperty.SCHEDULE, schedule); } if ((flags & COPIED) != 0) { attributes.put(SVNProperty.COPIED, copied ? Boolean.TRUE.toString() : null); } dir.modifyEntry(entry.getName(), attributes, true, false); if (copied) { SVNPropertiesManager.deleteWCProperties(dir, entry.getName(), false); } if (SVNProperty.SCHEDULE_DELETE.equals(schedule)) { SVNEvent event = SVNEventFactory.createSVNEvent(path, SVNNodeKind.UNKNOWN, null, 0, SVNEventAction.DELETE, null, null, null); dir.getWCAccess().handleEvent(event); } }
public static void markEntry(SVNAdminArea dir, SVNEntry entry, String schedule, boolean copied, boolean keepLocal, int flags) throws SVNException { if (dir.getThisDirName().equals(entry.getName())) { return; } Map attributes = new SVNHashMap(); File path = dir.getFile(entry.getName()); if (entry.getKind() == SVNNodeKind.DIR) { SVNAdminArea childDir = dir.getWCAccess().retrieve(path); markTree(childDir, schedule, copied, keepLocal, flags); } if ((flags & SCHEDULE) != 0) { attributes.put(SVNProperty.SCHEDULE, schedule); } if ((flags & COPIED) != 0) { attributes.put(SVNProperty.COPIED, copied ? Boolean.TRUE.toString() : null); } dir.modifyEntry(entry.getName(), attributes, true, false); if (copied) { SVNPropertiesManager.deleteWCProperties(dir, entry.getName(), false); } if (SVNProperty.SCHEDULE_DELETE.equals(schedule)) { SVNEvent event = SVNEventFactory.createSVNEvent(path, SVNNodeKind.UNKNOWN, null, 0, SVNEventAction.DELETE, null, null, null); dir.getWCAccess().handleEvent(event); } }
private static void postCopyCleanup(SVNAdminArea dir) throws SVNException { SVNPropertiesManager.deleteWCProperties(dir, null, false); SVNFileUtil.setHidden(dir.getAdminDirectory(), true); Map attributes = new SVNHashMap();
public static void deleteWCProperties(SVNAdminArea dir, String name, boolean recursive) throws SVNException { if (name != null) { SVNVersionedProperties props = dir.getWCProperties(name); if (props != null) { props.removeAll(); } } if (recursive || name == null) { for (Iterator entries = dir.entries(false); entries.hasNext();) { SVNEntry entry = (SVNEntry) entries.next(); SVNVersionedProperties props = dir.getWCProperties(entry.getName()); if (props != null) { props.removeAll(); } if (entry.isFile() || dir.getThisDirName().equals(entry.getName())) { continue; } if (recursive) { SVNAdminArea childDir = dir.getWCAccess().retrieve(dir.getFile(entry.getName())); deleteWCProperties(childDir, null, true); } } } dir.saveWCProperties(false); }
public static void deleteWCProperties(SVNAdminArea dir, String name, boolean recursive) throws SVNException { if (name != null) { SVNVersionedProperties props = dir.getWCProperties(name); if (props != null) { props.removeAll(); } } if (recursive || name == null) { for (Iterator entries = dir.entries(false); entries.hasNext();) { SVNEntry entry = (SVNEntry) entries.next(); SVNVersionedProperties props = dir.getWCProperties(entry.getName()); if (props != null) { props.removeAll(); } if (entry.isFile() || dir.getThisDirName().equals(entry.getName())) { continue; } if (recursive) { SVNAdminArea childDir = dir.getWCAccess().retrieve(dir.getFile(entry.getName())); deleteWCProperties(childDir, null, true); } } } dir.saveWCProperties(false); }
public static void deleteWCProperties(SVNAdminArea dir, String name, boolean recursive) throws SVNException { if (name != null) { SVNVersionedProperties props = dir.getWCProperties(name); if (props != null) { props.removeAll(); } } if (recursive || name == null) { for (Iterator entries = dir.entries(false); entries.hasNext();) { SVNEntry entry = (SVNEntry) entries.next(); SVNVersionedProperties props = dir.getWCProperties(entry.getName()); if (props != null) { props.removeAll(); } if (entry.isFile() || dir.getThisDirName().equals(entry.getName())) { continue; } if (recursive) { SVNAdminArea childDir = dir.getWCAccess().retrieve(dir.getFile(entry.getName())); deleteWCProperties(childDir, null, true); } } } dir.saveWCProperties(false); }
SVNPropertiesManager.deleteWCProperties(adminArea, name, false); adminArea.saveEntries(false); return validatedURLs; SVNPropertiesManager.deleteWCProperties(adminArea, childEntry.getName(), false); SVNPropertiesManager.deleteWCProperties(adminArea, "", false); adminArea.saveEntries(false); return validatedURLs;
SVNPropertiesManager.deleteWCProperties(adminArea, name, false); adminArea.saveEntries(false); return validatedURLs; SVNPropertiesManager.deleteWCProperties(adminArea, childEntry.getName(), false); SVNPropertiesManager.deleteWCProperties(adminArea, "", false); adminArea.saveEntries(false); return validatedURLs;
SVNPropertiesManager.deleteWCProperties(adminArea, name, false); adminArea.saveEntries(false); return validatedURLs; SVNPropertiesManager.deleteWCProperties(adminArea, childEntry.getName(), false); SVNPropertiesManager.deleteWCProperties(adminArea, "", false); adminArea.saveEntries(false); return validatedURLs;
public static void deleteWCProperties(SVNAdminArea dir, String name, boolean recursive) throws SVNException { if (name != null) { SVNVersionedProperties props = dir.getWCProperties(name); if (props != null) { props.removeAll(); } } if (recursive || name == null) { for(Iterator entries = dir.entries(false); entries.hasNext();) { SVNEntry entry = (SVNEntry) entries.next(); if (name != null) { SVNVersionedProperties props = dir.getWCProperties(entry.getName()); if (props != null) { props.removeAll(); } } if (dir.getThisDirName().equals(entry.getName())) { continue; } if (entry.isFile()) { continue; } if (recursive) { SVNAdminArea childDir = dir.getWCAccess().retrieve(dir.getFile(entry.getName())); deleteWCProperties(childDir, null, true); } } } dir.saveWCProperties(false); }
SVNPropertiesManager.deleteWCProperties(adminArea, name, false); adminArea.saveEntries(false); return validatedURLs; SVNPropertiesManager.deleteWCProperties(adminArea, childEntry.getName(), false); SVNPropertiesManager.deleteWCProperties(adminArea, "", false); adminArea.saveEntries(false); return validatedURLs;
static void postCopyCleanup(SVNAdminArea dir) throws SVNException { SVNPropertiesManager.deleteWCProperties(dir, null, false); SVNFileUtil.setHidden(dir.getAdminDirectory(), true); for(Iterator entries = dir.entries(true); entries.hasNext();) { SVNEntry entry = (SVNEntry) entries.next(); boolean deleted = entry.isDeleted(); SVNNodeKind kind = entry.getKind(); if (entry.isDeleted()) { entry.setSchedule(SVNProperty.SCHEDULE_DELETE); entry.setDeleted(false); if (entry.isDirectory()) { entry.setKind(SVNNodeKind.FILE); } } if (entry.getLockToken() != null) { entry.setLockToken(null); entry.setLockOwner(null); entry.setLockCreationDate(null); } if (!deleted && kind == SVNNodeKind.DIR && !dir.getThisDirName().equals(entry.getName())) { SVNAdminArea childDir = dir.getWCAccess().retrieve(dir.getFile(entry.getName())); postCopyCleanup(childDir); } } dir.saveEntries(false); }
adminArea.cleanup(); if (deleteWCProperties) { SVNPropertiesManager.deleteWCProperties(adminArea, null, true);
adminArea.cleanup(); if (deleteWCProperties) { SVNPropertiesManager.deleteWCProperties(adminArea, null, true);