@NotNull
  private MergeCheckResult goUpInRepo(final long revisionAsked,
                                      final long targetRevision,
                                      final Url branchUrl,
                                      final String trunkUrl) throws VcsException {
    MergeCheckResult result;
    Set<Long> mergeInfo = myPathMergedMap.get(branchUrl.toString() + "@" + targetRevision);

    if (mergeInfo != null) {
      // take from self or first parent with info; do not go further
      result = MergeCheckResult.getInstance(mergeInfo.contains(revisionAsked));
    }
    else {
      Target target = Target.on(branchUrl);
      PropertyValue mergeinfoProperty = myVcs.getFactory(target).createPropertyClient()
        .getProperty(target, SvnPropertyKeys.MERGE_INFO, false, Revision.of(targetRevision));

      if (mergeinfoProperty == null) {
        final String newTrunkUrl = Url.removeTail(trunkUrl).trim();
        final Url newBranchUrl = removePathTail(branchUrl);
        Url absoluteTrunk = append(myInfo.getRepoUrl(), newTrunkUrl);

        result = newTrunkUrl.length() <= 1 ||
                 newBranchUrl.toString().length() <= myInfo.getRepoUrl().toString().length() ||
                 newBranchUrl.equals(absoluteTrunk)
                 ? MergeCheckResult.NOT_MERGED
                 : goUpInRepo(revisionAsked, targetRevision, newBranchUrl, newTrunkUrl);
      }
      else {
        result = processMergeinfoProperty(branchUrl.toString() + "@" + targetRevision, revisionAsked, mergeinfoProperty, trunkUrl, false);
      }
    }

    return result;
  }
@NotNull
  private MergeCheckResult goUpInRepo(final long revisionAsked,
                                      final long targetRevision,
                                      final Url branchUrl,
                                      final String trunkUrl)