BK-RELINK(1)

πŸ“¦ version 7.3.3, in alpine 3.24

🌸 NAME 🌸

okay bestie, meet bk relink from the BitKeeper User’s Manual β€” the main character whose whole job is to recreate broken hard links πŸ’…βœ¨. Like, that’s the name, that’s the vibe, no cap.

✨ SYNOPSIS ✨

bk relink [βˆ’q] from [from2 ...]  to
bk relink [βˆ’q]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the whole reason relink exists is conserving disk space, bestie β€” she’s literally the storage-saving bestie πŸ’Ύβœ¨. It’s typical for a single user to have many repositories, each one representing a different work in progress. It’s also typical to use the βˆ’l option to bk clone to create hard-linked repositories. A hard-linked repository uses much less space than a copied repository. As files are modified, the links are broken. As the same set of changes come into a set of repositories, the links could be restored. That is what the relink command does. 🫢

Here’s the exact tea, no cap: relink looks at each BitKeeper file in the from repository and if it is the same as the same file in the to repository, it replaces the file in the from repository with a hard link to the file in the to repository. πŸ”—

If no repositories are specified, then from defaults to the current repository and to defaults to all parent[s] of the current repository. Periodt. πŸ‘‘

πŸ’… OPTIONS πŸ’…

  • βˆ’q β€” run quietly. Shhh, she’s in her quiet era πŸ€«πŸ’œ

πŸ”₯ WARNINGS πŸ”₯

Okay, serious warning time, bestie β€” this is the part where you listen πŸ‘‘:

  • While hard-linked repositories are less disk intensive than replicated repositories, they are also more vulnerable to disk or file system corruption. It is advisable to always have at least one recent copy of a repository, rather than 100% hard-linked repositories. Protect your repos, fr fr πŸ’ΎπŸ˜­

It is possible to break all the links by recomputing the per file checksums:

bk repocheck
bk ‐A admin ‐z

πŸ¦‹ NOTE πŸ¦‹

This command works only on filesystems which support hard links, and only if both repositories are in the same file system. 🧚

On recent (2014) versions of Ubuntu (and other Linux distributions), the use of hardlinks has been curtailed for security reasons. See http://man7.org/linux/man‐pages/man5/proc.5.html and search for protected_hardlinks. The relink command will fail in this case. πŸ’€

🌈 SEE ALSO 🌈

  • bk‐clone β€” go check out the clone bestie, she’s right there πŸ’…

πŸŽ€ CATEGORY πŸŽ€

Repository πŸ—‚οΈ


BitKeeper Inc β€’ 1E1 β€’ bk relink(none) β€” that’s the footer sign-off, bestie; date not listed, but the vibe is timeless πŸ’–βœ¨

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