test

progging - To wander about and beg; to seek food or other supplies by low arts; to seek for advantage by mean shift or tricks.
progging - Programmer slang for writing computer code.

mandag 8. august 2011

Bazaar Exampe 1 - Working alone

The simplest way of using Bazaar is to simple track changes on your own little project.

1. init
2. ignore files/directories
3. add
4. commit


In the example above I add a Visual Studio 2005 project called AnyDragDrop in 4 simple steps. First move to the project directory. The init command will create the .bzr directory where all the revision and all bazaar information will be kept. After that it's useful to avoid commiting output files and generated files like .exe and object files. If you where working with others then the local user project setting files should be ignored also. See also the useful "bzr status" and "bzr ignored" commands. When everything looks okay, add the files and do the first initial commit.

Note: If you don't 'ignore' the files they will kinda be reported with error in bazaar. Either add then, delete them or ignore them! The ignore file is a simple text file that is checked in just as any other file in the directory. It is also possible to ignore file globally for one user, but I think it's generally nice to share what is ignored :-)

To make a copy branch of your code you can do that anywhere with the "bzr branch SOURCE DEST" command. This is how the Bazaar folks think you should work on a new feature or bug fix in your project, and I think it makes good sense. Make a new branch, do your thing (with many check-ins to that branch) and then finally merge in the new feature.

I made a copy of the project in a sub-directory called 'any2 of the original project:



Next: Modify the same file in both branches, resolve conflicts and merge it all back together.


Look how nicely Bazaar shows the revision history of changes done in a separate branch.

All the changes for one feature (done i a separate branch) is shown as one revision that can be expanded to see the complete history.



Ingen kommentarer:

Legg inn en kommentar