Bug#900781: git-buildpackage: import-orig does 'reset --hard' at then end, voiding the previously run 'pq import'

2021-08-13 Thread Guido Günther
Hi,
On Tue, Jun 05, 2018 at 02:42:50PM +0200, Julien Muchembled wrote:
> Le 06/05/18 à 14:20, Guido Günther a écrit :
> > Does this work as you'd expect it:
> > 
> > $ gbp clone g...@salsa.debian.org:python-team/modules/zc-lockfile.git
> > $ gbp pq import
> > $ git co debian/master
> > $ gbp import-orig 
> > https://files.pythonhosted.org/packages/f5/fe/efb94907d8b2b81c3beab1bd628ff67e310d82816b94aa00b52062727ea9/zc.lockfile-1.3.0.tar.gz
> > 
> > import-orig imports onto the branch you're currently on 
> > causing the above commit to be lost. It should import on the
> > debian-branch instead.
> 
> Yes, that works.
> 
> But import-orig is supposed to import onto the branch specified by
> --debian-branch (already 'debian/master' according to
> debian/gpb.conf), isn't it ?

Actually no because that breaks the:

git checkout -b topic-branch
gbp pq import

gbp pq export --commmit
git push salsa topic-branch

workflow. 

> Or if debian/master must really be checked out, then the problem is in the 
> docs, and in the description of --debian-branch

Care enough the send a patch? That would be great.
Cheers,
 -- Guido



Bug#900781: git-buildpackage: import-orig does 'reset --hard' at then end, voiding the previously run 'pq import'

2018-06-05 Thread Guido Günther
Hi,
On Tue, Jun 05, 2018 at 02:42:50PM +0200, Julien Muchembled wrote:
> Le 06/05/18 à 14:20, Guido Günther a écrit :
> > Does this work as you'd expect it:
> > 
> > $ gbp clone g...@salsa.debian.org:python-team/modules/zc-lockfile.git
> > $ gbp pq import
> > $ git co debian/master
> > $ gbp import-orig 
> > https://files.pythonhosted.org/packages/f5/fe/efb94907d8b2b81c3beab1bd628ff67e310d82816b94aa00b52062727ea9/zc.lockfile-1.3.0.tar.gz
> > 
> > import-orig imports onto the branch you're currently on 
> > causing the above commit to be lost. It should import on the
> > debian-branch instead.
> 
> Yes, that works.

Thanks for confirming!

> 
> But import-orig is supposed to import onto the branch specified by
> --debian-branch (already 'debian/master' according to
> debian/gpb.conf), isn't it ?

It's "just" not doing the right thing atm. I'll fix that.
Cheers,
 -- Guido

> 
> Or if debian/master must really be checked out, then the problem is in the 
> docs, and in the description of --debian-branch
> 



Bug#900781: git-buildpackage: import-orig does 'reset --hard' at then end, voiding the previously run 'pq import'

2018-06-05 Thread Julien Muchembled
Le 06/05/18 à 14:20, Guido Günther a écrit :
> Does this work as you'd expect it:
> 
> $ gbp clone g...@salsa.debian.org:python-team/modules/zc-lockfile.git
> $ gbp pq import
> $ git co debian/master
> $ gbp import-orig 
> https://files.pythonhosted.org/packages/f5/fe/efb94907d8b2b81c3beab1bd628ff67e310d82816b94aa00b52062727ea9/zc.lockfile-1.3.0.tar.gz
> 
> import-orig imports onto the branch you're currently on 
> causing the above commit to be lost. It should import on the
> debian-branch instead.

Yes, that works.

But import-orig is supposed to import onto the branch specified by 
--debian-branch (already 'debian/master' according to debian/gpb.conf), isn't 
it ?

Or if debian/master must really be checked out, then the problem is in the 
docs, and in the description of --debian-branch



Bug#900781: git-buildpackage: import-orig does 'reset --hard' at then end, voiding the previously run 'pq import'

2018-06-05 Thread Guido Günther
Hi,
On Tue, Jun 05, 2018 at 12:22:59PM +0200, Julien Muchembled wrote:
> $ gbp clone g...@salsa.debian.org:python-team/modules/zc-lockfile.git
> gbp:info: Cloning from 
> 'g...@salsa.debian.org:python-team/modules/zc-lockfile.git'
> $ cd zc-lockfile
> $ git branch
> * debian/master
>   pristine-tar
>   upstream
> $ gbp pq import
> gbp:info: Trying to apply patches at 
> '8c7a785b55b4b94093dd2b634ebfcb5d4f238371'
> gbp:warning: Patch 'no_doc_txt.patch' has no authorship information, using 
> 'Debian/Ubuntu Zope Team '
> gbp:info: 1 patches listed in 'debian/patches/series' imported on 
> 'patch-queue/debian/master'
> $ git log -2 --oneline --graph debian/master @
> * 8e236e0 (HEAD -> patch-queue/debian/master) no_doc_txt
> *   8c7a785 (origin/debian/master, origin/HEAD, debian/master) Merge 
> remote-tracking branch 'origin/svn'
> |\
> $ gbp import-orig 
> https://files.pythonhosted.org/packages/f5/fe/efb94907d8b2b81c3beab1bd628ff67e310d82816b94aa00b52062727ea9/zc.lockfile-1.3.0.tar.gz
> What is the upstream version? [1.3.0] 
> gbp:info: Importing '../zc.lockfile-1.3.0.tar.gz' to branch 'upstream'...
> gbp:info: Source package is zc.lockfile
> gbp:info: Upstream version is 1.3.0
> gbp:info: Replacing upstream source on 'debian/master'
> gbp:info: Successfully imported version 1.3.0 of ../zc.lockfile-1.3.0.tar.gz
> $ git log -2 --oneline
> b465d76 (HEAD -> patch-queue/debian/master, debian/master) Update upstream 
> source from tag 'upstream/1.3.0'
> 5706e9b (tag: upstream/1.3.0, upstream) New upstream version 1.3.0
> $ 
> 
> Commit 8e236e0 is lost and can't be rebased. I expect 
> patch-queue/debian/master to still point to it.

