<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.inkscape.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=S+tec</id>
	<title>Inkscape Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.inkscape.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=S+tec"/>
	<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/Special:Contributions/S_tec"/>
	<updated>2026-04-19T19:30:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=Working_with_Bazaar&amp;diff=59755</id>
		<title>Working with Bazaar</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=Working_with_Bazaar&amp;diff=59755"/>
		<updated>2010-03-08T00:58:47Z</updated>

		<summary type="html">&lt;p&gt;S tec: Added information on working with patch files&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Bazaar concepts==&lt;br /&gt;
&lt;br /&gt;
It is assumed that you are familiar with the basic concepts of version control, like working copy, committing, updating, conflicts. There will be a section that explains the basic functionality soon.&lt;br /&gt;
&lt;br /&gt;
* '''Branch''' is a working copy of the project's code. Typically you use one branch per set of related changes, for example a new output extension. Once your work is finished, you ''merge'' your branch into a larger project. Initially, there is only one branch, the trunk; all other branches are its (probably indirect) descendants. To create a new branch, you have to copy an existing one.&lt;br /&gt;
* '''Checkout''' is a copy of code contained in a branch that is not stored on your computer (a remote branch). Committing to a checkout will immediately apply the changes to the remote branch. Commits will not succeed if somebody else modified the branch while you were working - you need to have an up-to-date working copy - or when you're offline.&lt;br /&gt;
* When branches A and B have a common ancestor branch but each contain changes not present in the other, they have '''diverged'''. For example, when you work on an improved rectangle tool in your own branch and at the same time somebody else applies a PDF export bugfix to the trunk, your rectangle tool branch becomes diverged from the trunk.&lt;br /&gt;
* '''Trunk''' is the main branch, which represents cutting-edge working code. You should start from it when doing any new development.&lt;br /&gt;
* '''Merge''' is the process of reconciling changes made between two branches since they diverged. This operation is asymmetric. When you merge A into B, all changes made to A since it was branched from B are applied to B. A is not changed. When you work on some feature, you typically work in a branch, periodically merging the trunk into your branch (to sync up with the latest changes), then you merge your work into the trunk. Merging is similar to applying a patch - it only changes your working copy. To apply a merge, you need to commit the changes it introduced. Merging un-diverges branches.&lt;br /&gt;
* '''Repository''' is a place where branches of a project are stored. Having a shared repository reduces the storage requirements of multiple branches of one project. Instead of O(number of branches) space, the Bazaar data takes up O(total size of changes in all branches) space.&lt;br /&gt;
* '''Bind''' is the process of converting a non-diverged local branch into a checkout of the remote branch.&lt;br /&gt;
* '''Push''' is the process of publishing an exact copy (a mirror) of your branch in some other location. The difference between pushing and checkouts is that a checked out remote branch is updated every time you commit, while a pushed remote branch is updated only when you push to it - you can commit any amount of changes between pushes. You can only push to a branch if the mirror has not diverged from your local copy. This can happen if more than 1 person can push to the same location.&lt;br /&gt;
* '''Pull''' is the process of creating a local exact copy (mirror) of a branch, in principle a reverse of pushing.&lt;br /&gt;
&lt;br /&gt;
==First steps==&lt;br /&gt;
&lt;br /&gt;
First you need to tell Bazaar your name. This will appear on all your commits. You should use your real e-mail, but you can obfuscate it if you are afraid of spam.&lt;br /&gt;
&lt;br /&gt;
Obfuscated e-mail examples:&lt;br /&gt;
 $ bzr whoami &amp;quot;John Q. Public &amp;lt;john dot q dot public at-sign bigmail dot com&amp;gt;&amp;quot;&lt;br /&gt;
 $ bzr whoami &amp;quot;John Q. Public &amp;lt;removethis.john.q.public@bigmail.com&amp;gt;&amp;quot;&lt;br /&gt;
Unobfuscated e-mail example: &lt;br /&gt;
 $ bzr whoami &amp;quot;John Q. Public &amp;lt;john.q.public@bigmail.com&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you have an account on launchpad and want to commit changes there, you need to specify your launchpad login:&lt;br /&gt;
 $ bzr launchpad-login johnq&lt;br /&gt;
&lt;br /&gt;
Then fetch Inkscape's trunk&lt;br /&gt;
 $ bzr branch lp:inkscape&lt;br /&gt;
==Using a centralized (SVN-like) workflow==&lt;br /&gt;
&lt;br /&gt;
In this case, every commit that you make is immediately sent to the central repository. There are two ways of achieving this:&lt;br /&gt;
&lt;br /&gt;
===SVN-style checkout===&lt;br /&gt;
&lt;br /&gt;
Get the latest Inkscape code as a checkout, rather than a branch:&lt;br /&gt;
 $ bzr checkout lp:inkscape&lt;br /&gt;
&lt;br /&gt;
Now work as in SVN:&lt;br /&gt;
  &amp;lt;do work&amp;gt;&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
  &amp;lt;error, someone else has changed things&amp;gt;&lt;br /&gt;
 $ bzr update&lt;br /&gt;
  &amp;lt;check all is okay&amp;gt;&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
&lt;br /&gt;
If you add new files, add them to version control with &amp;lt;tt&amp;gt;bzr add ''file''&amp;lt;/tt&amp;gt;. You can recursively add all new files by writing simply &amp;lt;tt&amp;gt;bzr add&amp;lt;/tt&amp;gt; in the top level directory.&lt;br /&gt;
&lt;br /&gt;
===Binding a BZR branch===&lt;br /&gt;
&lt;br /&gt;
Get Inkscape's code the regular bzr way:&lt;br /&gt;
 $ bzr branch lp:inkscape&lt;br /&gt;
&lt;br /&gt;
Then transform your banch into a checkout:&lt;br /&gt;
 $ cd inkscape&lt;br /&gt;
 $ bzr bind lp:inkscape&lt;br /&gt;
&lt;br /&gt;
Now work as in SVN:&lt;br /&gt;
  &amp;lt;do work&amp;gt;&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
  &amp;lt;error, someone else has changed things&amp;gt;&lt;br /&gt;
 $ bzr update&lt;br /&gt;
  &amp;lt;check all is okay&amp;gt;&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Differences from SVN===&lt;br /&gt;
&lt;br /&gt;
* Commits will fail if your checkout is not up to date, even if there would be no conflicts.&lt;br /&gt;
* The revision number is an attribute of the working tree, not of individual files. It is not possible to have different portions of the working tree at different revisions.&lt;br /&gt;
* &amp;lt;tt&amp;gt;bzr commit ''file''&amp;lt;/tt&amp;gt; works like &amp;lt;tt&amp;gt; svn commit ''file'' &amp;amp;&amp;amp; svn update ''project-root''&amp;lt;/tt&amp;gt;. After a successful partial commit, the entire tree's revision is increased by 1.&lt;br /&gt;
* No special server is needed to publish a branch. You can push branches to anywhere, including simple FTP shares. In our scenario, Launchpad works like a central repository, but it's not required to publish everything there.&lt;br /&gt;
* You create branches locally. To simulate creating a SVN-style branch on Launchpad, you need to create a local branch, push it, then bind it to the pushed location.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* In some cases it is possible to create subrevisions. When two branches with a common parent are merged, all commits to one of them since the time they diverged will be grouped into one revision. To avoid this, when committing your work to trunk, you should merge from your branch into trunk and push the trunk, rather than merging trunk into your work and pushing your branch as the new trunk.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using a decentralized workflow==&lt;br /&gt;
&lt;br /&gt;
In this case you will be working locally until you are ready to publish your changes. The basic idea is to perform the work in a ''branch'' of the Inkscape repository, since committing to a branch stores the changes locally in the branch itself. Then, to share the work with the rest of the Inkscape community, the changes in the branch are merged across to a ''checkout'' of the Inkscape repository. As the previous centralized workflow section describes, committing to a checkout sends the changes directly to the remote repository, making them part of the official Inkscape codebase.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' this workflow has been updated to avoid the &amp;quot;other people's commits become subrevisions of your commit&amp;quot; problem.&lt;br /&gt;
&lt;br /&gt;
This will assume this directory layout:&lt;br /&gt;
 inkscape&lt;br /&gt;
  +-trunk&lt;br /&gt;
  |  +-doc&lt;br /&gt;
  |  +-share&lt;br /&gt;
  |  +-src&lt;br /&gt;
  |  +-po&lt;br /&gt;
  |  +-...&lt;br /&gt;
  +-myproject&lt;br /&gt;
  +-some-other-branch&lt;br /&gt;
