#1029599 gbp: Permit to run merge step alone after gbp import-orig --no-merge

#1029599#5
Date:
2023-01-25 09:24:29 UTC
From:
To:
Dear Maintainer,

In my repo, there are various vendor branches, the upstream & pristine-tar
branches.

Let's say each vendor doesn't update to the latest upstream version at the
same time.

So the first one import the new upstream version runs:

gbp import-orig --uscan --no-merge --pristine-tar

But after that it is not possible to easily update the vendor branches with a
given version that is now in upstream/* & pristine-tar

Would it be possible to support a command in gbp import-orig to just run the
"merge" step at the time each vendor branch wants it?

I looked at the verbose output of git merge and there are rather a lot of
command to do this manually.

gbp:info: source package is freefilesync
gbp:info: upstream version is 12.0
gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/upstream/latest']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'upstream/latest']
gbp:debug: ['git', 'add', '-f', '.']
gbp:debug: ['git', 'write-tree']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'upstream/latest']
gbp:debug: ['git', 'commit-tree', '27314593587b7b431c0f7e0e400a6d11390c0214',
'-p', '8dadd1b9fd4fb3a53ff2357ffffeb3e7f6a602a8']
gbp:debug: ['git', 'update-ref', '-m', 'gbp: new upstream version 12.0',
'refs/heads/upstream/latest', '9f1e58d1da285e68cb26b9ea1527f22e590f80b1',
'8dadd1b9fd4fb3a53ff2357ffffeb3e7f6a602a8']
gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/pristine-tar']
gbp:debug: ['git', 'rev-parse', '--quiet', '--verify', 'pristine-tar']
gbp:debug: ['git', 'ls-tree', '-z', 'upstream/latest', '--']
gbp:debug: ['git', 'mktree', '-z']
gbp:debug: pristine-tar [] ['commit', '../freefilesync_12.0.orig.tar.xz',
'27314593587b7b431c0f7e0e400a6d11390c0214']
gbp:debug: ['git', 'tag', '-m', 'upstream version 12.0', 'upstream/12.0',
'9f1e58d1da285e68cb26b9ea1527f22e590f80b1']
gbp:debug: ['git', 'symbolic-ref', 'head']
gbp:debug: ['git', 'show-ref', 'refs/heads/debian/latest']
gbp:debug: rm ['-rf', '../tmptg4x81j5'] []
gbp:info: successfully imported version 12.0 of
../freefilesync_12.0.orig.tar.xz


I also tried:

git merge --strategy recursive --strategy-option theirs upstream/latest

But it doesn't take all changes in my case. Some files from upstream are not
updated.

Thanks