arean / Porjay Public

Porjay: distributed version control and code hosting, built on Fossil SCM

Help: patch

The "patch" command:

Usage: porjay patch SUBCOMMAND ?ARGS ..?

This command is used to create, view, and apply Porjay binary patches. A Porjay binary patch is a single (binary) file that captures all of the uncommitted changes of a check-out. Use Porjay binary patches to transfer proposed or incomplete changes between machines for testing or analysis.

porjay patch alias add|rm|ls|list ?ARGS?

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:
... add ALIAS REMOTE-CHECKOUT
Add ALIAS as an alias for REMOTE-CHECKOUT.
... ls|list
List all local aliases.
... rm ALIAS [ALIAS...]
Remove named aliases
... rm --all
Remove all aliases

porjay patch create [DIRECTORY] PATCHFILE

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

porjay patch apply [DIRECTORY] PATCHFILE

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

porjay patch diff [DIRECTORY] PATCHFILE
porjay patch gdiff [DIRECTORY] PATCHFILE

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 "porjay help diff" apply. With gdiff, gdiff-command is used instead of internal diff logic. In addition:
-f|--force
Continue trying to perform the diff even if baseline information is missing from the current repository

porjay patch push REMOTE-CHECKOUT

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 porjay executable on the remote host is specified by the --fossilcmd option, or if there is no --porjaycmd, it first tries "$HOME/bin/fossil" and if not found there it searches for any executable named "porjay" on the default $PATH set by SSH on the remote.

Command-line 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.
--porjaycmd EXE
Name of the "porjay" executable on the remote
-n|--dry-run
Do nothing, but print what would have happened
-v|--verbose
Extra output explaining what happens

porjay patch pull REMOTE-CHECKOUT

Like "porjay patch push" except that the transfer is from remote to local. All the same command-line options apply.

porjay patch view PATCHFILE

View a summary of the changes in the binary patch in PATCHFILE. Use "porjay patch diff" for detailed patch content.
-v|--verbose
Show extra detail about the patch