@Override
    protected long doUpdate(final File root) throws SvnBindException {
      final long rev;

      SvnConfiguration configuration = myVcs.getSvnConfiguration();
      final UpdateRootInfo rootInfo = configuration.getUpdateRootInfo(root, myVcs);

      final Url sourceUrl = getSourceUrl(myVcs, root);
      final boolean isSwitch = rootInfo != null && rootInfo.getUrl() != null && ! rootInfo.getUrl().equals(sourceUrl);
      final Revision updateTo = rootInfo != null && rootInfo.isUpdateToRevision() ? rootInfo.getRevision() : Revision.HEAD;
      if (isSwitch) {
        final UpdateClient updateClient = createUpdateClient(configuration, root, true, sourceUrl);
        myHandler.addToSwitch(root, sourceUrl);
        rev = updateClient.doSwitch(root, rootInfo.getUrl(), Revision.UNDEFINED, updateTo, configuration.getUpdateDepth(),
                                    configuration.isForceUpdate(), false);
      } else {
        final UpdateClient updateClient = createUpdateClient(configuration, root, false, sourceUrl);
        rev = updateClient.doUpdate(root, updateTo, configuration.getUpdateDepth(), configuration.isForceUpdate(), false);
      }

      return rev;
    }
@Override
    protected long doUpdate(final File root)