emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Git versus Bzr what is going on with emacs-24 branch?


From: Andreas Schwab
Subject: Re: Git versus Bzr what is going on with emacs-24 branch?
Date: Sat, 09 Feb 2013 14:02:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.93 (gnu/linux)

This is the script I'm using.

Andreas.

#!/bin/bash
test last-sync-start -nt last-sync-ready || touch -r last-sync-start last-sync
touch last-sync-start
rsync -av --del --exclude=obsolete_packs bzr.sv.gnu.org::bzr/emacs/ emacs.bzr/ 
|| exit
old=$(wc -l < marks/git-marks)
cd emacs.git
git fetch
state=$(git show-ref)
cd ../emacs.bzr
heads=
while read r; do
  b=${r%/.bzr/*}
  bb=$b
  test $b = master && bb=bzr/master
  test $b = emacs-23/emacs-23.2 && continue
  heads+=" refs/heads/$bb"
  git --git-dir=../emacs.git show-ref -q --verify refs/heads/$bb &&
  test $r -ot ../last-sync && continue
  echo $b
  bzr fast-export --plain --marks=../marks/bzr-marks -b $bb $b | (
    cd ../emacs.git
    git fast-import --force --quiet --export-marks=../marks/git-marks 
--import-marks=../marks/git-marks
  )
done < <(find . -path "*/.bzr/branch/last-revision" -printf "%P\n" | sort)
touch ../last-sync-ready
cd ../emacs.git
git show-ref --heads |
while read rev head; do
  test $head = refs/heads/master && continue
  case " $heads " in
    *" $head "*)
      r=$(echo "$state" | awk -v head=$head '$2 == head { print $1 }')
      if test -n "$r" && test "$(git merge-base $r $head)" != $r; then
        git tag lost+found/$r $r
      fi
      ;;
    *)
      git update-ref -d $head
      if test -z "$(git branch --contains $rev)"; then
        git tag lost+found/$rev $rev
      fi
      ;;
  esac
done

-- 
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]