I'm having trouble with using svn to check in/out my drupals with dbscript dumps in them.

I have two machines, pinky is the dev machine, perky is the production machine. Drupal was installed and setup on pinky and duplicated on perky via svn.

I have dumped a database on pinky and added the files to svn. I've checked them out on perky and run a production dump, last merge dump but all the commands now try to delete all my .svn files and I can't get the databases to merge.

I'm sure I'm doing something wrong but I can't see what it is?

How should I have my environment set up to do this?

Comments

mnlund’s picture

Evening.

I also have this issue. When I performe the dumps the exec("rm -r $dump_location/data/*.sql"); on line 404 in dbscripts.module tries to delete the .svn files in the data and tables directories. I did a small modifocation and specified that only .sql files should be deleted. Is this a good practice? My modification are:

On line 404 in dbscripts.module i changed

  exec("rm -r $dump_location/*");
  exec("cp -R $workspace_location/* $dump_location");

to

exec("rm -r $dump_location/data/*.sql");
exec("rm -r $dump_location/tables/*.sql");
exec("cp -R $workspace_location/data/* $dump_location/data");
exec("cp -R $workspace_location/tables/* $dump_location/tables");

And now it kind of works.

mrfelton’s picture

I have this trouble too.. is the solution at #1 still working for you?

EDIT: Well, I made the change sugested above, and it works for dumping... But I run in to the same trouble when doing a restore.

ceardach’s picture

Sorry about this bug. This should be fixed in the git repository -- I haven't had time to commit to cvs in awhile.

I'll leave this open until I commit to cvs.

mrfelton’s picture

This is not fixed correctly in git. When trying to svn commit after doing a dump on production, I get the following error:

svn: Commit failed (details follow):
svn: Directory '/var/www/databases/workspace/last-dump/data/.svn' containing working copy admin area is missing

it seems that it just completely removes this last-dump direcrory - including all the .svn subdirs, making it impossible to commit again.

ceardach’s picture

You should svn ignore everything that is inside both the tmp and workspace directories.

mrfelton’s picture

@ceardach: ok, good to hear, as that's exactly what I ended up doing! Perhaps add that to the docs?

ceardach’s picture

Yeah, I should add SVN and Git tips to the README

ceardach’s picture

Status: Active » Fixed
ceardach’s picture

Title: Subversion trouble » Update documentation for using SVN/Git
Component: Code » Documentation
Assigned: Unassigned » ceardach
Status: Fixed » Active
boztek’s picture

Anyone know a quick way to exclude tmp and workspace directories from svn?

toby.batch’s picture

Assuming a linux command lune, then in the databses folder execute:

$ svn propedit svn:ignore .

(don't forget the trailing full stop)

And add:

workspace
tmp

On two separate lines, That should do it

hefox’s picture

Status: Active » Fixed

http://drupalcode.org/viewvc/drupal/contributions/modules/dbscripts/READ...

Updated documentation.

Please reopen and provide a patch if I misspelled anything cause I probably did.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.