Note that there are some explanatory texts on larger screens.

plurals
  1. POISO a version control tool that can manage files that are NOT under a directory tree marked as managed by the VC tool
    primarykey
    data
    text
    <p>Most of the version control tools that I am familiar with [*], and all of the modern tools - CVS, SVN, git, Mercurial, Bazaar - have some sort of of "marker" in the directory tree.</p> <p>E.g. if you want to version control file <code>/a/b/c/file.txt</code>, you establish a repository at some level of the tree, e.g.</p> <pre><code>/a/b/.bzr /a/b/.git /a/b/.hg /a/b/CVS </code></pre> <p>Most of the DVCSes actually store the version history in this "marker". CVS does not - instead, the CVS directory contains files that tell you how to get to the actual repository (basically links, although not symlinks or hardlinks). CVS, further, puts a link "CVS" directory in every subdirectory of the working tree, that links that directory to its position in some repository. (Not necessarily the same.)</p> <p>Q: are there any modern DVCS tools that do NOT require such a link or marker in the filesystem.</p> <p>E.g. the file under version control is</p> <pre><code>/a/b/c/file.txt </code></pre> <p>But the repository is in </p> <pre><code>/x/y/z/repo/.DVCS-TOOL/{a/b/c/file.txt} </code></pre> <p>where the {a/b/c/file.txt} part is not necessarily a directory path, but possibly an entry in a database.</p> <p>So that you can do something like the following from inside the repository:</p> <pre><code> &gt; cd /x/y/z/repo &gt; DVCS-TOOL add /a/b/c/file.text Warning: /a/b/c/file.txt is not under the repository /x/y/z. Are you sure that you want to add such an outside-repository file? [y/n] y Absolute or relative path? [ar] a &gt; DVCS-TOOL ci /a/b/c/file.text --ci--&gt; /x/y/z/repo/.DVCS-TOOL/{a/b/c/file.txt} &gt; rm /a/b/c/file.txt &gt; DVCS-TOOL status Missing /a/b/c/file.text --in-repo-as--&gt; /x/y/z/repo/.DVCS-TOOL/{a/b/c/file.txt} &gt; DVCS-TOOL revert /a/b/c/file.text &lt;--reverted-from-- /x/y/z/repo/.DVCS-TOOL/{a/b/c/file.txt} &gt; echo 'stuff' &gt;&gt; /a/b/c/file.txt &gt; DVCS-TOOL ci /a/b/c/file.text --ci--&gt; /x/y/z/repo/.DVCS-TOOL/{a/b/c/file.txt} </code></pre> <p>and from outside the repo, you might do:</p> <pre><code>&gt; cd /a/b/c &gt; echo 'more stuff' &gt;&gt; file.txt &gt; DVCS-TOOL -repo /x/y/z/repo ci /a/b/c/file.text --ci--&gt; /x/y/z/repo/.DVCS-TOOL/{a/b/c/file.txt} </code></pre> <p>MOTIVATION:</p> <p>I version control my home directory, plus other changes that I have made to my systems, whether Linux, Cygwin, or Windows. </p> <p>Sure, I can manage cygwin <code>/</code>, so that I can checkin original plus changes I have made to files like <code>/etc/bash.bashrc</code> and <code>/usr/local/etc/foo.rc</code>. E.g. I can create a <code>/.bzr</code>. (More often I only checkin certain files I have changed, rather than the whole tree, relying on being able to retrieve the distro.)</p> <p>Plus I can do this on UNIX / Linux systems I own, or have root on.</p> <p>But if I don't have write access to <code>/</code>, but do to <code>/usr/etc/foo/bar</code> and <code>/etc/baz/bif</code> ... and do not want to have two separate repos, but instead want a "sparse repo".</p> <p>Or if I want to be able to blow away <code>/cygwin</code> at any time, but still have convenient mapping from <code>/a/b/my-repo/{cygwin/etc/bash.bashrc}</code> to <code>/cygwin/etc/bash.bashrc</code> (and, heck, possibly to <code>/etc/bash.bashrc</code> on other systems)</p> <p>Or, the Windows example, which I ran into today: I want to version control files like</p> <pre><code>C:\Users\[USERNAME]\AppData\Roaming\Adobe\FrameMaker\11\Maker.ini </code></pre> <p>or, the cygwin path </p> <pre><code>/cygdrive/c/Users/glew/AppData/Roaming/Adobe/FrameMaker/7.2/maker.ini </code></pre> <p>But I don't want to create a repo at C:.hg or C:\Users\glew.hg or ...</p> <p>I just want to have one repo, and./or a workspace based or linked to that repo, and commands that know how to deal with target files that are not actually under the repo/workspace.</p> <p><strong>Q: do you know of a modern DVCS tool that does this?</strong></p> <p><strong>Q: if so, how?</strong></p> <p>E.g. I vaguely know that bzr allows workspaces to share repos - but AFAIK there still needs to be a /a/b/workspace/.bzr file that links the workspace to the repo. So I'll need more details than "look at Bazaar". </p> <p>E.g. I know that hg has a --repository option. But it does NOT do what I want:</p> <pre><code>&gt; cd /tmp &gt; mkdir tmp1; cd tmp1 ./tmp1 &gt; hg init &gt; cd .. &gt; mkdir tmp2; cd tmp2 ./tmp2 &gt; bar.txt &gt; hg --repository ../tmp1 add bar.txt abort: bar.txt not under root '/tmp/tmp1' </code></pre> <hr> <p>Note *: the reason I say "Most of the version control tools that I am familiar with, and all of the modern tools..." is that the tools described in "Boxes, Links, and Parallel Trees: Elements of a Configuration Management System." In Workshop Proceedings of the Software Management Conference. 1989.</p> <p>have such a feature. Or, rather, had such a feature.</p> <p>Embarrassingly, I am the author. But, no, really, I did not ask this question for ego gratification - I had forgotten this paper when I started writing this question.</p> <p>Plus, the tools described in this paper are old and long gone, left behind at an employer years and years ago. And certainly not modern DVCS. </p> <p>Yes, I know: Brian Berliner disses my paper in his CVS paper. He's wrong and I'm right, but that's another issue. (Brian is happy with the possibility of livelock, I am not.)</p> <p>Anyway, I am just hoping that this very old concept, of mapping between a repository and files outside the repository - has resurfaced in some modern DVCS tool. Because I would like to use it, as described above.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload