HG(BUNDLE)

πŸ’– hg bundle β€” the manual, but make it cute πŸ’–

okay bestie, welcome to the HG(BUNDLE) page, aka the part of the hg manual that teaches you how to create a bundle file. it's giving "pack your bags, we're moving repos" energy and honestly? iconic. let's get into it πŸŽ€


✨ NAME ✨

hg bundle β€” create a bundle file πŸ¦‹


✨ SYNOPSIS ✨

hg bundle [-f] [-t BUNDLESPEC] [-a] [-r REV]... [--base REV]... FILE [DEST]...

✨ DESCRIPTION ✨

so basically: you're generating a bundle file that's full of data meant to be transferred over to another repository. it's a little care package of commits, fr fr πŸ’Œ

if you want a bundle with literally every changeset in it, use -a/--all (or, same vibe, --base null). but if you don't do that, hg assumes your destination already has all the nodes you named with the --base parameters. and if you don't do that either? hg assumes the repo already has all the nodes in destination β€” or default-push/default if you didn't name a destination at all β€” where destination means the repositories you hand over through the DEST option. it's a whole chain of assumptions and hg is just out here trusting you 🫢

you can change the bundle format with the -t/--type option. the full lore on that format lives in hg help bundlespec. and by default? the most appropriate format gets used and compression defaults to bzip2. slay.

once your bundle file exists, you can move it around however you want (conventional means, nothing fancy ✨) and then apply it to another repository with the unbundle or pull command. this is the move when direct push and pull aren't available, or when exporting an entire repository is just... not the vibe you're going for.

and here's the part that matters: applying bundles preserves all changeset contents, including:

  • permissions
  • copy/rename information
  • revision history

she keeps receipts. no cap. πŸ‘‘

Returns 0 on success, 1 if no changes found.


✨ OPTIONS ✨

  • --exact β€” compute the base from the revision you specified. precise queen behavior πŸ’…
  • -f, --force β€” run it even when the destination is unrelated. chaotic but sometimes necessary πŸ™ˆ
  • -r,--rev <REV[+]> β€” a changeset intended to be added to the destination
  • -b,--branch <BRANCH[+]> β€” a specific branch you would like to bundle 🌸
  • --base <REV[+]> β€” a base changeset assumed to be available at the destination
  • -a, --all β€” bundle all changesets in the repository. the whole entire thing, bestie πŸ’–
  • -t,--type <TYPE> β€” bundle compression type to use (default: bzip2)
  • -e,--ssh <CMD> β€” specify ssh command to use
  • --remotecmd <CMD> β€” specify hg command to run on the remote side
  • --insecure β€” do not verify server certificate (ignoring web.cacerts config)
🚨 psst β€” any option marked with [+] can be specified multiple times. stack 'em up, it's fine 🧚

okay that's the whole page, you ate it up, go forth and bundle responsibly βœ¨πŸ’œ

later bestie β€” this was the HG(BUNDLE) page, and that's a wrap on the manual πŸŒˆπŸŽ€πŸ‘‘