0

So I went through all the steps to make an svn repo.

1) I created the repo by calling

 svnadmin create /path/to/repo

2) I added the folder that holds the files I want in my repo using

svn import /path/to/folder

3) I also made a post commit hook that calls svn update on that folder

4) And then on my remote system I was able to check it out all without any problems. Now the problem is that when I commit and check the log I see the line

Skipped '/path/to/folder'

Basically it keeps skipping the folder and won't apply the changes I commit to it. I checked the folder and see there's no .svn folder in there which repos usually have which I suspect is the issue...or not.

Anyone know what could be the issue? I want that folder to be update the files when I make commits

Jared Joke
  • 1,226
  • 2
  • 18
  • 29
  • Without the .svn directory, the svn command will be unable to do anything with it. Your svn co should give you a .svn: can you post the result of svn co followed by a find . -name '.svn' – bishop Nov 19 '13 at 02:20
  • Well, I guess my main question is when I call svn update what directory is actually being updated? Maybe I'm a bit confused about how svn works. From what I thought, the original directory I added in step 2 would be updated whenever I made a commit but that doesn't seem to be the case – Jared Joke Nov 19 '13 at 06:22
  • Yeah, this sounds fishy: "I also made a post commit hook that calls svn update on that folder". post commit hooks are for actions on the svn server after a commit succeeds. svn update is used on a checked out directory to synchronize others' changes with files in that directory: svn update is not used on the svn server. Typical workflow is: (0) svn co; (1) do some work; (2) svn update; (3) merge any conflicts; (4) svn ci; (5) goto 1. On the server side, there is nothing to "update": it always has the latest commits. – bishop Nov 19 '13 at 14:16
  • Yeah, but that's the thing. On the webserver, the folder I added to the repo doesn't. I made a commit that seemed to be successful but the changes aren't being reflected in the folder. Could it be a permissions issue maybe? – Jared Joke Nov 19 '13 at 15:41
  • I suppose I'm missing some detail. The actual repository has directories conf, db, hooks, etc. It encodes, rather than mirrors, the content's structure -- as such, I would not expect the actual repository to have .svn directories. I would be better able to diagnose with actual commands and actual current ls of both actual repository and a local copy with svn co. – bishop Nov 19 '13 at 16:07
  • Ah, that makes sense. Specifically the encoding part – Jared Joke Nov 19 '13 at 19:43

1 Answers1

0

Thanks to some help from bishop and my friend I figured out what the problem. As bishop stated "It encodes, rather than mirrors, the content's structure" which I didn't realize. I thought it directly altered whatever directory(ies) were imported into it

So basically what I did was

  1. Perform steps 1-3 (setting up and adding the directory to the repo) then
  2. Delete the existing folder that was imported into the repo and checkout in the same location

Basically [2] allowed me to have a remote working copy on the server (with the expected .svn folders).

That way, whenever I committed my local copy, the post-commit hook would update the remote working copy (on the server) as expected.

Jared Joke
  • 1,226
  • 2
  • 18
  • 29
  • 1
    Yep, delete what you import then do a clean checkout. That's the SVN way! – bishop Nov 19 '13 at 19:44
  • 1
    You could have done an [in-place import](https://subversion.apache.org/faq.html#in-place-import) and avoided step 2. – alroc Nov 19 '13 at 19:47