Package org.exist.util.io

Examples of org.exist.util.io.Resource


        boolean hasTextConflicts = adminArea.hasTextConflict(info.Name);
        boolean hasPropConflicts = adminArea.hasPropConflict(info.Name);
        if (hasTextConflicts || hasPropConflicts) {
            info.isSkipped = true;
            Collection skippedPaths = getSkippedPaths();
            File file = new Resource(myAdminInfo.getAnchor().getRoot(), path);
            skippedPaths.add(file);
            SVNEvent event = SVNEventFactory.createSVNEvent(adminArea.getFile(info.Name), SVNNodeKind.FILE,
                    null, myTargetRevision, hasTextConflicts ? SVNStatusType.CONFLICTED : SVNStatusType.UNKNOWN,
                    hasPropConflicts ? SVNStatusType.CONFLICTED : SVNStatusType.UNKNOWN,
                    SVNStatusType.LOCK_INAPPLICABLE, SVNEventAction.SKIP, SVNEventAction.UPDATE_UPDATE, null, null);
View Full Code Here


        if (mySwitchURL == null) {
            SVNAdminArea area = null;
            SVNEntry dirEntry = null;
           
            File areaPath = new Resource(myAdminInfo.getAnchor().getRoot(), info.getPath());           
            try {
                area = myWCAccess.getAdminArea(areaPath);
                if (area != null) {
                    // could be missing.
                    dirEntry = area.getEntry(area.getThisDirName(), false);
View Full Code Here

        SVNCommitInfo info = null;
       
        try {
          WorkingCopy wc = new WorkingCopy(user, password);

          info = wc.commit(new Resource(wcDir), false, comment);
    } catch (SVNException svne) {
      svne.printStackTrace();
      throw new XPathException(this,
          "error while commiting a working copy to the repository '"
                    + wcDir + "'", svne);
View Full Code Here

       
    WorkingCopy wc = new WorkingCopy("", "");
       
        String uri = args[0].getStringValue();
      
        Resource wcURI = new Resource(uri);
      try {
      wc.addEntry(wcURI);
    } catch (SVNException svne) {
      throw new XPathException(this, "error while adding location '" + uri + "'", svne);
    }
View Full Code Here

        long endRev = getRevisionNumber(endRevision, repos, path);
        long startRev = getRevisionNumber(startRevision, repos, path);
        if (endRev < startRev) {
            SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CLIENT_BAD_REVISION, "Start revision must precede end revision"), SVNLogType.DEFAULT);
        }
        File tmpFile = new Resource(path.getParentFile(), SVNFileUtil.getAdminDirectoryName());
        tmpFile = new Resource(tmpFile, "tmp/text-base");
        if (!tmpFile.isDirectory()) {
            tmpFile = SVNFileUtil.createTempDirectory("annotate");
        }
        doAnnotate(path.getAbsolutePath(), startRev, tmpFile, repos, endRev, ignoreMimeType, handler,
                   inputEncoding, includeMergedRevisions);
    }
View Full Code Here

        }
       
        SVNRepository repos = null;
        if (rootWCPath != null && needsWC(pegRevision)) {           
            // open and use wc to create repository.
            File root = new Resource(rootWCPath);
            SVNAdminArea area = wcAccess.probeOpen(root, false, 0);
            repos = createRepository(null, root, area, pegRevision, sessionRevision, null);
            if (area != null) {
                wcAccess.closeAdminArea(area.getRoot());
            }
View Full Code Here

     */
    public static void main (String[] args) {
        //initialize SVNKit to work through file:/// protocol
        SamplesUtility.initializeFSFSprotocol();
       
        File baseDirectory = new Resource(args[0]);
        File reposRoot = new Resource(baseDirectory, "exampleRepository");
        File wcRoot = new Resource(baseDirectory, "exampleWC");
       
        try {
            //first create a repository and fill it with data
            SamplesUtility.createRepository(reposRoot);
            SVNCommitInfo info = SamplesUtility.createRepositoryTree(reposRoot);
View Full Code Here

                String conflictNew = entry.getConflictNew();
                String conflictWorking = entry.getConflictWorking();
               
                ISVNMergerFactory factory = myWCAccess.getOptions().getMergerFactory();
               
                File conflictOldFile = SVNPathUtil.isAbsolute(conflictOld) ? new Resource(conflictOld) : getFile(conflictOld);
                File conflictNewFile = SVNPathUtil.isAbsolute(conflictNew) ? new Resource(conflictNew) : getFile(conflictNew);
                File conflictWorkingFile = SVNPathUtil.isAbsolute(conflictWorking) ? new Resource(conflictWorking) : getFile(conflictWorking);
                   
                byte[] conflictStart = ("<<<<<<< " + conflictWorking).getBytes();
                byte[] conflictEnd = (">>>>>>> " + conflictNew).getBytes();
                byte[] separator = ("=======").getBytes();
View Full Code Here

        return SVNDate.formatDate(new Date(file.lastModified()));
    }

    public SVNLog getLog() {
        int index = 0;
        Resource logFile = null;
        Resource tmpFile = null;
        while (true) {
            logFile = getAdminFile("log" + (index == 0 ? "" : "." + index));
            if (logFile.exists()) {
                index++;
                continue;
View Full Code Here

        SVNLogRunner runner = new SVNLogRunner(rerun);
        int index = 0;
        SVNLog log = null;
        runner.logStarted(this);
        try {
          Resource logFile = null;
            while (true) {
                if (getWCAccess() != null) {
                    getWCAccess().checkCancelled();
                }
                logFile = getAdminFile("log" + (index == 0 ? "" : "." + index));
View Full Code Here

TOP

Related Classes of org.exist.util.io.Resource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.