2.5 development

Larry McVoy lm at bitmover.com
Sat Feb 16 04:06:53 EST 2002


> FWIW, I prefer to export as a patch, and then 'bk citool' to check in.

Groovy.  I love it when people use citool, we get better comments.

> If you are going to edit the comments anyway, then re-importing a patch
> is best done IMHO with
>
> 	patch -sp1 -g1 < ~/tmp/patch

The only problem with this is that it doesn't catch renames, so you'll be
adding and deleting files instead of renaming them.  Buried in the import
-tpatch code, you'll find (it's a shell script):

bk patch -g1 -f -p1 -ZsE \
    -z '=-PaTcH_BaCkUp!' --forcetime --lognames > ${TMP}plog$$ 2>&1

and then

grep '^Creating file ' ${TMP}plog$$ | sed 's/Creating file //' > ${TMP}creates$$
grep '^Removing file ' ${TMP}plog$$ | sed 's/Removing file //' > ${TMP}deletes$$
if [ -s ${TMP}deletes$$ -a -s ${TMP}creates$$ ]
then    (
	cat ${TMP}deletes$$
	echo ""
	cat ${TMP}creates$$
	) | bk renametool $Q
fi

which you really want to do, the repository will bloat up with duplicate files
if you don't.

Jeff, aside from the fact it's some unknown black box, what don't you like
about "import -tpatch"?  Is there something we could fix?
--
---
Larry McVoy            	 lm at bitmover.com           http://www.bitmover.com/lm

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list