-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"
-r Mercurial repository to use
"
-. git-sh-setup
+. "$(git --exec-path)/git-sh-setup"
cd_to_toplevel
while case "$#" in 0) break ;; esac
def get_git_sha1(name,type='heads'):
try:
# use git-rev-parse to support packed refs
- cmd="GIT_DIR='%s' git-rev-parse --verify refs/%s/%s 2>/dev/null" % (os.getenv('GIT_DIR','/dev/null'),type,name)
+ cmd="GIT_DIR='%s' git rev-parse --verify refs/%s/%s 2>/dev/null" % (os.getenv('GIT_DIR','/dev/null'),type,name)
p=os.popen(cmd)
l=p.readline()
p.close()