Does this work as you'd expect it:

$ gbp clone g...@salsa.debian.org:python-team/modules/zc-lockfile.git
$ gbp pq import
$ git co debian/master
$ gbp import-orig 
https://files.pythonhosted.org/packages/f5/fe/efb94907d8b2b81c3beab1bd628ff67e310d82816b94aa00b52062727ea9/zc.lockfile-1.3.0.tar.gz

import-orig imports onto the branch you're currently on 
causing the above commit to be lost. It should import on the
debian-branch instead.

Cheers,
 -- Guido



Bug#900781: git-buildpackage: import-orig does 'reset --hard' at then end, voiding the previously run 'pq import'

2018-06-05 Thread Julien Muchembled
$ gbp clone g...@salsa.debian.org:python-team/modules/zc-lockfile.git
gbp:info: Cloning from 
'g...@salsa.debian.org:python-team/modules/zc-lockfile.git'
$ cd zc-lockfile
$ git branch
* debian/master
  pristine-tar
  upstream
$ gbp pq import
gbp:info: Trying to apply patches at '8c7a785b55b4b94093dd2b634ebfcb5d4f238371'
gbp:warning: Patch 'no_doc_txt.patch' has no authorship information, using 
'Debian/Ubuntu Zope Team '
gbp:info: 1 patches listed in 'debian/patches/series' imported on 
'patch-queue/debian/master'
$ git log -2 --oneline --graph debian/master @
* 8e236e0 (HEAD -> patch-queue/debian/master) no_doc_txt
*   8c7a785 (origin/debian/master, origin/HEAD, debian/master) Merge 
remote-tracking branch 'origin/svn'
|\
$ gbp import-orig 
https://files.pythonhosted.org/packages/f5/fe/efb94907d8b2b81c3beab1bd628ff67e310d82816b94aa00b52062727ea9/zc.lockfile-1.3.0.tar.gz
What is the upstream version? [1.3.0] 
gbp:info: Importing '../zc.lockfile-1.3.0.tar.gz' to branch 'upstream'...
gbp:info: Source package is zc.lockfile
gbp:info: Upstream version is 1.3.0
gbp:info: Replacing upstream source on 'debian/master'
gbp:info: Successfully imported version 1.3.0 of ../zc.lockfile-1.3.0.tar.gz
$ git log -2 --oneline
b465d76 (HEAD -> patch-queue/debian/master, debian/master) Update upstream 
source from tag 'upstream/1.3.0'
5706e9b (tag: upstream/1.3.0, upstream) New upstream version 1.3.0
$ 

Commit 8e236e0 is lost and can't be rebased. I expect patch-queue/debian/master 
to still point to it.



Bug#900781: git-buildpackage: import-orig does 'reset --hard' at then end, voiding the previously run 'pq import'

2018-06-04 Thread Guido Günther
Hi,
On Mon, Jun 04, 2018 at 10:00:23PM +0200, Julien Muchembled wrote:
> Package: git-buildpackage
> Version: 0.9.9
> Severity: normal
> Tags: upstream
> 
> Both the git-buildpackage documentation and
>   https://wiki.debian.org/Python/GitPackagingPQ
> 
> invite the user to first run 'gbp pq import' before using 'import-orig'.
> 
> However, since the 'replace' merge mode, which is actually the default mode
> for most packages, 'import-orig' resets the patch queue branch at the end.
> 
> Which means that all patches are lost and executing
> 'gbp pq rebase' + 'gbp pq export' do nothing.

import-orig does not the pq branch at all. You need to give an example
what you think is wrong.
 -- Guido



Bug#900781: git-buildpackage: import-orig does 'reset --hard' at then end, voiding the previously run 'pq import'

2018-06-04 Thread Julien Muchembled
Package: git-buildpackage
Version: 0.9.9
Severity: normal
Tags: upstream

Both the git-buildpackage documentation and
  https://wiki.debian.org/Python/GitPackagingPQ

invite the user to first run 'gbp pq import' before using 'import-orig'.

However, since the 'replace' merge mode, which is actually the default mode
for most packages, 'import-orig' resets the patch queue branch at the end.

Which means that all patches are lost and executing
'gbp pq rebase' + 'gbp pq export' do nothing.

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (900, 'testing'), (600, 'unstable'), (500, 'unstable-debug'), 
(500, 'testing-debug'), (500, 'proposed-updates'), (500, 'stable'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.1.51+ (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE= 
(charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages git-buildpackage depends on:
ii  devscripts 2.18.3
ii  git1:2.14.1-3
ii  man-db 2.7.6.1-2
pn  python3
ii  python3-dateutil   2.6.1-1
ii  python3-pkg-resources  36.6.0-1

Versions of packages git-buildpackage recommends:
ii  pbuilder  0.229.2
ii  pristine-tar  1.44
ii  python3-requests  2.18.1-1

Versions of packages git-buildpackage suggests:
pn  python3-notify2  
ii  sudo 1.8.21p2-1
ii  unzip6.0-21

-- no debconf information