Add a "rev-tree" helper, which calculates the revision