patch¶
vb patch SUBCOMMAND [ARGS ..]
Description¶
This command is used to create, view, and apply VisionByte binary patches. A VisionByte binary patch is a single (binary) file that captures all of the uncommitted changes of a check-out. Use VisionByte binary patches to transfer proposed or incomplete changes between machines for testing or analysis.
Manage remote-name aliases, which act as short-form equivalents to REMOTE-CHECKOUT strings. Aliases are local to a given repository and do not sync.
Subcommands¶
vb patch alias add¶
vb patch alias add ALIAS REMOTE-CHECKOUT
Description¶
Add remote-name aliases, which act as short-form equivalents to REMOTE-CHECKOUT strings. Aliases are local to a given repository and do not sync.
vb patch alias ls (alias list)¶
vb patch alias ls|list
Description¶
List all local aliases.
vb patch alias rm¶
vb patch alias rm {ALIAS...|--all}
Description¶
Remove named aliases or all aliases if –all is specified.
vb patch create¶
vb patch create [DIRECTORY] PATCHFILE
Description¶
Create a new binary patch in PATCHFILE that captures all uncommitted
changes in the check-out at DIRECTORY, or the current directory if
DIRECTORY is omitted. If PATCHFILE is - then the binary patch
is written to standard output.
Options¶
- -f, --force¶
Overwrite an existing patch with the same name
vb patch apply¶
vb patch apply [DIRECTORY] PATCHFILE
Description¶
Apply the changes in PATCHFILE to the check-out at DIRECTORY, or in the current directory if DIRECTORY is omitted.
Options¶
- -f, --force¶
Apply the patch even though there are unsaved changes in the current check-out. Unsaved changes are reverted and permanently lost.
- -n, --dry-run¶
Do nothing, but print what would have happened
- -v, --verbose¶
Extra output explaining what happens
vb patch diff (gdiff)¶
vb patch diff|gdiff [DIRECTORY] PATCHFILE
Description¶
Show a human-readable diff for the patch in PATCHFILE and associated
with the repository checked out in DIRECTORY. The current
directory is used if DIRECTORY is omitted. All the usual
diff flags described at vb help diff apply. With gdiff,
gdiff-command is used instead of internal diff logic.
Options¶
- -f, --force¶
Continue trying to perform the diff even if baseline information is missing from the current repository
vb patch push¶
vb patch push REMOTE-CHECKOUT
Description¶
Create a patch for the current check-out, transfer that patch to a remote machine (using ssh) and apply the patch there. The REMOTE-CHECKOUT is in one of the following formats:
* DIRECTORY
* HOST:DIRECTORY
* USER@HOST:DIRECTORY
The name of the vb executable on the remote host is specified
by the –vbcmd option, or if there is no –vbcmd, it first
tries $HOME/bin/vb and if not found there it searches for any
executable named vb on the default $PATH set by SSH on the
remote.
Options¶
- -f, --force¶
Apply the patch even though there are unsaved changes in the current check-out. Unsaved changes will be reverted and then the patch is applied.
- --vbcmd EXE¶
Name of the
vbexecutable on the remote
- -n, --dry-run¶
Do nothing, but print what would have happened
- -v, --verbose¶
Extra output explaining what happens
vb patch pull¶
vb patch pull REMOTE-CHECKOUT
Description¶
Like vb patch push except that the transfer is from remote
to local. All the same command-line options apply.
vb patch view¶
vb patch view PATCHFILE
Description¶
View a summary of the changes in the binary patch in PATCHFILE.
Use vb patch diff for detailed patch content.
Options¶
- -v, --verbose¶
Show extra detail about the patch
Examples¶
Stage a change without committing and create a patch
$ vb patch create patch1.vbpch
View patch summary
$ vb patch view patch1.vbpch
BASELINE 8dba02e927cb57546480940ad18bf5832489e2d23d3494c673454a731eb408d6
NEW draft.txt
Show human-readable diff of the patch
$ vb patch diff patch1.vbpch
ADDED draft.txt
Index: draft.txt
==================================================================
--- /dev/null
+++ draft.txt
@@ -0,0 +1,1 @@
+draft