Fix git-p4.host option.

Use the '-H' on the p4 cmdline option for host, not -h, as per usage:

        -H host         set host name (default $P4HOST)
Add filters

This change adds three new parameters to the sync (and clone)
command: --tree-filter, --msg-filter, and --content-filter.
All three take the path to a filter script. Note that the path
should be an absolute path for the scripts to work correctly.

These filter scripts allow to apply tree, log message, and/or
content filters during the import of a change.

A tree filter is a script that gets the path of one file (in p4
notation, e.g. //depot/branch/file.txt) on stdin. It can output
a modified path on stdout, or return an empty string to ignore
this file.

The msg filter is a script that gets the commit message on stdin
and returns a modified commit message.

The content filter gets called for text files and is passed the
name of a temporary file on stdin and can modify that file.

These filters are useful when importing an entire p4 repo. They
allow to rearrange the location of some files (or ignore files
that accidentally got submitted in p4). The content filter is
useful to do whitespace cleanup or remove/replace some file
content that should not be in a repo, e.g. passwords.
Merge pull request #17 from jbert/master

Fix git-p4.host option
Oops - fix typo
Fix problem when we don't get any changes
Bugfix: need to apply tree filter to branchPrefixes/depotPaths as well
Bugfix: don't apply treefilter to branchPrefix if it was applied previously
Bugfix

contentFilterDir wasn't defined
Don't write "from" lines

This fixes a problem when importing branches: if the new branch in
Perforce is a subset of the parent branch the import didn't work as
expected: the entire parent branch got imported into git. The reason
is the "from" line.

This means that we shouldn't write the "from" line. According to git
documentation these lines can be omitted. In that case it will take
the previous commit of the current branch. Since Perforce only allows
linear history this should be sufficient.

If we start a new branch we list all the files included in that branch,
so we can't add "from" if we want the trees in Perforce and git to match
(otherwise git starts out with the "from" tree instead of an empty tree).
Bugfix: Need to write parent if it is first commit

If this is the first commit in a (existing) branch in the
fast-import file we have to specify the "from" parent, otherwise
git won't connect it to the existing branch. This is true at least
for git 1.7.5.4.
Apply labels only to branches that have files in the label spec
Fix merge commit of a new branch
Create label even with non-exact matching versions

Perforce can create a label with files from different changelists.
If fuzzyTags is set we create the label with the newest changelist
if we encounter such a situation.
Optimization for processing labels

Store the files included in the label in a variable so that we don't
have to get them over and over again for each branch.
Optimizations when applying treefilter
Use filename for content filter instead of random name

This allows to do different processing based on the filename.
For some files it might be necessary not to do any replacements.