BK-SET(1)
π bk set β set operations, but make it iconic β¨
bk set(none) β BitKeeper User's Manual β bk set(none)
okay so bestie, welcome to bk set β it's giving main character utility energy because this thing does set operations on a BitKeeper file and honestly? It ate. π
β¨ SYNOPSIS β¨
πΈ DESCRIPTION πΈ
The bk set command performs set operations on a BitKeeper file. It's literally that girl β it provides these set operations: union, intersection, difference and symmetric difference. And if that wasn't enough, it also gives you the member function (is this element a member of the set?) plus the list function (list all sets which contain this member). No cap, it does it all. π
If the file is not specified, it defaults to the ChangeSet file. Periodt.
π OUTPUT OPTIONS π
Default output is a list of revisions, one per line. You can restrict output to only tagged revisions, and you can force it into revision, tag, or key format. But listen β only the ChangeSet file may have tags, which means combining tag output format with a regular file has unexpected results. Consider yourself warned, bestie. π
-kβ list all answers as keys, not as tags or revisions.-nβ prefix each output line with the filename, likeChangeSet|1.3, so the output can be fed to other programs (yes, likebk log) β iykyk.-tβ list all answers as tags where possible, else revisions.-ttβ list only those answers which are tagged, and list them as the tag not the revision.-trβ list only those answers which are tagged, but list them as revisions.-tkβ list only those answers which are tagged, but list them as keys.
π¦ SPECIFYING SETS π¦
If a revision is specified for a set argument, the set is the set of deltas which make up that revision. Example: in a simple history without branches, revision 1.5 implies the set {1.1, 1.2, 1.3, 1.4, 1.5}. Slay.
A revision may be specified as a revision, as a symbolic tag, or as a BitKeeper key. It may also be specified as a -, for the second set only, in which case it expects a list of revisions (or keys) on stdin, one per line. π«Ά
π SET OPERATIONS π
π UNION (setA | setB)
bk set [output opts] βo setA setB [file]
The union operation β familiar to programmers as a "bitwise or" β lists all members which occur in either set. It's giving "everyone's invited to the function." π
πΈ INTERSECTION (setA & setB)
bk set [output opts] βa setA setB [file]
The intersection operator β familiar to programmers as a "bitwise and" β lists all members which occur in both sets. Only the real ones make the cut. β¨
π¦ DIFFERENCE (ΛsetA & setB)
bk set [output opts] βd setA setB [file]
The difference operator lists all members in setB which are not in setA. This is the most useful of the set operations β lowkey the goat β see the examples below. π
π§ SYMMETRIC DIFFERENCE (setA Λ setB)
bk set [output opts] βx setA setB [file]
The symmetric difference operator β familiar to programmers as an "exclusive or" β lists all members which occur in only one of the two sets. It's giving "you can sit with us but only if you're not already at the other table." π
β ELEMENT
bk set [output opts] βe βrrev setA [file]
The element operator treats the specified revision as a single element, not as an implied set, and lists the element if it is in the set. Vibe check: are you in or are you out? π
π LIST
bk set βl βrrev [file]
The list operator treats the specified revision as a single element, not as an implied set, and lists all sets (as revisions) which contain the element as part of their set. It's typically used to see if a bug fix is in a particular release. Ngl, this is iconic for release tracking.
Heads up bestie: If the changeset has been excluded from a later changeset, the later changeset and its descendants will not be listed. π
π SET
bk set βs βrrev [file]
The set operator treats the specified revision as a set, and lists all elements of that set. It's giving "show me everything in your group chat." π
π NESTED π
The set command will look at the product changeset file by default. Periodt.
-Sβ perform the set operation on the current component.
π₯ EXAMPLES π₯
A good use of this command is the generation of release notes. To do so, pick the starting and ending points and do this:
$ bk set βd βrbkβ2.0 βrbkβ2.0.1 | bk changes β
ChangeSet@1.1425.5.19, 2001β10β12 15:18:06, lm@work
utils.c:
Remove debugging.
Sleep 50 milliseconds when waiting for the lock.
ChangeSet@1.1425.5.20, 2001β10β15 15:57:42, lm@disks
A weekendβs worth of testing of locking over NFS
turned into this cset.
ChangeSet@1.1425.5.21, 2001β10β16 08:35:26, lm@disks
The cset lock was too fine grained.
This is a short term fix,
the longer term fix is the per file locking
Andrew is working on.
TAG: bkβ2.0.1
To see the tagged releases which contain bkβ2.0.3:
$ bk set βl βtt βrbkβ2.0.3
bkβ2.0.3
bkβ2.0.4
bkβ2.0.4b
bkβ2.1.2
bkβ2.1.3
bkβ3par_merge
bkβ3par_merge2
π SEE ALSO π
bkβchanges, bkβlog
π CATEGORY π
Utility
π okay that's the whole vibe, bestie. This page is brought to you by BitKeeper Inc β 1E1 β bk set(none). Go slay those set operations. π«Άβ¨π
π¦ where this page comes from
- alpine 3.24: bitkeeper-doc 7.3.3-r1 Β· Apache-2.0
- Copyright (c) 1998-2015 BitKeeper Inc
- Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms