diff options
| author | Franck Cuny <franck.cuny@gmail.com> | 2013-11-26 10:36:10 -0800 |
|---|---|---|
| committer | Franck Cuny <franck.cuny@gmail.com> | 2013-11-26 10:36:10 -0800 |
| commit | 8ddf2e94df70707b458528a437759b96046d3e01 (patch) | |
| tree | d442818d92d3c9c6f7fcdc92857a1228963849a1 /_posts/2009-11-17-sd-the-peer-to-peer-bug-tracking-system.md | |
| parent | Don't need to use the IP in the makefile. (diff) | |
| download | lumberjaph-8ddf2e94df70707b458528a437759b96046d3e01.tar.gz | |
Huge update.
Moved all posts from textile to markdown. Updated all the CSS and
styles. Added a new page for the resume.
Diffstat (limited to '')
| -rw-r--r-- | _posts/2009-11-17-sd-the-peer-to-peer-bug-tracking-system.md (renamed from _posts/2009-11-17-sd-the-peer-to-peer-bug-tracking-system.textile) | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/_posts/2009-11-17-sd-the-peer-to-peer-bug-tracking-system.textile b/_posts/2009-11-17-sd-the-peer-to-peer-bug-tracking-system.md index 3b4f69f..582ce10 100644 --- a/_posts/2009-11-17-sd-the-peer-to-peer-bug-tracking-system.textile +++ b/_posts/2009-11-17-sd-the-peer-to-peer-bug-tracking-system.md @@ -1,6 +1,6 @@ --- layout: post -category: app +summary: In which I write about SD. title: sd the peer to peer bug tracking system --- @@ -8,20 +8,20 @@ title: sd the peer to peer bug tracking system Why should you use SD ? Well, at <a href="http://linkfluence.net/">$work</a> we are using <a href="http://www.redmine.org/">redmine</a> as our ticket tracker. I spend a good part of my time in a terminal, and checking the ticket system, adding a ticket, etc, using the browser, is annoying. I prefer something which I can use in my terminal and edit with my <a href="http://www.vim.org/">$EDITOR</a>. So if you recognize yourself in this description, you might want to take a look at SD. -bq. In the contrib directory of the SD distribution, you will find a SD ticket syntax file for vim. +> In the contrib directory of the SD distribution, you will find a SD ticket syntax file for vim. -h3. how to do some basic stuff with sd +## how to do some basic stuff with sd We will start by initializing a database. By default {% highlight bash %} -sd init +% sd init {% endhighlight %} will create a *.sd* directory in your $HOME. If you want to create in a specific path, you will need to set the SD_REPO in your env. {% highlight bash %} -SD_REPO=~/code/myproject/sd sd init +% SD_REPO=~/code/myproject/sd sd init {% endhighlight %} The init command creates an sqlite database and a config file. The config file is in the same format as the one used by git. @@ -29,18 +29,18 @@ The init command creates an sqlite database and a config file. The config file i Now we can create a ticket: {% highlight bash %} -SD_REPO=~/code/myproject/sd ticket create +% SD_REPO=~/code/myproject/sd ticket create {% endhighlight %} This will open your $EDITOR, the part you need to edit are specified. After editing this file, you will get something like this: -bc. Created ticket 11 (437b823c-8f69-46ff-864f-a5f74964a73f) -Created comment 12 (f7f9ee13-76df-49fe-b8b2-9b94f8c37989) +> Created ticket 11 (437b823c-8f69-46ff-864f-a5f74964a73f) +> Created comment 12 (f7f9ee13-76df-49fe-b8b2-9b94f8c37989) You can view the created ticket: {% highlight bash %} -SD_REPO=~/code/myproject/sd ticket show 11 +% SD_REPO=~/code/myproject/sd ticket show 11 {% endhighlight %} and the content of your ticket will be displayed. @@ -48,8 +48,8 @@ and the content of your ticket will be displayed. You can list and filter your tickets: {% highlight bash %} -SD_REPO=~/code/myproject/sd ticket list -SD_REPO=~/code/myproject/sd search --regex foo +% SD_REPO=~/code/myproject/sd ticket list +% SD_REPO=~/code/myproject/sd search --regex foo {% endhighlight %} You can edit the SD configuration using the config tool or editing directly the file. SD will look for three files : /etc/sdrc, $HOME/.sdrc or the config file in your replica (in our exemple, ~/code/myproject/sd/config). @@ -57,26 +57,26 @@ You can edit the SD configuration using the config tool or editing directly the For changing my email address, I can do it this way: {% highlight bash %} -SD_REPO=~/code/myproject/sd config user.email-address franck@lumberjaph.net +% SD_REPO=~/code/myproject/sd config user.email-address franck@lumberjaph.net {% endhighlight %} or directly {% highlight bash %} -SD_REPO=~/code/myproject/sd config edit +% SD_REPO=~/code/myproject/sd config edit {% endhighlight %} and update the user section. -h3. sd with git +## sd with git SD provides a script for git: *git-sd*. Let's start by creating a git repository: {% highlight bash %} -mkdir ~/code/git/myuberproject -cd ~/code/git/myuberproject +% mkdir ~/code/git/myuberproject +% cd ~/code/git/myuberproject git init {% endhighlight %} @@ -85,7 +85,7 @@ SD comes with a git hook named "git-post-commit-close-ticket" (in the contrib di now we can initialize our sd database {% highlight bash %} -git-sd init +% git-sd init {% endhighlight %} git-sd will try to find which email you have choosen for this project using git config, and use the same address for it's configuration. @@ -102,20 +102,20 @@ print "hello, world\n"; then {% highlight bash %} -git add hello.pl -git commit -m "first commit" hello.pl +% git add hello.pl +% git commit -m "first commit" hello.pl {% endhighlight %} now we can create a new entry {% highlight bash %} -git-sd ticket create # create a ticket to replace print with say +% git-sd ticket create # create a ticket to replace print with say {% endhighlight %} We note the UUID for the ticket: in my exemple, the following output is produced: -bc. Created ticket 11 (92878841-d764-4ac9-8aae-cd49e84c1ffe) -Created comment 12 (ddb1e56e-87cb-4054-a035-253be4bc5855) +> Created ticket 11 (92878841-d764-4ac9-8aae-cd49e84c1ffe) +> Created comment 12 (ddb1e56e-87cb-4054-a035-253be4bc5855) so my UUID is <strong>92878841-d764-4ac9-8aae-cd49e84c1ffe</strong>. @@ -132,28 +132,28 @@ say "hello, world"; and commit it {% highlight bash %} -git commit -m "Closes 92878841-d764-4ac9-8aae-cd49e84c1ffe" hello.pl +% git commit -m "Closes 92878841-d764-4ac9-8aae-cd49e84c1ffe" hello.pl {% endhighlight %} If I do a {% highlight bash %} -git ticket show 92878841-d764-4ac9-8aae-cd49e84c1ffe +% git ticket show 92878841-d764-4ac9-8aae-cd49e84c1ffe {% endhighlight %} The ticket will be marked as closed. -h3. sd with github +## sd with github Let's say you want to track issues from a project (I will use <a href="http://plackperl.org/">Plack</a> for this exemple) that is hosted on github. {% highlight bash %} -git clone git://github.com/miyagawa/Plack.git -git-sd clone --from "github:http://github.com/miyagawa/Plack" +% git clone git://github.com/miyagawa/Plack.git +% git-sd clone --from "github:http://github.com/miyagawa/Plack" # it's the same as -git-sd clone --from "github:miyagawa/Plack" +% git-sd clone --from "github:miyagawa/Plack" # or if you don't want to be prompted for username and password each time -git-sd clone --from github:http://githubusername:apitoken@github.com/miyagawa/Plack.git +% git-sd clone --from github:http://githubusername:apitoken@github.com/miyagawa/Plack.git {% endhighlight %} It will ask for you github username and your API token, and clone the database. @@ -161,7 +161,7 @@ It will ask for you github username and your API token, and clone the database. Later, you can publish your sd database like this: {% highlight bash %} -git-sd push --to "github:http://github.com/$user/$project" +% git-sd push --to "github:http://github.com/$user/$project" {% endhighlight %} Now you can code offline with git, and open/close tickets using SD :) |
