<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="https://build2be.com"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>build2be/com/e - svn</title>
 <link>https://build2be.com/category/svn</link>
 <description></description>
 <language>en</language>
<item>
 <title>update module with a twist</title>
 <link>https://build2be.com/content/update-module-twist</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;I just did an upgrade from the calendar and date module of which calendar needed to move from 6.x-2.x-dev to 6.x-2.4 version which seemed a pitb exercise. I hope I missed some skills :-p&lt;/p&gt;
&lt;p&gt;The following command was not working&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;drush upc calendar-6.x-2.4&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So what I did was download the latest version offsite. Then diff the module trees.&lt;/p&gt;
&lt;p&gt;&lt;pre&gt;&lt;code&gt;cd /tmp
drush dl calendar-6.x-2.4
cd /my-site/sites/all/modules/calendar
cp -r /tmp/calendar/* ./&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;then compare the latest version with the svn version ... I still think I&#039;m missing something. Anyway we need to remove old files.&lt;/p&gt;
&lt;p&gt;&lt;pre&gt;&lt;code&gt;diff --recursive --brief . /tmp/calendar/ | grep -v .svn
&amp;nbsp; 557&amp;nbsp; svn rm ./calendar_ical/translations/calendar_ical.sv.po 
&amp;nbsp; 558&amp;nbsp; svn rm ./jcalendar/translations/jcalendar.sv.po
&amp;nbsp; 559&amp;nbsp; diff --recursive --brief . /tmp/calendar/ | grep -v .svn
&amp;nbsp; 560&amp;nbsp; svn rm ./translations/calendar.sv.po
&amp;nbsp; 561&amp;nbsp; diff --recursive --brief . /tmp/calendar/ | grep -v .svn
&amp;nbsp; 562&amp;nbsp; svn st
&amp;nbsp; 563&amp;nbsp; svn add *
&amp;nbsp; 564&amp;nbsp; svn add */*
&amp;nbsp; 565&amp;nbsp; svn st
&amp;nbsp; 566&amp;nbsp; svn add */*/*
&amp;nbsp; 567&amp;nbsp; svn add */*/*/*
&amp;nbsp; 568&amp;nbsp; svn st&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I guess now the above could be shortened with some recursive switch for svn.&lt;/p&gt;
&lt;p&gt;Now the calendar dir contains too many items which we need to remove. As the correct version is also in the temp dir we can run&lt;/p&gt;
&lt;p&gt;&lt;pre&gt;&lt;code&gt;drush upc date
&amp;nbsp; 572&amp;nbsp; drush upc cck
&amp;nbsp; 573&amp;nbsp; drush cc all
&amp;nbsp; 574&amp;nbsp; drush cc all
&amp;nbsp; 575&amp;nbsp; svn st
&amp;nbsp; 576&amp;nbsp; cd sites/all/modules/contrib/
&amp;nbsp; 577&amp;nbsp; svn st
&amp;nbsp; 578&amp;nbsp; cd date/
&amp;nbsp; 579&amp;nbsp; svn st
&amp;nbsp; 580&amp;nbsp; svn st | grep &quot;\!&quot;
&amp;nbsp; 581&amp;nbsp; svn st | grep &quot;\!&quot; | cut -c 2-
&amp;nbsp; 582&amp;nbsp; svn st | grep &quot;\!&quot; | cut -c 2- | xargs echo {}
&amp;nbsp; 583&amp;nbsp; svn st | grep &quot;\!&quot; | cut -c 2- | xargs echo 
&amp;nbsp; 584&amp;nbsp; svn st | grep &quot;\!&quot; | cut -c 2- | xargs svn rm 
&amp;nbsp; 585&amp;nbsp; history


svn st | grep &quot;\!&quot; | cut -c 2- | xargs svn rm &lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-4 field-type-taxonomy-term-reference field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;free form:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/drush&quot;&gt;drush&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/category/svn&quot;&gt;svn&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/svn-rm&quot;&gt;svn rm&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/category/xargs&quot;&gt;xargs&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 15 Feb 2011 10:46:52 +0000</pubDate>
 <dc:creator>clemens</dc:creator>
 <guid isPermaLink="false">111 at https://build2be.com</guid>
</item>
<item>
 <title>Using cron to update a site and prepare the backup</title>
 <link>https://build2be.com/content/using-cron-update-site-and-prepare-backup</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;For a site on my VM I needed an &lt;code&gt;svn sync&lt;/code&gt; and the backup files on my developer site.&lt;/p&gt;
&lt;p&gt;I initially didn&#039;t want to install backup_migrate module. This was partly due to my arcane workflow which is of course by hand and unfamiliarity with back_migrate module.&lt;/p&gt;
&lt;p&gt;So this is what I deviced&lt;/p&gt;
&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;a href=&quot;mailto:test_site@serverVM&quot;&gt;test_site@serverVM&lt;/a&gt;:~$ crontab -l
# m h&amp;nbsp; dom mon dow&amp;nbsp;&amp;nbsp; command
*/7 * * * * wget -O - -q -t 1 &lt;a href=&quot;http://test-site.com/cron.php&amp;lt;br /&amp;gt;
*/5&quot;&gt;http://test-site.com/cron.php
*/5&lt;/a&gt; * * * * /home/test_site/svn-up 2&amp;gt;&amp;amp;1 &amp;gt; /home/test_site/svn-up.log
* */1 * * * /home/test_site/ant-backup 2&amp;gt;&amp;amp;1 &amp;gt; /home/test_site/ant-backup.log&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;a href=&quot;mailto:test_site@serverVM&quot;&gt;test_site@serverVM&lt;/a&gt;:~$ cat svn-up
#!/bin/sh
cd /home/test_site
/usr/bin/svn up&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;a href=&quot;mailto:test_site@serverVM&quot;&gt;test_site@serverVM&lt;/a&gt;:~$ cat ant-backup
#!/bin/sh
/usr/bin/ant backup&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-4 field-type-taxonomy-term-reference field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;free form:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/drush&quot;&gt;drush&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/category/ant&quot;&gt;ant&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/backup&quot;&gt;backup&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/category/cron&quot;&gt;cron&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/svn&quot;&gt;svn&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Fri, 15 Oct 2010 06:49:46 +0000</pubDate>
 <dc:creator>clemens</dc:creator>
 <guid isPermaLink="false">106 at https://build2be.com</guid>
</item>
</channel>
</rss>