&lt;br /&gt;
In this layout, &amp;quot;trunk&amp;quot; is the checkout used for uploading changes to the central Inkscape repository, while &amp;quot;myproject&amp;quot; and &amp;quot;some-other-branch&amp;quot; are local branches used for working on specific features.&lt;br /&gt;
&lt;br /&gt;
===Repository setup===&lt;br /&gt;
&lt;br /&gt;
To speed things up, it's good to create a local shared repository. This way revision histories will only be stored in one place, instead of in every branch, so local branching will be faster and the branches will take up less space.&lt;br /&gt;
&lt;br /&gt;
Create a shared repository and enter it:&lt;br /&gt;
 $ bzr init-repo --rich-root inkscape&lt;br /&gt;
 $ cd inkscape&lt;br /&gt;
&lt;br /&gt;
===Working locally===&lt;br /&gt;
&lt;br /&gt;
Get Inkscape's code&lt;br /&gt;
 $ bzr branch lp:inkscape myproject&lt;br /&gt;
&lt;br /&gt;
Now work:&lt;br /&gt;
 $ cd myproject&lt;br /&gt;
   ... work work work ...&lt;br /&gt;
 $ bzr commit -m &amp;quot;Some changes&amp;quot;&lt;br /&gt;
   ... more work work work ...&lt;br /&gt;
 $ bzr commit -m &amp;quot;More changes&amp;quot;&lt;br /&gt;
   ... create new file ...&lt;br /&gt;
 $ bzr add new-file.c&lt;br /&gt;
 $ bzr commit -m &amp;quot;Added new file with kittens&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Advanced local features===&lt;br /&gt;
&lt;br /&gt;
To undo a commit:&lt;br /&gt;
 $ bzr uncommit&lt;br /&gt;
This will leave your working tree in the state it was just before you wrote &amp;quot;bzr commit&amp;quot;. This is useful for example if you forgot to add a file, and want to keep a clean revision history. This will NOT work on a trunk checkout.&lt;br /&gt;
&lt;br /&gt;
Let's say you started from r770 200 local commits, but you decided that what you did since r954 is completely wrong. You want to go back to revision 825 and do it differently. Here's one way to do this. First branch locally to preserve your work (maybe later you'll find out there's some way to save it). Then uncommit everything up to r954 and revert.&lt;br /&gt;
 $ bzr branch myproject myproject-dead-end&lt;br /&gt;
 $ cd myproject&lt;br /&gt;
 $ bzr uncommit -r 954&lt;br /&gt;
 $ bzr revert&lt;br /&gt;
&lt;br /&gt;
A different scenario: let's say that commit 1524 introduced a bug, but there were 50 other commits since then and you only want to revert the changes introduced by 1524.&lt;br /&gt;
 $ bzr merge -r1524..1523&lt;br /&gt;
&lt;br /&gt;
Sometimes a big change gets committed while you are working on a feature. If you want to check whether your code still works after the big change, merge from trunk.&lt;br /&gt;
 $ bzr merge&lt;br /&gt;
&lt;br /&gt;
In this case, you can omit where you are merging from, because the default is to merge from the branch you started from (the parent).&lt;br /&gt;
&lt;br /&gt;
===Publishing your work on Launchpad===&lt;br /&gt;
&lt;br /&gt;
To publish branches on Launchpad, you have to add an SSH key to your account. If you don't have one yet, generate it:&lt;br /&gt;
 $ ssh-keygen&lt;br /&gt;
   ... follow instructions ...&lt;br /&gt;
