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


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

Messed up a salsa commit - how best to fix?

Started byJulian Gilbey <julian@d-and-j.net>
First post2022-04-24 22:10 +0200
Last post2022-04-26 14:40 +0200
Articles 14 — 4 participants

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


Contents

  Messed up a salsa commit - how best to fix? Julian Gilbey <julian@d-and-j.net> - 2022-04-24 22:10 +0200
    Re: Messed up a salsa commit - how best to fix? Geert Stappers <stappers@stappers.nl> - 2022-04-24 22:10 +0200
      Re: Messed up a salsa commit - how best to fix? Julian Gilbey <julian@d-and-j.net> - 2022-04-24 22:50 +0200
        Re: Messed up a salsa commit - how best to fix? Geert Stappers <stappers@stappers.nl> - 2022-04-25 08:20 +0200
    Re: Messed up a salsa commit - how best to fix? Timo Röhling <roehling@debian.org> - 2022-04-24 22:50 +0200
      Re: Messed up a salsa commit - how best to fix? Timo Röhling <roehling@debian.org> - 2022-04-24 23:00 +0200
        Re: Messed up a salsa commit - how best to fix? Julian Gilbey <julian@d-and-j.net> - 2022-04-24 23:20 +0200
        Re: Messed up a salsa commit - how best to fix? Julian Gilbey <julian@d-and-j.net> - 2022-04-24 23:30 +0200
      Re: Messed up a salsa commit - how best to fix? Julian Gilbey <julian@d-and-j.net> - 2022-04-24 23:20 +0200
      Re: Messed up a salsa commit - how best to fix? Julian Gilbey <julian@d-and-j.net> - 2022-04-26 12:10 +0200
        Re: Messed up a salsa commit - Reporting the fix Geert Stappers <stappers@debian.org> - 2022-04-26 13:30 +0200
          Re: Messed up a salsa commit - Reporting the fix Julian Gilbey <julian@d-and-j.net> - 2022-04-26 14:30 +0200
        Re: Messed up a salsa commit - how best to fix? Timo Röhling <roehling@debian.org> - 2022-04-26 14:00 +0200
          Re: Messed up a salsa commit - how best to fix? Julian Gilbey <julian@d-and-j.net> - 2022-04-26 14:40 +0200

#14070 — Messed up a salsa commit - how best to fix?

FromJulian Gilbey <julian@d-and-j.net>
Date2022-04-24 22:10 +0200
SubjectMessed up a salsa commit - how best to fix?
Message-ID<EfQIp-aWgw-3@gated-at.bofh.it>
Hi,

Somehow I managed to really mess up a commit to python-qtconsole: the
upstream and pristine-tar branches do not have the upstream/5.3.0
sources (the current ones).  However, there's already an
upstream/5.3.0 tag in the repository, pointing to a commit to the
master branch.

I think the simplest thing to do is to "rewrite history": delete the
head commits to the master branch and the 5.3.0 tags, and then
recommit correctly and force-push to salsa.

Would people be OK with me doing this, or do you have an alternative
suggestion?

Best wishes,

   Julian

[toc] | [next] | [standalone]


#14071

FromGeert Stappers <stappers@stappers.nl>
Date2022-04-24 22:10 +0200
Message-ID<EfQIp-aWgw-9@gated-at.bofh.it>
In reply to#14070
On Sun, Apr 24, 2022 at 09:01:02PM +0100, Julian Gilbey wrote:
> Hi,
> 
> Somehow I managed to really mess up a commit to python-qtconsole: the
> upstream and pristine-tar branches do not have the upstream/5.3.0
> sources (the current ones).  However, there's already an
> upstream/5.3.0 tag in the repository, pointing to a commit to the
> master branch.
> 
> I think the simplest thing to do is to "rewrite history": delete the
> head commits to the master branch and the 5.3.0 tags, and then
> recommit correctly and force-push to salsa.
> 
> Would people be OK with me doing this,

I'm not OK with rewriting history.


> or do you have an alternative suggestion?

Accept the failure, learn from it, move on, make new mistakes, learn from them.

In other words:  Do not spend energy on erasing a mistake^Wlearing expirience.

 
> Best wishes,
>    Julian
> 

Groeten
Geert Stappers
-- 
Silence is hard to parse

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


#14072

