Beispiel #1
0
    @Override
    protected void load() {
      if (myPI != null) {
        myPI.setText2(SvnBundle.message("progress.text2.changes.establishing.connection", myUrl));
      }

      try {
        if (myForceBackwards) {
          SVNURL svnurl = SVNURL.parseURIEncoded(myUrl);
          if (!existsNow(svnurl)) {
            loadBackwards(svnurl);
            return;
          }
        }

        final SVNURL svnurl = SVNURL.parseURIEncoded(myUrl);
        SVNRevision operationalFrom = myFrom == null ? SVNRevision.HEAD : myFrom;
        // TODO: try to rewrite without separately retrieving repository url by item url - as this
        // command could require authentication
        // TODO: and it is not "clear enough/easy to implement" with current design (for some cases)
        // how to cache credentials (if in
        // TODO: non-interactive mode)
        final SVNURL rootURL = SvnUtil.getRepositoryRoot(myVcs, svnurl);
        if (rootURL == null) {
          throw new VcsException("Could not find repository root for URL: " + myUrl);
        }
        final String root = rootURL.toString();
        String relativeUrl = myUrl;
        if (myUrl.startsWith(root)) {
          relativeUrl = myUrl.substring(root.length());
        }
        SvnTarget target = SvnTarget.fromURL(svnurl, myPeg == null ? myFrom : myPeg);
        RepositoryLogEntryHandler handler =
            new RepositoryLogEntryHandler(
                myVcs,
                myUrl,
                SVNRevision.UNDEFINED,
                relativeUrl,
                createConsumerAdapter(myConsumer),
                rootURL);

        myVcs
            .getFactory(target)
            .createHistoryClient()
            .doLog(
                target,
                operationalFrom,
                myTo == null ? SVNRevision.create(1) : myTo,
                false,
                true,
                myShowMergeSources && mySupport15,
                myLimit + 1,
                null,
                handler);
      } catch (SVNCancelException e) {
        //
      } catch (SVNException e) {
        myException = new VcsException(e);
      } catch (VcsException e) {
        myException = e;
      }
    }
Beispiel #2
0
 protected void initSupports15() {
   assert myUrl != null;
   mySupport15 = SvnUtil.checkRepositoryVersion15(myVcs, myUrl);
 }