Having my own little conversation with myself here. So anyway I looked
in the code of newgem and there in deployment.rake is the definition
of the manifest task
task :manifest do
`rake check_manifest | patch -p0 > Manifest.txt`
end
so it just runs the hoe task "check_manifest" which generates a diff
output comparing the current directory structure (filtered by the
exclude list in my .hoerc file which previously didn't exist and was
the cause of the error message in problem #3 above)
This is a standard diff output with lines like
+thiswasadded
-thatwasdeleted
which can be read by humans like us but which also doubles as edit
instructions for programmatically generating one compared file from
the other and which can in turn be fed into a program like, say, I
dunno, "patch", which will then use the commands to make the changes.
Hence newgem's "| patch -p0 > Manifest.txt"
which basically takes the from check_manifest the edit commands needed
to turn the current contents of Manifest.txt into the current
directory structure and actually applies them and overwrites
Manifest.txt.
So what about the evil 'rm -fr'? Well Hoe is doing that. I guess it
figures if it's going to do a check_manifest to compare with the
current directory structure it should clean the junk out of the
current directory structure first. So it runs the clean task first.
Still evil since there's no warning.
I suggest Dr Nic that you might want to update the task description
for manifest to warn that it will also (by way of hoe admittedly)
clean anything that happens to be defined in the clean_glob in the
autogenerated Rake file.
Another alternative would be to leave the clean_glob empty by default,
but hoe still deletes stuff.