FSVS(1)

๐Ÿ’– NAME ๐Ÿ’–

Commands and command line parameters โ€” hi bestie, welcome to the manual for fsvs, the fast versioning tool (that's what the (1) is doing, it's giving "section 1 of the manual, iykyk").

So, for real: fsvs is a client for subversion repositories; it is designed for fast versioning of big directory trees. And yeah โ€” the original page says that sentence twice, and honestly? Not a typo, just main character energy. Both times, bestie. ๐Ÿ’…


๐Ÿ’ซ SYNOPSIS ๐Ÿ’ซ

fsvs command [options] [args]

The following commands are understood by FSVS:

๐Ÿ—‚๏ธ Local configuration and information:

  • urls โ€” define working copy base directories by their URL(s). ๐ŸŒ
  • status โ€” get a list of changed entries. ๐Ÿ‘€
  • info โ€” display detailed information about single entries. ๐Ÿ”
  • log โ€” fetch the log messages from the repository. ๐Ÿ“œ
  • diff โ€” get differences between files (local and remote). โœจ
  • copyfrom-detect โ€” ask FSVS about probably copied/moved/renamed entries; see cp. ๐Ÿ•ต๏ธ

๐ŸŽ€ Defining which entries to take:

  • ignore and rign โ€” define ignore patterns. ๐Ÿ™ˆ
  • unversion โ€” remove entries from versioning. ๐Ÿงน
  • add โ€” add entries that would be ignored. โž•
  • cp, mv โ€” tell FSVS that entries were copied. ๐Ÿ“ฆ

๐ŸŒˆ Commands working with the repository:

  • commit โ€” send changed data to the repository. ๐Ÿš€
  • update โ€” get updates from the repository. โฌ‡๏ธ
  • checkout โ€” fetch some part of the repository, and register it as working copy. ๐Ÿ›๏ธ
  • cat โ€” get a file from the directory. ๐Ÿฑ
  • revert and uncp โ€” undo local changes and entry markings. โ†ฉ๏ธ
  • remote-status โ€” ask what an update would bring. ๐Ÿ”ฎ

๐Ÿ’Ž Property handling:

  • prop-set โ€” set user-defined properties. โœ๏ธ
  • prop-get โ€” ask value of user-defined properties. โ“
  • prop-list โ€” get a list of user-defined properties. ๐Ÿ“‹

๐Ÿ› ๏ธ Additional commands used for recovery and debugging:

  • export โ€” fetch some part of the repository. ๐Ÿ“ค
  • sync-repos โ€” drop local information about the entries, and fetch the current list from the repository. โ™ป๏ธ
Note: multi-url-operations are relatively new; there might be rough edges. ๐Ÿซ 

The return code is 0 for success, or 2 for an error. 1 is returned if the option Checking for changes in a script is used, and changes are found; see also Filtering entries.


๐ŸŒˆ Universal options ๐ŸŒˆ

๐Ÿท๏ธ -V -- show version

-V makes FSVS print the version and a copyright notice, and exit. Slay, short and sweet. โœจ

๐Ÿ› -d and -D -- debugging

If FSVS was compiled using --enable-debug you can enable printing of debug messages (to STDOUT) with -d. Per default all messages are printed; if you're only interested in a subset, you can use -D start-of-function-name.

fsvs -d -D waa_ status

would call the status action, printing all debug messages of all WAA functions โ€” waa__init, waa__open, etc.

For more details on the other debugging options debug_output and debug_buffer please see the options list.

๐Ÿ” -N, -R -- recursion

The -N and -R switches in effect just decrement/increment a counter; the behaviour is chosen depending on that. So a command line of -N -N -N -R -R is equivalent to -3 +2 = -1, this results in -N. Math ate, honestly. ๐Ÿงฎ

๐Ÿ”‡ -q, -v -- verbose/quiet

-v/-q set/clear verbosity flags, and so give more/less output.

Please see the verbose option for more details.

โœ… -C -- checksum

-C chooses to use more change detection checks; please see the change_check option for more details.

๐ŸŽฏ -f -- filter entries

This parameter allows one to do a bit of filtering of entries, or, for some operations, modification of the work done on given entries.

It requires a specification at the end, which can be any combination of any, text, new, deleted (or removed), meta, mtime, group, mode, changed or owner; default or def use the default value.

By giving eg. the value text, with a status action only entries that are new or changed are shown; with mtime,group only entries whose group or modification time has changed are printed.

Note: please see Change detection for some more information. If an entry gets replaced with an entry of a different type (eg. a directory gets replaced by a file), that counts as deleted and new. ๐Ÿ’€

If you use -v, it's used as a any internally.

If you use the string none, it resets the bitmask to no entries shown; then you can built a new mask. So owner,none,any,none,delete would show deleted entries. If the value after all commandline parsing is none, it is reset to the default.

๐Ÿšจ -W warning=action -- set warnings

Here you can define the behaviour for certain situations that should not normally happen, but which you might encounter.

