From: Andreas Schwab <schwab@linux-m68k.org>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: emacs-devel@gnu.org
Subject: Re: Git versus Bzr what is going on with emacs-24 branch?
Date: Sat, 09 Feb 2013 14:02:19 +0100 [thread overview]
Message-ID: <m2wquh7i90.fsf@igel.home> (raw)
In-Reply-To: <877gmil8hr.fsf@wanadoo.es> ("Óscar Fuentes"'s message of "Fri, 08 Feb 2013 23:57:04 +0100")
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, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2013-02-09 13:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-27 9:00 Git versus Bzr what is going on with emacs-24 branch? Vitalie Spinu
2012-12-27 9:16 ` Vitalie Spinu
2012-12-27 9:37 ` Xue Fuqiao
2012-12-27 12:18 ` Adam Sjøgren
2013-02-07 21:58 ` John Wiegley
2013-02-07 22:14 ` Óscar Fuentes
2013-02-08 0:17 ` John Wiegley
2013-02-08 18:59 ` Óscar Fuentes
2013-02-08 20:04 ` Stefan Monnier
2013-02-08 20:20 ` Glenn Morris
2013-02-08 22:57 ` Óscar Fuentes
2013-02-09 13:02 ` Andreas Schwab [this message]
2013-02-09 13:42 ` Xue Fuqiao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2wquh7i90.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=emacs-devel@gnu.org \
--cc=ofv@wanadoo.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.