&lt;br /&gt;
Once you created the key, go to your Launchpad profile page, edit SSH keys and paste the contents of the key file (by default it's in &amp;lt;tt&amp;gt;~/.ssh/id_rsa&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;~/.ssh/id_dsa&amp;lt;/tt&amp;gt;) into the window. You can now use the Launchpad integration features.&lt;br /&gt;
&lt;br /&gt;
Login to Launchpad, if you didn't do it yet. You only need to do this once on each computer. You need to use your login name, not the display name.&lt;br /&gt;
 $ bzr launchpad-login johnq&lt;br /&gt;
&lt;br /&gt;
Publish your branch on Launchpad.&lt;br /&gt;
 $ bzr push lp:~johnq/inkscape/myproject&lt;br /&gt;
&lt;br /&gt;
The push location will be saved. After more commits, you can simply write&lt;br /&gt;
 $ bzr push&lt;br /&gt;
&lt;br /&gt;
It's sometimes convenient to update the Launchpad copy after each commit. To save on typing, you can bind your working tree to the remote branch. This way every commit will be immediately published on the remote branch. Note that you won't be able to commit while offline.&lt;br /&gt;
 $ bzr bind :push&lt;br /&gt;
&lt;br /&gt;
===Putting your work in the trunk===&lt;br /&gt;
&lt;br /&gt;
Once your new killer feature is ready, you need to merge your changes into a checkout of the trunk.  If you don't have one, do (in the directory ''containing'' myproject):&lt;br /&gt;
  $ bzr checkout lp:inkscape trunk&lt;br /&gt;
  $ cd trunk&lt;br /&gt;
&lt;br /&gt;
If you already have one on hand, make sure it's up to date:&lt;br /&gt;
  $ cd trunk&lt;br /&gt;
  $ bzr update&lt;br /&gt;
&lt;br /&gt;
Now that you have a local checkout of the current trunk:&lt;br /&gt;
  $ bzr merge ../myproject&lt;br /&gt;
  $ bzr commit -m'added my feature'&lt;br /&gt;
&lt;br /&gt;
WARNING: There is an alternative method that consists of merging trunk into your local branch, then pushing the result as trunk. Do not do this! It obfuscates the revision history.&lt;br /&gt;
&lt;br /&gt;
===Working with patch files===&lt;br /&gt;
&lt;br /&gt;
If you don't have permission to commit to the trunk, you can bundle your branch's changes into a patch instead:&lt;br /&gt;
  $ bzr send -o mychanges.patch&lt;br /&gt;
&lt;br /&gt;
To apply patches produced by the above command, just do this:&lt;br /&gt;
  $ bzr merge somechanges.patch&lt;br /&gt;
&lt;br /&gt;
===Local branching===&lt;br /&gt;
&lt;br /&gt;
Naturally, all this also works locally. For example, when you're in the &amp;lt;tt&amp;gt;inkscape&amp;lt;/tt&amp;gt; directory, you can write &amp;lt;tt&amp;gt;bzr branch trunk export-dialog&amp;lt;/tt&amp;gt; to create a new branch of the trunk called &amp;lt;tt&amp;gt;export-dialog&amp;lt;/tt&amp;gt;, where you'll work only on improving the export dialog. Similarly, you can merge between local branches.&lt;br /&gt;
&lt;br /&gt;
==Best Practices for Inkscape Project==&lt;br /&gt;
&lt;br /&gt;
===Registering Bugfixes===&lt;br /&gt;
&lt;br /&gt;
Launchpad will automatically mark a bug &amp;quot;Fix Available&amp;quot; (rather than &amp;quot;Fix Committed&amp;quot;) once somebody commits using the flag --fixes, e.g. (if you fix those two bugs in one commit):&lt;br /&gt;
 bzr commit --fixes lp:123456 --fixes lp:123457 -m 'patch description'&lt;br /&gt;
Then, bugs can be changed automatically from &amp;quot;Fix Available&amp;quot; to &amp;quot;Fix Released&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://doc.bazaar-vcs.org/bzr.dev/en/tutorials/using_bazaar_with_launchpad.html#changing-the-state-in-launchpad-while-committing-in-bazaar Read more: &amp;quot;Changing the state in Launchpad while committing in Bazaar&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
===Proper way of merging===&lt;br /&gt;
&lt;br /&gt;
To repeat, NEVER do something like:&lt;br /&gt;
 $ bzr branch lp:inkscape myproject&lt;br /&gt;
 ... work ...&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
 $ bzr merge               # NOOOO!!! We are doomed!&lt;br /&gt;
 $ bzr push lp:inkscape&lt;br /&gt;
&lt;br /&gt;
It will obfuscate the revision history: trunk commits that happened between the time you branched and the time you pushed will get grouped into one. Do the merge the other way around:&lt;br /&gt;
 $ bzr branch lp:inkscape myproject&lt;br /&gt;
 $ cd myproject&lt;br /&gt;
 ... work ...&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
 $ cd ../trunk&lt;br /&gt;
 $ bzr merge ../myproject  # correct!&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
&lt;br /&gt;
You'll need a trunk checkout, but the revision history will be much less confusing, and it's useful to have a trunk checkout anyway.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://doc.bazaar-vcs.org/latest/en/ Bazaar manual]&lt;/div&gt;</summary>
		<author><name>S tec</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=Working_with_Bazaar&amp;diff=59749</id>
		<title>Working with Bazaar</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=Working_with_Bazaar&amp;diff=59749"/>
		<updated>2010-03-08T00:38:30Z</updated>

		<summary type="html">&lt;p&gt;S tec: Adding a high-level description of what's going on in this section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Bazaar concepts==&lt;br /&gt;
&lt;br /&gt;
It is assumed that you are familiar with the basic concepts of version control, like working copy, committing, updating, conflicts. There will be a section that explains the basic functionality soon.&lt;br /&gt;
&lt;br /&gt;
* '''Branch''' is a working copy of the project's code. Typically you use one branch per set of related changes, for example a new output extension. Once your work is finished, you ''merge'' your branch into a larger project. Initially, there is only one branch, the trunk; all other branches are its (probably indirect) descendants. To create a new branch, you have to copy an existing one.&lt;br /&gt;
* '''Checkout''' is a copy of code contained in a branch that is not stored on your computer (a remote branch). Committing to a checkout will immediately apply the changes to the remote branch. Commits will not succeed if somebody else modified the branch while you were working - you need to have an up-to-date working copy - or when you're offline.&lt;br /&gt;
* When branches A and B have a common ancestor branch but each contain changes not present in the other, they have '''diverged'''. For example, when you work on an improved rectangle tool in your own branch and at the same time somebody else applies a PDF export bugfix to the trunk, your rectangle tool branch becomes diverged from the trunk.&lt;br /&gt;
* '''Trunk''' is the main branch, which represents cutting-edge working code. You should start from it when doing any new development.&lt;br /&gt;
* '''Merge''' is the process of reconciling changes made between two branches since they diverged. This operation is asymmetric. When you merge A into B, all changes made to A since it was branched from B are applied to B. A is not changed. When you work on some feature, you typically work in a branch, periodically merging the trunk into your branch (to sync up with the latest changes), then you merge your work into the trunk. Merging is similar to applying a patch - it only changes your working copy. To apply a merge, you need to commit the changes it introduced. Merging un-diverges branches.&lt;br /&gt;
* '''Repository''' is a place where branches of a project are stored. Having a shared repository reduces the storage requirements of multiple branches of one project. Instead of O(number of branches) space, the Bazaar data takes up O(total size of changes in all branches) space.&lt;br /&gt;
* '''Bind''' is the process of converting a non-diverged local branch into a checkout of the remote branch.&lt;br /&gt;
* '''Push''' is the process of publishing an exact copy (a mirror) of your branch in some other location. The difference between pushing and checkouts is that a checked out remote branch is updated every time you commit, while a pushed remote branch is updated only when you push to it - you can commit any amount of changes between pushes. You can only push to a branch if the mirror has not diverged from your local copy. This can happen if more than 1 person can push to the same location.&lt;br /&gt;
* '''Pull''' is the process of creating a local exact copy (mirror) of a branch, in principle a reverse of pushing.&lt;br /&gt;
&lt;br /&gt;
==First steps==&lt;br /&gt;
&lt;br /&gt;
First you need to tell Bazaar your name. This will appear on all your commits. You should use your real e-mail, but you can obfuscate it if you are afraid of spam.&lt;br /&gt;
&lt;br /&gt;
Obfuscated e-mail examples:&lt;br /&gt;
 $ bzr whoami &amp;quot;John Q. Public &amp;lt;john dot q dot public at-sign bigmail dot com&amp;gt;&amp;quot;&lt;br /&gt;
 $ bzr whoami &amp;quot;John Q. Public &amp;lt;removethis.john.q.public@bigmail.com&amp;gt;&amp;quot;&lt;br /&gt;
Unobfuscated e-mail example: &lt;br /&gt;
 $ bzr whoami &amp;quot;John Q. Public &amp;lt;john.q.public@bigmail.com&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you have an account on launchpad and want to commit changes there, you need to specify your launchpad login:&lt;br /&gt;
 $ bzr launchpad-login johnq&lt;br /&gt;
&lt;br /&gt;
Then fetch Inkscape's trunk&lt;br /&gt;
 $ bzr branch lp:inkscape&lt;br /&gt;
==Using a centralized (SVN-like) workflow==&lt;br /&gt;
&lt;br /&gt;
In this case, every commit that you make is immediately sent to the central repository. There are two ways of achieving this:&lt;br /&gt;
&lt;br /&gt;
===SVN-style checkout===&lt;br /&gt;
&lt;br /&gt;
Get the latest Inkscape code as a checkout, rather than a branch:&lt;br /&gt;
 $ bzr checkout lp:inkscape&lt;br /&gt;
&lt;br /&gt;
Now work as in SVN:&lt;br /&gt;
  &amp;lt;do work&amp;gt;&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
  &amp;lt;error, someone else has changed things&amp;gt;&lt;br /&gt;
 $ bzr update&lt;br /&gt;
  &amp;lt;check all is okay&amp;gt;&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
&lt;br /&gt;
If you add new files, add them to version control with &amp;lt;tt&amp;gt;bzr add ''file''&amp;lt;/tt&amp;gt;. You can recursively add all new files by writing simply &amp;lt;tt&amp;gt;bzr add&amp;lt;/tt&amp;gt; in the top level directory.&lt;br /&gt;
&lt;br /&gt;
===Binding a BZR branch===&lt;br /&gt;
&lt;br /&gt;
Get Inkscape's code the regular bzr way:&lt;br /&gt;
 $ bzr branch lp:inkscape&lt;br /&gt;
&lt;br /&gt;
Then transform your banch into a checkout:&lt;br /&gt;
 $ cd inkscape&lt;br /&gt;
 $ bzr bind lp:inkscape&lt;br /&gt;
&lt;br /&gt;
Now work as in SVN:&lt;br /&gt;
  &amp;lt;do work&amp;gt;&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
  &amp;lt;error, someone else has changed things&amp;gt;&lt;br /&gt;
 $ bzr update&lt;br /&gt;
  &amp;lt;check all is okay&amp;gt;&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Differences from SVN===&lt;br /&gt;
&lt;br /&gt;
* Commits will fail if your checkout is not up to date, even if there would be no conflicts.&lt;br /&gt;
* The revision number is an attribute of the working tree, not of individual files. It is not possible to have different portions of the working tree at different revisions.&lt;br /&gt;
* &amp;lt;tt&amp;gt;bzr commit ''file''&amp;lt;/tt&amp;gt; works like &amp;lt;tt&amp;gt; svn commit ''file'' &amp;amp;&amp;amp; svn update ''project-root''&amp;lt;/tt&amp;gt;. After a successful partial commit, the entire tree's revision is increased by 1.&lt;br /&gt;
* No special server is needed to publish a branch. You can push branches to anywhere, including simple FTP shares. In our scenario, Launchpad works like a central repository, but it's not required to publish everything there.&lt;br /&gt;
* You create branches locally. To simulate creating a SVN-style branch on Launchpad, you need to create a local branch, push it, then bind it to the pushed location.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* In some cases it is possible to create subrevisions. When two branches with a common parent are merged, all commits to one of them since the time they diverged will be grouped into one revision. To avoid this, when committing your work to trunk, you should merge from your branch into trunk and push the trunk, rather than merging trunk into your work and pushing your branch as the new trunk.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using a decentralized workflow==&lt;br /&gt;
&lt;br /&gt;
In this case you will be working locally until you are ready to publish your changes. The basic idea is to perform the work in a ''branch'' of the Inkscape repository, since committing to a branch stores the changes locally in the branch itself. Then, to share the work with the rest of the Inkscape community, the changes in the branch are merged across to a ''checkout'' of the Inkscape repository. As the previous &amp;quot;Centralized Workflow&amp;quot; section describes, committing to a checkout sends the changes directly to the remote repository, making them part of the official Inkscape codebase.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' this workflow has been updated to avoid the &amp;quot;other people's commits become subrevisions of your commit&amp;quot; problem.&lt;br /&gt;
&lt;br /&gt;
This will assume this directory layout:&lt;br /&gt;
 inkscape&lt;br /&gt;
  +-trunk&lt;br /&gt;
  |  +-doc&lt;br /&gt;
  |  +-share&lt;br /&gt;
  |  +-src&lt;br /&gt;
  |  +-po&lt;br /&gt;
  |  +-...&lt;br /&gt;
  +-myproject&lt;br /&gt;
  +-some-other-branch&lt;br /&gt;
&lt;br /&gt;
In this layout, &amp;quot;trunk&amp;quot; is the checkout used for uploading changes to the central Inkscape repository, while &amp;quot;myproject&amp;quot; and &amp;quot;some-other-branch&amp;quot; are local branches used for working on specific features.&lt;br /&gt;
&lt;br /&gt;
===Repository setup===&lt;br /&gt;
&lt;br /&gt;
To speed things up, it's good to create a local shared repository. This way revision histories will only be stored in one place, instead of in every branch, so local branching will be faster and the branches will take up less space.&lt;br /&gt;
&lt;br /&gt;
Create a shared repository and enter it:&lt;br /&gt;
 $ bzr init-repo --rich-root inkscape&lt;br /&gt;
 $ cd inkscape&lt;br /&gt;
&lt;br /&gt;
===Working locally===&lt;br /&gt;
&lt;br /&gt;
Get Inkscape's code&lt;br /&gt;
 $ bzr branch lp:inkscape myproject&lt;br /&gt;
&lt;br /&gt;
Now work:&lt;br /&gt;
 $ cd myproject&lt;br /&gt;
   ... work work work ...&lt;br /&gt;
 $ bzr commit -m &amp;quot;Some changes&amp;quot;&lt;br /&gt;
   ... more work work work ...&lt;br /&gt;
 $ bzr commit -m &amp;quot;More changes&amp;quot;&lt;br /&gt;
   ... create new file ...&lt;br /&gt;
 $ bzr add new-file.c&lt;br /&gt;
 $ bzr commit -m &amp;quot;Added new file with kittens&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Advanced local features===&lt;br /&gt;
&lt;br /&gt;
To undo a commit:&lt;br /&gt;
 $ bzr uncommit&lt;br /&gt;
This will leave your working tree in the state it was just before you wrote &amp;quot;bzr commit&amp;quot;. This is useful for example if you forgot to add a file, and want to keep a clean revision history. This will NOT work on a trunk checkout.&lt;br /&gt;
&lt;br /&gt;
Let's say you started from r770 200 local commits, but you decided that what you did since r954 is completely wrong. You want to go back to revision 825 and do it differently. Here's one way to do this. First branch locally to preserve your work (maybe later you'll find out there's some way to save it). Then uncommit everything up to r954 and revert.&lt;br /&gt;
 $ bzr branch myproject myproject-dead-end&lt;br /&gt;
 $ cd myproject&lt;br /&gt;
 $ bzr uncommit -r 954&lt;br /&gt;
 $ bzr revert&lt;br /&gt;
&lt;br /&gt;
A different scenario: let's say that commit 1524 introduced a bug, but there were 50 other commits since then and you only want to revert the changes introduced by 1524.&lt;br /&gt;
 $ bzr merge -r1524..1523&lt;br /&gt;
&lt;br /&gt;
Sometimes a big change gets committed while you are working on a feature. If you want to check whether your code still works after the big change, merge from trunk.&lt;br /&gt;
 $ bzr merge&lt;br /&gt;
&lt;br /&gt;
In this case, you can omit where you are merging from, because the default is to merge from the branch you started from (the parent).&lt;br /&gt;
&lt;br /&gt;
===Publishing your work on Launchpad===&lt;br /&gt;
&lt;br /&gt;
To publish branches on Launchpad, you have to add an SSH key to your account. If you don't have one yet, generate it:&lt;br /&gt;
 $ ssh-keygen&lt;br /&gt;
   ... follow instructions ...&lt;br /&gt;
&lt;br /&gt;
Once you created the key, go to your Launchpad profile page, edit SSH keys and paste the contents of the key file (by default it's in &amp;lt;tt&amp;gt;~/.ssh/id_rsa&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;~/.ssh/id_dsa&amp;lt;/tt&amp;gt;) into the window. You can now use the Launchpad integration features.&lt;br /&gt;
&lt;br /&gt;
Login to Launchpad, if you didn't do it yet. You only need to do this once on each computer. You need to use your login name, not the display name.&lt;br /&gt;
 $ bzr launchpad-login johnq&lt;br /&gt;
&lt;br /&gt;
Publish your branch on Launchpad.&lt;br /&gt;
 $ bzr push lp:~johnq/inkscape/myproject&lt;br /&gt;
&lt;br /&gt;
The push location will be saved. After more commits, you can simply write&lt;br /&gt;
 $ bzr push&lt;br /&gt;
&lt;br /&gt;
It's sometimes convenient to update the Launchpad copy after each commit. To save on typing, you can bind your working tree to the remote branch. This way every commit will be immediately published on the remote branch. Note that you won't be able to commit while offline.&lt;br /&gt;
 $ bzr bind :push&lt;br /&gt;
&lt;br /&gt;
===Putting your work in the trunk===&lt;br /&gt;
&lt;br /&gt;
Once your new killer feature is ready, you need to merge your changes into a checkout of the trunk.  If you don't have one, do (in the directory ''containing'' myproject):&lt;br /&gt;
  $ bzr checkout lp:inkscape trunk&lt;br /&gt;
  $ cd trunk&lt;br /&gt;
&lt;br /&gt;
If you already have one on hand, make sure it's up to date:&lt;br /&gt;
  $ cd trunk&lt;br /&gt;
  $ bzr update&lt;br /&gt;
&lt;br /&gt;
Now that you have a local checkout of the current trunk:&lt;br /&gt;
  $ bzr merge ../myproject&lt;br /&gt;
  $ bzr commit -m'added my feature'&lt;br /&gt;
&lt;br /&gt;
WARNING: There is an alternative method that consists of merging trunk into your local branch, then pushing the result as trunk. Do not do this! It obfuscates the revision history.&lt;br /&gt;
&lt;br /&gt;
===Local branching===&lt;br /&gt;
&lt;br /&gt;
Naturally, all this also works locally. For example, when you're in the &amp;lt;tt&amp;gt;inkscape&amp;lt;/tt&amp;gt; directory, you can write &amp;lt;tt&amp;gt;bzr branch trunk export-dialog&amp;lt;/tt&amp;gt; to create a new branch of the trunk called &amp;lt;tt&amp;gt;export-dialog&amp;lt;/tt&amp;gt;, where you'll work only on improving the export dialog. Similarly, you can merge between local branches.&lt;br /&gt;
&lt;br /&gt;
==Best Practices for Inkscape Project==&lt;br /&gt;
&lt;br /&gt;
===Registering Bugfixes===&lt;br /&gt;
&lt;br /&gt;
Launchpad will automatically mark a bug &amp;quot;Fix Available&amp;quot; (rather than &amp;quot;Fix Committed&amp;quot;) once somebody commits using the flag --fixes, e.g. (if you fix those two bugs in one commit):&lt;br /&gt;
 bzr commit --fixes lp:123456 --fixes lp:123457 -m 'patch description'&lt;br /&gt;
Then, bugs can be changed automatically from &amp;quot;Fix Available&amp;quot; to &amp;quot;Fix Released&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://doc.bazaar-vcs.org/bzr.dev/en/tutorials/using_bazaar_with_launchpad.html#changing-the-state-in-launchpad-while-committing-in-bazaar Read more: &amp;quot;Changing the state in Launchpad while committing in Bazaar&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
===Proper way of merging===&lt;br /&gt;
&lt;br /&gt;
To repeat, NEVER do something like:&lt;br /&gt;
 $ bzr branch lp:inkscape myproject&lt;br /&gt;
 ... work ...&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
 $ bzr merge               # NOOOO!!! We are doomed!&lt;br /&gt;
 $ bzr push lp:inkscape&lt;br /&gt;
&lt;br /&gt;
It will obfuscate the revision history: trunk commits that happened between the time you branched and the time you pushed will get grouped into one. Do the merge the other way around:&lt;br /&gt;
 $ bzr branch lp:inkscape myproject&lt;br /&gt;
 $ cd myproject&lt;br /&gt;
 ... work ...&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
 $ cd ../trunk&lt;br /&gt;
 $ bzr merge ../myproject  # correct!&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
&lt;br /&gt;
You'll need a trunk checkout, but the revision history will be much less confusing, and it's useful to have a trunk checkout anyway.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://doc.bazaar-vcs.org/latest/en/ Bazaar manual]&lt;/div&gt;</summary>
		<author><name>S tec</name></author>
	</entry>
</feed>