Abolish instant-commit commands [was: Re: The right library...to get info about a directory]
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-11-12 20:52:51 CET
What would you like those commands to do? I assume you would want them to make a commit which modifies "testfile.txt" to contain the text from "myfile.txt", but what properties? No properties? The properties from "testfile.txt@HEAD"? The properties from some other, optionally specified revision? And if you wanted to change the properties as well, would you use "propset" (or "propedit") to make a separate commit? Or would you want a way of changing the properties in the same commit? If you want to change more than one file, are you happy to use a separate commit for each file that you change in this way?
I don't like it at all. Perhaps the precedent for your proposal is the existence of commands like "propset NAME VALUE URL..." and "mkdir URL" which cause an instant commit. I would go the opposite way, and vote to abolish such instant commits. Those commands are useful in some limited circumstances, and your proposal IS a logical extension of them, but they all head away from Subversion's basis of "one commit per logical change".
For instance, there is an argument that "svn mkdir URL" is useful to make a branch directory. Of course it is, in the limited circumstance of not wanting any properties set on that new directory. As soon as you go beyond the simple, the idea falls apart.
Even "import" is, in my view, a bad idea. Normally one finds that one wants properties set or unset on files that are being imported, or wants to remove certain files from the import. The ideal way to do this would be to "svn add" (in place or to another local directory which would become the WC), and then have the opportunity to modify properties, remove files, etc., before making the initial commit. I know that "import" is "expected" by CVS converts, but I would prefer an "import to WC" which is the opposite of "export from WC".
Thoughts on reducing the set of "instant commit" commands to the bare essentials?
Thoughts on "import to WC"?
This is an archived mail posted to the Subversion Dev mailing list.