コード例 #1
0
 public static SVNAdminArea upgrade(SVNAdminArea area) throws SVNException {
   if (isUpgradeEnabled() && !ourFactories.isEmpty()) {
     Collection enabledFactories =
         getSelector().getEnabledFactories(area.getRoot(), ourFactories, true);
     if (!enabledFactories.isEmpty()) {
       SVNAdminAreaFactory newestFactory =
           (SVNAdminAreaFactory) enabledFactories.iterator().next();
       SVNAdminArea newArea = newestFactory.doChangeWCFormat(area);
       if (newArea != null && newArea != area && newArea.getWCAccess() != null) {
         SVNEvent event =
             SVNEventFactory.createSVNEvent(
                 newArea.getRoot(),
                 SVNNodeKind.DIR,
                 null,
                 SVNRepository.INVALID_REVISION,
                 SVNEventAction.UPGRADE,
                 null,
                 null,
                 null);
         newArea.getWCAccess().handleEvent(event, ISVNEventHandler.UNKNOWN);
       }
       area = newArea;
     }
   }
   return area;
 }
コード例 #2
0
 public static SVNAdminArea changeWCFormat(SVNAdminArea adminArea, int format)
     throws SVNException {
   SVNAdminAreaFactory factory = getAdminAreaFactory(format);
   SVNAdminArea newArea = factory.doChangeWCFormat(adminArea);
   if (newArea != null && newArea != adminArea && newArea.getWCAccess() != null) {
     SVNEvent event =
         SVNEventFactory.createSVNEvent(
             newArea.getRoot(),
             SVNNodeKind.DIR,
             null,
             SVNRepository.INVALID_REVISION,
             SVNEventAction.UPGRADE,
             null,
             null,
             null);
     newArea.getWCAccess().handleEvent(event, ISVNEventHandler.UNKNOWN);
   }
   adminArea = newArea;
   return adminArea;
 }