Moved command list building for publishes into function.
Moved command list building for publishes into function.

This will help later when rebuilding the whole snapshot tree (command "snapshot update")

adfinis-sygroup/pyaptly,ganwell/pyaptly