Manpage logo

bk-collapse - (unknown subject)


NAME
bk collapse − combine recent changesets into a single unit of work

SYNOPSIS
bk collapse
[−lqS] −e [−arev] [−@[url]]

DESCRIPTION
bk collapse
allows you to combine (collapse) the most recent successive changesets made in a repository. You typically use this when completing a develop-review-test-debug-fix cycle to combine a changeset and all its bug-fix and review-generated changesets into a single logical unit of work. In this usage, you specify a revision with −a, specifying that all changesets since that revision be collapsed.

Note: Currently, the −e option is required; the modifications introduced by the changesets to be collapsed are applied to the affected files, which are left as locked, modified files in the repository. You must subsequently use bk citool or bk delta/commit to commit these edits as a single changeset. bk collapse preserves all checkin comments for individual files and for the collapsed changesets; bk citool then uses these saved checkin comments to populate the comments fields for all affected files and the ChangeSet file.

You can use bk collapse without the −a option immediately after a checkin if you realize that the change was not done or was incorrect. You can do this “uncommit” on the most recent changeset only if you are positive that there are no other copies of this changeset in other repositories.

The checkin comments are preserved if you use bk citool to make the subsequent checkin.

The −l option to bk collapse saves a list of the md5keys of all changesets that have been replaced by the this command in the BitKeeper/etc/collapsed file. Later bk pull examines this file to prevent the uncollapsed csets from being pulled into the repository with the collapsed versions.

bk collapse saves a backup patch in BitKeeper/tmp/collapse.patch in case it turns out that the collapse was the wrong idea.

OPTIONS
−@
[url] If the current repository is a strict superset of the repository at url then collapse will replace all changesets not in url with a single collapsed cset. If url is omitted then the current repositories parent is used instead.
−a
rev Collapse all changesets that occurred after rev.
−e
Leave the resulting changes as locked, modified files; you must run bk citool or bk delta/commit to create the final changeset.
−l
Record the csetkeys of the changesets being replaced in the BitKeeper/etc/collapsed file.
−−no−save
when fixing the entire changeset the normal behavior is to save a backup patch of all the csets being removed in BitKeeper/tmp/collapse.patch in case something goes wrong. This option disables this safety net for a minor performance gain.
−q
suppress most messages

EXAMPLES
Fix a problem in the latest cset.

$ bk collapse -e
$ bk citool

Collapse all csets not in my parent into a single cset.

$ bk collapse -e@
$ bk citool

SEE ALSO
bk-citool, bk-commit, bk-delta, bk-edit, bk-makepatch, bk-stripdel, bk-undo

CATEGORY
Repository


Updated 2026-06-01 - jenkler.se | uex.se