Closed (fixed)
Project:
Drush
Version:
All-versions-4.x-dev
Component:
Core Commands
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
8 Feb 2011 at 20:49 UTC
Updated:
17 May 2011 at 04:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
jonhattanThe really good reason is to not expose .svn in a production server. So we asume the usecase for rsync @dev @prod. Haven't tested but perhaps --include-paths does an override.
Comment #2
greg.1.anderson commentedvcs files are excluded from rsync by default because it would be a Really Bad Thing to copy them over if the files were stored in a different repository on each machine. Copying the vcs files only makes sense if the files are stored in the same repository, but if that is the case, then usually one would use the vcs to transfer the files.
There is something odd about your use case. You say that you can't do an svn up on the target server; if that is the case, then why do you need to transfer the vcs files as part of the rsync operation? If you can't use the vcs, seems you wouldn't need them.
Perhaps this is why there is no option to suppress the --exclude=".svn" etc. in drush rsync.
Comment #3
dpearcefl commentedIn our case, yes they are pointed at the same repository.
Yes, I suppose I could use SVN to update the taget server, except we don't have the entire site in SVN. "drush rsync" does such a marvelous job I was hoping to use it, rather than struggle to make rsync work over SSH (I'm not a Linux super-pro). This is the only reason I can't use rsync to the target server.
--include-path (or --include-paths) does not override the hardcoded rsync --exclude=".svn" command.
Our SVN server is a public purchased account so the source and target are "exposed" already.
If a flag in Drush to override the --exclude is not safe or feasible, I guess I'll have to see how to make rsync work over SSH.
Comment #4
greg.1.anderson commentedrsync already works over ssh. Run your rsync command with -s and look at the shell command it prints out. You can copy and modify this command to make it do a remote svn up on your remote server if you want.
Comment #5
greg.1.anderson commentedOh, and it would be feasible -- easy, even, to add --include-vcs as a flag to drush rsync. I'm just not sure why you want to transfer the vcs files if you are using rsync instead of svn on the remote server.
Comment #6
dpearcefl commentedI'm going to mark this as closed as I guess my use-case is too weird. I wanted to use "drush rsync" for no defensible reason, but I can use just rsync itself to get the job done.
Here is what I did: I ran my "drush rsync" command but added the --debug flag. Amongst everything it prints out is the rsync command line it is running. I killed the command and then copied the command line into my script. I removed the "--exclude=".svn" part of the command. This worked perfectly for me. Now I can do "svn status -u" and see that my local copy is in sync with my SVN repository.
Thanks everyone.
Comment #7
greg.1.anderson commentedNaw, that's a reasonable use case.
Regarding your workaround, you might want to consider using regular rsync with
drush ddif you want to sync things like %files. I'll add your --include-vcs args sometime; trivial change, just need to test it and make sure it works okay.Comment #8
willieseabrook commentedI've found this issue because I share a similar use case.
Tried to override the exclude using --include="+.svn" and that don't appear to work.
Comment #9
willieseabrook commentedPatch attached.
Comment #10
acrollet commentedhi folks,
just chipping in with another use case for this feature. At the agency where I work, we are using a development workflow with aegir wherein we build the production platform with a drush makefile, with custom code checked out of a VCS repository (svn at the present time). In order to do this, we build the platform on the command line with the --working-copy arg to drush_make and import it with provision-save. (as described by Miguel Jacq here: http://lists.aegirproject.org/pipermail/aegir/2011-January/000026.html)
All this works beautifully, except for the use case where the production platform is located on an Aegir satellite server. Aegir's hub & spoke model uses drush rsync to copy platforms to remote servers, and the lack of a --include-vcs flag to drush means that all our work up to this point was in vain.
The patch in #9 looks decent to me, I can do a proper review if it helps to move this issue along.
thanks,
Adrian
Comment #11
greg.1.anderson commentedCommitted to 5.x-dev. Could optionally be backported to 4.x.
Comment #12
msonnabaum commentedYeah, I think this is pretty reasonable. Backported.