Skip to main content

Two-column web-based git difftool

Project description

Build Status

git webdiff

Two-column web-based git difftool.

Features include:

  • Side-by-side (two column) diff view
  • Runs in the browser of your choice on any platform.
  • Syntax highlighting via highlight.js
  • Step back and forth through multiple files in a single diff
  • Rich support for image diffs

Screenshot of webdiff in action

Screenshot of image diffs

Installation

pip install webdiff

Usage

Instead of running "git diff", run:

git webdiff

You can also start webdiff via:

git webdiff [args]

You can pass all the same arguments that you would to git diff, e.g. 1234..5678 or HEAD.

webdiff can also be invoked directly to diff two directories or files:

webdiff <left_dir> <right_dir>
webdiff <left_file> <right_file>

You can also use webdiff to view GitHub pull requests:

webdiff https://github.com/owner/repo/pull/123
webdiff #123  # if you're in a git repo with a github remote

This will download the files relevant to the Pull Request and run webdiff.

If you run into GitHub API quota limits or you'd like to use webdiff with private repos, you can set your credentials in a .githubrc file:

user.login: yourusername
user.token: your-personal-access-tokens

Make sure you chmod this file to only be readable by yourself. You can generate a personal access token for webdiff via github.com → profile → Settings → Personal access tokens. Make sure to grant all the "repo" privileges.

Development

(from an activated virtualenv)

pip install -r requirements.txt
cd ts
yarn
webpack

Then from the root directory:

./webdiff/app.py testdata/dygraphsjs/{left,right}

or to launch in debug mode:

./test.sh $(pwd)/../testdata/webdiffdiff/{left,right}

(or any other directory in testdata)

To run the Python tests:

nosetests

To run the JavaScript tests:

python -m SimpleHTTPServer
open tests/runner.html

To iterate on the PyPI package, run:

# from outside the webdiff virtualenv:
pip uninstall webdiff

# from inside the webdiff virtualenv, adjust for current version
python setup.py sdist
mkdir /tmp/webdiff-test
cp dist/webdiff-X.Y.Z.tar.gz /tmp/webdiff-test

deactivate
cd /tmp/webdiff-test
pip install webdiff-X.Y.Z.tar.gz

To publish to pypitest:

pip install --upgraede wheel setuptools twine
python setup.py sdist bdist_wheel
twine upload -r testpypi dist/*

And to the real pypi:

twine upload dist/*

See pypirc docs for details on setting up ~/.pypirc.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webdiff-0.15.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

webdiff-0.15.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file webdiff-0.15.0.tar.gz.

File metadata

  • Download URL: webdiff-0.15.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for webdiff-0.15.0.tar.gz
Algorithm Hash digest
SHA256 70c3b6f137f0d7e6a7a3e79cb80b2cc486f2742db9028cd16226a6ef92f66956
MD5 fae62363828a92446bf3614ca7a74a60
BLAKE2b-256 174823126eb1f9588a8ae8075a6287d11cec8ff351d4753e6de5e714a40eec1b

See more details on using hashes here.

File details

Details for the file webdiff-0.15.0-py3-none-any.whl.

File metadata

  • Download URL: webdiff-0.15.0-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for webdiff-0.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e39be710122190f23c46a2ae40fcc3270359ddafb0beed4cc008c492b032eb8a
MD5 7f623da1d6c51f5e003c1bb15ee010f7
BLAKE2b-256 6770a6129cf211e0a84ead2e1471b43a927852271fce41ac941233b023d37075

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page