<?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=Reandug</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=Reandug"/>
	<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/Special:Contributions/Reandug"/>
	<updated>2026-04-13T16:10:44Z</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=72823</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=72823"/>
		<updated>2011-10-01T05:24:45Z</updated>

		<summary type="html">&lt;p&gt;Reandug: /* External links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains an introduction to the Bazaar distributed version control system. It focuses on the use of Bazaar to develop Inkscape, but should be useful to all would-be users of Bazaar.&lt;br /&gt;
&lt;br /&gt;
==Why version control is useful==&lt;br /&gt;
&lt;br /&gt;
 NOTE: skip this section if you have experience with any version control system.&lt;br /&gt;
&lt;br /&gt;
If you ever worked on some large document in a group without any dedicated software, you have probably encountered the problem of simultaneous modification. When two people add something to the document at the same time, then send their version to each other, no one has the correct version. One of them has to redo their work in the other's version to merge the changes. This process is tedious and time-consuming, and the time spent on merging grows significantly when more people are added to the project.&lt;br /&gt;
&lt;br /&gt;
Fortunately, for text files, this task is simple enough that it can be done automatically by a special program. When merging is done by software, people have more time to focus on productive work.&lt;br /&gt;
&lt;br /&gt;
Version control systems (VCS) are programs designed to eliminate the overhead of merging. They manage a set of text files and allow many people to simultaneously work on them, then periodically submit their changes to a shared location. When two people change the same file, the changes are automatically merged together. Version control systems also store the complete history of changes. When someone makes a mistake and only spots it much later, it can be easily corrected, without affecting later work by other people.&lt;br /&gt;
&lt;br /&gt;
==Version control basics==&lt;br /&gt;
&lt;br /&gt;
Most version control systems use some shared location to publish the most up-to-date version of the project. (We will from now on assume that the project contains the source code for a program.) We will call this place the '''trunk'''. The first thing to do when starting work on a project is to download its source code, which is called creating a '''checkout'''. The files in your checkout are called the '''working copy'''. A checkout contains copies of files belonging to the project, where you can make changes. When you are ready to send your changes to others, you '''commit''' them, and they are stored in the shared location for others to see. The state of the project after someone's changes is called a '''revision''', and each revision in Bazaar is assigned a sequential number, called the '''revision number'''. Revision 0 is the empty project and revision 1 is the initial commit of the project's files. To receive the latest changes introduced by others, you '''update''' your checkout. The update command does not remove any of your uncommitted changes - they are automatically merged.&lt;br /&gt;
&lt;br /&gt;
Bazaar uses the following commands for the above functionality.&lt;br /&gt;
 $ bzr checkout ''project_trunk_url''&lt;br /&gt;
This checks out the source code of a project stored at the specified URL.&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
This sends your changes to the shared location, so others can see them. It will display an editor window, where you should enter the summary of your changes. This description will be visible when using the &amp;lt;tt&amp;gt;bzr log&amp;lt;/tt&amp;gt; command.&lt;br /&gt;
 $ bzr update&lt;br /&gt;
This updates your working copy to the latest public revision. Your uncommitted changes are left in place and automatically merged with others' changes.&lt;br /&gt;
&lt;br /&gt;
===Useful basic commands===&lt;br /&gt;
 $ bzr revert ''file''&lt;br /&gt;
This undoes all of your changes to the specified file and restores it to the state it was in after the last update.&lt;br /&gt;
 $ bzr add ''file''&lt;br /&gt;
When you create a new file it is initially '''unversioned''', which means the version control system doesn't track changes to it. You need to tell the VCS that you want to include it in the project, or make it '''versioned'''. The &amp;lt;tt&amp;gt;add&amp;lt;/tt&amp;gt; command is used to do this. The next &amp;lt;tt&amp;gt;commit&amp;lt;/tt&amp;gt; command will then add this file to the shared location.&lt;br /&gt;
 $ bzr rm ''file''&lt;br /&gt;
This removes a file and its contents from version control and deletes it from disk. The next &amp;lt;tt&amp;gt;commit&amp;lt;/tt&amp;gt; command will remove it from the shared location. Use the &amp;lt;tt&amp;gt;--keep&amp;lt;/tt&amp;gt; option if you want to remove the shared location but keep it as an unversioned file in your working copy.&lt;br /&gt;
&lt;br /&gt;
===Inspecting project history===&lt;br /&gt;
&lt;br /&gt;
Display last 20 sets of changes (revisions):&lt;br /&gt;
 $ bzr log -l20&lt;br /&gt;
&lt;br /&gt;
Display all changes since the beginning of project history to some file:&lt;br /&gt;
 $ bzr log ''file''&lt;br /&gt;
&lt;br /&gt;
===Inspecting changes===&lt;br /&gt;
&lt;br /&gt;
Display all uncommitted changes:&lt;br /&gt;
 $ bzr diff&lt;br /&gt;
&lt;br /&gt;
Display all changes, both committed and uncommitted, from revision 340:&lt;br /&gt;
 $ bzr diff -r340&lt;br /&gt;
&lt;br /&gt;
Display changes introduced by revision 436:&lt;br /&gt;
 $ bzr diff -c436&lt;br /&gt;
&lt;br /&gt;
Display changes between revisions 252 and 260:&lt;br /&gt;
 $ bzr diff -r252..260&lt;br /&gt;
&lt;br /&gt;
===Undoing mistakes===&lt;br /&gt;
&lt;br /&gt;
To remove all your uncommitted changes:&lt;br /&gt;
 $ bzr revert&lt;br /&gt;
&lt;br /&gt;
To revert a specific file to the state from revision 230:&lt;br /&gt;
 $ bzr revert -r230 ''file''&lt;br /&gt;
&lt;br /&gt;
Let's say you committed some change, but then after some time realized it was very wrong. To back it out without affecting any later changes, you need to find the revision number of the change using the &amp;lt;tt&amp;gt;bzr log&amp;lt;/tt&amp;gt; command. Let's say want to undo changes from revision 340. To do this, write:&lt;br /&gt;
 $ bzr merge -r340..339&lt;br /&gt;
&lt;br /&gt;
In the same way, you can undo any set of contiguous revisions, e.g.&lt;br /&gt;
 $ bzr merge -r340..320&lt;br /&gt;
&lt;br /&gt;
To undo sets of non-contiguous revisions, you have to use one command per set. All commands after the first need to use the --force option (by default Bazaar will refuse to do a merge if here are uncommitted changes).&lt;br /&gt;
 $ bzr merge -r340..339&lt;br /&gt;
 $ bzr merge -r327..326 --force&lt;br /&gt;
 $ bzr merge -r289..286 --force&lt;br /&gt;
&lt;br /&gt;
To actually make the above changes in the shared location, you need to follow them with &amp;lt;tt&amp;gt;bzr commit&amp;lt;/tt&amp;gt;. The exception is &amp;lt;tt&amp;gt;bzr revert&amp;lt;/tt&amp;gt;, which restores the state to the last committed revision, so there is nothing to commit after it.&lt;br /&gt;
&lt;br /&gt;
===Conflict resolution===&lt;br /&gt;
&lt;br /&gt;
Sometimes two people change the same file in a way that cannot be automatically merged, for example, they change the same line to something different. When this happens, you need to merge the problematic bits manually. You might encounter output like this:&lt;br /&gt;
&lt;br /&gt;
  $ bzr update&lt;br /&gt;
   M  src/painting-algorithm.cpp&lt;br /&gt;
   M  src/ui/widget/spinner.h&lt;br /&gt;
   M  src/ui/widget/spinner.cpp&lt;br /&gt;
   M  src/ui/widget/awesome-widget.cpp&lt;br /&gt;
  Text conflict in src/ui/widget/spinner.cpp&lt;br /&gt;
  1 conflict encountered.&lt;br /&gt;
  Updated to revision 1337 of branch [some URL]&lt;br /&gt;
&lt;br /&gt;
After that, the directory &amp;lt;tt&amp;gt;src/ui/widget&amp;lt;/tt&amp;gt; will contain four related files.&lt;br /&gt;
* &amp;lt;tt&amp;gt;spinner.cpp&amp;lt;/tt&amp;gt;: this will contain an unified view of the conflicts in the file. Conflicts will be marked with lines with multiple consecutive angle brackets.&lt;br /&gt;
* &amp;lt;tt&amp;gt;spinner.cpp.BASE&amp;lt;/tt&amp;gt;: latest common ancestor version of the file. In other words, both you and other people started from this version before conflicting changes were made.&lt;br /&gt;
* &amp;lt;tt&amp;gt;spinner.cpp.THIS&amp;lt;/tt&amp;gt;: the file with your changes, with conflicting changes by others removed.&lt;br /&gt;
* &amp;lt;tt&amp;gt;spinner.cpp.OTHER&amp;lt;/tt&amp;gt;: the file with other people's changes, with your conflicting changes removed.&lt;br /&gt;
&lt;br /&gt;
To display the list of conflicts again, use the command:&lt;br /&gt;
 $ bzr conflicts&lt;br /&gt;
&lt;br /&gt;
To resolve the conflict, you need to modify the contents of the &amp;lt;tt&amp;gt;spinner.cpp&amp;lt;/tt&amp;gt;. You can do this either by manually editing the file, by overwriting it with &amp;lt;tt&amp;gt;spinner.cpp.BASE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;spinner.cpp.THIS&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;spinner.cpp.OTHER&amp;lt;/tt&amp;gt;, or by using special options to the resolve command. Once you are done, you need to tell Bazaar about it:&lt;br /&gt;
 $ bzr resolve src/ui/widget/spinner.cpp&lt;br /&gt;
&lt;br /&gt;
You can tell Bazaar to use your version or others' version, respectively, with the following commands:&lt;br /&gt;
 $ bzr resolve --take-this ''file''&lt;br /&gt;
 $ bzr resolve --take-other ''file''&lt;br /&gt;
&lt;br /&gt;
The above command will delete the files &amp;lt;tt&amp;gt;spinner.cpp.BASE&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;spinner.cpp.THIS&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;spinner.cpp.OTHER&amp;lt;/tt&amp;gt;. Manually deleting those files has the same effect as executing &amp;lt;tt&amp;gt;bzr resolve&amp;lt;/tt&amp;gt;. If you resolve all the conflicts at once, you can tell Bazaar to clean up everything:&lt;br /&gt;
 $ bzr resolve --all&lt;br /&gt;
&lt;br /&gt;
More information is available here: [http://doc.bazaar.canonical.com/latest/en/user-guide/resolving_conflicts.html Bazaar manual - Conflict handling].&lt;br /&gt;
&lt;br /&gt;
===Determining who made a change===&lt;br /&gt;
&lt;br /&gt;
Sometimes it is useful to see who last changed some lines in a file.&lt;br /&gt;
 $ bzr annotate ''file''&lt;br /&gt;
This will display the entire ''file''. Each line will be prefixed with the revision when the line was last changed and the person which committed that revision. Another name for this command, which might be easier to remember, is &amp;lt;tt&amp;gt;bzr blame&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Distributed VCS concepts in Bazaar==&lt;br /&gt;
&lt;br /&gt;
This section assumes that you are familiar with the basic concepts of version control, like working copy, committing, updating, conflicts.&lt;br /&gt;
&lt;br /&gt;
; '''Branch'''&lt;br /&gt;
: 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. 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;
; '''Checkout'''&lt;br /&gt;
: 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;
; '''Trunk'''&lt;br /&gt;
: is the main branch, which represents cutting-edge working code. You should start from it when doing any new development.&lt;br /&gt;
; '''Merge'''&lt;br /&gt;
: 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'''&lt;br /&gt;
: 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'''&lt;br /&gt;
: is the process of converting a non-diverged local branch into a checkout of the remote branch.&lt;br /&gt;
; '''Push'''&lt;br /&gt;
: 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'''&lt;br /&gt;
: 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. You can skip this if you do not intend to commit.&lt;br /&gt;
 $ bzr launchpad-login johnq&lt;br /&gt;
&lt;br /&gt;
Then fetch Inkscape's trunk&lt;br /&gt;
 $ bzr checkout lp:inkscape&lt;br /&gt;
&lt;br /&gt;
To carry out a later update of Inkscape's trunk&lt;br /&gt;
 $ bzr update lp:inkscape&lt;br /&gt;
&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, as described above.&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 Bazaar branch===&lt;br /&gt;
&lt;br /&gt;
Branch Inkscape's code:&lt;br /&gt;
 $ bzr branch lp:inkscape&lt;br /&gt;
&lt;br /&gt;
Then transform your branch 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;
 $ bzr branch trunk killer-feature&lt;br /&gt;
 $ cd killer-feature&lt;br /&gt;
  &amp;lt;do work&amp;gt;&lt;br /&gt;
 $ bzr push lp:~inkscape.dev/inkscape/killer-feature&lt;br /&gt;
 $ bzr bind :push&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 codebase, 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 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 an Inkscape trunk checkout.'''&lt;br /&gt;
&lt;br /&gt;
Let's say you started from r770, made 200 local commits, but you decided that what you did since r954 is completely wrong. You want to go back to revision 954 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;
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;
To cherry-pick specific revisions from another branch:&lt;br /&gt;
 $ bzr merge -r340..360 ''branch_location''&lt;br /&gt;
Or to cherry-pick a single revision:&lt;br /&gt;
 $ bzr merge -c340 ''branch_location''&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.pub&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;~/.ssh/id_dsa.pub&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. If you push it under your username, only you will be able to modify it. If you have commit access and publish your branch under the username &amp;lt;tt&amp;gt;inkscape.dev&amp;lt;/tt&amp;gt;, all Inkscape developers will be able to change it.&lt;br /&gt;
 $ bzr push lp:~johnq/inkscape/myproject&lt;br /&gt;
 $ bzr push lp:~inkscape.dev/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 you made in a branch 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;
Alternatively, if you don't have a checkout but a branch:&lt;br /&gt;
 $ bzr merge ../myproject&lt;br /&gt;
 $ bzr commit -m 'added my feature'&lt;br /&gt;
 $ bzr push&lt;br /&gt;
&lt;br /&gt;
Note that you need to do the above sequence on a branch that has not diverged from the trunk, otherwise it will fail, as the trunk is append-only.&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 the new trunk. Do not do this! It obfuscates the revision history, and in any case it will fail with Inkscape's trunk on Launchpad.&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;
==Using Git-style branches==&lt;br /&gt;
&lt;br /&gt;
Git stores many branches in one directory, and allows you to switch between them. This is also possible in Bazaar. One way is to use native Bazaar facilities, the other is to use the [https://launchpad.net/bzr-colo bzr-colo] plugin. We'll cover the native way, since the plugin has good documentation.&lt;br /&gt;
&lt;br /&gt;
First, create a no-working-trees shared repository. The repo directory can be hidden if you want.&lt;br /&gt;
 $ bzr init-repo --no-trees .inkscape-repo&lt;br /&gt;
&lt;br /&gt;
Fetch the trunk and any other branches you want into our repository. (You can also push your local branches.)&lt;br /&gt;
 $ bzr branch lp:inkscape .inkscape-repo/trunk&lt;br /&gt;
 $ bzr branch lp:inkscape/0.48.x .inkscape-repo/0.48.x&lt;br /&gt;
 $ bzr push killer-feature .inkscape-repo/killer-feature&lt;br /&gt;
&lt;br /&gt;
Create your working tree by making a lightweight checkout of a desired branch. The &amp;lt;tt&amp;gt;--lightweight&amp;lt;/tt&amp;gt; parameter is imp[ortant, otherwise you can run into problems.&lt;br /&gt;
 $ bzr checkout --lightweight .inkscape-repo/trunk inkscape&lt;br /&gt;
 $ cd inkscape&lt;br /&gt;
&lt;br /&gt;
If you have an existing checkout of the trunk, use the following command:&lt;br /&gt;
 $ cd inkscape&lt;br /&gt;
 $ bzr reconfigure --lightweight-checkout --bind-to ../.inkscape-repo/trunk&lt;br /&gt;
&lt;br /&gt;
Now you can work in the &amp;lt;tt&amp;gt;inkscape&amp;lt;/tt&amp;gt; directory like you would on a normal branch. If you want to switch to a different branch, use:&lt;br /&gt;
 $ bzr switch ../.inkscape-repo/killer-feature&lt;br /&gt;
&lt;br /&gt;
To create a new branch in the repository:&lt;br /&gt;
 $ bzr switch -b ../.inkscape-repo/killer-feature-2&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 link a bug report to a branch and mark it &amp;quot;Fix Available&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, don't 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 would obfuscate the revision history: trunk commits that happened between the time you branched and the time you pushed would get grouped into one. Additionally, to prevent this obfuscation, Inkscape's trunk is set to append-only, so the above sequence of commands would fail. Do the merge the other way around:&lt;br /&gt;
 $ bzr branch trunk 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 for minor fixes.&lt;br /&gt;
&lt;br /&gt;
===Fixing a bug in both trunk and a release branch===&lt;br /&gt;
&lt;br /&gt;
This will assume this directory layout:&lt;br /&gt;
 inkscape&lt;br /&gt;
  +-trunk&lt;br /&gt;
  |  +-src&lt;br /&gt;
  |  +-...&lt;br /&gt;
  +-0.48.x&lt;br /&gt;
  |  +-src&lt;br /&gt;
  |  +-...&lt;br /&gt;
&lt;br /&gt;
Fix the bug in trunk and commit it, let's say it will be revision 1234.&lt;br /&gt;
Go to the release branch directory, e.g. 0.48.x, and write&lt;br /&gt;
&lt;br /&gt;
 $ bzr merge -r 1233..1234 ../trunk&lt;br /&gt;
&lt;br /&gt;
The operation can take a while. Resolve any conflicts, fix any compilation failures, then commit to the release branch, or post the diff to a Launchpad bug report.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://doc.bazaar-vcs.org/latest/en/ Bazaar manual]&lt;br /&gt;
* [http://firstrent.kiev.ua/ apartment in Kiev]&lt;/div&gt;</summary>
		<author><name>Reandug</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=Extension_requirements&amp;diff=63979</id>
		<title>Extension requirements</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=Extension_requirements&amp;diff=63979"/>
		<updated>2010-08-18T10:18:08Z</updated>

		<summary type="html">&lt;p&gt;Reandug: /* on Mac OS X */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setting Up Effects in Inkscape ==&lt;br /&gt;
