[Python-apps-team] Bug#531908: mercurial: cannot apply a convoluted patch

Jakub Wilk ubanus at users.sf.net
Thu Jun 4 21:23:06 UTC 2009


Package: mercurial
Version: 1.2.1-3
Severity: normal

Mercurial is unable to apply some git patches, even when (due to the way 
they were generated) they should apply cleanly:

$ hg init

$ printf '[diff]\ngit=true\n' > .hg/hgrc

$ ln -s /dev/null test

$ hg add test

$ hg diff
diff --git a/test b/test
new file mode 120000
--- /dev/null
+++ b/test
@@ -0,0 +1,1 @@
+/dev/null
\ No newline at end of file

$ hg ci -m symlink

$ hg qinit

$ hg qnew buggy.diff

$ hg rm test

$ echo test > test

$ hg add test

$ hg diff
diff --git a/test b/test
old mode 120000
new mode 100644
--- a/test
+++ b/test
@@ -1,1 +1,1 @@
-/dev/null
\ No newline at end of file
+test

$ hg qrefresh

$ hg qpop
patch queue now empty

$ hg qpush
applying buggy.diff
patching file test
Hunk #1 FAILED at 0
1 out of 1 hunks FAILED -- saving rejects to file test.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh buggy.diff


-- System Information:
Debian Release: squeeze/sid
   APT prefers unstable
   APT policy: (900, 'unstable'), (500, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.29-2-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mercurial depends on:
ii  libc6                         2.9-13     GNU C Library: Shared libraries
ii  mercurial-common              1.2.1-3    scalable distributed version contr
ii  python                        2.5.4-2    An interactive high-level object-o
ii  python-support                1.0.3      automated rebuilding support for P
ii  python2.5                     2.5.4-1    An interactive high-level object-o
ii  ucf                           3.0018     Update Configuration File: preserv

mercurial recommends no packages.

Versions of packages mercurial suggests:
pn  kdiff3 | tkdiff | meld | xxd <none>      (no description available)
pn  qct                          <none>      (no description available)
ii  vim                          2:7.2.148-2 Vi IMproved - enhanced vi editor
ii  vim-gtk [vim]                2:7.2.148-2 Vi IMproved - enhanced vi editor -
pn  wish                         <none>      (no description available)

-- no debconf information

-- 
Jakub Wilk





More information about the Python-apps-team mailing list