Bazaar is great on Windows. Several years later, git's tools for Windows still.... (ahem) are lacking or too commercial. However, official development on it has ended and git is so much more popular now. So I think the time has come to convert all my beloved bzr repositories to git.

First we need note some prerequisites:

  • Bazaar
  • Git (msysgit flavor)
  • Hstart (you could do it without, but the script uses it, as written)
  • TortoiseGit (not strictly necessary, but it's my preferred way of using git repositories)

Get all those installed and then we can use the script attached.

The output looks like this:

Found a bzr repository in...
   F:\CodeProjects\ExportPDF-01\

Press [Enter] to open a git shell and continue.

Welcome to Git (version 1.9.4-preview20140929)

Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
/f/CodeProjects /f/CodeProjects/ExportPDF-01
/f/CodeProjects/ExportPDF-01

This script creates a git repository from a bzr repository.

Affected directory: ExportPDF-01
                in: /f/CodeProjects/

Initializing git repository in /f/CodeProjects/ExportPDF-01 ...
Initialized empty Git repository in f:/CodeProjects/ExportPDF-01/.git/
Converting...
16:06:28 Calculating the revisions to include ...
16:06:28 Starting export of 3 revisions ...
G:/Programming/Bazaar/plugins\fastimport\exporter.py:557: DeprecationWarning:
bzrlib.revisiontree.InventoryRevisionTree._get_inventory was deprecated in version 2.5.0.

16:06:28 Exported 3 revisions in 0:00:00
G:\Programming\Git\libexec\git-core\git-fast-import.exe statistics:
---------------------------------------------------------------------
Alloc'd objects:   5000
Total objects:       65 ( 6 duplicates )
       blobs :       42 ( 5 duplicates    18 deltas of    41 attempts)
       trees :       20 ( 1 duplicates     6 deltas of    20 attempts)
      commits:        3 ( 0 duplicates     0 deltas of     0 attempts)
        tags :        0 ( 0 duplicates     0 deltas of     0 attempts)
Total branches:       1 ( 1 loads     )
      marks:       1024 ( 3 unique    )
      atoms:         38
Memory total:      2294 KiB
       pools:      2098 KiB
     objects:       195 KiB
---------------------------------------------------------------------
pack_report: getpagesize()            =     65536
pack_report: core.packedGitWindowSize =  33554432
pack_report: core.packedGitLimit      = 268435456
pack_report: pack_used_ctr            =        15
pack_report: pack_mmap_calls          =         8
pack_report: pack_open_windows        =         1 /          1
pack_report: pack_mapped              =     36961 /      36961
---------------------------------------------------------------------

Creating .gitignore from .bzrignore...
Cloning repository...
Cloning into 'f:/CodeProjects/ExportPDF-01-clone'...
done.

Creating dummy remote folder (locally)...
------------------------------------------------------------------------------

             Total    Copied   Skipped  Mismatch   FAILED    Extras
   Dirs :       34        34         0         0        0         0
  Files :       78        78         0         0        0         0
  Bytes :  264.4 k   264.4 k         0         0        0         0
  Times :  0:00:00   0:00:00                      0:00:00   0:00:00

  Speed :            2820656 Bytes/sec.
  Speed :            161.399 MegaBytes/min.
  Ended : Saturday, November 8, 2014 4:06:29 PM

Fetching into remote folder...
From f:/CodeProjects/ExportPDF-01-tmp
* [new branch] master -> origin/master
Already on 'master'
Your branch is up-to-date with 'origin/master'.

Copying .git from dummy folder back to repository...
cp: `/f/CodeProjects/ExportPDF-01-clone/.git/objects/pack/pack-d642dfcb49971e8a979d2f266f4f67dc0247e32b.idx' and `/f/CodeProjects/ExportPDF-01/.git/objects/pack/pack-d642dfcb49971e8a979d2f266f4f67dc0247e32b.idx' are the same file
cp: `/f/CodeProjects/ExportPDF-01-clone/.git/objects/pack/pack-d642dfcb49971e8a979d2f266f4f67dc0247e32b.pack' and `/f/CodeProjects/ExportPDF-01/.git/objects/pack/pack-d642dfcb49971e8a979d2f266f4f67dc0247e32b.pack' are the same file

Cleaning up...
error: tag 'origin/HEAD' not found.

Error at git
Continuing from next operation...

error: tag 'origin/master' not found.

Error at git
Continuing from next operation...

Press [Enter] to continue

 

The errors at the end can be ignored. You'll want to check the new git repository before deleting the bzr folder.

Tags

Traffic Question 15: Mailing a letter

Traffic Question 15:

During a period of heavy traffic, you want to mail a letter and then head in the direction of the pink arrow. How do you do it?

  1. Stop at Mailbox A, then do a U turn
  2. Park in a spot near Mailbox A, then turn left out of the parking lot
  3. Use Mailbox A, then use the left turn lane at the intersection to do a legal U turn
  4. Turn right at the main street, turn left into the parking lot for Mailbox B, then go through the intersection in the desired direction

Traffic Question 14: A traffic light turns yellow and you’re not quite going to make it through before it turns red... what do you do?

Traffic Question 14:

A traffic light turns yellow and you’re not quite going to make it through before it turns red... what do you do?

  1. Stomp on the gas pedal and zoom through
  2. Continue through the intersection without any change in speed
  3. Wait until the last second and then stomp on the brake
  4. Start coming to a gradual stop immediately
  5. None of the above

Traffic Question 9: If you get a phone call while you’re driving, what do you do?

traffic-09q.pngTraffic Question 9: If you get a phone call while you’re driving, what do you do?

A. Answer it right away

B. Wait until you get to a stop light and call back.

C. Stop at a stop sign and call back.

D. See who it is. If you think it might be an emergency, park the car in a designated parking area and then call back.

(Yes, this is pretty similar to #2 If you get a text while you’re driving... The main difference is, texting on the phone is illegal whereas talking on the phone is legal. At least in Moline.)

Traffic Question 12: Which of the following are factors in whether or not a vehicle is going to be slower than normal?

Traffic Question 12:

Which of the following are factors in whether or not a vehicle is going to be slower than normal?

* Car is Buick, Cadillac, or similar type

* One or more children are present

* Vehicle is a minivan

* Age of driver is over 60

* Handicapped license plates

* Driver is using cell phone

* Vehicle is a "sporty" color

* Driver is female

Traffic Quiz 6: Is it possible to back out of a driveway and use only one lane?

traffic-06q.pngTraffic Question 6:

The blue dots indicate the path used to pull IN the driveway.

Is it possible to back out of a driveway and head in the direction indicated by the pink arrow, using only one lane of the road?

A. No, one lane is not enough room.

B. Yes, it can be done in one lane.