Re: How to access local BK repositories after 1st July?

Richard Guenther <[email protected]> Fri, 15 Apr 2005 12:04:35 +0200 (CEST)
Newsgroups gmane.comp.version-control.bitkeeper.user
Message-ID <Pine.LNX.4.44.0504151158390.7457-200000@alwazn.tat.physik.uni-tuebingen.de>
On Thu, 14 Apr 2005, Larry McVoy wrote:

> All repos on bkbits.net will continue to be available indefinitely.
> At the very least you'll be about to get at the data and the checkin
> comments via the open source client.
>
> We will do CVS exports for people as they need them, we're hoping to
> automate that.

[subscribed now]

I was specifically asking about single-user repositories that use
the open logging facility and are not hosted at bkbits.  With some
script hackery I was able to create a series of patches between the
main changesets (those named 1.x), which is enough for my purpose.
Only for binary files this doesn't work.  Feeding the patch series
into whatever scm should be easy with some extra scripts extracting
the changelog.

However, the naiive approach of just exporting every 1.x changeset
as patch didn't work, as appearantly merge changesets are empty
and thus there is missing stuff if I apply such series.  Only if
exporting a series of patches for ranges like -r1.2,1.3 and then
-r1.3,1.4, etc. applying works.  I don't know yet if this has
other disadvantages from exporting only with -r1.3

Any good idea on how to handle binary files and deltas for them
is appreciated.  Current extract-script attached.

Thanks,
Richard.

--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/

_______________________________________________
Bitkeeper-users mailing list
[email protected]
http://mail.bitmover.com/mailman/listinfo/bitkeeper-users
export-bk.sh (text/plain, 658 B)
#!/bin/sh

if test -z "$1"; then
  echo "Usage: $0 patch-target-directory"
  exit 1
fi


# get a list of (local) changesets (reversed chronological order)
changesets=`bk changes -a | grep '^ChangeSet@1\.[0-9]*,' | sed -e 's/ChangeSet@\(1\.[0-9]*\),.*/\1/'`

# export them to individual patches
old=""
for i in $changesets; do
	echo Exporting ChangeSet $i
	bk export -tpatch -du -r$i > $1/ChangeSet.$i
	if ! test -z "$old"; then
	  echo Exporting Delta $i,$old
	  bk export -tpatch -du -r$i,$old > $1/Delta.$i
	fi
	old=$i
done

# apply the patches
# for i in `seq 176`; do echo Applying Delta.1.$i; patch -s -p1 < ../Delta.1.$i; done