====== Source code repository ====== ===== The repository url ===== MyHDL code development is managed using [[http://www.selenic.com/mercurial|mercurial]]. The public repository resides here: http://hg.myhdl.org/myhdl This url can be used in several ways, as described below. ===== Browsing the repository ===== You can use the repository url in your web browser to browse through the repository and its history. This is a very good interface to track down issues in the code. ===== Tracking development ===== If you have mercurial installed, you can use the repository url to track the latest development: $ hg clone http://hg.myhdl.org/myhdl myhdl This makes a clone of the repository in a local ''myhdl'' directory. In that directory you can now do the following: $ hg in to check if there are new changesets. $ hg pull to get new changesets. $ hg update to update the workspace with new changesets. ===== Named branches ===== The repository contains multiple named branches. Each branch corresponds to a development line with a specific purpose. Before using the repository to install MyHDL or to develop your own changesets, make sure you are on the correct branch. To find out what branches are available, use: $ hg branches Currently, the following branches are active: ^ Branch name ^ Purpose ^ Policy ^ | default | Bleeding edge development | Requires Python 2.6. Bug fixes are merged in | | 0.6-maint | Bug fixes for MyHDL 0.6 | Bug fixes only | To switch to a particular branch, use: $ hg update -C BE CAREFUL! The -C options also discards local changes. Only switch branches when everything you need is committed. ===== Using the repository code ===== To use the repository code the simplest way is to adjust the **PYTHONPATH** variable of the used shell. Let's assume you have checked out the MyHDL code from the mercurial repository to $HOME/dev/myhdl. Then insert that path as the first entry to the PYTHONPATH variable. That way when doing the **'from myhdl import *'** import, the myhdl package in the $HOME/dev/myhdl path will be found first. This works even when you have a stable version of MyHDL installed in one of the Python's site-package/ paths. For convenience you can put the change of the PYTHONPATH variable in a script and then, in case of a bash shell e.g., just source it from the shell you want to use the repository from. The script for bash could look like this: PYTHONPATH="$HOME/dev/myhdl:${PYTHONPATH}" export PYTHONPATH Assuming this script got saved e.g. as myhdl.sh, to source it in a bash shell, call: source myhdl.sh ===== Creating your own patches ===== You can also make changesets from your own patches and contribute them to the development. This is more advanced usage that merits a page on its own: [[dev:patches]].