Git underwhelms

I work on source code from two separate SVN
repositories. One of them is geographically remote. Working with the remote server is slow for ‘log’, ‘diff -r’, ‘blame’, etc. Due to my interest in distributed version control, and my desire for faster repository access, I decided to try git and git-svn. Doing ‘log’, ‘diff’, etc. with a local git repo is much faster, but on the whole, working in a git repo created with git-svn has been difficult and unrewarding. Perhaps it would be easier if others at my company were using git-svn and we could share ideas. Working with git and git-svn requires learning a new workflow, and I haven’t yet reached enlightenment.

Challenges with Git:

  • The Git Wiki is often out-of-date and/or incomplete (submodule support, for example).
  • No Nautilus, Konquerer, or Windows Explorer integration.
  • No KDevelop itegration.
  • git-gui should:
  • let me double-click on files listed in either “Staged Changes” or “Unstaged Changes” to edit the file. Or let me right-click and choose an “edit” option.
  • Let me use an external diff program such as meld or kdiff3. git-gui should let me set this up and use it. qgit has an external diff option (defaults to kompare), but it doesn’t use the working copy on the right hand side, so it’s not possible to use the diff tool to change the working copy file.

Challenges with Git-SVN: (More complicated to use than Subversion)

  • Two stage commit instead of single stage. ‘git commit’, ‘git-svn dcommit’
  • Error messages are cryptic, so I don’t know how to resolve the errors.
  • git-svn rebase doesn’t merge changes from upstream Subversion server into my working copy, and git-svn doesn’t tell me what workflow I should be using. So I ran git-svn fetch to pull upstream Subversion changes. Then I ran git-gui and chose Merge->Local. It told me something helpful. “You are in the middle of a change. File X is modified. You should complete the current commit before starting the merge. Doing so will help you abort a failed merge, should the need arise.” “git-svn rebase” should have told me
    the same thing.

Reasons to continue with Subversion:

  • Workflow is easier, less complex — perhaps because I’m used to it.
  • Windows Explorer integration via TortiseSVN.
  • IDE integration. Nearly every IDE supports or has a pluging for Subversion.
  • svnmerge.py gives me cherry-picking support (between branches within the same repository)
  • svnmerge.py remembers merges, so I don’t have to resolve the same
    conflicts twice.
  • I don’t need disconnected operation in my workplace.

I hope that in a year, Git, git-svn and developer tool integration will be more mature and thus rewarding to use. With the rapid development I see happening, it wouldn’t be surprising.

I will continue to use git-svn. It gives me the speed I need for working with log history, annotate and diff.

Update: I’ve come across Git for Computer Scientists, and seeing the pretty graphs leads me to believe that working with git requires an understanding of how git works.

Article: The Pillars of Concurrency

