private boolean checkAncestry(final File sourceFile, final Url targetUrl, final Revision targetRevision) throws SvnBindException {
    final Info sourceSvnInfo = myVcs.getInfo(sourceFile);
    final Info targetSvnInfo = myVcs.getInfo(targetUrl, targetRevision);

    if (sourceSvnInfo == null || targetSvnInfo == null) {
      // cannot check
      return true;
    }

    final Url copyFromTarget = targetSvnInfo.getCopyFromUrl();
    final Url copyFromSource = sourceSvnInfo.getCopyFromUrl();

    if ((copyFromSource != null) || (copyFromTarget != null)) {
      if (sourceSvnInfo.getUrl().equals(copyFromTarget) || targetUrl.equals(copyFromSource)) {
        return true;
      }
    }

    final int result = Messages.showYesNoDialog(myVcs.getProject(), message("dialog.message.switch.target.not.copy.current"),
                                                message("dialog.title.switch.target.problem"), Messages.getWarningIcon());
    return (Messages.YES == result);
  }
private boolean checkAncestry(final File sourceFile, final Url targetUrl, final Revision targetRevision)