{ "info": { "author": "Matthew Wang", "author_email": "mattwyl(@)gmail(.)com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "Cdiff\n=====\n\n.. image:: https://travis-ci.org/ymattw/cdiff.png?branch=master\n :target: https://travis-ci.org/ymattw/cdiff\n :alt: Build status\n\nTerm based tool to view *colored*, *incremental* diff in a *Git/Mercurial/Svn*\nworkspace or from stdin, with *side by side* and *auto pager* support. Requires\npython (>= 2.5.0) and ``less``.\n\n.. image:: https://raw.github.com/ymattw/cdiff/gh-pages/img/default.png\n :alt: default\n :align: center\n\n.. image:: https://raw.github.com/ymattw/cdiff/gh-pages/img/side-by-side.png\n :alt: side by side\n :align: center\n :width: 900 px\n\nInstallation\n------------\n\nInstall with pip\n~~~~~~~~~~~~~~~~\n\nCdiff is already listed on `PyPI`_, you can install with ``pip`` if you have\nthe tool.\n\n.. _PyPI: http://pypi.python.org/pypi/cdiff\n\n.. code-block:: bash\n\n pip install --upgrade cdiff\n\nInstall with setup.py\n~~~~~~~~~~~~~~~~~~~~~\n\nYou can also run the setup.py from the source if you don't have ``pip``.\n\n.. code-block:: bash\n\n git clone https://github.com/ymattw/cdiff.git\n cd cdiff\n ./setup.py install\n\nInstall with Homebrew\n~~~~~~~~~~~~~~~~~~~~~\n\nYou can also install with Homebrew on Mac. (Thanks to `@josa42`_,\n`@bfontaine`_, `@hivehand`_ and `@nijikon`_ for contributing to the Homebrew\n`Formula`_).\n\n.. _`@josa42`: https://github.com/josa42\n.. _`@bfontaine`: https://github.com/bfontaine\n.. _`@hivehand`: https://github.com/hivehand\n.. _`@nijikon`: https://github.com/nijikon\n.. _`Formula`: https://github.com/Homebrew/homebrew-core/blob/master/Formula/cdiff.rb\n\n.. code-block:: bash\n\n brew install cdiff\n\nDownload directly\n~~~~~~~~~~~~~~~~~\n\nJust save `cdiff.py`_ to whatever directory which is in your ``$PATH``, for\nexample, ``$HOME/bin`` is in my ``$PATH``, so I save the script there and name\nas ``cdiff``.\n\n.. _`cdiff.py`: https://raw.github.com/ymattw/cdiff/master/cdiff.py\n\n.. code-block:: bash\n\n curl -ksSL https://raw.github.com/ymattw/cdiff/master/cdiff.py > ~/bin/cdiff\n chmod +x ~/bin/cdiff\n\nUsage\n-----\n\nType ``cdiff -h`` to show usage::\n\n $ cdiff -h\n Usage: cdiff [options] [file|dir ...]\n\n View colored, incremental diff in a workspace or from stdin, with side by side\n and auto pager support\n\n Options:\n --version show program's version number and exit\n -h, --help show this help message and exit\n -s, --side-by-side enable side-by-side mode\n -w N, --width=N set text width for side-by-side mode, 0 for auto\n detection, default is 80\n -l, --log show log with changes from revision control\n -c M, --color=M colorize mode 'auto' (default), 'always', or 'never'\n\n Note:\n Option parser will stop on first unknown option and pass them down to\n underneath revision control. Environment variable CDIFF_OPTIONS may be\n used to specify default options that will be placed at the beginning\n of the argument list.\n\nRead diff from local modification in a *Git/Mercurial/Svn* workspace (output\nfrom e.g. ``git diff``, ``svn diff``):\n\n.. code-block:: bash\n\n cd proj-workspace\n cdiff # view colored incremental diff\n cdiff -s # view side by side, use default text width 80\n cdiff -s -w 90 # use text width 90 other than default 80\n cdiff -s -w 0 # auto set text width based on terminal size\n cdiff -s file1 dir2 # view modification of given files/dirs only\n cdiff -s -w90 -- -U10 # pass '-U10' to underneath revision diff tool\n cdiff -s -w90 -U10 # '--' is optional as it's unknown to cdiff\n cdiff -s --cached # show git staged diff (git diff --cached)\n cdiff -s -r1234 # show svn diff to revision 1234\n\nRead log with changes in a *Git/Mercurial/Svn* workspace (output from e.g.\n``git log -p``, ``svn log --diff``), note *--diff* option is new in svn 1.7.0:\n\n.. code-block:: bash\n\n cd proj-workspace\n cdiff -l # read log along with changes\n cdiff -ls # equivalent to cdiff -l -s, view side by side\n cdiff -ls -w90 # set text width 90 as well\n cdiff -ls file1 dir2 # see log with changes of given files/dirs only\n\nEnvironment variable ``CDIFF_OPTIONS`` may be used to specify default options\nthat will be placed at the beginning of the argument list, for example:\n\n.. code-block:: bash\n\n export CDIFF_OPTIONS='-s -w0'\n cdiff foo # equivalent to \"cdiff -s -w0 foo\"\n\nIf you feel more comfortable with a command such as ``git cdiff`` to trigger\nthe cdiff command, you may symlink the executable to one named ``git-cdiff``\nas follows:\n\n.. code-block:: bash\n\n cdiff_dir=$(dirname $(which cdiff))\n ln -s \"${cdiff_dir}/cdiff\" \"${cdiff_dir}/git-cdiff\"\n\nPipe in a diff:\n\n.. code-block:: bash\n\n git log -p -2 | cdiff # view git log with changes of last 2 commits\n git show 15bfa | cdiff -s # view a given git commit, side by side\n svn diff -r1234 | cdiff -s # view svn diff comparing to given revision\n diff -u file1 file2 | cdiff # view diff between two files (note the '-u')\n diff -ur dir1 dir2 | cdiff # view diff between two dirs\n\n # View diff in a GitHub pull request, side by side\n curl https://github.com/ymattw/cdiff/pull/11.diff | cdiff -s\n\n # View a patch file in unified or context format, the latter depends on\n # command `filterdiff` from package `patchutils` which is available in\n # major Linux distros and MacPorts.\n #\n cdiff -s < foo.patch\n\nRedirect output to another patch file is safe:\n\n.. code-block:: bash\n\n svn diff -r PREV | cdiff -s > my.patch\n\nNotes\n-----\n\nCdiff has following known issues:\n\n- Does not recognize `normal` diff, and depends on ``filterdiff`` (patchutils)\n to read `context` diff\n- Side by side mode has alignment problem for wide chars\n- Terminal might be in a mess on exception (type ``reset`` can fix it)\n\nPull requests are very welcome, please make sure your changes can pass unit\ntests and regression tests by run ``make test`` (required tool *coverage* can\nbe installed with ``pip install coverage``). Also watch out `travis build`_\nafter push, make sure it passes as well.\n\n.. _`travis build`: https://travis-ci.org/ymattw/cdiff/pull_requests\n\nSee also\n--------\n\nI have another tool `coderev`_ which generates side-by-side diff pages for code\nreview from two given files or directories, I found it's not easy to extend to\nsupport git so invented `cdiff`. Idea of ansi color markup is also from\nproject `colordiff`_.\n\n.. _coderev: https://github.com/ymattw/coderev\n.. _colordiff: https://github.com/daveewart/colordiff\n\n.. vim:set ft=rst et sw=4 sts=4 tw=79:\n\nChange log\n==========\n\nVersion 1.0 (2016-12-31)\n\n - Use environment variable ``CDIFF_OPTIONS`` to hold default options\n\nVersion 0.9.8 (2016-01-16)\n\n - More robust parser to tolerate evil unified diff\n\nVersion 0.9.7 (2015-04-24)\n\n - Fix unexpected side-by-side output for diff of diff\n - Better color to work with solarized color scheme\n\nVersion 0.9.6 (2014-06-20)\n\n - Fix TypeError exception in auto width logic\n\nVersion 0.9.5 (2014-06-19)\n\n - Option ``--width 0`` now fits terminal size automatically\n - Enable smooth horizontal scrolling with less option ``--shift 1``\n\nVersion 0.9.4 (2014-06-04)\n\n - Respect the ``LESS`` environment variable\n - Support python 3.4\n - Fix curl options in document\n\nVersion 0.9.3 (2013-09-28)\n\n - Moved screenshots to 'gh-pages' branch\n - Handle all keyboard interrupts more completely\n - Explicitly set default encoding to utf-8\n - Fixed broken output diff when I/O with filterdiff in nonblocking mode\n\nVersion 0.9.2 (2013-06-21)\n\n - Enahanced option parser now pass unknown option to underneath revision\n control, user can use ``cdiff --cached``, ``cdiff -U5`` directly\n\nVersion 0.9.1 (2013-05-20)\n\n - Use ``--no-ext-diff`` to disable GIT_EXTERNAL_DIFF and diff.external which\n might break cdiff output\n\nVersion 0.9 (2013-03-23)\n\n - Supports reading context diff via ``filterdiff`` (patchutils)\n - Fixed a diff parser bug which misread git commit message as common line\n - Lots of code refactor\n\nVersion 0.8 (2013-03-13)\n\n - Parser is now robust enough to handle dangling headers and short patch\n - PEP8 (with minor own flavors) and other code lint\n - Change 'Development Status' to stable\n\nVersion 0.7.1 (2013-02-25)\n\n - Handle 'Binary files ... differ'\n - Document update for known issues\n\nVersion 0.7 (2013-02-23)\n\n - Support reading diff or log for given files/dirs in workspace\n - Support diff generated from ``diff -ru dir1 dir2``\n - Usage change: reading a patch and comparing two files need stdin redirect\n\nVersion 0.6 (2013-02-20)\n\n - A few performance tuning and code clean up\n - Add unit test cases with coverage 70%\n - Show merge history in svn log\n\nVersion 0.5.1 (2013-02-19)\n\n - Fixed incorrect yield on diff missing eof\n - Fixed a bug in diff format probe\n - Handle keyboard interrupt and large diffs in non-color mode\n - Code clean up\n\nVersion 0.5 (2013-02-18)\n\n - Support read output from ``svn diff --log`` and ``hg log -p``\n - Streamline reading large patch set\n - New ``--log (-l)`` option to read revision control diff log (thanks to\n `Steven Myint`_)\n\nVersion 0.4 (2013-02-16)\n\n - New option *-c WHEN* (*--color WHEN*) to support auto test\n - Auto regression test now on Travis\n\nVersion 0.3 (2013-02-07)\n\n - Support compare two files (wrapper of diff)\n\nVersion 0.2 (2013-02-06)\n\n - Move cdiff.py to top dir for better meta info management\n\nVersion 0.1 (2013-02-05)\n\n - New --version option\n - setup.py now read version from source code\n\nVersion 0.0.4 (2013-02-04)\n\n - Add CHANGES for history track and better versioning\n\nVersion 0.0.3 (2013-02-04)\n\n - Publish on PyPI, supports read patch from file, pipe and diff output from\n revision tools (thanks to `Steven Myint`_)\n\n.. _Steven Myint: https://github.com/myint\n\n.. vim:set ft=rst et sw=4 sts=4 tw=79:", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ymattw/cdiff", "keywords": "colored incremental side-by-side diff", "license": "BSD-3", "maintainer": null, "maintainer_email": null, "name": "cdiff", "package_url": "https://pypi.org/project/cdiff/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/cdiff/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ymattw/cdiff" }, "release_url": "https://pypi.org/project/cdiff/1.0/", "requires_dist": null, "requires_python": null, "summary": "View colored, incremental diff in a workspace or from stdin, with side by side and auto pager support", "version": "1.0" }, "last_serial": 2547168, "releases": { "0.4": [ { "comment_text": "", "digests": { "md5": "b602510904763a048452a5aa4a8fe942", "sha256": "eaf370f3ca3229063578832be9a8e7ebd9ef1a05d93b40ea6f6f24f4957901fc" }, "downloads": -1, "filename": "cdiff-0.4.tar.gz", "has_sig": false, "md5_digest": "b602510904763a048452a5aa4a8fe942", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14139, "upload_time": "2013-03-24T14:03:12", "url": "https://files.pythonhosted.org/packages/c4/bb/56c8d1ee96a1d17565f4f2ef0f55f913c21821174cb221a6527b4c6c2912/cdiff-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "e38d10f6eb459ccf3c155488d0c170bb", "sha256": "d781dda34fb5fbaceb334a824f61225e4f92784a4af8426749720fb38ba12200" }, "downloads": -1, "filename": "cdiff-0.5.tar.gz", "has_sig": false, "md5_digest": "e38d10f6eb459ccf3c155488d0c170bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17684, "upload_time": "2013-03-24T14:03:59", "url": "https://files.pythonhosted.org/packages/72/f1/8997a37ec328aaac9af1b30d4ed7c89391961e6adc78af18381390ae7417/cdiff-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "c4edcf27040d3d5c20b78e94477716d5", "sha256": "d47548e872eb7713f885a959bb02018d83eaca218bc6a7020e29d70c6d321aaf" }, "downloads": -1, "filename": "cdiff-0.6.tar.gz", "has_sig": false, "md5_digest": "c4edcf27040d3d5c20b78e94477716d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20162, "upload_time": "2013-03-24T14:04:24", "url": "https://files.pythonhosted.org/packages/ea/d8/00abebba22324ba0df3a9b7814adf76e4551d48caa9d076c5e1f1823955d/cdiff-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "4b62e3782348619e089d1e35535ec376", "sha256": "1b2446bb63bf56cf8d6bd19e3b32225b5dac38d17534b69db61871d33461b612" }, "downloads": -1, "filename": "cdiff-0.7.tar.gz", "has_sig": false, "md5_digest": "4b62e3782348619e089d1e35535ec376", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21669, "upload_time": "2013-03-24T14:04:48", "url": "https://files.pythonhosted.org/packages/34/c3/a47a03da818a31d03958bac2095052d90ec1319141244eca7ed03a33083a/cdiff-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "72faa9ec98c5a5e4133076e4a5572548", "sha256": "d65380572b5fc36809628ecce968df8238b7364d66e47e4bd215fe35770fb1ab" }, "downloads": -1, "filename": "cdiff-0.8.tar.gz", "has_sig": false, "md5_digest": "72faa9ec98c5a5e4133076e4a5572548", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24784, "upload_time": "2013-03-24T14:05:58", "url": "https://files.pythonhosted.org/packages/c1/00/35dab1f710e046865b1ad91c2437ee185bf59df5c9d7f3570ce79d73bbac/cdiff-0.8.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "c6f491f4cd9ad5a149017a733fe26862", "sha256": "fb22c1e7fefd1762e9df1666875da2312526f7d729c4bd07a47947898f4ae666" }, "downloads": -1, "filename": "cdiff-0.9.tar.gz", "has_sig": false, "md5_digest": "c6f491f4cd9ad5a149017a733fe26862", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28194, "upload_time": "2013-03-24T14:15:23", "url": "https://files.pythonhosted.org/packages/ee/06/4f1ad13e8311b2cd15fbf5330e9b6f8e864a5e2289a1fd07389cb473df54/cdiff-0.9.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "c306fcfba89e5714ded0658fd72155c1", "sha256": "b099239223151df274a3b2f94499ae3c1ef746e70a68a940a8395487d034570c" }, "downloads": -1, "filename": "cdiff-0.9.1.tar.gz", "has_sig": false, "md5_digest": "c306fcfba89e5714ded0658fd72155c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28359, "upload_time": "2013-05-20T05:50:58", "url": "https://files.pythonhosted.org/packages/ec/d4/a5160e46ae048e9c96257f061470c1319cf0763921279f10b4d1c82cd84a/cdiff-0.9.1.tar.gz" } ], "0.9.2": [ { "comment_text": "", "digests": { "md5": "4330cbbc7793be8a9c00bb3133b256d8", "sha256": "83ecc296ce1dadf386b92584d8f9608732279c20973777cbac0b3f2201a8b7c4" }, "downloads": -1, "filename": "cdiff-0.9.2.tar.gz", "has_sig": false, "md5_digest": "4330cbbc7793be8a9c00bb3133b256d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28987, "upload_time": "2013-06-21T15:34:58", "url": "https://files.pythonhosted.org/packages/98/27/03918a3d053b4670952567d15eea5a31bcf58803914d1f174327c24e234a/cdiff-0.9.2.tar.gz" } ], "0.9.3": [ { "comment_text": "", "digests": { "md5": "b6cd122f94fc601a09e775a2feb66882", "sha256": "893ffb90d3b9723318bfc9fd02bcefae69d9bbb1f7ac99e357bbee87dc269e6e" }, "downloads": -1, "filename": "cdiff-0.9.3.tar.gz", "has_sig": false, "md5_digest": "b6cd122f94fc601a09e775a2feb66882", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29355, "upload_time": "2013-09-28T14:55:17", "url": "https://files.pythonhosted.org/packages/63/37/1b5dee630466b3a7ba7c69c32a23c84676cd97d1d253057c36eb18ddc352/cdiff-0.9.3.tar.gz" } ], "0.9.4": [ { "comment_text": "", "digests": { "md5": "4a0b5725e93f51ca3187d290a38b374c", "sha256": "41ba56db6629d634f263c0ea450b1fab68363ae5dc98bcab3b5c96e4a6183e87" }, "downloads": -1, "filename": "cdiff-0.9.4.tar.gz", "has_sig": false, "md5_digest": "4a0b5725e93f51ca3187d290a38b374c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30086, "upload_time": "2014-06-04T18:22:43", "url": "https://files.pythonhosted.org/packages/ff/da/8da6d947f2d5c3385808c6c0a208e14c0184ad9def6cd43329277c582a35/cdiff-0.9.4.tar.gz" } ], "0.9.5": [ { "comment_text": "", "digests": { "md5": "ef10061cf7a90a7e562db29017854b6d", "sha256": "d775892635052ecb15b535b50847d6e5bc7a7814b199f89b8529eb9dddeb0be2" }, "downloads": -1, "filename": "cdiff-0.9.5.tar.gz", "has_sig": false, "md5_digest": "ef10061cf7a90a7e562db29017854b6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30676, "upload_time": "2014-06-19T23:29:06", "url": "https://files.pythonhosted.org/packages/e2/da/f04d39e60c5ca7e00d8af4bddf9a1ba08df1b7119aafbbe2b102b3826f4f/cdiff-0.9.5.tar.gz" } ], "0.9.6": [ { "comment_text": "", "digests": { "md5": "e71be83591535621b5c11504563d859b", "sha256": "a2fe898344f80ff5ecfd1d4bea7908422aeb0193f58b7669b485b8f7f978ae1b" }, "downloads": -1, "filename": "cdiff-0.9.6.tar.gz", "has_sig": false, "md5_digest": "e71be83591535621b5c11504563d859b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30751, "upload_time": "2014-06-20T19:02:06", "url": "https://files.pythonhosted.org/packages/41/39/9cdcbcbb9fdf04a5af526f3418d33ad3b4824acce0bfa309a836f69ba9aa/cdiff-0.9.6.tar.gz" } ], "0.9.7": [ { "comment_text": "", "digests": { "md5": "6e6e3dbbf0473ed091ef010f12d32134", "sha256": "63b7f1037cbcf5ce76b56cd4e5643751e25e0c2a124bcd382af827651d81ca90" }, "downloads": -1, "filename": "cdiff-0.9.7.tar.gz", "has_sig": false, "md5_digest": "6e6e3dbbf0473ed091ef010f12d32134", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32061, "upload_time": "2015-04-24T22:29:28", "url": "https://files.pythonhosted.org/packages/03/bd/e8135b2150184a5198d74232f2e4fa9d5f51be04f22f435a844372737d9a/cdiff-0.9.7.tar.gz" } ], "0.9.8": [ { "comment_text": "", "digests": { "md5": "7489095f06daea06a91c22e7afa9f60b", "sha256": "61229ba5b294faa8b4c257a220cfda34ac4a7ecf35aa88e8121c36234fea3760" }, "downloads": -1, "filename": "cdiff-0.9.8.tar.gz", "has_sig": false, "md5_digest": "7489095f06daea06a91c22e7afa9f60b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34861, "upload_time": "2016-01-16T01:20:42", "url": "https://files.pythonhosted.org/packages/30/aa/4cfbbeede203a8d19ddb9c2a7b5eaa2563c2e39311e4e987625cd0b7766a/cdiff-0.9.8.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "c70ed1abbd9d999bfe4fd83e05ed4092", "sha256": "fa5348bdf563562b386407d7fe815e50cbd80fe78c6c08c6b9882136130941d3" }, "downloads": -1, "filename": "cdiff-1.0.tar.gz", "has_sig": false, "md5_digest": "c70ed1abbd9d999bfe4fd83e05ed4092", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33599, "upload_time": "2016-12-31T04:38:39", "url": "https://files.pythonhosted.org/packages/69/6c/301876940e760a8b46c1caacf08c298f511f517c70eec32e43f38e9cc6f5/cdiff-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c70ed1abbd9d999bfe4fd83e05ed4092", "sha256": "fa5348bdf563562b386407d7fe815e50cbd80fe78c6c08c6b9882136130941d3" }, "downloads": -1, "filename": "cdiff-1.0.tar.gz", "has_sig": false, "md5_digest": "c70ed1abbd9d999bfe4fd83e05ed4092", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33599, "upload_time": "2016-12-31T04:38:39", "url": "https://files.pythonhosted.org/packages/69/6c/301876940e760a8b46c1caacf08c298f511f517c70eec32e43f38e9cc6f5/cdiff-1.0.tar.gz" } ] }