emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch: first impression]


From: Dr. Arne Babenhauserheide
Subject: Re: [patch: first impression]
Date: Tue, 18 Oct 2022 21:17:42 +0200
User-agent: mu4e 1.8.9; emacs 28.1

Dmitry Gutov <dgutov@yandex.ru> writes:

>>>>> "DG" == Dmitry Gutov <dgutov@yandex.ru> writes:
>>> On 18.10.2022 18:38, Uwe Brauer wrote:
>>>> I am confused now! That description sounds like
>>>> hg update
>>>> to me
>>>> but it seems git reset --soft would not call a merge in the case you
>>>> describe

The goal is to make the modified files stay exactly as they are, right?

For that you can use the merge tool that always uses the local changes:

hg import --bypass <patch> && hg update --merge --tool internal:merge-local
(see hg help mergetool for details)

⇒ import the patch, then update and in case of conflict, use the local
  version.

To test:

hg init foo
cd foo
echo first > 1
hg add 1
hg ci -m first
echo interactive.patch > 1
hg diff > interactive.patch
echo second > 1
hg import --bypass interactive.patch -m "interactive.patch"
hg update --merge --tool internal:merge-local
hg diff

Result:
diff --git a/1 b/1
--- a/1
+++ b/1
@@ -1,1 +1,1 @@
-interactive.patch
+second

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]