Porjay

Porjay
Login

Porjay

Porjay is a distributed version control system with code hosting built in: commits, branches, sync, plus a web interface with timeline, wiki, tickets (issues), forum and chat. It is one self-contained executable, and each repository is one file.

Porjay is a fork of Fossil SCM 2.28 by D. Richard Hipp and contributors, used under the BSD 2-Clause license (see COPYRIGHT-BSD2.txt). Hosted service: https://porjay.labmirai.org.

Quick start

porjay clone https://porjay.labmirai.org/USER/REPO repo.porjay   # get a project
mkdir repo && cd repo && porjay open ../repo.porjay             # check it out
porjay add FILE...                                              # stage new files
porjay commit -m "message"                                      # commit (auto-pushes)
porjay pull / porjay push / porjay sync                         # move changes
porjay ui                                                       # local web UI

Coming from git: init, clone, add, commit, push, pull, status, diff, branch and stash work much as you expect; log is porjay timeline, and switching branches is porjay update BRANCH. Commits auto-sync to the remote by default (setting autosync). When cloning with a password in the URL, answer "yes" to remember password (or pass --save-http-password), so later pushes don't ask.

Building

Requirements: a C compiler, make, zlib, and OpenSSL for https:// (brew install openssl@3 on macOS, apt install libssl-dev on Debian/Ubuntu).

./configure            # add --with-openssl=none for an HTTP-only build
make                   # produces ./porjay
sh test/porjay-smoke.sh ./porjay [/path/to/fossil]   # smoke test

Out-of-tree builds work too: mkdir build && cd build && ../configure && make.

What Porjay changes relative to Fossil

Everything a user sees or types is Porjay; internals and wire formats stay Fossil-compatible, so Porjay and Fossil can clone, push and pull to and from each other.

Item Fossil Porjay
Executable fossil porjay
Repository file *.fossil *.porjay
Check-out database .fslckout / _FOSSIL_ .pjyckout / _PORJAY_
Versioned settings .fossil-settings/ .porjay-settings/
Global config ~/.fossil, ~/.config/fossil.db ~/.porjay, ~/.config/porjay.db
Environment variables FOSSIL_HOME, FOSSIL_USER, ... PORJAY_HOME, PORJAY_USER, ...
Remote command (ssh/patch) --fossilcmd, ?fossil= --porjaycmd, ?porjay= (old names still accepted)
Version 2.28 1.0.0, "based on Fossil 2.28"

Deliberately unchanged: the sync protocol (application/x-fossil), artifact and wiki formats, the JSON API, C identifiers, the window.fossil JS namespace, and links to the upstream documentation in www/ (which applies to Porjay as written: read fossil as porjay). Windows build files still use upstream naming. Upstream's Tcl test suite (test/tester.tcl) is disabled upstream; test/porjay-smoke.sh covers what the rebrand touches.

Repository layout and history

Release builds and deploying porjay.labmirai.org

Release binaries go in dist/ (ignored by version control):

Deploy (details in hub/README.md):

bash hub/deploy/deploy-bdren.sh      # hub + binaries + PM2, no sudo needed
ssh -t -i ~/Desktop/Development/mirai/bdren.pem -p 2222 [email protected] \
    'bash ~/porjay/hub/deploy/install-nginx-porjay.sh'   # once: nginx + TLS (asks for sudo)

Updating to a new Fossil release

  1. porjay update upstream-fossil-2.28 then create a branch upstream (first time only) and replace the tree with the new pristine release; commit it on upstream with tag upstream-fossil-X.Y.
  2. porjay update trunk && porjay merge upstream.
  3. Run python3 tools/porjay-rebrand.py, rebuild, run the smoke test, review porjay diff, then commit.