unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26028: 26.0.50; epatch for multifile patches
@ 2017-03-08 17:29 Arseny Sher
  2017-03-08 19:17 ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Arseny Sher @ 2017-03-08 17:29 UTC (permalink / raw)
  To: 26028

Hello,

I am having trouble using epatch while applying multifile patches.
Consider the following simple example:

ars@ars-thinkpad ~/tmp $ mkdir -p old/src
ars@ars-thinkpad ~/tmp $ echo "void main() { }" > old/src/hello.c
ars@ars-thinkpad ~/tmp $ mkdir -p new/src
ars@ars-thinkpad ~/tmp $ echo "int main() { return 0; }" > new/src/hello.c
ars@ars-thinkpad ~/tmp $ diff -cr old/ new/ > tmp.patch
ars@ars-thinkpad ~/tmp $ cat tmp.patch
diff -cr old/src/hello.c new/src/hello.c
*** old/src/hello.c	2017-03-08 14:29:24.743846995 +0300
--- new/src/hello.c	2017-03-08 14:29:32.399846824 +0300
***************
*** 1 ****
! void main() { }
--- 1 ----
! int main() { return 0; }


Now I start emacs and do M-x epatch. First of all, it asks me for
patch buffer or file, I point to '~/tmp/tmp.patch'. Then it asks for
directory to patch, I say '~/tmp/old' and ediff complains

Ediff has inferred that
	/home/ars/tmp/old/hello.c
is assumed to be the target for this patch.  However, this file does not exist.

Please enter an alternative patch target ...


because it ignores the path ('src' directory in this case) to the file.
Ediff manual says: "Ediff can recognize multi-file patches only if they
are in the context format or GNU unified format. All other patches are
treated as 1-file patches. Ediff is [hopefully] using the same algorithm
as patch to determine which files need to be patched." If I understand
this correctly, my scenario should work, so it seems like a bug.

I tried it on GNU Emacs versions 25.1, 25.2 RC2 and daily build
26.0.50.2, sometimes on clean Emacs (emacs -q), and sometimes with
unified diff format (diff -u), the result is the same.

I use GNU/Linux, Linux Mint 17 (based on Ubuntu 14.04).

Below goes autogenerated info from report-emacs-bug.

In GNU Emacs 26.0.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8)
 of 2016-10-26 built on lgw01-50
Windowing system distributor 'The X.Org Foundation', version 11.0.11501000
System Description:	Linux Mint 17 Qiana

Recent messages:
my-misc loaded
Loading /home/ars/.emacs.d/recentf...done
Cleaning up the recentf list...done (0 removed)
my-text-processing loaded
Loading font-lock...done
my-windows-frames-funcs loaded
coding styles loaded
my-gdb-stuff loaded
Loading quail/cyrillic...done
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --build=x86_64-linux-gnu --prefix=/usr
 '--includedir=${prefix}/include' '--mandir=${prefix}/share/man'
 '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var
 '--libdir=${prefix}/lib/x86_64-linux-gnu'
 '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode
 --disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib
 --program-suffix=-snapshot --with-modules=yes --with-x=yes
 --with-x-toolkit=gtk3 --with-xwidgets=yes 'CFLAGS=-g -O2
 -fstack-protector --param=ssp-buffer-size=4 -Wformat
 -Werror=format-security' CPPFLAGS=-D_FORTIFY_SOURCE=2
 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES XWIDGETS

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LC_MONETARY: ru_RU.UTF-8
  value of $LC_NUMERIC: ru_RU.UTF-8
  value of $LC_TIME: ru_RU.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  gud-tooltip-mode: t
  diff-hl-flydiff-mode: t
  global-diff-hl-mode: t
  diff-auto-refine-mode: t
  global-flycheck-mode: t
  projectile-mode: t
  ivy-mode: t
  show-paren-mode: t
  my-global-fci-mode: t
  global-linum-mode: t
  dired-omit-mode: t
  delete-selection-mode: t
  cua-mode: t
  recentf-mode: t
  savehist-mode: t
  global-undo-tree-mode: t
  global-auto-revert-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
~/.emacs.d/static_packages/all-the-icons.el/all-the-icons hides ~/.emacs.d/static_packages/all-the-icons
/usr/share/emacs/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/26.0.50/lisp/textmodes/ispell
/usr/share/emacs/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/26.0.50/lisp/textmodes/flyspell
/usr/share/emacs/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/26.0.50/lisp/language/thai-word

Features:
(shadow sort mail-extr emacsbug message puny format-spec rfc822 mml
mml-sec epa derived epg gnus-util rmail rmail-loaddefs mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils colir
color ggtags etags xref project windmove quail gud my-gdb-stuff
diff-hl-flydiff diff-hl edmacro kmacro face-remap vc-hg vc-git vc-dir
ewoc vc vc-dispatcher diff-mode flycheck json map find-func rx subr-x
coding-styles cc-styles cc-align cc-engine cc-vars cc-defs projectile
advice grep compile comint ansi-color ibuf-ext ibuffer ibuffer-loaddefs
ivy ivy-overlay ffap thingatpt xcscope ring paren disp-table
fill-column-indicator easy-mmode linum dired-x dired dired-loaddefs
my-windows-frames-funcs all-the-icons all-the-icons-faces
data-weathericons data-octicons data-fileicons data-faicons
data-alltheicons font-lock+ cl dash my-text-processing drag-stuff delsel
cua-base recentf tree-widget wid-edit savehist undo-tree diff autorevert
filenotify wombat-theme my-misc finder-inf tex-site info package
epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev
obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face
macroexp files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
dbusbind inotify dynamic-setting system-font-setting font-render-setting
xwidget-internal move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 288745 21478)
 (symbols 48 35267 1)
 (miscs 40 517 1228)
 (strings 32 74748 9913)
 (string-bytes 1 2122820)
 (vectors 16 35442)
 (vector-slots 8 683178 9673)
 (floats 8 665 276)
 (intervals 56 444 300)
 (buffers 976 13)
 (heap 1024 41802 1607))





^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-03-24  8:34 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-08 17:29 bug#26028: 26.0.50; epatch for multifile patches Arseny Sher
2017-03-08 19:17 ` Eli Zaretskii
2017-03-08 21:53   ` Arseny Sher
2017-03-09  1:41     ` Tino Calancha
2017-03-09 11:44       ` Arseny Sher
2017-05-23 11:26     ` Tino Calancha
2017-05-23 22:45       ` Michael Heerdegen
2017-05-24  0:46         ` Tino Calancha
2020-08-11  7:34           ` Stefan Kangas
2020-10-03 22:25             ` Michael Heerdegen
2021-05-10 12:02               ` Lars Ingebrigtsen
2021-05-12  9:27                 ` Michael Heerdegen
2021-05-13 16:29                 ` Filipp Gunbin
2021-05-16 13:57                   ` Lars Ingebrigtsen
2021-07-23 12:54                     ` Lars Ingebrigtsen
2022-03-24  8:34                       ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).