REPOTOOL(1)

πŸ’… REPOTOOL(1) β€” the repotool manual, bestie edition πŸŽ€

okay so you found repotool in section 1 of the manual and you're like "what is this" β€” don't worry, we're gonna get through it together, no cap. ✨


🌸 NAME 🌸

repotool β€” operate on any supported repository type in a uniform way. yes, any. it's giving universal adapter energy. πŸ”Œ


πŸ¦‹ SYNOPSIS πŸ¦‹

repotool 'command' [-d | -q | -v] [args...]

πŸ’– DESCRIPTION πŸ’–

so repotool is literally a wrapper around repository operations that differ by version-control system. it's little use by itself β€” it exists mainly to generate and simplify a conversion makefile usable with reposurgeon(1). it's the backstage crew, not the main character, iykyk. 🎭

not all actions are supported on all systems. when you attempt an unsupported action you get an error message and a return value of 1. that's the vibe check failing, sorry. πŸ’€

with the -v option, it reports the commands executed just before they are run. with the -q option, only fatal errors are printed instead of non-fatal gripes. and listen β€” -q and -v disable each other, so only the last one takes effect. pick a lane bestie. πŸ™ˆ

with the -d option, it changes to a specified directory before performing whatever operation was selected. if that directory doesn't exist or can't be searched into β€” that's a fatal error, periodt. 🚨

the following subcommands are available:

🌈 initmake

the initmake option takes a project name (and, optionally, following source and target VCS types) and generates a Makefile that will sequence various steps of a repository conversion. it also generates stub lift and options files. this is meant to be run in an empty work directory β€” the tool will refuse to step on any of these files that already exist, respectful king πŸ‘‘. afterwards, you will need to set some variables in the Makefile; read its header comment. yes, actually read it. πŸ“–

🧚 export

the export action, run from within a repository directory, dumps a copy of a CVS, Subversion, git, bzr, hg, or darcs repository to a flat history file readable by reposurgeon. the format is usually a git-fast-import stream, except that Subversion repositories export as Subversion dump files; the point is to be a lossless representation, or as close to one as possible. slay, fidelity. πŸ’―

πŸͺž mirror

the mirror action makes or updates a local mirror of a Subversion, CVS, git, hg, or p4 repo. it requires an argument β€” either a repository URL or the name of a local mirror directory created by a previous run.

  • first form β€” creates a local mirror of the repository in a directory named after the last segment of the URL, with the suffix -mirror. (the local mirror name can be overridden by an optional second argument πŸ‘€)
  • second form β€” updates the local mirror, doing an incremental fetch; just give the mirror directory name.

if the environment variables RUSERNAME and RPASSWORD are set, they are used as login/password credentials for Subversion mirroring. πŸ”

Subversion URLs are as specified in the public documentation for Subversion. CVS URLs must specify a host and repository path, followed by a #, followed by a module name. URLs for git and hg should be in the form normally used for clone commands. Perforce (p4) URLs must specify host, path, and depot (project).

