code: private void traverseTransientDescendants(ItemData parent, int action, List<ItemState> ret)
        throws RepositoryException
     {
  
        if (parent.isNode())
        {
           if (action != MERGE_PROPS)
           {
              Collection<ItemState> childNodes = changesLog.getLastChildrenStates(parent, true);
              for (ItemState childNode : childNodes)
              {
                 ret.add(childNode);
              }
           }
           if (action != MERGE_NODES)
           {
              Collection<ItemState> childProps = changesLog.getLastChildrenStates(parent, false);
              for (ItemState childProp : childProps)
              {
                 ret.add(childProp);
              }
           }
        }
     }
docs: Calculate all transient descendants for the given parent node
  
  @param parent
  @param action
  @param ret
  @throws RepositoryException