[The Pillars of Concurrency](http://www.ddj.com/dept/64bit/200001985), July 02, 2007 by Herb Sutter

“In his inaugural column, Herb makes the case that we must build a
consistent mental model before talking about concurrency.
Herb is a software architect at Microsoft and chair of the ISO C++
Standards committee.”

* Pillar 1: Responsiveness and Isolation Via Asynchronous Agents
* Pillar 2: Throughput and Scalability Via Concurrent Collections
* Pillar 3: Consistency Via Safely Shared Resources
* Composability: More Than The Sum of the Parts

Ubiquitous Version Control and the future of Subversion

Mantra: “[Version control must become ubiquitous](http://subversion.tigris.org/servlets/ReadMsg?list=dev&&msgNo=128193)” — Branko Čibej

Subversion developers are gradually leaning toward distributed version control techniques [[1]](http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=128301), [[2]](http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=128301). However, they don’t want users to have to know it’s distributed. They don’t want users to know they’re even using version control. Lawyers, architectes, etc. all need version control, and often, they don’t even know that it’s possible. It also needs to be easy to do text searches on commit history.

> We do need to recognize that users are not interested in becoming version control experts, and we need to pay close attention to what they actually want, as opposed to what experts might want them to want.

> The reason Subversion is taking over the world is because it is tremendously
user-focused, and because it provides well-documented APIs that enable other
developers to write software on top of Subversion. We should copy what
we need from the decentralized systems, but remember that most users don’t know
or care whether a system is centralized or decentralized — their ideal system
is one they don’t notice. — [Karl Vogel](http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=128111)

Apparently, users really like the ability to “lock” files in the repository. How does that work with distributed version control? I don’t know.

[Eric Raymond praised the Subversion developers](http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=128106), although he believes the future lies in distributed systems like Mercurial.

Karl Fogel [replies to this and to Linus Torvald’s criticisms of Subversion](http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=128111). He does a great job of summarizing Linus’s talk on Git, and the things people want to do with version control:

> For many organizations, including open source projects, centralization is a
feature: you want changes (and branches) to end up in the master repository
sooner rather than later, so they’ll be visible to everyone, so they’ll be
backed up, so they’ll go through the central hook system, etc. It
focuses the community on a shared object (Ben Collins-Sussman makes this argument in
more detail at [http://blog.red-bean.com/sussman/?p=20](http://blog.red-bean.com/sussman/?p=20)).”

> A general tool configured to behave in a specific way is never quite
as natural to use as a tool designed for that specific use in the
first place. In other words, Subversion can — will have to — take
on some of the features of decentralized VC systems, but it will never
be as good a decentralized system as they are. By the same token, a
decentralized system can be configured to work like a centralized one,
but will never be as good at it as Subversion is.”

Individual [.svn dirs may go away](http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=128148), along with the ability to move a
subdirectory from a checkout somewhere else and have it still work. The reason? Better performance.

Myths of Innovation

Guy Kowasaki published [Ten Questions](http://blog.guykawasaki.com/2007/06/ten-questions-w.html) [and answers] with Scott Berkun, Author of “The Myths of Innovation”.

FreeNX and SELinux

As I [mentioned earlier](http://jaredrobinson.com/blog/?p=87), upgrading from Fedora 6 to Fedora 7 broke FreeNX. A temporary solution was to disable SELinux. Here’s what allowed me to re-enable SELinux. First, I read the RHEL 5 SELinux guide to [building a local policy module](http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Deployment_Guide-en-US/sec-sel-building-policy-module.html). Next, I ran the following commands, as root:

setenforce Enforcing
/etc/init.d/auditd stop
mv /var/log/audit/audit.log /var/log/audit.log.old
/etc/init.d/auditd start

At this point, I used an NX client to attempt to connect to my server, which failed. Then I did this:

cd /etc/selinux
cat /var/log/audit/audit.log | audit2allow -M freenx
semodule -i freenx.pp

At that point, my NX client allowed me to connect to the server. Here’s the freenx.te file that audit2allow created:

module freenx 1.0;

require {
type unconfined_t;
type lib_t;
class file execmod;
}

#============= unconfined_t ==============
allow unconfined_t lib_t:file execmod;

Upgrading from Fedora 6 to Fedora 7

Last night, I completed the easiest Fedora upgrade I’ve ever had, without having to download and boot from a CD/DVD. Here are the instructions I followed:
[http://fedoraproject.org/wiki/YumUpgradeFaq](http://fedoraproject.org/wiki/YumUpgradeFaq)

I did have some unexpected glitches, mostly due to SELinux.

* The pidgin (formerly known as gaim) system tray icon didn’t appear until I deleted my .gconf settings and logged back in. This has the drawback that I had to reconfigure several aspects of my UI. It may be possible to only delete ~/.gconf/apps/panel/applets/systray (or to remove it from the panel manually), then re-add it by right-clicking the panel, selecting “Add to Panel” and chooise “Notification Area”.
* The Dovecot IMAP server wasn’t allowing Thunderbird to connect. I ran ‘yum upgrade’, and it installed an updated SELinux policy pack. After restarting, IMAP services functioned properly.
* HAL didn’t start up. To fix it, I ran ‘touch /.autorelabel’ as root and rebooted. Since then, I’ve learned that using [fixfiles](http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Deployment_Guide-en-US/sec-sel-admincontrol.html#sec-sel-fsrelabel) is a safer approach.
* FreeNX didn’t allow me to connect unless I disable SELinux. Later, I [figured out how](http://jaredrobinson.com/blog/?p=89) to configure SELinux to allow FreeNX.

Goodby VMWare, Hello VirtualBox

I’ve been using the freeware VMPlayer and VMware Server for a few years now, and while they function, it’s been a pain to have to recompile kernel modules every time the kernel is updated on my Fedora machines. A big disadvantage of VMWare is that the guests don’t seem to startup when run inside of an NX session, and I can’t run guests “headless” (without a monitor connected) using the free editions.

Based on the recommendation of [Craig Ozancin](http://www.linkedin.com/pub/0/826/810), I’ve tried [Virtual Box](http://www.virtualbox.org/), and I’m pleased with it — it lets me start and stop guests from the command line. I can connect to them using RDP (remote desktop). The new 1.4.0 release includes support for VMWare guest images! VirtualBox hasn’t required me to recompile kernel modules, and it seems to run faster than VMWare.

Goodbye VMware. Hello VirtualBox. What does the future hold? Probably [KVM](http://fedoraproject.org/wiki/Docs/Fedora7VirtQuickStart) (the [kernel-based virtual machine](http://www.phoronix.com/vr.php?view=9066)), which only works with newer Intel and AMD chips containing virtualization instructions.

I later discovered that when I (accidentally) ran the Xen kernel, VirtualBox wouldn’t work. It seems the Xen kernel doesn’t work well with third party virtualization solutions. It’s a good thing I don’t need Xen.

HOWTO disable middle-mouse-paste in Linux

A coworker couldn’t stand the fact that, on his linux computer, when he accidentally clicked the mouse wheel, it would paste text. He offered to buy me lunch if I could turn it off. Here’s how we did it. Run the following command:

> xmodmap -e “pointer = 1 25 3 4 5 6 7 8 9”

To persist this behavior, edit ~/.Xmodmap and add
> pointer = 1 25 3 4 5 6 7 8 9

Next annoyance: My coworker uses Eclipse, and wants to hit the F10 key. GTK (the toolkit underneath Gnome) maps F10 to pop up the application menu. In RHEL/CentOS 4, there’s no good way to fix it. On my Fedora 6 machine, I did the following:

> gconftool-2 –get /desktop/gnome/interface/menubar_accel

I saved off the value of that, which was “F10”. Then I ran this:

> gconftool-2 –type string –set /desktop/gnome/interface/menubar_accel “Ctrl-Shift-M”

It also works to use gconf-editor to edit the key /desktop/gnome/interface/menubar_accel.

Ethics are about business survival

[Business ethics about survival, leaders told](http://www.deseretnews.com/dn/view2/1,4382,660225718,00.html)

> Ethics aren’t important because they help businesses feel good about themselves… [it] is about staying in business.

> “We don’t ask you to do ethics so you can feel warm and soft and squishy,” Jennings said. “We ask you to do ethics because it is an integral part of long-term business survival. This is the thing you have to stay focused on when the pressure hits. This is the antidote,” [said professor and columnist Marianne Jennings]

[Read more](http://www.deseretnews.com/dn/view2/1,4382,660225718,00.html)

Morse Code Tutor

Here’s a morse code tutor I’ve been using. It works on Windows, Linux, Mac and Dos: [http://c2.com/morse/](http://c2.com/morse/)