Difference between revisions of "Working on a Styles Bug"

From Dreamwidth Notes
Jump to: navigation, search
(Right URL for the location of S2 layers)
(Selecting a Layout for your Journal)
Line 2: Line 2:
  
 
<dwuser>afuna</dwuser>'s notes:
 
<dwuser>afuna</dwuser>'s notes:
# claim a bug
+
# claim a bug [http://wiki.dwscoalition.org/notes/Dev_Getting_Started (steps 8 and 9)]
# get the source code from layer
+
# get the [http://www.dreamwidth.org/customize/advanced/layerbrowse source code from layer]
# copy or set up style as necessary
+
# [http://dw-styles.dreamwidth.org/11389.html copy or set up style] as necessary
 
# make changes; compile; check in various browsers, or whatever...
 
# make changes; compile; check in various browsers, or whatever...
  

Revision as of 21:57, 4 October 2009

Selecting a Layout for your Journal

[info]afuna's notes:

  1. claim a bug (steps 8 and 9)
  2. get the source code from layer
  3. copy or set up style as necessary
  4. make changes; compile; check in various browsers, or whatever...

Working with the Code Locally

This guide is written assuming you have some basic knowledge and familiarity with Linux/UNIX, shells, file systems, etc. To work on styles bugs, you will also need familiarity with CSS and the S2 language. Knowledge of Perl is a bonus but not required (unless you want to work on S2.pm or other modules). If you only have Windows to work on, don't despair! It's possible to work with the repositories through the Windows Explorer, too.

Install Mercurial

$ sudo aptitude install mercurial

or use Synaptic package manager (System->Administration->Synaptic Package Manager). Windows users can install TortoiseHG, which is a context-menu (i.e. right-click) interface to Mercurial in Windows Explorer.

Add Mercurial Queue support by editing ~/.hgrc to add this section:

[extensions]
hgext.mq =

Edit the ~/.hgrc file to add your username/e-mail and the hook to prevent pull from running when there is a patch applied to the stack (don't worry if you don't understand what this means):

[ui]
username = USERNAME <E-MAIL>
[hooks]
#Prevent "hg pull" if MQ patches are applied.
prechangegroup.mq-no-pull = ! hg qtop > /dev/null 2>&1

(Replace USERNAME and E-MAIL with your username and e-mail). Unfortunately, MQ has not been adapted for TortoiseHG yet, which makes the commit/patch process a little more complicated.

Getting the DW Code

Create a main working directory for the Dreamwidth source. Most of the instructions on the wiki are tailored to the source directory being ~/dw/cvs/dw-free but you can use anything you like. I happen to use ~/projects/dw-free .

"Clone", i.e. download and create the dw-free repository:

$ hg clone http://hg.dwscoalition.org/dw-free
$ hg update -C tip

Repeat for the non-free repository, which also contains some of the layouts:

$ hg clone http://hg.dwscoalition.org/dw-nonfree
$ hg update -C tip

To begin working with Mercurial Queues, execute these commands in each of your DW repositories to initialize the queue repository. For example, if your working directory is ~/dw/cvs/, enter:

$ cd ~/dw/cvs/dw-free
$ hg qinit -c

There is more information on working with Mercurial Queues on the Dreamwidth Wiki here.

The S2 layers are located in dw-[non]free/bin/upgrading/s2layers/$layoutname/layout.s2

Generating and Submitting the Patch

In part 3 of the tutorial, I'll go through the process of claiming and patching a bug step by step.