BK-LOCK(1)

πŸ“¦ version 7.3.3, in alpine 3.24

πŸ’… bk lock(none) β€” BitKeeper User's Manual, bestie edition πŸŽ€

okay so real talk, this page is from the BitKeeper User's Manual and it's all about bk lock, which is genuinely one of those commands that sounds scary but is actually so simple. let's get into it ✨


🌸 NAME 🌸

bk lock β€” lock a repository, or just peek at who's holding the lock (the lockers, if you will πŸ‘€)


✨ SYNOPSIS ✨

bk lock [βˆ’l|r|w|L|U] [βˆ’q] [directory]

that's it. that's the whole vibe check. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so bk lock does two iconic things: it can lock an entire repository, or it can list the lockers of a repository. like, "who's got it rn" energy.

if you pass a directory, the operation applies to the repository rooted at that directory. simple as that, no cap.

and here's the part you need to know, bestie β€” a lock is only valid as long as the locking process exists 😭. so when you're placing a lock, bk lock does not exit. it goes to sleep and waits for a signal. it's literally just vibing there, holding the lock down, main character energy fr fr.

🫢 don't be weirded out when it doesn't return to your prompt. it's supposed to do that. that IS the feature.

πŸ’– OPTIONS πŸ’–

  • -l β€” list the lockers of a repository. the "who's here" option πŸ‘‘
  • -q β€” quiet mode: exit status only, no chatter. just the receipts 🀫
  • -r β€” add a read lock (non-exclusive) and sleep until interrupted 😴
  • -w β€” add a write lock (exclusive) and sleep until interrupted 😴πŸ”₯
  • -L β€” wait for the repository to become locked (primarily used for testing) πŸ§ͺ
  • -U β€” wait for the repository to become unlocked (primarily used for testing) πŸ§ͺ

🌈 EXIT STATUS 🌈

okay so the exit status depends on how you called it. pay attention, this part's important πŸŽ€

if you called it with no options, or with the -l option, bk lock returns:

  • 0 β€” if the repository has no locks πŸŽ‰
  • 1 β€” if the repository has locks πŸ”’
  • 2 β€” if run outside of a repository πŸ™ˆ (oops)

if you called it with either -r or -w, bk lock returns exit status 1 if it's unable to lock the repository πŸ’€


⭐ SEE ALSO ⭐

bk‐unlock β€” the other half of the lock/unlock duo, go read it 🫢


πŸ’œ CATEGORY πŸ’œ

Repository πŸ—‚οΈβœ¨


and that's the whole page, bestie! this one's from BitKeeper Inc, version 1E1, manual page bk lock(none) β€” go lock something (responsibly) and remember: sleep is a feature, not a bug πŸ˜΄πŸ’… slay 🌈

πŸ“¦ 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