Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #9607 > unrolled thread

git-dpm: remove a patch

Started byVincent Bernat <bernat@debian.org>
First post2017-07-05 09:00 +0200
Last post2017-07-05 16:50 +0200
Articles 6 — 4 participants

Back to article view | Back to linux.debian.maint.python


Contents

  git-dpm: remove a patch Vincent Bernat <bernat@debian.org> - 2017-07-05 09:00 +0200
    Re: git-dpm: remove a patch Scott Kitterman <debian@kitterman.com> - 2017-07-05 13:10 +0200
    Re: git-dpm: remove a patch Brian May <bam@debian.org> - 2017-07-05 13:30 +0200
      Re: git-dpm: remove a patch Vincent Bernat <bernat@debian.org> - 2017-07-05 16:50 +0200
    Re: git-dpm: remove a patch Nikolaus Rath <Nikolaus@rath.org> - 2017-07-05 13:40 +0200
      Re: git-dpm: remove a patch Vincent Bernat <bernat@debian.org> - 2017-07-05 16:50 +0200

#9607 — git-dpm: remove a patch

FromVincent Bernat <bernat@debian.org>
Date2017-07-05 09:00 +0200
Subjectgit-dpm: remove a patch
Message-ID<tZMs2-2Ms-25@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hey!

How to remove a patch with git-dpm?

I have tried:

git-dpm c-p
git reset --hard HEAD~1
git-dpm u-p

And got:

git-dpm: Calling merge-patched-into-debian first...
git-dpm: ERROR: cowardly refusing to update patched to already merged version!. Use --allow-revert to override!

I don't understand what it means. git-dpm tag doesn't report anything
suspicious so I suppose that debian/.git-dpm is correct.
-- 
Use self-identifying input.  Allow defaults.  Echo both on output.
            - The Elements of Programming Style (Kernighan & Plauger)

[toc] | [next] | [standalone]


#9609

FromScott Kitterman <debian@kitterman.com>
Date2017-07-05 13:10 +0200
Message-ID<tZQlY-5sb-13@gated-at.bofh.it>
In reply to#9607

[Multipart message — attachments visible in raw view] — view raw

On Wednesday, July 05, 2017 08:51:34 AM Vincent Bernat wrote:
> Hey!
> 
> How to remove a patch with git-dpm?
> 
> I have tried:
> 
> git-dpm c-p
> git reset --hard HEAD~1
> git-dpm u-p
> 
> And got:
> 
> git-dpm: Calling merge-patched-into-debian first...
> git-dpm: ERROR: cowardly refusing to update patched to already merged
> version!. Use --allow-revert to override!
> 
> I don't understand what it means. git-dpm tag doesn't report anything
> suspicious so I suppose that debian/.git-dpm is correct.

Did you try they way it says in man git-dpm:

       Removing existing patches
              First get the master branch:
               git clone URL

              Create the patched branch and check it out:
               git-dpm checkout-patched

              Get a list of commits since the last upstream release: git 
rebase -i upstream-unstable

              This will open your default editor with a list of commits.  Edit 
the list to remove undesired commits.
               ...
               git commit

              Then you want to get those changes into the Debian branch and 
the old patch files deleted (which you can do using git-dpm update-patches), 
but you most likely want to also document  what  you  did  in  the
              changelog, so all in one step:
               git-dpm dch -- -i

              Perhaps change something in the Debian packaging:
               ...
               git commit -a

              Then push the whole thing back:
               git push

Scott K

[toc] | [prev] | [next] | [standalone]


#9610

FromBrian May <bam@debian.org>
Date2017-07-05 13:30 +0200
Message-ID<tZQFk-5Al-35@gated-at.bofh.it>
In reply to#9607
Vincent Bernat <bernat@debian.org> writes:

> git-dpm: Calling merge-patched-into-debian first...
> git-dpm: ERROR: cowardly refusing to update patched to already merged version!. Use --allow-revert to override!

Have you tried doing what it suggests, using the --allow-revert
parameter?

I believe git-dpm sees you removing a patch and assumes you might be
doing something wrong - so it stops you. However as you know what you
are doing, you should override it.
-- 
Brian May <bam@debian.org>

[toc] | [prev] | [next] | [standalone]


#9613

FromVincent Bernat <bernat@debian.org>
Date2017-07-05 16:50 +0200
Message-ID<tZTMR-7yB-9@gated-at.bofh.it>
In reply to#9610

[Multipart message — attachments visible in raw view] — view raw

 ❦  5 juillet 2017 21:19 +1000, Brian May <bam@debian.org> :

>> git-dpm: Calling merge-patched-into-debian first...
>> git-dpm: ERROR: cowardly refusing to update patched to already merged version!. Use --allow-revert to override!
>
> Have you tried doing what it suggests, using the --allow-revert
> parameter?
>
> I believe git-dpm sees you removing a patch and assumes you might be
> doing something wrong - so it stops you. However as you know what you
> are doing, you should override it.

This seemed to have worked as expected: the patch is gone.
-- 
"Elves and Dragons!" I says to him.  "Cabbages and potatoes are better
for you and me."
		-- J. R. R. Tolkien

[toc] | [prev] | [next] | [standalone]


#9611

FromNikolaus Rath <Nikolaus@rath.org>
Date2017-07-05 13:40 +0200
Message-ID<tZQOZ-5Dw-9@gated-at.bofh.it>
In reply to#9607
On Jul 05 2017, Vincent Bernat <bernat@debian.org> wrote:
> Hey!
>
> How to remove a patch with git-dpm?

Look for "Removing existing patches" in git-dpm(1):

$ git-dpm checkout-patched
$ git  rebase  -i upstream-unstable
$ git-dpm dch -- -i

Best,
-Nikolaus

-- 
GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«

[toc] | [prev] | [next] | [standalone]


#9614

FromVincent Bernat <bernat@debian.org>
Date2017-07-05 16:50 +0200
Message-ID<tZTMS-7yB-13@gated-at.bofh.it>
In reply to#9611

[Multipart message — attachments visible in raw view] — view raw

 ❦  5 juillet 2017 13:27 +0200, Nikolaus Rath <Nikolaus@rath.org> :

>> How to remove a patch with git-dpm?
>
> Look for "Removing existing patches" in git-dpm(1):
>
> $ git-dpm checkout-patched
> $ git  rebase  -i upstream-unstable
> $ git-dpm dch -- -i

That's totally similar to use "git reset --hard HEAD~1" (since I want to
remove the last commit).
-- 
Make sure all variables are initialised before use.
            - The Elements of Programming Style (Kernighan & Plauger)

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web