FromJulian Gilbey <julian@d-and-j.net>
Date2022-04-24 22:50 +0200
Message-ID<EfRl7-aWuZ-1@gated-at.bofh.it>
In reply to#14071
On Sun, Apr 24, 2022 at 10:09:21PM +0200, Geert Stappers wrote:
> On Sun, Apr 24, 2022 at 09:01:02PM +0100, Julian Gilbey wrote:
> > Hi,
> > 
> > Somehow I managed to really mess up a commit to python-qtconsole: the
> > upstream and pristine-tar branches do not have the upstream/5.3.0
> > sources (the current ones).  However, there's already an
> > upstream/5.3.0 tag in the repository, pointing to a commit to the
> > master branch.
> > 
> > I think the simplest thing to do is to "rewrite history": delete the
> > head commits to the master branch and the 5.3.0 tags, and then
> > recommit correctly and force-push to salsa.
> > 
> > Would people be OK with me doing this,
> 
> I'm not OK with rewriting history.
> 
> > or do you have an alternative suggestion?
> 
> Accept the failure, learn from it, move on, make new mistakes, learn from them.
> 
> In other words:  Do not spend energy on erasing a mistake^Wlearing expirience.

I do understand this, but now someone cloning the repository and
running "gbp buildpackage" won't be able to do so.

I realise there is a much more minor change that would fix things:
just delete the upstream/5.3.0 tag, create the upstream/5.3.0
pristine-tar and upstream branch contents manually, make a commit with
those and recreate the upstream/5.3.0 tag to point to those.

Would that be acceptable?

Best wishes,

   Julian

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


#14078

FromGeert Stappers <stappers@stappers.nl>
Date2022-04-25 08:20 +0200
Message-ID<Eg0eJ-b2ff-3@gated-at.bofh.it>
In reply to#14072
On Sun, Apr 24, 2022 at 09:40:53PM +0100, Julian Gilbey wrote:
> On Sun, Apr 24, 2022 at 10:09:21PM +0200, Geert Stappers wrote:
> > On Sun, Apr 24, 2022 at 09:01:02PM +0100, Julian Gilbey wrote:
> > > Hi,
> > > 
> > > Somehow I managed to really mess up a commit to python-qtconsole: the
> > > upstream and pristine-tar branches do not have the upstream/5.3.0
> > > sources (the current ones).  However, there's already an
> > > upstream/5.3.0 tag in the repository, pointing to a commit to the
> > > master branch.
> > > 
> > > I think the simplest thing to do is to "rewrite history": delete the
> > > head commits to the master branch and the 5.3.0 tags, and then
> > > recommit correctly and force-push to salsa.
> > > 
> > > Would people be OK with me doing this,
> > 
> > I'm not OK with rewriting history.
> > 
> > > or do you have an alternative suggestion?
> > 
> > Accept the failure, learn from it, move on, make new mistakes, learn from them.
> > 
> > In other words:  Do not spend energy on erasing a mistake^Wlearing expirience.
> 
> I do understand this, but now someone cloning the repository and
> running "gbp buildpackage" won't be able to do so.
> 
> I realise there is a much more minor change that would fix things:
> just delete the upstream/5.3.0 tag, create the upstream/5.3.0
> pristine-tar and upstream branch contents manually, make a commit with
> those and recreate the upstream/5.3.0 tag to point to those.
> 
> Would that be acceptable?

If upstream has a 5.3.1  go for 5.3.1 in Debian.
If an upstream 5.3.1 will take weeks, go for 5.3.01 
 
 
Groeten
Geert Stappers
-- 
Silence is hard to parse

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


#14073

FromTimo Röhling <roehling@debian.org>
Date2022-04-24 22:50 +0200
Message-ID<EfRl7-aWuZ-3@gated-at.bofh.it>
In reply to#14070

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

Hi Julian,

* Julian Gilbey <julian@d-and-j.net> [2022-04-24 21:01]:
>Somehow I managed to really mess up a commit to python-qtconsole: the
>upstream and pristine-tar branches do not have the upstream/5.3.0
>sources (the current ones).  However, there's already an
>upstream/5.3.0 tag in the repository, pointing to a commit to the
>master branch.
>
>I think the simplest thing to do is to "rewrite history": delete the
>head commits to the master branch and the 5.3.0 tags, and then
>recommit correctly and force-push to salsa.
>
>Would people be OK with me doing this, or do you have an alternative
>suggestion?
I looked at the Salsa repository, and it is not so bad. It seems like you
forgot to pull the latest changes in upstream and pristine-tar from
the 5.2.2 import first, so your import of 5.3.0 forked the those branches
unintentionally.

As the first order of business, you should run

$ git fetch origin

