Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1.4 KB

File metadata and controls

58 lines (40 loc) · 1.4 KB

Stash for Subversion

A tool to stash changes to a file in a Subversion repository.

Based on svn diff and patch.

Example

  1. Edit your file.c

  2. Realize you made two distinct changes

  3. Use 'stash push' to save one of them

  4. Now you have a working copy with only one change, and a stash file (file.c.stash)

  5. Commit file.c with one change

  6. Use 'stash pop' to put the remaining change back in your working copy, which zeroes out the stash file

  7. Commit file.c with the other change

Concepts

The stash file is a simple text file with the diff hunks in it. New hunks are pushed to the top of this file. You can even edit this file directly! stash uses svn diff and patch to move hunks back and forth from the stash file and your working copy.

Usage

The stash push and pop commands accept a hunk-list as an argument. This can be:

  • '@' for all hunks

  • '1,2,3' a comma-separated list of hunks

  • nothing for an interactive mode like 'git add --patch'

Usage text

stash: usage:

  stash push|pop <flags> <file> <hunks>?

  where hunks is
  * nothing -> interactive mode
  * a comma-separated list of integers
  * '@' -> all hunks

flags:
  -h : help
  -q : decrease verbosity (may be given several times)
  -v : increase verbosity (may be given several times)

Installation

This is a standard automake build. Simply run:

$ autoreconf
$ ./configure --prefix=...
$ make -j install