BK-SET(1)

πŸ“¦ version 7.3.3, in alpine 3.24

πŸ’… 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, like ChangeSet|1.3, so the output can be fed to other programs (yes, like bk 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms