Thursday, August 30, 2007

Import a repository into another repository.

1. First dump the first repository.
svnadmin dump repo1 > repo1.dumpfile
2. Filter if necessary (see svndumpfilter). Not necessary for me.

3. Create a directory in your repository for the project.
svn mkdir projectdir
svn commit -m "getting ready to import new project"
4. Load the project into the repository.
svnadmin load --parent-dir relative/path/to/projectdir repo2 < repo1.dumpfile
5. Now update your working copies.
svn update

Convert a Subversion repository from BDB to FSFS

Create a FSFS repository.
svnadmin --fs-type create repo2
Dump the first repository.
svnadmin dump repo1 > repo2.dumpfile
Load the dumpfile into the new FSFS repository.
svnadmin load repo2 < repo2.dumpfile
A lot more information is available in the Subversion FAQ http://subversion.tigris.org/faq.html#bdb-fsfs-convert

Wednesday, August 29, 2007

Fixing LaTeX-Suite's jump to error feature.

LaTeX-Suite's jump to error feature doesn't always work correctly. The following is a fix proposed by Martin Sander on the vim-latex-dev mailing list.

The key observation is that passing the option -file-line-error-style to latex formats the output in a parser-friendly manner. So add the following to your .vimrc file.
let g:Tex_CompileRule_dvi = 'latex -interaction=nonstopmode -file-line-error-style $*'
And the following line needs to be added (at the appropriate place; see the patch below for context) to the tex.vim script of the LaTeX-Suite Package.
setlocal efm+=%E%f:%l:\ %m
Here is Martin's patch.
--- /usr/share/vim/addons/compiler/tex.vim      2007-01-29
13:39:58.000000000 +0100
+++ /home/lennox/.vim/compiler/tex.vim 2007-06-14 23:33:33.000000000
+0200
@@ -202,6 +202,7 @@ function! SetLatexEfm()

setlocal efm+=%E!\ LaTeX\ %trror:\ %m
setlocal efm+=%E!\ %m
+ setlocal efm+=%E%f:%l:\ %m

setlocal efm+=%+WLaTeX\ %.%#Warning:\ %.%#line\ %l%.%#
setlocal efm+=%+W%.%#\ at\ lines\ %l--%*\\d

Monday, August 20, 2007

AIGLX + Compiz Fusion on MacBook

