Skip to content

Couple of minor changes to make getting started easier from source #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 18 additions & 77 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,69 +7,22 @@ Commit patches to Darcs, Git, Mercurial, Bazaar, Monotone, Subversion, or CVS
Installation
------------

On a recent Debian/Ubuntu:
Depends on:

apt install commit-patch
- [patchutils] (https://github.com/twaugh/patchutils)
-- Install from your OS pkg manager
- [IPC-Run] (https://github.com/toddr/IPC-Run)
-- Run following script:

Anywhere else: Install the prerequisites below and download the release
tarball from the [homepage](https://porkrind.org/commit-patch/). This
tarball contains a "fatpacked" version of the `commit-patch` perl script
with the external perl dependencies embedded. Then put the commit-patch
and commit-partial binaries into your `PATH`.
```
git clone https://github.com/toddr/IPC-Run ~/repos/IPC-Run
git clone https://github.com/oneness/commit-patch ~/repos/commit-patch
cd ~/repos/commit-patch && sudo make install
```


Prerequisites
-------------

`commit-patch` is known to run on Linux and Mac OS X. It is perl,
so ideally it will run anywhere, but we have never tested in
other environments, most notably Windows. Use at your own risk.

`commit-patch` relies on several programs to get the job done:

- [perl](https://www.perl.org)
- [patch](https://www.gnu.org/software/patch/)
- [interdiff](http://cyberelk.net/tim/software/patchutils/)
- cp - Ideally installed on your system already. :-)

and, of course, one of:

- [git](https://git-scm.com/)
- [mercurial](https://subversion.apache.org/)
- [darcs](http://darcs.net/)
- [subversion](http://subversion.tigris.org/)
- [cvs](https://www.nongnu.org/cvs/)
- [bazaar](https://bazaar.canonical.com/)
- [monotone](https://www.monotone.ca/)

## Installing Prerequisites

On Debian/Ubuntu:

apt-get install patch patchutils

On Fedora:

yum install patch patchutils

On Mac OS X w/ [Homebrew](https://brew.sh)

brew install patchutils


Instructions
Usage
------------

### commit-patch

See the man page or perldoc:

man ./commit-patch.1
perldoc commit-patch


### commit-patch-buffer.el

commit-patch-buffer.el is an emacs interface to `commit-patch`. It
allows you to just hit `C-c C-c` in any patch buffer to apply and commit
only the changes indicated by the patch, regardless of the changes in
Expand All @@ -83,30 +36,18 @@ your emacs init file:

The easy way of working with commit-patch-buffer is to `M-x vc-diff` a
file (or `M-x vc-root-diff` your whole project) then kill, split or edit
the resulting hunks using diff mode's built-in commands and to then hit
`C-c C-c` to commit the patch.
the resulting hunks using diff mode's built-in commands and then hit
`C-c C-c` to commit the patch. You can amend previous commit by `C-c C-C` instead.


Development
Notes
-----------

`commit-patch` uses [Carton](https://github.com/perl-carton/carton) for
local development. Once Carton is installed:

carton install

After than `commit-patch` and `commit-partial` should work. There is no
need to `carton exec` them—the code autodetects the local libs.


Homepage
--------
https://porkrind.org/commit-patch/
This is my fork of:
- [commit-patch] (https://github.com/caldwell/commit-patch)

Authors
-------
- David Caldwell <[email protected]>
- Jim Radford <[email protected]>
I will keep updating this fork to meet my use case. Please fork this
or the original above to change/extend it if your needs are not met.

Copyright and License
---------------------
Expand Down
4 changes: 2 additions & 2 deletions commit-patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
# Copyright © 2003-2021 David Caldwell <[email protected]>
# and Jim Radford <[email protected]>
# This code can be distributed under the terms of the GNU Public License (Version 2 or greater).
Expand All @@ -9,7 +9,7 @@ my $FALLBACK_EDITOR = 'vi';
use strict;
use Cwd qw(abs_path);
use File::Basename;
use lib dirname(abs_path($0))."/local/lib/perl5";
use lib $ENV{HOME}."/repos/IPC-Run/lib";
use IPC::Run;
use File::Temp qw(tempfile);
use Getopt::Long;
Expand Down