From: Tino Calancha <tino.calancha@gmail.com>
To: Arseny Sher <sher-ars@yandex.ru>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
26028@debbugs.gnu.org, tino.calancha@gmail.com
Subject: bug#26028: 26.0.50; epatch for multifile patches
Date: Thu, 09 Mar 2017 10:41:18 +0900 [thread overview]
Message-ID: <87d1drfcqp.fsf@calancha-pc> (raw)
In-Reply-To: <87y3wfv3iy.fsf@yandex.ru> (Arseny Sher's message of "Thu, 09 Mar 2017 00:53:41 +0300")
Arseny Sher <sher-ars@yandex.ru> writes:
> How then I am expected to apply
> patches generated by VCS, where paths are prefixed with a/ and b/?
Ediff will skip those 'a/', 'b/' automatically.
> Again, let's consider some simple example:
>
> mkdir -p proj/src
> cd proj
> echo "void main() {}" > src/hello.c
> git init
> git add src/ && git commit -m "commit"
> echo "int main() { return 0; }" > src/hello.c
> git diff > ../tmp.patch
> git reset --hard HEAD
>
> cat ../tmp.patch
> diff --git a/src/hello.c b/src/hello.c
> index ab73b3a..76e8197 100644
> --- a/src/hello.c
> +++ b/src/hello.c
> @@ -1 +1 @@
> -void main() {}
> +int main() { return 0; }
>
> How should I apply tmp.patch to proj?
Ediff uses the `default-directory' for the patch buffer as a hint.
When i apply patches generated with VCS i _always_ set the
`default-directory' of the patch buffer equal as the root directory of
the project. That makes multi patches work OK.
This is how i would do in your exmple:
M-: (dired "/tmp/proj") RET
C-x b *p* RET ; Now copy the patch here in your favourite way.
C-x 4 r /tmp/tmp.patch RET
C-x h M-w C-x o C-y
M-x epatch RET y *p* RET /tmp/proj/src RET
> Yet am not still sure that this is not a bug; some other guy said that
> this behaviour doesn't make sense, and similar bug was fixed recently:
> http://lists.gnu.org/archive/html/help-gnu-emacs/2017-03/msg00064.html
> http://emacs.1067599.n8.nabble.com/bug-25010-26-0-50-epatch-might-parse-wrongly-a-file-name-td413747.html
I tend to agree that it might be possible to improve how Ediff
handle these things. That said, as a user i haven't being disturbed
so much by this inconvenience. I am also worry if i could break other
important feature while trying to improve this; that's essentially why
i didn't try hard to work in this issue.
If you have some an idea about how to prepare a patch improving
Ediff on this area i am welcome to support you in that task.
Regards,
Tino
next prev parent reply other threads:[~2017-03-09 1:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d1drfcqp.fsf@calancha-pc \
--to=tino.calancha@gmail.com \
--cc=26028@debbugs.gnu.org \
--cc=michael_heerdegen@web.de \
--cc=sher-ars@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.