public inbox for [email protected]
help / color / mirror / Atom feedbest way to apply and work on the patches of the pg community
5+ messages / 4 participants
[nested] [flat]
* best way to apply and work on the patches of the pg community
@ 2022-07-15 15:33 mahendrakar s <[email protected]>
2022-07-15 16:11 ` Re: best way to apply and work on the patches of the pg community David G. Johnston <[email protected]>
2022-07-15 16:33 ` Re: best way to apply and work on the patches of the pg community Tom Lane <[email protected]>
2022-08-24 14:30 ` Re: best way to apply and work on the patches of the pg community Alvaro Herrera <[email protected]>
0 siblings, 3 replies; 5+ messages in thread
From: mahendrakar s @ 2022-07-15 15:33 UTC (permalink / raw)
To: pgsql-novice <[email protected]>
Hi Pg team,
I would like to work on a patch published on hackers community( patch is
from June, 2021). I cloned postgres code and tried to apply the patch and
got errors.
*patch -p1 < ../0001-auth-generalize-SASL-mechanisms.patch*
patching file src/backend/libpq/auth-scram.c
Hunk #1 FAILED at 101.
Hunk #2 FAILED at 170.
Hunk #3 FAILED at 199.
Hunk #4 FAILED at 215.
Hunk #5 FAILED at 325.
Can you please let me know what is the recommended way to apply the patches
for me to begin the work?
Thanks,
Mahendrakar.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: best way to apply and work on the patches of the pg community
2022-07-15 15:33 best way to apply and work on the patches of the pg community mahendrakar s <[email protected]>
@ 2022-07-15 16:11 ` David G. Johnston <[email protected]>
2 siblings, 0 replies; 5+ messages in thread
From: David G. Johnston @ 2022-07-15 16:11 UTC (permalink / raw)
To: mahendrakar s <[email protected]>; +Cc: pgsql-novice <[email protected]>
On Fri, Jul 15, 2022 at 8:33 AM mahendrakar s <[email protected]>
wrote:
> Hi Pg team,
>
> I would like to work on a patch published on hackers community( patch is
> from June, 2021). I cloned postgres code and tried to apply the patch and
> got errors.
>
> *patch -p1 < ../0001-auth-generalize-SASL-mechanisms.patch*
> patching file src/backend/libpq/auth-scram.c
> Hunk #1 FAILED at 101.
> Hunk #2 FAILED at 170.
> Hunk #3 FAILED at 199.
> Hunk #4 FAILED at 215.
> Hunk #5 FAILED at 325.
>
> Can you please let me know what is the recommended way to apply the
> patches for me to begin the work?
>
>
I'm still in a bit of trial-and-error mode myself but I try to use `git
apply` first, possibly after making sure that the files are newline only
line endings.
David J.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: best way to apply and work on the patches of the pg community
2022-07-15 15:33 best way to apply and work on the patches of the pg community mahendrakar s <[email protected]>
@ 2022-07-15 16:33 ` Tom Lane <[email protected]>
2 siblings, 0 replies; 5+ messages in thread
From: Tom Lane @ 2022-07-15 16:33 UTC (permalink / raw)
To: mahendrakar s <[email protected]>; +Cc: pgsql-novice <[email protected]>
mahendrakar s <[email protected]> writes:
> I would like to work on a patch published on hackers community( patch is
> from June, 2021). I cloned postgres code and tried to apply the patch and
> got errors.
> *patch -p1 < ../0001-auth-generalize-SASL-mechanisms.patch*
> patching file src/backend/libpq/auth-scram.c
> Hunk #1 FAILED at 101.
> Hunk #2 FAILED at 170.
> Hunk #3 FAILED at 199.
> Hunk #4 FAILED at 215.
> Hunk #5 FAILED at 325.
> Can you please let me know what is the recommended way to apply the patches
> for me to begin the work?
"patch -p1" is the way that usually works the best for me. My guess
here is that the patch in question is out of date and will need manual
adjustment to apply to HEAD. There have been some pretty significant
changes in that code in the last year, eg 9fd85570d.
Sometimes --ignore-whitespace helps, but I doubt that's the main
problem in this case.
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: best way to apply and work on the patches of the pg community
2022-07-15 15:33 best way to apply and work on the patches of the pg community mahendrakar s <[email protected]>
@ 2022-08-24 14:30 ` Alvaro Herrera <[email protected]>
2022-08-24 15:19 ` Re: best way to apply and work on the patches of the pg community mahendrakar s <[email protected]>
2 siblings, 1 reply; 5+ messages in thread
From: Alvaro Herrera @ 2022-08-24 14:30 UTC (permalink / raw)
To: mahendrakar s <[email protected]>; +Cc: pgsql-novice <[email protected]>
On 2022-Jul-15, mahendrakar s wrote:
> I would like to work on a patch published on hackers community( patch is
> from June, 2021). I cloned postgres code and tried to apply the patch and
> got errors.
>
> *patch -p1 < ../0001-auth-generalize-SASL-mechanisms.patch*
> patching file src/backend/libpq/auth-scram.c
> Hunk #1 FAILED at 101.
I would suggest to do a "git checkout" to a point in the tree near where
the patch was posted, then do "patch -p1" or "git apply" or "git am",
which is likely to work without conflict; then commit. Then you can
merge to the tip of whatever branch it is, and you will get the
conflicts then. It may be simpler to fix the conflicts there (with
git's help).
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"En las profundidades de nuestro inconsciente hay una obsesiva necesidad
de un universo lógico y coherente. Pero el universo real se halla siempre
un paso más allá de la lógica" (Irulan)
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: best way to apply and work on the patches of the pg community
2022-07-15 15:33 best way to apply and work on the patches of the pg community mahendrakar s <[email protected]>
2022-08-24 14:30 ` Re: best way to apply and work on the patches of the pg community Alvaro Herrera <[email protected]>
@ 2022-08-24 15:19 ` mahendrakar s <[email protected]>
0 siblings, 0 replies; 5+ messages in thread
From: mahendrakar s @ 2022-08-24 15:19 UTC (permalink / raw)
To: Alvaro Herrera <[email protected]>; +Cc: pgsql-novice <[email protected]>
Thank you ...I followed the same approach.
Thanks,
Mahendrakar
On Wed, 24 Aug, 2022, 8:00 pm Alvaro Herrera, <[email protected]>
wrote:
> On 2022-Jul-15, mahendrakar s wrote:
>
> > I would like to work on a patch published on hackers community( patch is
> > from June, 2021). I cloned postgres code and tried to apply the patch
> and
> > got errors.
> >
> > *patch -p1 < ../0001-auth-generalize-SASL-mechanisms.patch*
> > patching file src/backend/libpq/auth-scram.c
> > Hunk #1 FAILED at 101.
>
> I would suggest to do a "git checkout" to a point in the tree near where
> the patch was posted, then do "patch -p1" or "git apply" or "git am",
> which is likely to work without conflict; then commit. Then you can
> merge to the tip of whatever branch it is, and you will get the
> conflicts then. It may be simpler to fix the conflicts there (with
> git's help).
>
> --
> Álvaro Herrera Breisgau, Deutschland —
> https://www.EnterpriseDB.com/
> "En las profundidades de nuestro inconsciente hay una obsesiva necesidad
> de un universo lógico y coherente. Pero el universo real se halla siempre
> un paso más allá de la lógica" (Irulan)
>
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2022-08-24 15:19 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-07-15 15:33 best way to apply and work on the patches of the pg community mahendrakar s <[email protected]>
2022-07-15 16:11 ` David G. Johnston <[email protected]>
2022-07-15 16:33 ` Tom Lane <[email protected]>
2022-08-24 14:30 ` Alvaro Herrera <[email protected]>
2022-08-24 15:19 ` mahendrakar s <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox