<?xml version="1.0"?>
<rss version="2.0">
<channel>
  <title>Weiqi Gao&#039;s Observations - subversion tag</title>
  <link>http://www.weiqigao.com/blog/tags/subversion/</link>
  <description>Sharing My Experience...</description>
  <language>en</language>
  <copyright>Weiqi Gao</copyright>
  <lastBuildDate>Fri, 11 May 2012 12:48:36 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  
  <image>
    <url>http://pebble.sourceforge.net/common/images/powered-by-pebble.gif</url>
    <title>Weiqi Gao&#039;s Observations</title>
    <link>http://www.weiqigao.com/blog/</link>
  </image>
  
  
  <item>
    <title>Git At Home</title>
    <link>http://www.weiqigao.com/blog/2008/10/10/git_at_home.html</link>
    
      
        <description>
          &lt;p&gt;Here&#039;s a little experiment that I did last night after Kyle&#039;s Git talk&amp;mdash;I put this blog under Git control.&lt;/p&gt;

&lt;p&gt;I have been maintaining the content of this blog in Subversion &lt;a href= &#034;http://www.weiqigao.com/blog/2005/03/28/the_subversion_conversion_diversion.html&#034; &gt;since March 2005, 1292 days ago&lt;/a&gt; (and in CVS before that).  When I &lt;a href= &#034;http://www.weiqigao.com/blog/2008/08/07/upgraded_weblog_software_to_pebble_2_3_1.html&#034; &gt;moved this blog&lt;/a&gt; from my Fedora Core 6 box to my Debian box 64 days ago, I don&#039;t have enough disk space on the partition to hold the 1.9G Subversion workspace.  So I simply used the 916M export from Subversion.&lt;/p&gt;

&lt;p&gt;One of the questions I asked yesterday was the disk space usage of Git.  And Kyle assured me that its much less than Subversion.  So I gave Git a try:&lt;/p&gt;

&lt;pre style=&#034;margin-left:3em&#034;&gt;[weiqi@gao] # &lt;b&gt;feta install git-core&lt;/b&gt;
&lt;span style=&#034;color:darkgray&#034;&gt;Blah Blah Blah&lt;/span&gt;
[weiqi@gao] # &lt;b&gt;df -h /var&lt;/b&gt;
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/gao--2006-var
                      2.9G  2.0G  732M  74% /var
[weiqi@gao] # &lt;b&gt;git --version&lt;/b&gt;
git version 1.4.4.4
[weiqi@gao] # &lt;b&gt;git init-db&lt;/b&gt;
defaulting to local storage area
[weiqi@gao] # &lt;b&gt;echo *.bak &gt; .gitignore&lt;/b&gt;
[weiqi@gao] # &lt;b&gt;git add .&lt;/b&gt;
&lt;span style=&#034;color:darkgray&#034;&gt;Blah Blah Blah&lt;/span&gt;
&lt;span style=&#034;color:darkgray&#034;&gt;Blah Blah Blah&lt;/span&gt;
...
[weiqi@gao] # &lt;b&gt;df -h /var&lt;/b&gt;
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/gao--2006-var
                      2.9G  2.2G  550M  80% /var
[weiqi@gao] # &lt;b&gt;git commit&lt;/b&gt;
Committing initial tree 9c31562f7a84c42ebab872d245a49b637b1e0395
[weiqi@gao] # &lt;b&gt;df -h /var&lt;/b&gt;
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/gao--2006-var
                      2.9G  2.2G  546M  81% /var
[weiqi@gao] # &lt;b&gt;du -sh .git&lt;/b&gt;
187M    .git
&lt;/pre&gt;