to update all your remote branches to the actual locations. Then, we
can fix the branches one by one.

For the pristine-tar branch, the easiest way is to rebase your
commit to the actual remote branch that includes the 5.2.2 import by
Frédéric:

$ git checkout pristine-tar
$ git rebase origin/pristine-tar
$ git push origin pristine-tar

The upstream branch cannot be rebased, because it is interwined with
the master branch. Fortunately, that is not necessary, because the
5.2.2 import has been merged into master and therefore is connected
in the graph.

Make sure that your local upstream branch and the upstream/5.3.0 tag both 
point at commit 08935221b549bf32157d739cd54eb1645a2ab123:

$ git -P log -n1 upstream
$ git -P log -n1 upstream/5.3.0

If they do, you can

$ git push --force origin upstream upstream/5.3.0

This will remove the 5.2.2 import from the upstream branch history, but it
will not be lost because it is still connected to the master branch,
which is arguably the more important connection, as it allows
you to reproduce the 5.2.2 upload if required.


Cheers
Timo

-- 
⢀⣴⠾⠻⢶⣦⠀   ╭────────────────────────────────────────────────────╮
⣾⠁⢠⠒⠀⣿⡁   │ Timo Röhling                                       │
⢿⡄⠘⠷⠚⠋⠀   │ 9B03 EBB9 8300 DF97 C2B1  23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄⠀⠀⠀⠀   ╰────────────────────────────────────────────────────╯

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


#14074

FromTimo Röhling <roehling@debian.org>
Date2022-04-24 23:00 +0200
Message-ID<EfRuN-aWBh-1@gated-at.bofh.it>
In reply to#14073

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

* Timo Röhling <roehling@debian.org> [2022-04-24 22:42]:
>Make sure that your local upstream branch and the upstream/5.3.0 tag 
>both point at commit 08935221b549bf32157d739cd54eb1645a2ab123:
Aaaand I copied the wrong commit hash to the email. :/
e228e8902aeb91011a53bb1a91f7f3390a771e0e is the one you should be
looking for: 

https://salsa.debian.org/python-team/packages/python-qtconsole/-/commit/e228e8902aeb91011a53bb1a91f7f3390a771e0e

>Cheers
>Timo

-- 
⢀⣴⠾⠻⢶⣦⠀   ╭────────────────────────────────────────────────────╮
⣾⠁⢠⠒⠀⣿⡁   │ Timo Röhling                                       │
⢿⡄⠘⠷⠚⠋⠀   │ 9B03 EBB9 8300 DF97 C2B1  23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄⠀⠀⠀⠀   ╰────────────────────────────────────────────────────╯

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


#14075

FromJulian Gilbey <julian@d-and-j.net>
Date2022-04-24 23:20 +0200
Message-ID<EfROa-aWYO-1@gated-at.bofh.it>
In reply to#14074
On Sun, Apr 24, 2022 at 10:49:55PM +0200, Timo Röhling wrote:
> * Timo Röhling <roehling@debian.org> [2022-04-24 22:42]:
> > Make sure that your local upstream branch and the upstream/5.3.0 tag
> > both point at commit 08935221b549bf32157d739cd54eb1645a2ab123:
> Aaaand I copied the wrong commit hash to the email. :/
> e228e8902aeb91011a53bb1a91f7f3390a771e0e is the one you should be
> looking for:
> 
> https://salsa.debian.org/python-team/packages/python-qtconsole/-/commit/e228e8902aeb91011a53bb1a91f7f3390a771e0e

Indeed, that was the commit made by gbp import-orig.  But the upstream
and pristine-tar branches don't include that commit, unfortunately,
because of my mistake.  Therefore gbp buildpackage doesn't work,
because it can't find the original sources on the upstream branch.

Best wishes,

   Julian

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


#14077

FromJulian Gilbey <julian@d-and-j.net>
Date2022-04-24 23:30 +0200
Message-ID<EfRXP-aX2u-17@gated-at.bofh.it>
In reply to#14074
On Sun, Apr 24, 2022 at 10:49:55PM +0200, Timo Röhling wrote:
> * Timo Röhling <roehling@debian.org> [2022-04-24 22:42]:
> > Make sure that your local upstream branch and the upstream/5.3.0 tag
> > both point at commit 08935221b549bf32157d739cd54eb1645a2ab123:
> Aaaand I copied the wrong commit hash to the email. :/
> e228e8902aeb91011a53bb1a91f7f3390a771e0e is the one you should be
> looking for:
> 
> https://salsa.debian.org/python-team/packages/python-qtconsole/-/commit/e228e8902aeb91011a53bb1a91f7f3390a771e0e

Ah, I understand now!  This commit is actually the upstream sources!
I hadn't realised exactly what gbp does.  I'll have a go at following
your instructions in your last email tomorrow.

Thanks,

   Julian

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


#14076

FromJulian Gilbey <julian@d-and-j.net>
Date2022-04-24 23:20 +0200
Message-ID<EfROa-aWYO-5@gated-at.bofh.it>
In reply to#14073
Hi Timo,

On Sun, Apr 24, 2022 at 10:42:51PM +0200, Timo Röhling wrote:
> Hi Julian,
> 
> * Julian Gilbey <julian@d-and-j.net> [2022-04-24 21:01]:
> > Somehow I managed to really mess up a commit to python-qtconsole: the
> > upstream and pristine-tar branches do not have the upstream/5.3.0
> > sources (the current ones).  However, there's already an
> > upstream/5.3.0 tag in the repository, pointing to a commit to the
> > master branch.
> > 
> > I think the simplest thing to do is to "rewrite history": delete the
> > head commits to the master branch and the 5.3.0 tags, and then
> > recommit correctly and force-push to salsa.
> > 
> > Would people be OK with me doing this, or do you have an alternative
> > suggestion?
> I looked at the Salsa repository, and it is not so bad. It seems like you
> forgot to pull the latest changes in upstream and pristine-tar from
> the 5.2.2 import first, so your import of 5.3.0 forked the those branches
> unintentionally.

Thanks for the analysis, but I don't think that's what happened.  I
think what I did was something like this:

* I had an up-to-date clone of the repository from salsa (at tag
  debian/5.2.2-1 on master, and at tag upstream/5.2.2 on upstream)
* I ran gbp import-orig on the new 5.3.0 sources.
* I realised I'd done something wrong, so I tried to reset --hard all
  three branches back to before the import.
* I then re-imported the 5.3.0 sources correctly, or so I thought.