The general format here is specification = action, where specification is a string matching the start of at least one of the defined situations, and action is one of these:

  • once to print only a single warning,
  • always to print a warning message every time,
  • stop to abort the program,
  • ignore to simply ignore this situation, or
  • count to just count the number of occurrences.

If specification matches more than one situation, all of them are set; eg. for meta=ignore all of meta-mtime, meta-user etc. are ignored.

If at least a single warning that is not ignored is encountered during the program run, a list of warnings along with the number of messages it would have printed with the setting always is displayed, to inform the user of possible problems. ๐Ÿซถ

The following situations can be handled with this:

  • meta-mtime, meta-user, meta-group, meta-umask โ€” these warnings are issued if a meta-data property that was fetched from the repository couldn't be parsed. This can only happen if some other program or a user changes properties on entries. In this case you can use -Wmeta=always or -Wmeta=count, until the repository is clean again.
  • no-urllist โ€” this warning is issued if a info action is executed, but no URLs have been defined yet.
  • charset-invalid โ€” if the function nl_langinfo(3) couldn't return the name of the current character encoding, a default of UTF-8 is used. You might need that for a minimal system installation, eg. on recovery.
  • chmod-eperm, chown-eperm โ€” if you update a working copy as normal user, and get to update a file which has another owner but which you may modify, you'll get errors because neither the user, group, nor mode can be set. This way you can make the errors non-fatal.
  • chmod-other, chown-other โ€” if you get another error than EPERM in the situation above, you might find these useful.
  • mixed-rev-wc โ€” if you specify some revision number on a revert, it will complain that mixed-revision working copies are not allowed. While you cannot enable mixed-revision working copies (I'm working on that) you can avoid being told every time.
  • propname-reserved โ€” it is normally not allowed to set a property with the prop-set action with a name matching some reserved prefixes.
  • ignpat-wcbase โ€” this warning is issued if an absolute ignore pattern' does not match the working copy base directory. \n See \ref ignpat_shell_abs 'absolute shell patterns" for more details.
  • diff-status โ€” GNU diff has defined that it returns an exit code 2 in case of an error; sadly it returns that also for binary files, so that a simply fsvs diff some-binary-file text-file would abort without printing the diff for the second file. Because of this FSVS currently ignores the exit status of diff per default, but this can be changed by setting this option to eg. stop.

Also an environment variable FSVS_WARNINGS is used and parsed; it is simply a whitespace-separated list of option specifications. ๐ŸŒธ

๐Ÿ”— -u URLname[@revision[:revision]] -- select URLs

Some commands can be reduced to a subset of defined URLs; the update command is a example.

If you have more than a single URL in use for your working copy, update normally updates all entries from all URLs. By using this parameter you can tell FSVS to update only the specified URLs.

The parameter can be used repeatedly; the value can have multiple URLs, separated by whitespace or one of ,;.

fsvs up -u base_install,boot@32 -u gcc

This would get HEAD of base_install and gcc, and set the target revision of the boot URL for this command at 32. ๐ŸŽฏ

๐ŸŽ›๏ธ -o [name[=value]] -- other options

This is used for setting some seldom used option, for which default can be set in a configuration file (to be implemented, currently only command-line).

For a list of these please see Further options for FSVS..


๐Ÿšฆ Signals ๐Ÿšฆ

If you have a running FSVS, and you want to change its verbosity, you can send the process either SIGUSR1 (to make it more verbose) or SIGUSR2 (more quiet). It's giving "texting your girl mid-task" energy. ๐Ÿ“ฒ


โž• add โž•

fsvs add [-u URLNAME] PATH [PATH...]

With this command you can explicitly define entries to be versioned, even if they have a matching ignore pattern. They will be sent to the repository on the next commit, just like other new entries, and will therefore be reported as New. ๐Ÿ‘‘

The -u option can be used if you're have more than one URL defined for this working copy and want to have the entries pinned to the this URL.

๐ŸŒธ Example

Say, you're versioning your home directory, and gave an ignore pattern of ./.* to ignore all .* entries in your home-directory. Now you want .bashrc, .ssh/config, and your complete .kde3-tree saved, just like other data.

So you tell fsvs to not ignore these entries:

fsvs add .bashrc .ssh/config .kde3

Now the entries below .kde3 would match your earlier ./.* pattern (as a match at the beginning is sufficient), so you have to insert a negative ignore pattern (a take pattern):

fsvs ignore prepend t./.kde3

Now a fsvs st would show your entries as New, and the next commit will send them to the repository. Periodt. ๐Ÿ’…


๐Ÿงน unversion ๐Ÿงน

fsvs unversion PATH [PATH...]

This command flags the given paths locally as removed. On the next commit they will be deleted in the repository, and the local information of them will be removed, but not the entries themselves. So they will show up as New again, and you get another chance at ignoring them. ๐Ÿ”„

๐Ÿ“ Example

Say, you're versioning your home directory, and found that you no longer want .bash_history and .sh_history versioned. So you do

fsvs unversion .bash_history .sh_history

and these files will be reported as d (will be deleted, but only in the repository).

Then you do a

fsvs commit

Now fsvs would report these files as New, as it does no longer know anything about them; but that can be cured by

fsvs ignore './.*sh_history'

Now these two files won't be shown as New, either.

The example also shows why the given paths are not just entered as separate ignore patterns โ€” they are just single cases of a (probably) much broader pattern. ๐Ÿฆ‹

Note: if you didn't use some kind of escaping for the pattern, the shell would expand it to the actual filenames, which is (normally) not what you want. ๐Ÿ™ˆ

๐Ÿฆ‹ _build_new_list

Ok so bestie, this one is literally just for debugging โ€” it walks the whole filesystem and builds a brand-new entries file from scratch.

Do NOT use this in production, fr fr. Neither the URLs nor the revision of the entries are known, so information is lost by calling this function. It's giving data loss energy and we are not about that. ๐Ÿ’€

Go peek at sync-repos if you're curious.


๐ŸŒธ delay

This one just waits โ€” it delays execution until time has passed at least to the next second after writing the data files that FSVS uses (dir and urls).

It's built for scripts. Wherever you'd previously have used the delay option, you can now sub in this command followed by the delay command instead.

The glow-up here vs. the delay option? Read-only commands can run in the meantime. Iconic behavior honestly. โœจ

An example, bestie:

fsvs commit /etc/X11 -m 'Backup of X11'
... read-only commands, like 'status'
fsvs delay /etc/X11
... read-write commands, like 'commit'

The optional path can point to any path in the WC.

In the testing framework it's used to save a bit of time; but in normal operation, where FSVS commands aren't packed so tightly together, it's normally preferable to just use the delay option.


๐ŸŽ€ cat

fsvs cat [-r rev] path

Fetches a file from the repository and yeets it straight to STDOUT. ๐Ÿซถ

If you don't specify a revision, it defaults to BASE, i.e. the current local revision number of the entry.


๐Ÿ‘‘ checkout

fsvs checkout [path] URL [URLs...]

Sets one or more URLs for the current working directory (or for the directory path), and then does a checkout of those URLs.

Example, because examples are self-care:

fsvs checkout . http://svn/repos/installation/machine-1/trunk

So how does it know if something's a directory or not? It's decided by the result of URL-parsing โ€” if it looks like an URL, it is used as an URL.

Mind you, at most a single path is allowed; as soon as two non-URLs are found, an error message gets printed. No cap.

If no directory is given, . is used. Yes this differs from the usual subversion usage, but it might be better suited for usage as a recovery tool (where versioning / is common). Opinions welcome. ๐Ÿ’…

The given path must exist, and should be empty โ€” FSVS will abort on conflicts, i.e. if files that should be created already exist.

If there's a need to create that directory, please say so; patches for some parameter like -p are welcome. ๐Ÿ™ˆ

For a format definition of the URLs, please see the chapter Format of URLs and the urls and update commands.

Furthermore you might be interested in Using an alternate root directory and Recovery for a non-booting system.


๐Ÿ”ฅ commit

fsvs commit [-m 'message'|-F filename] [-v] [-C [-C]] [PATH [PATH ...]]

Commits (parts of) the current state of the working copy into the repository. The main character move of the whole operation, ngl.

โœจ Example โœจ

Say the working copy is /etc, and it's set up and committed already. Then /etc/hosts and /etc/inittab got modified. Since these are non-related changes, you'd like them to be in separate commits.

So you simply run these commands:

fsvs commit -m 'Added some host' /etc/hosts
fsvs commit -m 'Tweaked default runlevel' /etc/inittab

And if the current directory is /etc you could even drop the /etc/ in front and use just the filenames. Slay. ๐Ÿ’…

Please see status for explanations on -v and -C.

For advanced backup usage see also the commit-pipe property.


๐ŸŒˆ cp

fsvs cp [-r rev] SRC DEST
fsvs cp dump
fsvs cp load

The cp command marks DEST as a copy of SRC at revision rev, so that on the next commit of DEST the corresponding source path is sent as the copy source.

The default value for rev is BASE, i.e. the revision the SRC (locally) is at.

Please note that this command works always on a directory structure โ€” if you say to copy a directory, the whole structure is marked as copy. That means if some entries below the copy are missing, they're reported as removed from the copy on the next commit.

(Of course it's possible to mark files as copied too; non-recursive copies are not possible, but they can be emulated by having parts of the destination tree removed.)

Note: TODO: There will be differences in the exact usage โ€” copy will try to run the cp command, whereas copied will just remember the relation.

If this command is used without parameters, the currently defined relations get printed; please keep in mind that the key is the destination name, i.e. the 2nd line of each pair! Don't get it twisted. ๐ŸŽ€

The input format for load is newline-separated โ€” first a SRC line, followed by a DEST line, then an line with just a dot (.) as delimiter. If you've got filenames with newlines or other special characters, you have to give the paths as arguments.

Internally the paths are stored relative to the working copy base directory, and they're printed that way, too.

Later definitions are appended to the internal database; to undo mistakes, use the uncopy action.

Note: Important: User-defined properties like fsvs:commit-pipe are not copied to the destinations, because of space/time issues (traversing through entire subtrees, copying a lot of property-files) and because it's not sure that this is really wanted. TODO: option for copying properties? As subversion currently treats a rename as copy+delete, the mv command is an alias to cp.

If you have a need to give the filenames dump or load as first parameter for copyfrom relations, give some path too, as in './dump'.

Note: The source is internally stored as URL with revision number, so that operations like these $ fsvs cp a b $ rm a/1 $ fsvs ci a $ fsvs ci b work โ€” FSVS sends the old (too recent!) revision number as source, and so the local filelist stays consistent with the repository. But it is not implemented (yet) to give an URL as copyfrom source directly โ€” we'd have to fetch a list of entries (and possibly the data!) from the repository.

๐Ÿงš copyfrom-detect

fsvs copyfrom-detect [paths...]

This command tells FSVS to look through the new entries and see whether it can find some that seem to be copied from others already known.

It will output a list with source and destination path, and why it could match.

This is just for information purposes and doesn't change any FSVS state (TODO: unless some option/parameter is set). It's giving "I'm just looking, I'm not touching" energy. ๐Ÿ™ˆ

The list format is on purpose incompatible with the load syntax, as the best match normally has to be taken manually.

If verbose is used, an additional value giving the percentage of matching blocks, and the count of possibly copied entries, is printed.

Example:

$ fsvs copyfrom-list -v
newfile1
  md5:oldfileA
newfile2
  md5:oldfileB
  md5:oldfileC
  md5:oldfileD
newfile3
  inode:oldfileI
  manber=82.6:oldfileF
  manber=74.2:oldfileG
  manber=53.3:oldfileH
  ...
3 copyfrom relations found.

The abbreviations are:

  • md5 โ€” The MD5 of the new file is identical to that of one or more already committed files; there is no percentage.
  • inode โ€” The device/inode number is identical to the given known entry; this could mean that the old entry has been renamed or hardlinked. Note: Not all filesystems have persistent inode numbers (eg. NFS) โ€” so depending on your filesystems this might not be a good indicator! ๐Ÿ’€
  • name โ€” The entry has the same name as another entry.
  • manber โ€” Analysing files of similar size shows some percentage of (variable-sized) common blocks (ignoring the order of the blocks).
  • dirlist โ€” The new directory has similar files to the old directory. The percentage is (number_of_common_entries)/(files_in_dir1 + files_in_dir2 - number_of_common_entries).
Note: - manber matching is not implemented yet. - If too many possible matches for an entry are found, not all are printed; only an indicator ... is shown at the end.

๐Ÿ’œ uncp

fsvs uncopy DEST [DEST ...]

The uncopy command removes a copyfrom mark from the destination entry. This will make the entry unknown again, and it gets reported as New on the next invocations.

Only the base of a copy can be un-copied; if a directory structure was copied, and the given entry is just implicitly copied, this command will return an error. Sorry bestie, rules are rules. ๐ŸŽ€

This is not folded into revert, because it's not clear whether revert on copied, changed entries should restore the original copyfrom data or remove the copy attribute; by using another command this is no longer ambiguous. Big brain design decision tbh.

Example:

$ fsvs copy SourceFile DestFile
# Whoops, was wrong!
$ fsvs uncopy DestFile

โญ diff

fsvs diff [-v] [-r rev[:rev2]] [-R] PATH [PATH...]

This command gives you diffs between local and repository files.

With -v the meta-data is additionally printed, and changes shown.

If you don't give the revision arguments, you get a diff of the base revision in the repository (the last commit) against your current local file. With one revision, you diff that repository version against your local file. With both revisions given, the difference between those two repository versions is calculated.

You'll need the diff program, as the files are simply passed as parameters to it.

The default is to do non-recursive diffs; so fsvs diff . will output the changes in all files in the current directory and below.

The output for special files is the diff of the internal subversion storage, which includes the type of the special file, but no newline at the end of the line (which diff complains about). Not our fault, it's just dramatic. ๐Ÿ˜ญ

For entries marked as copy, the diff against the (clean) source entry is printed.

Please see also Options relating to the 'diff' action and Using colordiff.


๐ŸŒธ export

fsvs export REPOS_URL [-r rev]

If you want to export a directory from your repository without storing any FSVS-related data, you can use this command.

This restores all meta-data โ€” owner, group, access mask and modification time; its primary use is for data recovery. ๐Ÿ’–

The data gets written (in the correct directory structure) below the current working directory; if entries already exist, the export will stop, so this should be an empty directory.


๐Ÿ’ซ help

help [command]

This command shows general or specific help (for the given command). A similar function is available by using -h or -? after a command. ๐Ÿซถ

๐ŸŽ€ groups ๐ŸŽ€

fsvs groups dump|load
fsvs groups [prepend|append|at=n] group-definition [group-def ...]
fsvs ignore [prepend|append|at=n] pattern [pattern ...]
fsvs groups test [-v|-q] [pattern ...]

okay bestie so this one is literally just about adding patterns ๐Ÿ’… โ€” by default they go at the end of the pattern list, but if you say prepend they get shoved to the front instead. And with at=x they get inserted at position x, and yes the counting starts at 0 because of course it does ๐Ÿ™ˆ.

The tea between groups and ignore โ˜• โ€” groups needs you to hand it a group name, whereas ignore is the lazy queen who just assumes the default group ignore. Not her fault she's unbothered ๐Ÿ’….

For the actual spec, go read the related documentation, iykyk ๐Ÿฆ‹.

fsvs dump prints the patterns out to STDOUT โœจ. But heads up: if there are special characters like CR or LF chillin' inside a pattern without being encoded (like \r or \n), the output is gonna be straight-up garbled ๐Ÿ’€. Not a vibe.

Your patterns can include * and ? as wildcards inside one directory level, or ** for arbitrary strings โ€” she's flexible like that ๐ŸŒˆ.

Now the important part, no cap ๐Ÿซถ: these patterns are only matched against new (aka not-yet-known) files. Entries that are already versioned do not get invalidated. And if the path you gave matches a new directory, the entries below it aren't found either. But if that directory or the entries below it are already versioned, the pattern just doesn't work, because the match is restricted to the directory. Sorry babe, rules are rules ๐Ÿ’….

So like:

fsvs ignore ./tmp

ignores the directory tmp ๐ŸŽ€. But if it's already been committed, those existing entries would have to be unmarked with fsvs unversion. Normally it's way better to use:

fsvs ignore ./tmp/**

because that takes the directory itself (which you might need after a restore as a mount point anyway ๐Ÿ‘‘), but ignores all the entries below it. Currently this has the drawback that mtime changes will be reported and committed โ€” which is not the case if the whole directory is ignored. Pick your fighter ๐Ÿ˜ญ.

Examples, because we love a demonstration โœจ:

fsvs group group:unreadable,mode:4:0
fsvs group 'group:secrets,/etc/*shadow'

fsvs ignore /proc
fsvs ignore /dev/pts
fsvs ignore './var/log/*-*'
fsvs ignore './**~'
fsvs ignore './**/*.bak'
fsvs ignore prepend 'take,./**.txt'
fsvs ignore append 'take,./**.svg'
fsvs ignore at=1 './**.tmp'

fsvs group dump
fsvs group dump -v

echo './**.doc' | fsvs ignore load
# Replaces the whole list
Note: please take care that your wildcard patterns are not expanded by the shell!! ๐Ÿ™ˆ Put quotes on those babies or the shell will eat them before fsvs ever sees them.

๐ŸŒธ Testing patterns ๐ŸŒธ

To see more easily what different patterns actually do, you can use the test subcommand ๐Ÿงš. The following combinations are available:

  • fsvs groups test pattern โ€” Tests only the given pattern against all new entries in your working copy, and prints the matching paths. The pattern is not stored in the pattern list โœจ.
  • fsvs groups test โ€” Uses the already defined patterns on the new entries, and prints the group name, a tab, and the path. With -v you can see the matching pattern in the middle column too ๐Ÿ‘‘

By using -q you can avoid getting the whole list; this makes sense if you use the group_stats option at the same time ๐Ÿ’œ.


๐Ÿฆ‹ rign ๐Ÿฆ‹

fsvs rel-ignore [prepend|append|at=n] path-spec [path-spec ...]
fsvs ri [prepend|append|at=n] path-spec [path-spec ...]

ok so imagine you keep the same repository data at more than one working copy on the same machine ๐Ÿซ  โ€” it's gonna be stored in different paths, and that makes absolute ignore patterns literally infeasible. Tragic. But relative ignore patterns are anchored at the beginning of the WC root, which is a bit tiring to type if you're deep in your WC hierarchy and just wanna ignore some files ๐Ÿ˜ญ.

To make that easier you can use the rel-ignore command (abbreviated as ri ๐ŸŽ€); this converts all given path-specifications (which may include wildcards as per the shell pattern specification above โœจ) to WC-relative values before storing them.

Example for /etc as working copy root:

fsvs rel-ignore '/etc/X11/xorg.conf.*'

cd /etc/X11
fsvs rel-ignore 'xorg.conf.*'

Both commands would store the pattern ./X11/xorg.conf.* ๐Ÿ’…. Slay.

Note: This works only for shell patterns. ๐Ÿ’€

For more details about ignoring files please see the ignore command and Specification of groups and patterns ๐ŸŒˆ.


๐Ÿ‘‘ info ๐Ÿ‘‘

fsvs info [-R [-R]] [PATH...]

Use this command to show information regarding one or more entries in your working copy ๐Ÿ’–. You can use -v to obtain slightly more information โ€” highkey useful sometimes for locating bugs ๐Ÿ›, or to obtain the URL and revision a working copy is currently at.

Example:

$ fsvs info
URL: file:
....       200  .
        Type:           directory
        Status:         0x0
        Flags:          0x100000
        Dev:            0
        Inode:          24521
        Mode:           040755
        UID/GID:        1000/1000
        MTime:          Thu Aug 17 16:34:24 2006
        CTime:          Thu Aug 17 16:34:24 2006
        Revision:       4
        Size:           200

The default is to print information about the given entry only ๐ŸŽ€. With a single -R you'll get this data about all entries of a given directory; with another -R you'll get the whole (sub-)tree ๐Ÿ‘‘. Double the R, double the lore.


โญ log โญ

fsvs log [-v] [-r rev1[:rev2]] [-u name] [path]

This command views the revision log information associated with the given path at its topmost URL, or, if none is given, the highest priority URL ๐Ÿ’….

The optional rev1 and rev2 can be used to restrict the revisions that are shown โœจ; if no values are given, the logs are given starting from HEAD downwards, and then a limit on the number of revisions is applied (but see the limit option ๐Ÿ‘€).

If you use the -v -option, you get the files changed in each revision printed, too ๐Ÿซถ.

There is an option controlling the output format; see the log_output option ๐ŸŽ€.

Optionally the name of an URL can be given after -u; then the log of this URL, instead of the topmost one, is shown ๐ŸŒธ.

TODOs:

  • --stop-on-copy
  • Show revision for all URLs associated with a working copy? In which order? ๐Ÿค”

๐Ÿ’œ prop-get ๐Ÿ’œ

fsvs prop-get PROPERTY-NAME PATH...

Prints the data of the given property to STDOUT โœจ.

Note: Be careful!! This command will dump the property as it is, ie. with any special characters!! ๐Ÿ’€ If there are escape sequences or binary data in the property, your terminal might get messed up!! ๐Ÿ˜ญ

If you want a safe way to look at the properties, use prop-list with the -v parameter ๐Ÿซถ. Trust, it's the move.


๐Ÿ“ prop-set ๐Ÿ“

fsvs prop-set [-u URLNAME] PROPERTY-NAME VALUE PATH...

This command sets an arbitrary property value for the given path(s) ๐Ÿ’….

Note: Some property prefixes are reserved; currently everything starting with svn: throws a (fatal) warning ๐Ÿ˜ฑ, and fsvs: is already used, too. See Special property names.

If you're using a multi-URL setup, and the entry you'd like to work on should be pinned to a specific URL, you can use the -u parameter ๐ŸŽ€; this is like the add command, see there for more details.


๐Ÿ’… prop-del ๐Ÿ’…

fsvs prop-del PROPERTY-NAME PATH...

This command removes a property for the given path(s) โœจ. See also prop-set.


๐ŸŒˆ prop-list ๐ŸŒˆ

fsvs prop-list [-v] PATH...

Lists the names of all properties for the given entry ๐Ÿ‘‘.

With -v, the value is printed as well ๐ŸŽ€; special characters will be translated, as arbitrary binary sequences could interfere with your terminal settings ๐Ÿ’€.

If you need raw output, post a patch for --raw, or write a loop with prop-get ๐Ÿซถ. DIY era.


โœจ remote-status โœจ

fsvs remote-status PATH [-r rev]

This command looks into the repository and tells you which files would get changed on an update ๐Ÿฆ‹ โ€” it's a dry-run for update ๐Ÿ’….

Per default it compares to HEAD, but you can choose another revision with the -r parameter โญ.

Please see the update documentation for details regarding multi-URL usage ๐ŸŒธ.


๐Ÿงš resolve ๐Ÿงš

fsvs resolve PATH [PATH...]

When FSVS tries to update local files which have been changed, a conflict might occur ๐Ÿ˜ญ. (For various ways of handling these please see the conflict option.)

This command lets you mark such conflicts as resolved โœ…. Closure, finally, we love to see it ๐Ÿ’–.

revert ๐Ÿ’…

fsvs revert [-rRev] [-R] PATH [PATH...]

okay so this one is the undo button, bestie. It walks back your local modifications, and here's exactly what that means in every case:

  • An entry that's marked to be unversioned gets this flag removed.
  • For an already versioned entry (one that exists in the repository) the local entry gets replaced with its repository version, and its status and flags are cleared. fresh start energy โœจ
  • An entry that is a modified copy destination gets reverted to the copy source data.
  • Manually added entries get changed back to 'N'ew.
Please note that implicitly copied entries โ€” i.e. entries marked as copied because some parent directory is the base of a copy โ€” can not be un-copied ๐Ÿ˜ญ. They can only be reverted to their original (copied-from) data, or removed.

If you want to undo a copy operation, please see the uncopy command. See also HOWTO: Understand the entries' statii.

If a directory is given on the command line, all versioned entries in this directory are reverted to the old state; this behaviour can be modified with -R/-N, or see below ๐Ÿซถ

The reverted entries are printed, along with the status they had before the revert (because the new status is per definition unchanged). ๐Ÿ’–

If a revision is given, the entries' data is taken from this revision; furthermore, the new status of that entry is shown. revision glow-up โœจ

Note: Please note that mixed revision working copies are not (yet) possible; the BASE revision is not changed, and a simple revert without a revision argument gives you that. By giving a revision parameter you can just choose to get the text from a different revision.

Difference to update ๐Ÿฆ‹

If something doesn't work as it should in the installation you can revert entries until you are satisfied, and directly commit the new state. so chill, so flexible

In contrast, if you update to an older version, you:

  • cannot choose single entries (no mixed revision working copies yet),
  • and you cannot commit the old version with changes, as the 'skipped' (later) changes will create conflicts in the repository. ๐Ÿ’€

Currently only known entries are handled. ๐ŸŒธ

If you need a switch (like --delete in rsync(1)) to remove unknown (new, not yet versioned) entries, to get the directory in the exact state it is in the repository, please tell the dev@ mailing list. they want your feedback, fr fr

Removed directory structures ๐ŸŽ€

If a path is specified whose parent is missing, fsvs complains. We plan to provide a switch (probably -p), which would create (a sparse) tree up to this entry. future feature arc

Recursive behaviour ๐Ÿ’ซ

When the user specifies a non-directory entry (file, device, symlink), this entry is reverted to the old state. Simple. Iconic.

If the user specifies a directory entry, these definitions should apply:

  • -N โ€” this directory only (meta-data)
  • none โ€” this directory, and direct children of the directory
  • -R โ€” this directory, and the complete tree below

pick your fighter ๐Ÿ‘‘

Working with copied entries ๐Ÿงš

If an entry is marked as copied from another entry (and not committed!), a revert will fetch the original copyfrom source. To undo the copy setting use the uncopy command. ๐Ÿ’œ


status ๐Ÿ”ฅ

fsvs status [-C [-C]] [-v] [-f filter] [PATHs...]

This command shows the entries that have been changed locally since the last commit. the receipts, basically ๐Ÿงพ

The most important output formats are:

  • A status column of four (or, with -v, six) characters. There are either flags or a . printed, so that it's easily parsed by scripts โ€” the number of columns is only changed by -q, -v โ€” verbose/quiet.
  • The size of the entry, in bytes, or dir for a directory, or dev for a device.
  • The path and name of the entry, formatted by the path option.

Normally only changed entries are printed; with -v all are printed, but see the filter option for more details. โœจ

The status column can show the following flags:

  • 'D' and 'N' are used for deleted and new entries.
  • 'd' and 'n' are used for entries which are to be unversioned or added on the next commit; the characters were chosen as little delete (only in the repository, not removed locally) and little new (although ignored). See add and unversion. If such an entry does not exist, it is marked with an ! in the last column โ€” because it has been manually marked, and so the removal is unexpected. ๐Ÿ˜ญ
  • A changed type (character device to symlink, file to directory etc.) is given as 'R' (replaced), i.e. as removed and newly added.
  • If the entry has been modified, the change is shown as 'C'. If the modification or status change timestamps (mtime, ctime) are changed, but the size is still the same, the entry is marked as possibly changed (a question mark ? in the last column) โ€” but see change detection for details. ๐Ÿ‘€
  • A 'x' signifies a conflict. ๐Ÿ’ฅ
  • The meta-data flag 'm' shows meta-data changes like properties, modification timestamp and/or the rights (owner, group, mode); depending on the -v/-q command line parameters, it may be split into 'P' (properties), 't' (time) and 'p' (permissions). If 'P' is shown for the non-verbose case, it means only property changes, i.e. the entries filesystem meta-data is unchanged.
  • A '+' is printed for files with a copy-from history; to see the URL of the copyfrom source, see the verbose option.

Here's a table with the characters and their positions:

*   Without -v    With -v
*     ....         ......
*     NmC?         NtpPC?
*     DPx!         D   x!
*     R  +         R    +
*     d            d
*     n            n
*

Furthermore please take a look at the stat_color option, and for more information about displayed data the verbose option. ๐ŸŒˆ


sync-repos ๐ŸŒŸ

fsvs sync-repos [-r rev] [working copy base]

This command loads the file list afresh from the repository. ๐Ÿฆ‹

A following commit will send all differences and make the repository data identical to the local. full resync energy

This is normally not needed; the only use cases are:

  • debugging and
  • recovering from data loss in the $FSVS_WAA area. ๐Ÿ˜ญ

It might be of use if you want to backup two similar machines. Then you could commit one machine into a subdirectory of your repository, make a copy of that directory for another machine, and sync this other directory on the other machine. ๐Ÿ’ป๐Ÿ’ป

A commit then will transfer only _changed_ files; so if the two machines share 2GB of binaries (/usr, /bin, /lib, ...) then these 2GB are still shared in the repository, although over time they will deviate (as both committing machines know nothing of the other path with identical files). storage efficiency queen ๐Ÿ‘‘

This kind of backup could be substituted by two or more levels of repository paths, which get overlaid in a defined priority. So the base directory, which all machines derive from, will be committed from one machine, and it's no longer necessary for all machines to send identical files into the repository.

The revision argument should only ever be used for debugging; if you fetch a filelist for a revision, and then commit against later revisions, problems are bound to occur. do not do this casually bestie
Note: There's issue 2286 in subversion which describes sharing identical files in the repository in unrelated paths. By using this relaxes the storage needs; but the network transfers would still be much larger than with the overlaid paths.

update ๐Ÿš€

fsvs update [-r rev] [working copy base]
fsvs update [-u url@rev ...] [working copy base]

This command does an update on the current working copy; per default for all defined URLs, but you can restrict that via -u. โœจ

It first reads all filelist changes from the repositories, overlays them (so that only the highest-priority entries are used), and then fetches all necessary changes. overlay then fetch, the whole routine ๐Ÿ’…

Updating to zero ๐Ÿ•ณ๏ธ

If you start an update with a target revision of zero, the entries belonging to that URL will be removed from your working copy, and the URL deleted from your URL list. poof โœจ

This is a convenient way to replace an URL with another. ๐ŸŽ€

Note: As FSVS has no full mixed revision support yet, it doesn't know whether under the removed entry is a lower-priority one with the same path, which should get visible now. Directories get changed to the highest priority URL that has an entry below (which might be hidden!).

Because of this you're advised to either use that only for completely distinct working copies, or do a sync-repos (and possibly one or more revert calls) after the update. ๐Ÿซถ


urls ๐Ÿ’–

fsvs urls URL [URLs...]
fsvs urls dump
fsvs urls load

Initializes a working copy administrative area and connects the current working directory to REPOS_URL. All commits and updates will be done to this directory and against the given URL. the setup ritual โœจ

Example:

fsvs urls http://svn/repos/installation/machine-1/trunk

For a format definition of the URLs please see the chapter Format of URLs. ๐ŸŒธ

Note: If there are already URLs defined, and you use that command later again, please note that as of 1.0.18 the older URLs are not overwritten as before, but that the new URLs are appended to the given list! If you want to start afresh, use something like
true | fsvs urls load

Loading URLs ๐Ÿ“ฅ

You can load a list of URLs from STDIN; use the load subcommand for that. ๐Ÿงš

Example:

( echo 'N:local,prio:10,http://svn/repos/install/machine-1/trunk' ;
    echo 'P:50,name:common,http://svn/repos/install/common/trunk' ) |
  fsvs urls load

Empty lines are ignored. so forgiving ๐Ÿ’œ

Dumping the defined URLs ๐Ÿ“ค

To see which URLs are in use for the current WC, you can use dump. ๐Ÿ”

As an optional parameter you can give a format statement:

  • p โ€” priority
  • n โ€” name
  • r โ€” current revision
  • t โ€” target revision
  • R โ€” readonly-flag
  • u โ€” URL
  • I โ€” internal number for this URL
Note: That's not a real printf()-format; only these and a few \ sequences are recognized.

Example:

fsvs urls dump '  %u %n:%p\n'
  http://svn/repos/installation/machine-1/trunk local:10
  http://svn/repos/installation/common/trunk common:50

The default format is 'name:%n,prio:%p,target:%t,ro:%r,%u\\n'; for a more readable version you can use -v. โœจ

Loading URLs ๐Ÿ› ๏ธ

You can change the various parameters of the defined URLs like this:

# Define an URL
fsvs urls name:url1,target:77,readonly:1,http://anything/...
# Change values
fsvs urls name:url1,target:HEAD
fsvs urls readonly:0,http://anything/...
fsvs urls name:url1,prio:88,target:32
Note: FSVS as yet doesn't store the whole tree structures of all URLs. So if you change the priority of an URL, and re-mix the directory trees that way, you'll need a sync-repos and some revert commands. I'd suggest to avoid this, until FSVS does handle that case better. lowkey chaotic, tbh ๐Ÿ’€

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Bestie, nobody hand-wrote this one. It was Generated automatically by Doxygen for fsvs from the source code. โœจ So likeโ€ฆ the robot wrote it about itself. Main character energy fr fr. ๐Ÿ’…


And that's a wrap, gorgeous. ๐ŸŽ€ You just read the whole FSVS - fast versioning tool(1) page, Version trunk:2424, dated 11 Mar 2010.

Go version something. Go commit something. Go be iconic. ๐Ÿฆ‹ Periodt. ๐Ÿ’–