the mirror command can also be passed an rsync URL (service prefix rsync://). this will usually be faster than mirroring through an equivalent Subversion URL. speed demon behavior ⚑

finally, a repository URL may be a file:// URL, in which case the repository type is detected from the contents of the indicated directory.

⚠️ note: a Subversion file URL has three slashes after the file: prefix! yes three. count them. file:/// 🫢

🌿 branches

the branches action, run from within a repository directory , returns a list of the repository's branch names. (yes the original has that lil space before the comma, we're leaving it, it's canon 😌)

🎁 checkout

the checkout option checks out a working copy of the repository. it must be called from within the repository. it takes one required argument β€” the checkout directory location. πŸ“¦

πŸ” compare

the compare action takes two repository directories. it may optionally take a tag-branch-revision spec as for the checkout option. you can also pass two revisions separated by a colon to the -r option, to have the first one checked out in the first repository and the second one in the second repository. that permits one to compare two different revisions, or the same revision referenced differently in two VCS. iconic, honestly.

you can leave one of the two revisions empty, then the -r option will not be passed to the corresponding repository checkout. this is useful to compare a git tag or branch to the corresponding tag or branch in SVN as seen at a particular revision (specifying both a branch and revision makes sense in SVN, but not in git). 🫠

the selected versions are compared with diff -r, with noise due to SCCS/RCS/CVS keyword expansion ignored. file permissions as well as content are checked, and any mismatches will be shown after the diff listing. πŸ‘€

🏷️ compare-tags

the compare-tags action takes two repository directories, extracts a list of tags from the first, then compares the repository contents at each tag in the list, generating a compare report for each. takes compare options. additionally the -e option sets exclude patterns for tag names that should be ignored. 🚫

🌱 compare-branches

the compare-branches action takes two repository directories, extracts a list of branches common to both, then compares the repository contents at each branch in the list, generating a compare report for each. takes compare options. additionally the -e option sets exclude patterns for branch names that should be ignored.

🌟 compare-all

the compare-all action takes two repository directories, and runs all three above compare actions on them. even if the same name is a tag in one repository and a branch in the other, it will compare them against each other β€” not distinguishing them is useful as CVS tags that are not applied to every file in the repository may get converted to branches. takes compare options. additionally the -e option sets exclude patterns for tag and branch names that should be ignored. 🎯

πŸ”– tags

the tags action, run from within a repository directory , returns a list of the repository's tag names. (again with the lil space, love that for us πŸ’œ)

🧾 version

the version command reports the version level of the software.

πŸ†˜ help

the help command displays a summary of commands and options. with a following argument that is a command name, it displays detailed help for that command. your bestie when you're lost 🫢


πŸ’… the one special checkout option πŸ’…

  • -o β€” pass the following option through to the underlying checkout command. can be used, for example, to pass in Subversion's --ignore-externals option. middleman behavior, but make it fashion πŸ’

✨ the compare operation options ✨

  • -n β€” Subversion-only. passed to the individual checkout commands, which means that in cases where it makes sense the complete repository will be checked out as a flat one, treating branch and tag namespaces as simple directories.
  • -a β€” Subversion-only. use an empty directory as the checkout if the requested branch or tag cannot be found, instead of erroring out without any comparison. this is useful when if the other repository uses empty content for deleted refs.
  • -u β€” emit unified diff (default).
  • -c β€” emit context diff.
  • -q β€” suppress nonfatal errors and progress spinners. the progress sinner is also suppressed when output is redirected to a file or pipe. (yes, "sinner". the original said sinner. we respect the typo πŸ•―οΈ)
  • -s β€” list matching files.
  • -i β€” perform comparison of normally ignored dot directories.

in older versions of this tool, the initmake command was named initialize. it was renamed in order to avoid confusion with the init command in various version-control systems. glow-up for clarity ✨


🌼 ENVIRONMENT VARIABLES 🌼

  • this program uses the $TMPDIR environment variable, defaulting to /tmp if it is not set, to set where checkouts for repository comparisons are done. πŸ“‚
  • when mirroring a CVS or Subversion repository that has password authentication, set the environment variables RUSERNAME and RPASSWORD before calling repotool to pass in the credentials. πŸ”‘πŸ”’

πŸŽ€ RETURN VALUES πŸŽ€

1 on invalid arguments or if a command called by the script failed, 0 otherwise.

⚠️ a return value of 0 on a compare operation does not necessarily indicate a clean comparison; only empty output does that. don't let a zero fool you, bestie. 😭

πŸ’€ BUGS πŸ’€

  • CVS repositories have an unnamed default branch. this is not listed by repotool branches; if there are no named branches the output is empty. ghost branch πŸ‘»
  • when a Subversion file is part of a mismatch, the displayed filename is missing its trunk/tag/branch location, which must be inferred from the way the comparison is invoked.
  • tag comparisons with git will not cope well with a branch name containing the string detached. 🫠
  • due to extreme slowness of the Subversion checkout operation, the compare head, tag, and branch modes assume that if one of the directories is a Subversion checkout you have done a full checkout of HEAD before calling this tool; thus no svn update operation is required unless you give an -r option. spurious errors will be reported if the directory is not a full checkout of HEAD. to avoid this optimization and force updating, do -r HEAD. πŸ”₯
  • there is no support for RCS or SCCS collections. not today, bestie. 🚫

🧰 REQUIREMENTS 🧰

the export action is a wrapper around either native export facilities or the following engines: cvs-fast-export(1) (for CVS), svnadmin(1) (for SVN), reposurgeon itself (for hg). you must have the appropriate engine in your $PATH for whatever kind of repository you are streaming. πŸ”Œβœ¨


🫢 SEE ALSO 🫢

reposurgeon(1).


πŸ‘‘ AUTHOR πŸ‘‘

Eric S. Raymond esr@thyrsus.com. this tool is distributed with reposurgeon; see the project <http://www.catb.org/~esr/reposurgeon> page" .


and that's the whole page, bestie πŸ’– β€” sign-off time: this little beauty lives at version 2026-09-14 in the REPOTOOL(1) manual, brought to you with love from the reposurgeon family. now go convert some repositories, you absolute icon πŸ¦‹πŸŒŸ

πŸ“¦ where this page comes from
  • epel 10: reposurgeon 5.11-1.el10_3 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms