tests/test-mq-qsave.t
author Patrick Mezard <patrick@mezard.eu>
Mon, 13 Feb 2012 16:47:31 +0100
branchstable
changeset 16123 b0c7525f826d
parent 12324 b701610f6c56
child 49621 55c6ebd11cb9
permissions -rw-r--r--
patch: fix fuzzing of hunks without previous lines (issue3264) When applying hunks such as: @@ -2,1 +2,2 @@ context +change fuzzing would empty the "old" block and make patchfile.apply() traceback. Instead, we apply the new block at specified location without testing. The "bottom hunk" test was removed as patch(1) has no problem applying hunk with no context in the middle of a file.

  $ echo "[extensions]" >> $HGRCPATH
  $ echo "mq=" >> $HGRCPATH

  $ hg init

  $ echo 'base' > base
  $ hg ci -Ambase
  adding base

  $ hg qnew -mmqbase mqbase

  $ hg qsave
  $ hg qrestore 2
  restoring status: hg patches saved state