Well, I had some fun today with Mercurial. I was adding files with a find script, as I have a bunch of files that I want under hg control, and a whole bunch more that I don't.
I goofed on the find script, resulting in "hg add ''". So hg happily added everything. (WTF moment #1) Oh, well, no worries. HG helpfully provides me with a list of files. I can edit that on the commit, and limit my changeset to just those files. Don't all the modern VCS systems do this? It's a nice feature. So hg happily committed everything. (WTF moment #2) Okay, how do I take a file _away_ from hg? Ah, yes, remove. I start doing the "hg remove filename" -- no errors. So hg happily deletes the files. (WTF moment #3) Enough of this "intuitive interface" crap. I google up some documentation. Oh, look, that's a FEATURE. Silly me. Stupid, but hey, it's documented. But, look, there's a pointer to "rollback". That sounds promising. I then instruct hg to 'rollback', and lo! It looks good. Puppies fall from heaven. Angels sing. All is forgiven. Now revert should do the right thing. So once again, I begin to revert the files I do not want under hg control. So hg looks at me, looks at the missing files unrelated to the file I am attempting to revert, bitches, and falls over. (WTF moment #4) For some reason, when I attempt to revert file A, but there's no file B, hg will, indeed, revert file A, and then complain about file B. I was worried for a bit that it was possible to utterly corrupt the hg repository with a sequence of normal commands. This would be the death-knell for the program; wiping out the .hg directory and starting anew is not an acceptable solution. (It would start with wiping out the .hg directory and moving on to something else.) However, the abort message was a lie. I could "hg revert" the now-missing files (which, fortunately, were not terribly important, or were recoverable from CVS), and once they were all reverted, hg offered no further complaint. So again, puppies are falling from heaven, angels are singing, etc. etc. -- It is an excellent sign to be able to recover from dumb user mistakes. Stewart Stremler -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