&lt;p&gt;So everything fits in there nicely.  What would have been a 1.9G Subversion working directory now fits into a 1.2G space.  (This is a bit of an unfair comparison because I did not convert my Subversion repository to Git, so I don&#039;t have much history in Git, yet.)  And yes, Git is blazingly fast.&lt;/p&gt;

&lt;p&gt;I&#039;ll just have to push it to another box from time to time.&lt;/p&gt;

&lt;p&gt;And here&#039;s how the repo looks in gitk, a Tk GUI that Kyle demoed yesterday:&lt;/p&gt;

&lt;center&gt;
&lt;a href= &#034;./images/git-initial-import.png&#034; &gt;
&lt;img src=&#034;http://www.weiqigao.com/blog/images/git-initial-import.png&#034; title=&#034;Git initial import, shown in gitk&#034; alt=&#034;Git initial import, shown in gitk&#034; width=&#034;455&#034; height=&#034;435&#034; /&gt;
&lt;/a&gt;
&lt;/center&gt;
        </description>
      
      
    
    
    
    <comments>http://www.weiqigao.com/blog/2008/10/10/git_at_home.html#comments</comments>
    <guid isPermaLink="true">http://www.weiqigao.com/blog/2008/10/10/git_at_home.html</guid>
    <pubDate>Fri, 10 Oct 2008 12:17:28 GMT</pubDate>
  </item>
  
  <item>
    <title>Subversion, CVS, Bazaar-NG (bzr), ...</title>
    <link>http://www.weiqigao.com/blog/2006/05/18/subversion_cvs_bazaar_ng_bzr.html</link>
    
      
        <description>
          &lt;p&gt;Mark and Jonathan had a little Subversion problem today.  They wanted to move a directory in the repo and had a hard time doing it.&lt;/p&gt;

&lt;/p&gt;I&#039;ve been using Subversion for a long time and never had any problems with it.  However, I had never attempted to move a directory.  So I tried a little experiement with my toy repo using the svn command from Cygwin:&lt;/p&gt;

&lt;pre style=&#034;margin-left:3em&#034;&gt;[weiqi@gao] $ &lt;b&gt;svn co file:///var/svnroot&lt;/b&gt;
A    svnroot/trunk
A    svnroot/branches
A    svnroot/src
A    svnroot/src/foo.txt
A    svnroot/tags
Checked out revision 14.
[weiqi@gao] $ &lt;b&gt;ls&lt;/b&gt;
&lt;span style=&#034;color:blue&#034;&gt;svnroot&lt;/span&gt;/
[weiqi@gao] $ &lt;b&gt;cd svnroot&lt;/b&gt;
[weiqi@gao] $ &lt;b&gt;ls&lt;/b&gt;
&lt;span style=&#034;color:blue&#034;&gt;branches&lt;/span&gt;/  &lt;span style=&#034;color:blue&#034;&gt;src&lt;/span&gt;/  &lt;span style=&#034;color:blue&#034;&gt;tags&lt;/span&gt;/  &lt;span style=&#034;color:blue&#034;&gt;trunk&lt;/span&gt;/
[weiqi@gao] $ &lt;b&gt;svn move src trunk&lt;/b&gt;
svn: Can&#039;t move &#039;trunk/src/.svn/props/foo.txt.svn-work.tmp&#039; to &#039;trunk/src/.svn/p
rops/foo.txt.svn-work&#039;: Permission denied&lt;/pre&gt;

&lt;p&gt;I don&#039;t know what causes this problem.  But the problem goes away if I performs a server side move (&lt;tt&gt;svn move file:///var/svnroot/src file:///var/svnroot/trunk&lt;/tt&gt;).&lt;/p&gt;

&lt;hr align=&#034;center&#034; noshade=&#034;noshade&#034; size=&#034;1&#034; width=&#034;60%&#034;&gt;

&lt;p&gt;&#034;Why can&#039;t they just add the directory moving (and atomic commit) features to CVS?&#034;&lt;/p&gt;
&lt;p&gt;&#034;The maintainers of CVS wrote Subversion.&#034;&lt;/p&gt;

&lt;hr align=&#034;center&#034; noshade=&#034;noshade&#034; size=&#034;1&#034; width=&#034;60%&#034;&gt;

&lt;p&gt;And then there&#039;s &lt;a href= &#034;http://bazaar-vcs.org/&#034; &gt;Bazaar-NG (bzr)&lt;/a&gt;.  It&#039;s in both Cygwin and Fedora Core 5.  I vaguely know that it&#039;s a new kind of source control system, but not much more.  I read about it on &lt;a href= &#034;http://www.markshuttleworth.com/&#034; &gt;Mark Shuttleworth&lt;/a&gt;&#039;s &lt;a href= &#034;http://www.markshuttleworth.com/archives/34&#034; &gt;blog&lt;/a&gt; 10 days ago.&lt;/p&gt;

&lt;p&gt;Mark Shuttleworth, for those who don&#039;t already know, is the man behind the &lt;a href= &#034;http://www.ubuntu.com/&#034; &gt;Ubuntu Linux distribution&lt;/a&gt;.  (He was on &lt;a href= &#034;http://flickr.com/photos/webmink/148204920/&#034; &gt;stage with Jonathan Schwartz&lt;/a&gt; at JavaOne on Tuesday announcing the availability of Java in Debian and Ubuntu repositories.)&lt;/p&gt;

&lt;p&gt;Bzr is definitely different from CVS and Subversion.  Their tutorial is easy to follow.  And I like the fact that I&#039;m always working in a branch and can commit to my branch without bothering other developers.  However, some of the other features are not so easy to get used to.  For example, there is not a central repository.  (I guess that&#039;s why it is called a decentralized source control system.)  Everybody has his own branch, which they can push to a web site for others to marvel at.  And everybody can merge from everybody else&#039;s branch.&lt;/p&gt;

&lt;p&gt;It also seems to me that all the revisions are stored in a &lt;tt&gt;.bar&lt;/tt&gt; subdirectory of the working directory, just like in the SCCS days.  If I loose my hard drive, I loose my branch.&lt;/p&gt;

&lt;p&gt;What do you do when you want to release version 1.0?  Whose branch do you use?&lt;/p&gt;

&lt;p&gt;However, this &lt;a href= &#034;http://www.omat.nl/drupal/?q=node/76&#034; &gt;blog entry from Tom Albers&lt;/a&gt; shows a different scenario where bzr&#039;s usage may add value.  Because you can very easily bring any old directory laying around your hard drive under bzr&#039;s control (&lt;tt&gt;bzr init; bzr add; bzr commit;&lt;/tt&gt;) you can version directories that isn&#039;t normally versioned.&lt;/p&gt;
        </description>
      
      
    
    
    
    <comments>http://www.weiqigao.com/blog/2006/05/18/subversion_cvs_bazaar_ng_bzr.html#comments</comments>
    <guid isPermaLink="true">http://www.weiqigao.com/blog/2006/05/18/subversion_cvs_bazaar_ng_bzr.html</guid>
    <pubDate>Thu, 18 May 2006 05:16:34 GMT</pubDate>
  </item>
  
  <item>
    <title>Printers That Just Worked, And Other Stories</title>
    <link>http://www.weiqigao.com/blog/2005/12/18/printers_that_just_worked_and_other_stories.html</link>
    
      
        <description>
          &lt;p&gt;Last week was computer music chair week.  I installed Fedora Core 4 on &lt;tt&gt;gao-2006&lt;/tt&gt;, moved all my stuff from &lt;tt&gt;gao-2004&lt;/tt&gt; to &lt;tt&gt;gao-2006&lt;/tt&gt;, installed Windows 2000 Pro in &lt;tt&gt;gao-2004&lt;/tt&gt; and moved all of my daughter&#039;s stuff from &lt;tt&gt;hal-2001&lt;/tt&gt; to &lt;tt&gt;gao-2004&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;I already told you about my &lt;a href= &#034;http://www.weiqigao.com/blog/2005/12/12/ubuntu_5_10_first_impression.html&#034; &gt;one day encounter with Ubuntu 5.10&lt;/a&gt;.  I switched back to my old friend Fedora Core 4 after that.  I finally turned &lt;tt&gt;gao-2004&lt;/tt&gt; over to my daughter yesterday evening.&lt;/p&gt;

&lt;p&gt;Here&#039;s a few stories that I want to tell.&lt;/p&gt;

&lt;h4&gt;No printer configuration needed for FC4&lt;/h4&gt;

&lt;p&gt;Usually one would expect that some network printer configuration is needed after installing a new OS.  Not for Fedora Core 4.  It recognized the two printers I have on the home network and configured them appropriately.  Immediately after the OS install, I can just open up Firefox and print to both the HP LaserJet 1100 on an Fedora Core 3 box and the HP Photosmart 7350 on the Mac mini.&lt;/p&gt;

&lt;h4&gt;Moving a Subversion repository&lt;/h4&gt;

&lt;p&gt;I hosted my Subversion repository on &lt;tt&gt;gao-2004&lt;/tt&gt;, and needed to move it to &lt;tt&gt;gao-2006&lt;/tt&gt;.  With the default backend storage system change (from Berkeley db based to file system based) for Subversion that happen between FC3 and FC4, I expected that I need to at least read a lot of documentation and perform a fair amount of experimentation.&lt;/p&gt;

&lt;p&gt;It turn out that that is not the case, for two reasons.  One, the backend storage system is an implementation detail of Subversion and is mostly hidden behind the Subversion user interface.  The detail leaked through only in terms file permission problems.  BTW, &lt;a href= &#034;http://www.pragmaticprogrammer.com/titles/svn/index.html&#034; &gt;Pragmatic Version Control Using Subversion&lt;/a&gt; helped a lot in the process, even though one of its recipes no longer applies in the &lt;a href= &#034;http://svn.collab.net/repos/svn/trunk/notes/fsfs&#034; &gt;fsfs&lt;/a&gt; world.&lt;/p&gt;

&lt;p&gt;Here&#039;s my migration steps:&lt;/p&gt;

&lt;pre style=&#034;margin-left:3em&#034;&gt;[root@gao-2004] $ &lt;b&gt;svnadmin dump /var/svnroot &gt; /mnt1/svn-repo.svndump&lt;/b&gt;

[root@gao-2006] # &lt;b&gt;svnadmin create /var/svnroot&lt;/b&gt;
[root@gao-2006] # &lt;b&gt;chown -R weiqi.svn /var/svnroot&lt;/b&gt;
[root@gao-2006] # &lt;b&gt;svnadmin load /var/svnroot &lt; /mnt1/svn-repo.svndump&lt;/b&gt;&lt;/pre&gt;

&lt;p&gt;The Pragmatic Subversion book contains a recipe that contains some &#034;group sticky bit&#034; trickery (p.151) that is no longer needed because &lt;b&gt;&lt;tt&gt;svnadmin create&lt;/tt&gt;&lt;/b&gt; already does it for you.&lt;/p&gt;

&lt;p&gt;Here &lt;b&gt;&lt;tt&gt;weiqi&lt;/tt&gt;&lt;/b&gt; is the user who will access the repo through the &lt;a href= &#034;http://svnbook.red-bean.com/en/1.0/ch06s03.html&#034; &gt;svn+ssh&lt;/a&gt; protocol, and &lt;b&gt;&lt;tt&gt;svn&lt;/tt&gt;&lt;/b&gt; is a group that contains all Subversion users.&lt;/p&gt;

&lt;h4&gt;Moving a WordPress weblog&lt;/h4&gt;

&lt;p&gt;I haven&#039;t done too much with the &lt;a href = &#034;http://www.weiqigao.com/blog2/&#034; &gt;WordPress blog I created  122 days ago&lt;/a&gt;.  But instead of throwing it away, I thought it a good opportunity to test how easy it is to move the blog over.&lt;/p&gt;

&lt;p&gt;It indeed it easy.  All I have to do is to move the MySQL database and the &lt;tt&gt;/var/www/html/wordpress&lt;/tt&gt; directory from one computer to another:&lt;/p&gt;

&lt;pre style=&#034;margin-left:3em&#034;&gt;[root@gao-2004] # &lt;b&gt;mysqladmin -p --add-drop-tables wordpress &gt; /mnt1/wordpress.mysqldump&lt;/b&gt;
[root@gao-2004] # &lt;b&gt;cd /var/www/html&lt;/b&gt;
[root@gao-2004] # &lt;b&gt;tar cf /mnt1/wordpress-files.tar wordpress&lt;/b&gt;

[root@gao-2006] # &lt;b&gt;mysqladmin -p create wordpress&lt;/b&gt;
[root@gao-2006] # &lt;b&gt;mysql -p wordpress &lt; /mnt1/wordpress.mysqldump&lt;/b&gt;
[root@gao-2006] # &lt;b&gt;mysql -p&lt;/b&gt;
Enter password:
[...]
&gt; &lt;b&gt;grant usage on *.* to weiqi identified by password&lt;/b&gt;
&gt; &lt;b&gt;grant delete, select, insert, update on wordpress.* to weiqi&lt;/b&gt;
[root@gao-2006] # &lt;b&gt;cd /var/www/html&lt;/b&gt;
[root@gao-2006] # &lt;b&gt;tar xf /mnt1/wordpress-files.tar&lt;/b&gt;
&lt;/pre&gt;

&lt;p&gt;where &lt;tt&gt;weiqi/password&lt;/tt&gt; is the username/password pair I gave to WordPress when I did the five minutes install back then.&lt;/p&gt;

&lt;p&gt;Here &lt;a href= &#034;http://www.weiqigao.com/blog2/&#034; &gt;it is&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;Evolution did not migrate cleanly&lt;/h4&gt;

&lt;p&gt;I never thought the migration of email client data could be this hard.  I use &lt;a href= &#034;http://www.novell.com/products/desktop/features/evolution.html&#034; &gt;Evolution&lt;/a&gt;, the default email client for Fedora Core (and Red Hat Linux before it).  There is a &lt;tt&gt;~/.evolution&lt;/tt&gt; directory and it seems to contain my emails.&lt;/p&gt;

&lt;p&gt;Just copy the &lt;tt&gt;~/.evolution&lt;/tt&gt; directory to the new machine and everything will be taken care of, right?  After all, Mozilla, Firefox, Thunderbird all work that way.&lt;/p&gt;

&lt;p&gt;&lt;span style=&#034;color:red&#034;&gt;Wrong!&lt;/span&gt;  It turns out Evolution also saves some of its settings elsewhere that is not obvious to the casual user.&lt;/p&gt;

&lt;p&gt;When I started Evolution on &lt;tt&gt;gao-2006&lt;/tt&gt;, the first-use dialog popped up.  I recreated all of my email accounts.  Fortunately for me, once I&#039;m in Evolution proper, all of my old email messages showed up.&lt;/p&gt;

&lt;h4&gt;Windows installation remains to be a pain&lt;/h4&gt;

&lt;p&gt;Compared to how smoothly the Fedora Core installation went, Windows installation remains to be a major pain.  Nothing is improved since I &lt;a href= &#034;http://www.weiqigao.com/blog/2004/01/14/windows_on_the_second_hard_drive_linux_on_the_first.html&#034; &gt;last performed&lt;/a&gt; this magic 704 days ago.&lt;/p&gt;

&lt;p&gt;My main complaints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The trickling in of updates.  Windows Update first told me I have to get IE6.  Only after the reboot did it tell me that I also need IE6 SP1.  And only after another reboot did I learn that I also need IE6 SPI security update KB45423, or whatever.&lt;/li&gt;
&lt;li&gt;Everything is a separate download.  Red Hat need to do a Windows distribution&amp;mdash;&#034;Here&#039;s 20 DVDs for your Red Hat Windows distribution.  It includes all the cool programs that you can download from the internet.  Just install it, and turn on the Red Hat update agent.&#034;&lt;/li&gt;
&lt;li&gt;There are too many reboots that I have to perform to get everything installed.&lt;/li&gt;
&lt;li&gt;Microsoft Office installation is down right ridiculous!  I&#039;ve done the installation several times too many to render the online activation not working.  So I have to call an 888 telephone number and speak with a voice response program:
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Very pleasant synthetic female voice&lt;/b&gt;: Now read the first set of numbers&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Me&lt;/b&gt;: six-three-five-nine-zero-eight&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Voice&lt;/b&gt;: Do you want to repeat it?  If you don&#039;t want to repeat it, simply say &#034;move on.&#034;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Me&lt;/b&gt;: Move on.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Voice&lt;/b&gt;: All right. read the next set of numbers&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Me&lt;/b&gt;: nine-zero-five-three-seven-six&lt;/li&gt;
&lt;li&gt;[...]&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Voice&lt;/b&gt;: We are almost done.  Now read the last set of numbers&lt;/li&gt;
&lt;li&gt;[...]&lt;/li&gt;
&lt;/ul&gt;
It took me six minutes to go through the registration process.
&lt;/li&gt;
&lt;/ul&gt;
        </description>
      
      
    
    
    
    <comments>http://www.weiqigao.com/blog/2005/12/18/printers_that_just_worked_and_other_stories.html#comments</comments>
    <guid isPermaLink="true">http://www.weiqigao.com/blog/2005/12/18/printers_that_just_worked_and_other_stories.html</guid>
    <pubDate>Mon, 19 Dec 2005 04:21:38 GMT</pubDate>
  </item>
  
  </channel>
</rss>

