views:

263

answers:

2

I have WebDAV access to a filesystem where I can't write to the root of the filesystem, but can write to 2 folders beneath it. I'd like to:

  1. track my changes in a single DVCS repo (git/hg preferred)
  2. work directly on the WebDAV connection rather than constantly pulling changes into it (this would hurt my workflow quite a bit)

Assume the directory structure is:

$ ls -lR root
drwxr-xr-x  folder1
drwxr-xr-x  folder2

root/folder1:
-rw-r--r--  file1.txt

root/folder2:
-rw-r--r--  file2.txt

I can't create a repo at the root level because it is not writable. I can't symlink folder1 and folder2 into a local folder because git and hg don't follow symlinks. The symlinks would be ideal because of the speed benefits of having all the repo info stored locally.

Any other suggestions?

A: 

That's a tough one. I've been trying to think of an answer for a while and not coming up with anything. Then I looked at the "Related" column for your question and noticed this:

http://stackoverflow.com/questions/86402/how-can-i-get-git-to-follow-symlinks

Apparently older versions of git (1.6.0 and earlier) do follow symlinks. Would that work for you? You might have to install that version of git, but it sounds like just being able to do what you want would make up for needing to use an older version.

Update: Just tried this. It works. The only possible gotcha is that when I clone the directory, the symlink becomes an actual directory. I don't think this matters for your case, and actually seems like the right behavior if you did clone.

quark
A: 

I'll admit to not fully understanding what're trying to achieve, but could you create a mercurial repository in your local (writeable) root, and then have each of folder1 and folder2 be separate subrepos? Mercurial's built-in subrepo support has graduated from beta in 1.3 to pretty darn nice in 1.4.

Ry4an