Notifications fail to be sent when using SubGit SVN Importer

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

Notification messages fail to be sent when using the 2.0 EAP SVN Importer for Bitbucket Server.

 

原因

This bug was submitted to tmate: http://issues.tmatesoft.com/issue/SGT-706

We've found a bug in SubGit that causes the problem.

回避策

The instructions are located here:


Find 'abs_path' function in GIT_REPO/hooks/pre-receive and GIT_REPO/hooks/post-receive hooks, it looks like this:

 

# computes absolute path from relative.
function abs_path() {
  local FILE="$1"
  local RESULT="$2"
  FILE="${FILE%/}"
  local file_basename="${FILE##*/}"

  local DC="${FILE%$file_basename}"

  if [ "x$DC" != "x" ]; then
    cd "$DC"
  fi
  local fileap="$(pwd -P)"
  local ap_with_basename="$fileap/$file_basename"
  cd "-" &>/dev/null

  APFN="${ap_with_basename}"
  eval $RESULT="'$APFN'"
}

 


And change this function as follows: add pushd call in the beginning of the function and popd call at the end of it:

 

# computes absolute path from relative.
function abs_path() {
  pushd $PWD &>/dev/null
  local FILE="$1"
  local RESULT="$2"
  FILE="${FILE%/}"
  local file_basename="${FILE##*/}"

  local DC="${FILE%$file_basename}"

  if [ "x$DC" != "x" ]; then
    cd "$DC"
  fi
  local fileap="$(pwd -P)"
  local ap_with_basename="$fileap/$file_basename"
  cd "-" &>/dev/null

  APFN="${ap_with_basename}"
  eval $RESULT="'$APFN'"
  popd &>/dev/null
}

 


Update all the repositories SubGit is installed into this way and notifications should work fine.

ソリューション

 From tmate:
I've just published an interim build with the fix at http://subgit.com/interim/SGT-706/

Feel free to use this version for new repositories; you may upgrade existing repositories to this version as well. We'll include the fix into next EAP/RC build.
最終更新日: 2016 年 2 月 19 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.