&lt;br /&gt;
For effects to work you need to be using inkscape .42 or later.&lt;br /&gt;
&lt;br /&gt;
For info about what effects can do, screenshots, and how to make your own go to [http://www.ekips.org/comp/inkscape/ Aarons Site]&lt;br /&gt;
&lt;br /&gt;
If you are interested in opening special file formats through extensions, see  [[GettingExtensionsWorking]].&lt;br /&gt;
&lt;br /&gt;
=== Unhide the Effects menu ===&lt;br /&gt;
&lt;br /&gt;
This is only necessary in verions .41+CVS to .45.&lt;br /&gt;
&lt;br /&gt;
On the &amp;quot;Misc&amp;quot; tab of the &amp;quot;Inkscape Preferences&amp;quot; dialog check the box labeled &amp;quot;Enable script effects&amp;quot;. Close and reopen Inkscape&lt;br /&gt;
&lt;br /&gt;
== Python Effects ==&lt;br /&gt;
=== on Debian GNU / Linux ===&lt;br /&gt;
    apt-get install python python-xml&lt;br /&gt;
&lt;br /&gt;
=== on Microsoft Windows ===&lt;br /&gt;
&amp;lt;b&amp;gt;Important note: From version .44 onwards, Inkscape now includes python in the download, and has effects &amp;lt;i&amp;gt;enabled&amp;lt;/i&amp;gt; by default. Therefore these steps are outdated and no longer needed.&amp;lt;/b&amp;gt; &lt;br /&gt;
&lt;br /&gt;
# Download [http://www.python.org/download/ Python]&lt;br /&gt;
# Install  python and remember the directory you set it to install to. (e.g. C:\Python24 )&lt;br /&gt;
# Set your path variable in Windows. For Windows 2000 or XP read [http://support.microsoft.com/default.aspx?scid=kb;en-us;310519&amp;amp;sd=tech Microsofts instructions] or do&lt;br /&gt;
## Right Click My Computer&lt;br /&gt;
## Properties&lt;br /&gt;
## Advanced Tab&lt;br /&gt;
## Environment Variables&lt;br /&gt;
## In the system variables section select the one named PATH and hit edit.&lt;br /&gt;
## Find the end of all the values in there and add &amp;quot;;*path to python*&amp;quot; where *path to python* is the directory you told python to install to (ie c:\program files\python24)&lt;br /&gt;
## hit Ok, Ok, Apply&lt;br /&gt;
For more general instructions (including instructions for Windows 95,98,ME,NT,2000 and XP) look at the [http://www.chem.gla.ac.uk/%7Elouis/software/faq/q1.html University of Glasgow's] instructions, just remember that you want to set the PATH varable to the python directory. If there is already a path variable, don't delete it, but just add a semicolon and then the full path to the python directory at the end (e.g. PATH = C:\somthing else ; C:\python_directory)&lt;br /&gt;
# Reboot&lt;br /&gt;
# Download and Install [http://sourceforge.net/project/showfiles.php?group_id=6473 PyXML] for whatever version Python you chose to install&lt;br /&gt;
&lt;br /&gt;
To get the effects menu showing up:&lt;br /&gt;
# Load Inscape&lt;br /&gt;
# Go to File &amp;gt; Inkscape Preferences (Shift+Ctrl+P)&lt;br /&gt;
# Select the &amp;quot;Misc&amp;quot; tab and tick &amp;quot;Enable script effects...&amp;quot;&lt;br /&gt;
# Restart Inkscape &lt;br /&gt;
&lt;br /&gt;
If that didn't work, you may like to try to edit the preferences manually:&lt;br /&gt;
# Go to your preferences.xml file (Documents and Settings/USERNAME/Application Data/Inkscape/preferences.xml) &lt;br /&gt;
# Search for &amp;quot;id=&amp;quot;extensions&amp;quot;. &lt;br /&gt;
# If you find it: Add the following line above that &amp;quot;show-effects-menu=&amp;quot;1&amp;quot;. &lt;br /&gt;
# If you can't find it just add&lt;br /&gt;
     &amp;lt;group&lt;br /&gt;
     show-effects-menu=&amp;quot;1&amp;quot;&lt;br /&gt;
     id=&amp;quot;extensions&amp;quot; /&amp;gt;&lt;br /&gt;
Save the file, start up inkscape and use those sweet effects&lt;br /&gt;
&lt;br /&gt;
=== on Mac OS X ===&lt;br /&gt;
&lt;br /&gt;
Starting with version 0.46, Inkscape contains the python packages needed for the extension system. All python extensions should work out of the box. However in case you still have trouble you can install them in their regular location. &amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mac-how.net how to uninstall software on mac] you should knowbefire installation&lt;br /&gt;
&lt;br /&gt;
==== Binary packages ====&lt;br /&gt;
&lt;br /&gt;
# Download and open http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# Browse the disk image to find the packages corresponding to your architecture and Python version &lt;br /&gt;
#* Your architecture is ppc if you have a G4-G5 based Mac, i386 if you have an Intel Mac&lt;br /&gt;
#* By default Panther and Tiger have Python 2.3 and Leopard has Python 2.5. If you have installed a newer version of Python we also provide packages for 2.4&lt;br /&gt;
# Copy all the files and folder from the appropriate location to your Python site-packages directory. By default the site-packages directory is /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages  on Panther and Tiger, /Library/Python/2.5/site-packages on Leopard. Otherwise it is somewhere in your custom install of python (/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/ for an install of Python 2.4 via MacPorts for example)&lt;br /&gt;
&lt;br /&gt;
==== Compiling from source ====&lt;br /&gt;
If you prefer, you can install them from source, it is really easy.&lt;br /&gt;
&lt;br /&gt;
# download the source code for [http://sourceforge.net/project/showfiles.php?group_id=1369&amp;amp;package_id=175103 sourceforge numpy repository] and/or [http://codespeak.net/lxml/index.html#download lxml download section]&lt;br /&gt;
# unpack the &amp;lt;code&amp;gt;.tar.gz&amp;lt;/code&amp;gt; file &amp;lt;pre&amp;gt;tar -xzf numpy***.tar.gz lxml***.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
# for each one &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the newly created directory&lt;br /&gt;
# build C extensions and install (the install is system wide so you need administrator privileges)&amp;lt;pre&amp;gt;sudo python setup.py install&amp;lt;/pre&amp;gt;and type your password.&lt;br /&gt;
&lt;br /&gt;
The packages are installed in the site-packages directory of your Python install. This is /Library/Python/2.*/site-packages for the stock install of Python on Mac OS X.&lt;br /&gt;
&lt;br /&gt;
== Perl Effects ==&lt;br /&gt;
=== on Debian GNU / Linux ===&lt;br /&gt;
    apt-get install perl libxml-xql-perl&lt;br /&gt;
&lt;br /&gt;
=== on Gentoo GNU / Linux ===&lt;br /&gt;
    emerge -a XML-XQL&lt;br /&gt;
&lt;br /&gt;
=== on Microsoft Windows ===&lt;br /&gt;
    install [http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl [[ActivePerl]]]&lt;br /&gt;
    install XML::XQL::DOM (perhaps like this?)&lt;br /&gt;
        1: install prereqs with ppm:&lt;br /&gt;
 	    install xml-dom&lt;br /&gt;
 	    install parse-yapp&lt;br /&gt;
 	    install datemanip&lt;br /&gt;
        2: download xml-xql from:&lt;br /&gt;
 	    http://www.cpan.org/authors/id/T/TJ/TJMATHER/XML-XQL-0.68.tar.gz&lt;br /&gt;
        3: open command prompt and locate perl&amp;quot;s lib directory with:&lt;br /&gt;
 	    perl -e &amp;quot;print qq(@INC)&amp;quot;    (mine was C:[[/Perl/site/lib]])&lt;br /&gt;
        4: unpack xml-xql archive&lt;br /&gt;
        5: copy contents of XML-XQL-*\lib\XML into C:\Perl\site\lib\XML&lt;br /&gt;
        6: copy XML-XQL-*\XQLParser\Parser.pm to C:\Perl\site\lib\XML\XQL&lt;br /&gt;
&lt;br /&gt;
== Plugin Effects ==&lt;br /&gt;
I have absolutely no idea. Please record your success here. :)&lt;br /&gt;
&lt;br /&gt;
== What if it doesn't work? ==&lt;br /&gt;
Run Inkscape from the console&lt;br /&gt;
&lt;br /&gt;
Use the error messges printed to the console to diagnose the problem (very often missing dependencies)&lt;br /&gt;
&lt;br /&gt;
On Windows you will have to redirect output to a text file like this: &amp;quot;inkscape &amp;gt; output.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Extensions]]&lt;/div&gt;</summary>
		<author><name>Reandug</name></author>
	</entry>
</feed>