[issue2402] Folding empty patch fails

Mads Kiilerich bugs at mercurial.selenic.com
Sun Sep 26 17:21:19 CDT 2010

New submission from Mads Kiilerich <mads at kiilerich.com>:

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

  $ hg init repo
  $ cd repo
  $ hg qnew first
  $ echo a > a
  $ hg add a
  $ hg qnew ok-patch
  $ hg qnew empty-patch
  $ hg qgoto first
  popping empty-patch
  popping ok-patch
  now at: first
  $ hg qfold ok-patch
  $ hg qfold empty-patch
  internal patcher failed
  please report details to http://mercurial.selenic.com/bts/
  or mercurial at selenic.com
  /usr/bin/patch: **** Only garbage was found in the patch input.
  patch failed, unable to continue (try -v)
  abort: error folding patch empty-patch

The patch code could be cleaned up a lot, but we have insufficient test
coverage and won't change it because of the risk of breaking something.

The fallback to /usr/bin/patch should be removed - our own patcher is far
better anyway.

I also think we should stop caring if a patch is empty. That would simplify
the code a lot.

messages: 13754
nosy: kiilerix
priority: bug
status: unread
title: Folding empty patch fails

Mercurial issue tracker <bugs at mercurial.selenic.com>

More information about the Mercurial-devel mailing list