(That can't be exactly right, but it may be close to what happened.)
But somehow, that didn't work properly, and what I've ended up with is
that the master branch is correct, with the upstream/5.3.0 and
debian/5.3.0-1 tags pointing at the correct commits, but the upstream
and pristine-tar branches are not up-to-date: the don't have the
upstream 5.3.0 contents.

So what I'm thinking I could do is:
* Unpack the 5.3.0 sources into the upstream branch and commit the
  change
* Reset the upstream/5.3.0 tag to point to this new commit
* Use gbp pristine-tar to create the .delta and .id files on the
  pristine-tar branch

This does not rewrite history, but it fixes the gbp problem, with the
only change required being a modification to the upstream/5.3.0 tag.

Thoughts?

   Julian

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


#14082

FromJulian Gilbey <julian@d-and-j.net>
Date2022-04-26 12:10 +0200
Message-ID<EgqiR-biAP-1@gated-at.bofh.it>
In reply to#14073
Hi Timo (and Geert),

On Sun, Apr 24, 2022 at 10:42:51PM +0200, Timo Röhling wrote:
> Hi Julian,
> 
> * Julian Gilbey <julian@d-and-j.net> [2022-04-24 21:01]:
> > Somehow I managed to really mess up a commit to python-qtconsole: the
> > upstream and pristine-tar branches do not have the upstream/5.3.0
> > sources (the current ones).  However, there's already an
> > upstream/5.3.0 tag in the repository, pointing to a commit to the
> > master branch.
> > 
> > I think the simplest thing to do is to "rewrite history": delete the
> > head commits to the master branch and the 5.3.0 tags, and then
> > recommit correctly and force-push to salsa.
> > 
> > Would people be OK with me doing this, or do you have an alternative
> > suggestion?
> I looked at the Salsa repository, and it is not so bad. It seems like you
> forgot to pull the latest changes in upstream and pristine-tar from
> the 5.2.2 import first, so your import of 5.3.0 forked the those branches
> unintentionally.
> [...]

Thanks for all the advice!  I managed to sort it moderately cleanly in
the end, and this email records what happened and what I did, in case
anyone might benefit from this in the future.

It turns out that I'd also messed up more than I'd realised: even when
I pulled in the updated master branch, I didn't pull the upstream
branch, so managed to introduce even more conflicts.  Oh well.

But the key things that allowed for a moderately clean fix were:

* I'd correctly used gbp import-orig to pull in the original 5.3.0
  distribution to the master branch

* I had an upstream/5.3.0 tag in my local repository (which for some
  reason I hadn't pushed, yeesh)

So the state of the salsa repository was (in an ideal world where I'd
pulled upstream):
- master included the upstream/5.3.0 commit, tagged as upstream/5.3.0,
  along with further commits
- upstream was at upstream/5.2.2
- pristine-tar contained data up to upstream/5.2.2

To fix the problem, I did:

$ git checkout upstream
$ git reset --hard upstream/5.3.0
$ git checkout master
$ gbp pristine-tar commit

and that fixed everything.  I finished with git push --all and git
push --tags.

I hope I don't make this mistake again!

Best wishes,

   Julian

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


#14083 — Re: Messed up a salsa commit - Reporting the fix

FromGeert Stappers <stappers@debian.org>
Date2022-04-26 13:30 +0200
SubjectRe: Messed up a salsa commit - Reporting the fix
Message-ID<Egryh-bjok-1@gated-at.bofh.it>
In reply to#14082

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

On Tue, Apr 26, 2022 at 11:03:24AM +0100, Julian Gilbey wrote:
> Hi Timo (and Geert),
 
;-)


> On Sun, Apr 24, 2022 at 10:42:51PM +0200, Timo Röhling wrote:
> > Hi Julian,
> > 
> > * Julian Gilbey <julian@d-and-j.net> [2022-04-24 21:01]:
> > > Somehow I managed to really mess up a commit to python-qtconsole: the
> > > upstream and pristine-tar branches do not have the upstream/5.3.0
> > > sources (the current ones).  However, there's already an
> > > upstream/5.3.0 tag in the repository, pointing to a commit to the
> > > master branch.
> > > 
> > > I think the simplest thing to do is to "rewrite history": delete the
> > > head commits to the master branch and the 5.3.0 tags, and then
> > > recommit correctly and force-push to salsa.
> > > 
> > > Would people be OK with me doing this, or do you have an alternative
> > > suggestion?
> > I looked at the Salsa repository, and it is not so bad. It seems like you
> > forgot to pull the latest changes in upstream and pristine-tar from
> > the 5.2.2 import first, so your import of 5.3.0 forked the those branches
> > unintentionally.
> > [...]
> 
> Thanks for all the advice!  I managed to sort it moderately cleanly in
> the end, and this email records what happened and what I did, in case
> anyone might benefit from this in the future.
> 
> It turns out that I'd also messed up more than I'd realised: even when
> I pulled in the updated master branch, I didn't pull the upstream
> branch, so managed to introduce even more conflicts.  Oh well.
> 
> But the key things that allowed for a moderately clean fix were:
> 
> * I'd correctly used gbp import-orig to pull in the original 5.3.0
>   distribution to the master branch
> 
> * I had an upstream/5.3.0 tag in my local repository (which for some
>   reason I hadn't pushed, yeesh)

Ah


> So the state of the salsa repository was (in an ideal world where I'd
> pulled upstream):
> - master included the upstream/5.3.0 commit, tagged as upstream/5.3.0,
>   along with further commits
> - upstream was at upstream/5.2.2
> - pristine-tar contained data up to upstream/5.2.2
> 
> To fix the problem, I did:
> 
> $ git checkout upstream
> $ git reset --hard upstream/5.3.0

FWIW Here I miss a `git commit -a`

> $ git checkout master
> $ gbp pristine-tar commit
> 
> and that fixed everything.  I finished with
> 
> $ git push --all
> 
> and
> 
> $ git push --tags.
> 

Thanks for reporting, thanks for sharing what was learnt.

> 
> I hope I don't make this mistake again!

No worries, there will be other mistakes  and that is good.
Know that the only way to avoid mistakes is doing nothing.

 
> Best wishes,
>    Julian
 

Groeten
Geert Stappers
DD
-- 
Silence is hard to parse

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


#14085 — Re: Messed up a salsa commit - Reporting the fix

FromJulian Gilbey <julian@d-and-j.net>
Date2022-04-26 14:30 +0200
SubjectRe: Messed up a salsa commit - Reporting the fix
Message-ID<Egsul-bjYg-1@gated-at.bofh.it>
In reply to#14083
On Tue, Apr 26, 2022 at 01:26:26PM +0200, Geert Stappers wrote:
> [...]
> > So the state of the salsa repository was (in an ideal world where I'd
> > pulled upstream):
> > - master included the upstream/5.3.0 commit, tagged as upstream/5.3.0,
> >   along with further commits
> > - upstream was at upstream/5.2.2
> > - pristine-tar contained data up to upstream/5.2.2
> > 
> > To fix the problem, I did:
> > 
> > $ git checkout upstream
> > $ git reset --hard upstream/5.3.0
> 
> FWIW Here I miss a `git commit -a`

Actually there is no git commit here, surprisingly.  When running
`gbp import-orig`, if I understand correctly, it checks out the
previous upstream in the master branch, then unpacks the new upstream
and commits it, tagging it as "upstream/..." - this commit has a
single parent: the previous upstream commit.  Then it merges the
debian/ directory of the previous commit in the master branch with the
new upstream.  The "upstream" branch contains just the upstream
commits; "upstream" is just a pointer to the most recent upstream
commit, so the `git reset` command here moves the pointer to the
correct place.  There are no uncommitted files.

> Thanks for reporting, thanks for sharing what was learnt.

:-)

> > I hope I don't make this mistake again!
> 
> No worries, there will be other mistakes  and that is good.
> Know that the only way to avoid mistakes is doing nothing.

That is indeed true!

Best wishes,

   Julian

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


#14084

FromTimo Röhling <roehling@debian.org>
Date2022-04-26 14:00 +0200
Message-ID<Egs1j-bjzV-1@gated-at.bofh.it>
In reply to#14082

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

Hi Julian,

* Julian Gilbey <julian@d-and-j.net> [2022-04-26 11:03]:
>It turns out that I'd also messed up more than I'd realised: even when
>I pulled in the updated master branch, I didn't pull the upstream
>branch, so managed to introduce even more conflicts.  Oh well.
It's an easy mistake to write "git pull" if you meant to do "gbp
pull". I lost count how often I wrote "git pq" by accident...

>To fix the problem, I did:
>
>$ git checkout upstream
>$ git reset --hard upstream/5.3.0
Judging from the current commit graph, you probably threw in a
"git merge -s ours origin/upstream" here as well?
>$ git checkout master
>$ gbp pristine-tar commit
>
>and that fixed everything.  I finished with git push --all and git
>push --tags.
Nice!

>I hope I don't make this mistake again!
Don't worry about it too much. Git is quite resilient, and as long
as you do not panic and start force-pushing random stuff, everything
can be repaired.


Cheers
Timo

-- 
⢀⣴⠾⠻⢶⣦⠀   ╭────────────────────────────────────────────────────╮
⣾⠁⢠⠒⠀⣿⡁   │ Timo Röhling                                       │
⢿⡄⠘⠷⠚⠋⠀   │ 9B03 EBB9 8300 DF97 C2B1  23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄⠀⠀⠀⠀   ╰────────────────────────────────────────────────────╯

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


#14086

FromJulian Gilbey <julian@d-and-j.net>
Date2022-04-26 14:40 +0200
Message-ID<EgsE1-bk1e-3@gated-at.bofh.it>
In reply to#14084
Hi Timo,

On Tue, Apr 26, 2022 at 01:55:13PM +0200, Timo Röhling wrote:
> Hi Julian,
> 
> * Julian Gilbey <julian@d-and-j.net> [2022-04-26 11:03]:
> > It turns out that I'd also messed up more than I'd realised: even when
> > I pulled in the updated master branch, I didn't pull the upstream
> > branch, so managed to introduce even more conflicts.  Oh well.
> It's an easy mistake to write "git pull" if you meant to do "gbp
> pull". I lost count how often I wrote "git pq" by accident...

Ah, I didn't know about gbp pull/push!  I'm definitely going to use
those in future (and repeatedly make that same typing mistake!).

> > To fix the problem, I did:
> > 
> > $ git checkout upstream
> > $ git reset --hard upstream/5.3.0
> Judging from the current commit graph, you probably threw in a
> "git merge -s ours origin/upstream" here as well?

Yeah :-( Well, sort of.  I did the git reset, then git push --all and
got an error because I hadn't done a pull on this branch :-(  So then I
did a git pull on this branch followed by resolving the conflicts....

> > $ git checkout master
> > $ gbp pristine-tar commit
> > 
> > and that fixed everything.  I finished with git push --all and git
> > push --tags.
> Nice!
> 
> > I hope I don't make this mistake again!
> Don't worry about it too much. Git is quite resilient, and as long
> as you do not panic and start force-pushing random stuff, everything
> can be repaired.

I'm not too worried, just that it took far more effort than it would
have done if I'd done things right to begin with!

Best wishes,

   Julian

[toc] | [prev] | [standalone]


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


csiph-web