quilt.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Thu, 03 Jan 2019 22:13:18 +0200
changeset 2334 c44e4331713c
parent 2289 fdcdf49ddc71
permissions -rw-r--r--
merged

=======
 quilt
=======
.. contents::
   :local:

Basic flow
==========

Basic Quilt flow::

  $ cd $proj
  $ quilt new my.patch
  $ quilt add $file
  $ $EDIT $file
  $ quilt diff -z
  $ quilt refresh
  $ quilt pop
  $ quilt push

Folding patch
=============
::

  quilt pop
  quilt top
  quilt fold < patches/fix-x.patch
  quilt diff -z
  quilt refresh
  quilt delete -r fix-x.patch

Integrating local VCS changes
=============================

Integrating working directory changes from ``git``/``hg`` to ``quilt`` if they are in files
unmanaged by ``quilt``::

  quilt pop -a
  git st
  git diff >patches/tmp.patch
  git reset --hard
  quilt push my.patch
  quilt fold <patches/tmp.patch
  quilt diff -z
  quilt refresh
  rm patches/tmp.patch

Rollback topmost changes
========================

Rollback topmost changes shown by ``quilt diff -z``::

  quilt revert `quilt files`

Integrate changes into separate patch
=====================================
::

  quilt refresh -zNAME.patch

Delete patch
============
::

  quilt delete NAME.patch

Delete file from patch::

  quilt remove -p NAME.patch FILE
  quilt refresh

Delete file from patch
======================
::

  quilt remove -p NAME.patch FILE
  quilt refresh

Import patch
============

Import patch with non-p1 paths (like after ``svn diff``)::

  svn diff >.diff
  quilt import -p 0 -P .diff  fix.patch