-
Notifications
You must be signed in to change notification settings - Fork 0
Quickstart
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.
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
Now you're ready to use hdcli to automate the task of committing and resolving jira. Here are a few examples.
hdcli merge --issue HADOOP-1234 --from 42@trunk --to branch-2
hdcli resolve-jira --issue HADOOP-1234
hdcli upload --issue HADOOP-1234 -f foo.patch