Compute mergeinfo and istag on the fly

This way the metadata doesn't change.
Add lookup command to the helper