Question title is pretty much the question. Here's a look at what I get:
I am trying to export a mercurial repository to git, but to a different directory. hg gexport works just fine without the --cwd parameter, but I don't want that -- I want to change the working directory to another one, but strangely, it says unknown command when I use that command line switch.
Any ideas?

hgexportis not nativehgcommand, it's part of hggit extension>hg gexport --cwd $PATHwork in my own tests without errors (so-so, see below) with command-line expanded accordingly to requirementswithout -R gexport will not find source hg-repo after
cdto target locationAnd last, but not least: even properly used,
hgexportin current hggithg id15457fc67631 0.8.13do nothing (nothing changed on target). I suppose, for getting git-repo from hg you have to use trivial
hg push <git-URL>today (yes, it work, with minimal tricks on your side:branch_bookmark_suffix = $STRINGin .hgrc)Side note
If you have hggit extension enabled (globally or per-repository) hg-repo is mirrored automagically into bare git-repo (at least it seems so) in
.hg/gitdirectory, you can just copy&rename it