Install AIGLX. Following the instructions for setting up AIGLX, I did the following.
  1. Edit /etc/X11/xorg.conf file as suggested in the above instructions. My xorg.conf file is below.
  2. Restart the X server with '/etc/init.d/gdm restart'.
    # /etc/X11/xorg.conf (xorg X Window System server configuration file)
    #
    # This file was generated by dexconf, the Debian X Configuration tool, using
    # values from the debconf database.
    #
    # Edit this file with caution, and see the xorg.conf(5) manual page.
    # (Type "man xorg.conf" at the shell prompt.)
    #
    # This file is automatically updated on xserver-xorg package upgrades *only*
    # if it has not been modified since the last upgrade of the xserver-xorg
    # package.
    #
    # If you have edited this file but would like it to be automatically updated
    # again, run the following command:
    # sudo dpkg-reconfigure -phigh xserver-xorg

    Section "Files"
    FontPath "/usr/share/fonts/X11/misc"
    FontPath "/usr/share/fonts/X11/cyrillic"
    FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
    FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
    FontPath "/usr/share/fonts/X11/Type1"
    FontPath "/usr/share/fonts/X11/100dpi"
    FontPath "/usr/share/fonts/X11/75dpi"
    # path to defoma fonts
    FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
    EndSection

    Section "Module"
    Load "i2c"
    Load "bitmap"
    Load "ddc"
    Load "dri"
    Load "extmod"
    Load "freetype"
    Load "glx"
    Load "int10"
    Load "vbe"
    Load "dbe"
    EndSection

    Section "InputDevice"
    Identifier "Generic Keyboard"
    Driver "kbd"
    Option "CoreKeyboard"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "us"
    EndSection

    Section "InputDevice"
    Identifier "Configured Mouse"
    Driver "mouse"
    Option "CorePointer"
    Option "Device" "/dev/input/mice"
    Option "Protocol" "ImPS/2"
    Option "ZAxisMapping" "4 5"
    Option "Emulate3Buttons" "true"
    EndSection

    Section "InputDevice"
    Identifier "Synaptics Touchpad"
    Driver "synaptics"
    Option "SendCoreEvents" "true"
    Option "Device" "/dev/psaux"
    Option "Protocol" "auto-dev"
    Option "HorizScrollDelta" "0"
    Option "SHMConfig" "on"
    EndSection

    Section "InputDevice"
    Identifier "MacBook Touchpad"
    Driver "synaptics"
    Option "AccelFactor" "0.015"
    Option "BottomEdge" "310"
    Option "Device" "/dev/psaux"
    Option "FingerHigh" "30"
    Option "FingerLow" "20"
    Option "HorizScrollDelta" "0"
    Option "LeftEdge" "100"
    Option "MaxDoubleTapTime" "180"
    Option "MaxSpeed" "0.88"
    Option "MaxTapMove" "220"
    Option "MaxTapTime" "150"
    Option "MinSpeed" "0.79"
    Option "Protocol" "auto-dev"
    Option "RightEdge" "1120"
    Option "SendCoreEvents" "true"
    Option "SHMConfig" "on"
    Option "TapButton2" "3"
    Option "TapButton3" "2"
    Option "TopEdge" "50"
    Option "VertScrollDelta" "25"
    Option "VertTwoFingerScroll" "true"
    EndSection


    Section "InputDevice"
    Driver "wacom"
    Identifier "stylus"
    Option "Device" "/dev/input/wacom"
    Option "Type" "stylus"
    Option "ForceDevice" "ISDV4" # Tablet PC ONLY
    EndSection

    Section "InputDevice"
    Driver "wacom"
    Identifier "eraser"
    Option "Device" "/dev/input/wacom"
    Option "Type" "eraser"
    Option "ForceDevice" "ISDV4" # Tablet PC ONLY
    EndSection

    Section "InputDevice"
    Driver "wacom"
    Identifier "cursor"
    Option "Device" "/dev/input/wacom"
    Option "Type" "cursor"
    Option "ForceDevice" "ISDV4" # Tablet PC ONLY
    EndSection

    Section "Device"
    Identifier "Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller"
    Driver "i810"
    Option "XAANoOffscreenPixmaps"
    BusID "PCI:0:2:0"
    EndSection

    Section "Monitor"
    Identifier "Generic Monitor"
    Option "DPMS"
    HorizSync 28-64
    VertRefresh 43-60
    EndSection

    Section "Screen"
    Identifier "Default Screen"
    Device "Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller"
    Monitor "Generic Monitor"
    DefaultDepth 24
    SubSection "Display"
    Depth 1
    Modes "1280x800"
    EndSubSection
    SubSection "Display"
    Depth 4
    Modes "1280x800"
    EndSubSection
    SubSection "Display"
    Depth 8
    Modes "1280x800"
    EndSubSection
    SubSection "Display"
    Depth 15
    Modes "1280x800"
    EndSubSection
    SubSection "Display"
    Depth 16
    Modes "1280x800"
    EndSubSection
    SubSection "Display"
    Depth 24
    Modes "1280x800"
    EndSubSection
    EndSection

    Section "ServerLayout"
    Identifier "Default Layout"
    Screen "Default Screen"
    InputDevice "Generic Keyboard"
    InputDevice "Configured Mouse"
    InputDevice "stylus" "SendCoreEvents"
    InputDevice "cursor" "SendCoreEvents"
    InputDevice "eraser" "SendCoreEvents"
    # InputDevice "Synaptics Touchpad"
    InputDevice "MacBook Touchpad"
    Option "AIGLX" "true"
    EndSection

    Section "DRI"
    Mode 0666
    EndSection

    Section "Extensions"
    Option "Composite" "Enable"
    EndSection


Un-install Beryl, Compiz, Emerald, etc.
apt-get remove compiz-core desktop-effects
apt-get remove beryl-ubuntu beryl-manager emerald
Install Compiz Fusion.
  1. Add repositories.
    deb http://download.tuxfamily.org/3v1deb feisty eyecandy
    deb-src http://download.tuxfamily.org/3v1deb feisty eyecandy
  2. Import key.
    wget http://download.tuxfamily.org/3v1deb/DD800CD9.gpg -O - | sudo apt-key add -
  3. Install Compiz Fusion.
    apt-get update
    apt-get install compiz compizconfig-settings-manager compiz-plugins compiz-gnome compiz-fusion-plugins-extra compiz-fusion-plugins-unofficial libcompizconfig-backend-gconf
    apt-get install sexy-python
    apt-get upgrade
  4. [Optional] Test.
  5. compiz --replace
  6. Setup with the Compiz Config Settings Manager.
    ccsm
  7. Add compiz to AutoStarted Programs.
  8. Restart the X server with '/etc/init.d/gdm restart'.