views:

145

answers:

1

I have a file in a project that is in a bitkeeper repository. I checked in a file but I haven't committed the change to create a changeset. How can I undo the checkin?

If I had a changeset I could undo the commit with:

bk undo -r<rev>

But in this case I can't commit and undo the changeset because I have other checked-in files that I don't want to touch.

+2  A: 

You can undo a checkin outside of a commit using bk stripdel:

bk stripdel -r<rev> filename

For instance, checking in with this:

nfellman@xyz> bk ci a.c 
End comments with "." by itself or a blank line.
a.c 1.242>>  a
[email protected]>>  b
[email protected]>>  .
a.c revision 1.242: +0 -4 = 6731
a.c 1.242 -> 1.243

And then undoing the checkin with this:


nfellman@xyz> bk stripdel -r1.242 a.c
stripdel: removed 1 deltas from a.c

Nathan Fellman