I wanted my gedcom and associated stuff to be stored in
a subversion repository. However, the current
implementation of the version control calls doesn't work.
Oops, submitted before I was done writing. Anyhow, the
problem is two-fold.
The zeroth problem is that the check_in method didn't log
any errors in the exec call to commit. I've changed that by
cutting-n-pasting something I found online using "popen" to
read the stderr output from the call. I'm no php wizard, so
someone might want to double-check if that's the best way to
do it, but it works.
The first real problem is that Subversion expects the
credentials to exist in ~/.subversion. This is a
subversion-specific problem, doesn't apply to cvs. The
problem is that the "www" or "daemon" or whatever user
apache runs as, doesn't have a "~" directory. Instead (in
my case anyway) it tries to use /var/local and bombs because
it had no permission.
My solution (which you'll see hard-coded in the attached
files) is to add a parameter to the commit call,
"--config-dir <path>". I would suggest adding an "extra
commit parameters" field to the configuration screen, right
below the selection for CVS/SVN/None. That would allow
someone to specify --config-dir, or any other parameters
custom to their particular CVS or SVN setup.
I'll discuss the second problem later, I have to run at the
moment. I'll also attach the rest of the files I modified,
plus the diffs.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK the second part of the problem (and the reason I doubt
the CVS commit worked either) is that several of the
functions didn't declare the global "COMMIT_COMMAND"...
meaning that even though check_in was called from a bunch of
places, it didn't actually DO anything because it didn't
think COMMIT_COMMAND was defined.
There were one or two other minor tweaks I did here and
there as I was tracking this down, so you'll see a few other
lines changed in those files. I tried to add a "// JA"
comment everywhere I changed anything, plus I'm attaching a
text file with the list of diffs.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmm, make sure you test my changes well if you use 'em, for
some reason I'm getting errors while trying to edit the
configuration (looks like it isn't finding the definition of
INDEX_DIRECTORY, which makes no sense). Not sure if it's
related, but I'll add another comment when I figure out
what's going on with that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, I haven't forgotten about it, but I've been busy with other projects. If you have time, go ahead and apply my changes to a local copy and see if it works for you. I had made other local changes (unrelated to this issue) which were probably what messed up my config page, but since I wasn't sure I wanted to include a cautionary note. I'll try to get back to it sometime in the near future (of course at this point, I need to re-merge with the current code base).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Added some logging that seemed to be missing.
Logged In: YES
user_id=1293534
Oops, submitted before I was done writing. Anyhow, the
problem is two-fold.
The zeroth problem is that the check_in method didn't log
any errors in the exec call to commit. I've changed that by
cutting-n-pasting something I found online using "popen" to
read the stderr output from the call. I'm no php wizard, so
someone might want to double-check if that's the best way to
do it, but it works.
The first real problem is that Subversion expects the
credentials to exist in ~/.subversion. This is a
subversion-specific problem, doesn't apply to cvs. The
problem is that the "www" or "daemon" or whatever user
apache runs as, doesn't have a "~" directory. Instead (in
my case anyway) it tries to use /var/local and bombs because
it had no permission.
My solution (which you'll see hard-coded in the attached
files) is to add a parameter to the commit call,
"--config-dir <path>". I would suggest adding an "extra
commit parameters" field to the configuration screen, right
below the selection for CVS/SVN/None. That would allow
someone to specify --config-dir, or any other parameters
custom to their particular CVS or SVN setup.
I'll discuss the second problem later, I have to run at the
moment. I'll also attach the rest of the files I modified,
plus the diffs.
Didn't call commit after changing a file.
Simplified some code related to check_in calls.
Logged In: YES
user_id=1293534
OK the second part of the problem (and the reason I doubt
the CVS commit worked either) is that several of the
functions didn't declare the global "COMMIT_COMMAND"...
meaning that even though check_in was called from a bunch of
places, it didn't actually DO anything because it didn't
think COMMIT_COMMAND was defined.
There were one or two other minor tweaks I did here and
there as I was tracking this down, so you'll see a few other
lines changed in those files. I tried to add a "// JA"
comment everywhere I changed anything, plus I'm attaching a
text file with the list of diffs.
Rewrote a big chunk of check_in, declared global COMMIT_COMMAND in several places.
Declare global, set logging to true.
Declare global, set logging to true.
List of all diffs.
Logged In: YES
user_id=1293534
Hmm, make sure you test my changes well if you use 'em, for
some reason I'm getting errors while trying to edit the
configuration (looks like it isn't finding the definition of
INDEX_DIRECTORY, which makes no sense). Not sure if it's
related, but I'll add another comment when I figure out
what's going on with that.
Logged In: YES
user_id=634811
Originator: NO
any update on this?
Logged In: YES
user_id=1293534
Originator: YES
Sorry, I haven't forgotten about it, but I've been busy with other projects. If you have time, go ahead and apply my changes to a local copy and see if it works for you. I had made other local changes (unrelated to this issue) which were probably what messed up my config page, but since I wasn't sure I wanted to include a cautionary note. I'll try to get back to it sometime in the near future (of course at this point, I need to re-merge with the current code base).
Logged In: YES
user_id=1617070
Originator: NO
I agree. There is the setting for Version Control, but it never says how to set up the server.