Re: a minimal effort to categorize come bk commands

Thomas Glanzmann <[email protected]> Thu, 28 Oct 2004 10:35:04 +0200
Newsgroups gmane.comp.version-control.bitkeeper.user
Message-ID <[email protected]>
Hello,
that's what I give them to get started:


# leachen:
bk clone http://linux.bkbits.net/linux-2.4
bk clone http://linux.bkbits.net/linux-2.5

# see diffs
bk changes -L
bk rset [email protected],+ | bk gnupatch -h > ~/.www/mutt/mutt-cvs-maildir-header-cache.10
# diff between parent and child called from child:
bk export -tpatch -h -r`bk repogca`,+ > ~/.www/mutt/mutt-cvs-header-cache.4
bk rset -hr`bk repogca`,+ | grep -v '^BitKeeper' | bk gnupatch -du -e -h -T
bk rset -hr<revision> | bk gnupatch -h
#                                    ~ -> no describing header
bk export -tpatch -hr1.4,1.25

# extrace old kernel sources for example
bk changes -t
bk clone -rtag_name source_repo dest_repo
bk export [email protected] /tmp/linux-2.4.18
bk export -rv2.4.18 /tmp/linux-2.4.18

# deleting a changeset
bk undo [email protected] (kick one)
bk undo -av2.4.18 (remove all till this point)

# importing a patch abort if fails
bk import -tpatch -R -y"4G patch" /tmp/1 .

# importing patch and fix problems
bk import -tpatch -y"4G patch" /tmp/1 .

# To find which files are modified, but not yet checked in: 
# To find all files the are not under revision control: 
bk -r sfiles -gc
bk -r sfiles -gx
bk status -v

# To find which files are pending (checked in, but not yet committed): 
bk pending

# repository locked up
bk lock
bk unlock -w
bk unlock -r

# edit comments afterward *before* propagating
bk sccslog ChangeSet
bk comment -r1.30 ChangeSet

# enable RCS keyword expansion for one file
bk admin -fRCS print

# unlock file
bk unedit drivers/input/keyboard/atkbd.c
bk get drivers/input/keyboard/atkbd.c

# help
bk help terms
bk help -k keyword

# citool by hand
cat <<EOF | bk commit -ywhatever -
src/foo.c
src/bar.c
man/foo.1
EOF

# undo uncommited deltas
rm SCCS/?.libmad-0.15.1b.tar.gz

bk fix filename
# This only works for changes not for bk add's
# pay attention with the -c (fix entire changeset) option. last time I used it
# accidently I had to restore my repository from backup

# Never used successful before, so beware!
bk stripdel

bk csetprune - shrink a repository by removing files

bk cset -x (undoing a previous changeset)

BK_SHOWPROC=YES # debug

# Find every revision which touched a file
$ bk rset -lv2.6.6 | grep drivers/scsi/libata-core.c
drivers/scsi/libata-core.c|1.39
$ bk prs -hnd:I: -r1.39.. drivers/scsi/libata-core.c | while read rev; do  bk r2c -r$rev drivers/scsi/libata-core.c; done

# Make a hardlinked clone of the parent without fucking up the network
# but use local cpu instead
bk clone -lr`bk repogca` . ../clone_of_parent

Honestly,
	Thomas
_______________________________________________
Bitkeeper-users mailing list
[email protected]
http://bitmover.com/mailman/listinfo/bitkeeper-users
To unsubscribe from this list, go to the above URL, follow instruction at the bottom of the web page.