Update documentation for using SVN/Git

toby.batch - March 3, 2009 - 11:05
Project:Database Scripts
Version:6.x-2.x-dev
Component:Documentation
Category:support request
Priority:normal
Assigned:ceardach
Status:active
Description

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?

#1

ramsalt - March 28, 2009 - 20:38

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.

#2

mrfelton - April 15, 2009 - 13:58

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.

#3

ceardach - April 15, 2009 - 16:08

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.

#4

mrfelton - May 11, 2009 - 12:20

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.

#5

ceardach - May 11, 2009 - 12:30

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

#6

mrfelton - May 11, 2009 - 12:44

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

#7

ceardach - May 11, 2009 - 12:57

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

#8

ceardach - May 11, 2009 - 12:58
Status:active» fixed

#9

ceardach - May 16, 2009 - 22:48
Title:Subversion trouble» Update documentation for using SVN/Git
Component:Code» Documentation
Assigned to:Anonymous» ceardach
Status:fixed» active

#10

borg000 - August 2, 2009 - 04:21

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

#11

toby.batch - August 5, 2009 - 19:05

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

 
 

Drupal is a registered trademark of Dries Buytaert.