SFX_HEADS="heads"
SFX_STATE="state"
QUIET=""
-PYTHON=${PYTHON:python}
+PYTHON=${PYTHON:-python}
USAGE="[--quiet] [-r <repo>] [-m <max>] [-s] [-A <file>]"
LONG_USAGE="Import hg repository <repo> up to either tip or <max>
-r Mercurial repository to import
"
-. git-sh-setup
+. "$(git --exec-path)/git-sh-setup"
cd_to_toplevel
while case "$#" in 0) break ;; esac
--heads "$GIT_DIR/$PFX-$SFX_HEADS" \
--status "$GIT_DIR/$PFX-$SFX_STATE" \
"$@" \
-| git-fast-import $QUIET --export-marks="$GIT_DIR/$PFX-$SFX_MARKS.tmp" \
+| git fast-import $QUIET --export-marks="$GIT_DIR/$PFX-$SFX_MARKS.tmp" \
|| die 'Git fast-import failed'
# move recent marks cache out of the way...
# save SHA1s of current heads for incremental imports
# and connectivity (plus sanity checking)
for head in `git branch | sed 's#^..##'` ; do
- id="`git-rev-parse $head`"
+ id="`git rev-parse $head`"
echo ":$head $id"
done > "$GIT_DIR/$PFX-$SFX_HEADS"