public void rename()

in vault-server/src/jetbrains/buildServer/buildTriggers/vcs/vault/VaultPathHistory.java [23:38]


  public void rename(@NotNull String parent, @NotNull String fromName, @NotNull String toName) {
    final String from = parent + "/" + fromName;
    final String to = parent + "/" + toName;

    final Node node = getTreeNode(to);
    if (node == null) {
      final String newPath = getNewPath(to);
      myPathMap.put(newPath, addTreeNode(from, newPath));
    } else {
      node.setName(fromName);
      node.getParent().childRenamed(toName, fromName);
      if (!myPathMap.containsKey(node.getNewPath())) {
        myPathMap.put(node.getNewPath(), node);        
      }
    }
  }