Wednesday, August 27, 2014

Version control clean: unknown / ignored / skipped over

The reference is not what I am talking about in general, but an example



     General - hg clean is pure evil:



     'via Blog this'



Tools such as "hg purge" (or got clean)



have options such as



"remove all unknown files" (hg purge)



"remove unknown and ignored files" (hg purge --all)



Methinks there is a third option needed - not files that you have ignored because they are generated, but files that are skipped over, e.g. because they are controlled by a different version control system.



E.g. -X directory -- often I have a different VCS in the subdirectory, .bzr rather than .hg.



It is dangerous to type in "hg purge --all" in such a situation.  E.g. it may delete the .hg/.bzr/.git subdirectories.



This is an example of "splitting": what is a simple action "exclude" from the point opf view of "hg add" is actually two flavors from the point of view of "hg purge".