Skip to content
Haohui Mai edited this page Mar 20, 2014 · 1 revision

Installation

You can install hdcli via pip, the python package manager:

pip install --user git+https://github.com/haohui/hdcli.git

The above command installs hdcli and its dependency in your user directory. On Mac OS X 10.9, it is installed in /Users/hmai/Library/Python/2.7/bin.

Configuration

The next step is to configure hdcli. Currently hdcli requires two configuration files place in the ~/.hdcli directory:

  • config.yaml. The file that specifies the editor, the location of the svn and maven, and your jira account information.
  • resolve-jira.yaml.tmpl. The file that provides a template when you're resolving jira.

Both files are in YAML format. You can find some examples in the conf-example directory in the repository.

In order for the merging function to work, you also need to checkout the repositories in the hadoop_repo_directory directory, which is configured in config.yaml. For example, I've checked out trunk, branch-2 and branch-2.4 in the directory.

$ mkdir -p $HADOOP_REPO_DIRECTORY && cd $HADOOP_REPO_DIRECTORY
$ svn co https://svn.apache.org/repos/asf/hadoop/common/trunk trunk
$ mkdir branches && cd branches
$ svn co https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2 branch-2

Examples

Now you're ready to use hdcli to automate the task of committing and resolving jira. Here are a few examples.

For issue HADOOP-1234, merge the patch with revision 42 from trunk to branch-2

hdcli merge --issue HADOOP-1234 --from 42@trunk --to branch-2

Resolve jira HADOOP-1234

hdcli resolve-jira --issue HADOOP-1234

Upload a patch (foo.patch) to the jira HADOOP-1234

hdcli upload --issue HADOOP-1234 -f foo.patch