Pages

Saturday, February 25, 2012

Convert Mercurial (hg) Repository to Git

The following instructions are for converting an hg repository to git on Windows 7.

INSTRUCTIONS
  1. Install Cygwin with python, hg and git
  2. Install fast-export

    You can try installing directly from the fast-export repository by issuing this command in the Cygwin console:
    git clone git://repo.or.cz/fast-export.git
    If your firewall doesn't like that command and responds with:
    Cloning into fast-export...
    repo.or.cz[0: 195.113.20.142]: errno=Connection timed out
    fatal: unable to connect a socket (Connection timed out)


    you can download an archive from here:
    http://repo.or.cz/w/fast-export.git/shortlog/refs/heads/master/

    Also, I was getting the following error: 
    IOError: [Errno 32] Broken pipe


    and was able to get around it by downloading an older version:

    fast-export-c8a45848968a21c3021489a6ba3ab1ffe5ef2a90.tar.gz
  3. Execute these commands in cygwin to create a working directory and initialize a new git repository:

    mkdir conversion
    cd conversion
  4. In Windows explorer, copy the fast-export folder from inside the archive into:

    C:\cygwin\home\<USERNAME>\conversion
  5. Also,  copy your existing mercurial repository, we'll call it convert.hg, into the same directory
  6. Execute the following commands:

    mkdir convert.git
    cd convert.git
    git init
    ~/conversion/fast-export/hg-fast-export.sh -r ~/conversion/convert.hg
ADDITIONAL NOTES

The directory structure created for this example was:

~/conversion
    /convert.git  # A new empty git repository
    /convert.hg   # Your existing mercurial repository
    /fast-export  # The fast-export directory we downloaded
REFERENCES

Saturday, February 11, 2012

Installing Ubuntu Desktop 11.10 on a Dell M4400 with Dock and Dual External Monitors



The following are notes for how I was able to get Ubuntu 11.10 working with the two external monitors attached to my docked Dell M4400 laptop.
  1. Before starting the installation, it is best to start by undocking the laptop and connecting directly to the router instead of using wireless. I had an issue where it seemed progress would halt during startup, booting from USB, but the problem didn't occur when using the undocked laptop screen.
  2. I went ahead and checked the box for proprietary drivers. This option might install the Nvidia
    driver which ultimately causes an issue(we're going to remove the Nvidia drivers later).  I also checked the box to install updates. If you don't install updates, you will eventually notice an issue where you have to hold down the mouse button to navigate the menus.
  3. After installation completes, and you reboot into Ubuntu, execute these commands:

       sudo apt-get remove nvidia-*
       sudo apt-get upgrade


    Enter "y" when prompted
  4. Shutdown
  5. Dock your laptop with the lid closed and press the power button.  The external monitors will eventually fire up, but the desktop will be mirrored.
  6. To extend the desktop across both monitors, under the same "Dash home" searchbox, enter "displays". Unclick the mirror displays checkbox and make sure moitor resolutions are correct, then click the Apply button.  Click the "Keep this configuration" button in the dialog that appears.
  7. All done, you should be able to drag windows across both desktops. At one point there was a glitch when I applied the settings and I needed to restart because the menu bar was missing (click the desktop and push the power button on the dock, a window with restart options will appear).
  8. Enjoy Ubuntu 11.10!  It looks slick!  I finally made the switch because Windows 7 kept blue-screening, and I had always wanted to leave the dark side.
  9. If you find out the exact instructions to get the Nvidia driver working, please post a comment.  I ultimately gave up after multiple failed attempts at installing the driver both from the Nvidia website and from Ubuntu's package repository. Eventually, I might do some more attempts with a fresh install on a different hard drive, but for now I can get to work!