[Git-dpm-user] [request-tracker-maintainers] git repo at risk; upstream branch breakage

Dominic Hargreaves dom at earth.li
Tue Mar 26 22:36:29 UTC 2013


Adding git-dpm-user to receipients. This is talking about the repository
to be found at

http://anonscm.debian.org/gitweb/?p=pkg-request-tracker/request-tracker4.git

and I'd appreciate hints.

On Tue, Mar 26, 2013 at 09:22:22AM +0200, Niko Tyni wrote:
> On Tue, Mar 26, 2013 at 08:35:32AM +0200, Niko Tyni wrote:
> > On Tue, Mar 26, 2013 at 12:50:33AM +0000, Dominic Hargreaves wrote:
> >  
> > > I just noticed that the upstream branch (and thus master
> > > which is merged from upstream) has ended up not being descended
> > > from the old upstream with the commit history back to 4.0.1.
> > > This appears to have been caused by git-dpm import-new-upstream,
> > > of 4.0.10 (the first use of git-dpm in this repo), even though it is
> > > not expected to do this.
> > > 
> > > I don't know why this has happened; clues welcomed if anyone knows
> > > what's going on here, otherwise please take this as a warning that
> > > I may have to do a forced push to repair things, meaning that anything
> > > based on the current master (post-4.0.10 import) will need to be 
> > > rebased.
> > 
> > Sounds weird. I'll try to have a look when anonscm.debian.org is reachable
> > again (it's refusing connections atm). No problem with the forced push
> > on my part FWIW.
> 
> Oh, it's reachable via ssh so I've got the clone now.
> 
> Sorry, I can't make sense of it. I tried to redo an 'import-new-upstream'
> operation on top of 7ac49511bdf8a06718c579a0a72bd4a11456b390 but that
> seemed to work as expected.

I can reproduce this broken behaviour every time (see attachment).

To be clear, the issues is that in the upstream branch, following the
import, 'git log' shows the expected history, but 'git log etc' doesn't.

Anyone wanting to try this at home can find the orig files from
pristine-tar, or 

http://download.bestpractical.com/pub/rt/release/
http://download.bestpractical.com/pub/rt/release/third-party-source/

> The -third-party stuff confuses me, and perhaps git-dpm too. I note
> there's a 'component:' entry in debian/.git-dpm so I suppose you've
> used the '--component' git-dpm option at some point?

Yes, once I'd merged upstream-third-party-source into upstream, as
git-dpm seems to expect, I ran git init like this:

git-dpm init --record-patch-name --component ../request-tracker4_4.0.7.orig-third-party-source.tar.gz ../request-tracker4_4.0.7.orig.tar.gz upstream

The problem does indeed seem to be related to components, because if I run

git-dpm import-new-upstream -p upstream ../request-tracker4_4.0.10.orig.tar.gz

(without component) then the right thing does seem to happen. Given that
there are no changes between the two, this might actually be a workable
solution this time round, but it feels wrong.

Running with debug doesn't reveal anything which jumps out at me:

dom at callisto:~/working/pkg-request-tracker-git/request-tracker4$ git-dpm --debug import-new-upstream --component ../request-tracker4_4.0.10.orig-third-party-source.tar.gz ../request-tracker4_4.0.10.orig.tar.gz
request-tracker4_4.0.10.orig-third-party-source.tar.gz has sha1 adf4e3e8355c242ca2c91b21a0b75de8ba6f581a and size 803359
look at '../request-tracker4_4.0.10.orig.tar.gz'...
Guessing upstream branch name upstream
Guessing patched branch name patched
Guessing debian branch name master
Guessing current branch to be master
Create detached empty HEAD...
Unpack '../request-tracker4_4.0.10.orig-third-party-source.tar.gz'
and import into git's index.
removing possible left over empty folders...
Create detached empty HEAD...
Unpack '../request-tracker4_4.0.10.orig.tar.gz'
and import into git's index.
removing possible left over empty folders...
Read 54954a6439eac736206d70508f38807cd6075181 into .git/dpm/tmpindex
replace third-party-source/ with f499b4fe5b96366dc8ec3d2a6cd89f51794c159d
writing index stored in .git/dpm/tmpindex into tree
setting upstream branch...
Record new upstream branch...
preparing new debian/.git-dpm file for master
Read 7ac49511bdf8a06718c579a0a72bd4a11456b390: into .git/dpm/tmpindex
and apply .git/dpm/modifications:
100644 blob 9711f7faa85e7cb6ebadd34aa885f8a1e35c9e4d    debian/.git-dpm
writing index stored in .git/dpm/tmpindex into tree
Update 'master' ..
Next you need to call git-dpm rebase-patched.
git-dpm: WARNING: No parent commit specified.
This means the upstream branch was created from the .orig.tar with only theold upstream branch as parent (but not any possible upstream git history).
Use 'git config dpm.importWithoutParent true' to no longer show this warning.
or 'git config dpm.importWithoutParent false' to make this an hard error.

> Anyway, feel free to force push whatever fix you come up with :)

I'm still looking for ideas about what to do next. git-dpm people,
hoping this will sound familiar to you...

Cheers,
Dominic.

-- 
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)
-------------- next part --------------
dom at callisto:~/working/pkg-request-tracker-git/request-tracker4$ git show HEAD|grep ^commit
commit 7ac49511bdf8a06718c579a0a72bd4a11456b390
dom at callisto:~/working/pkg-request-tracker-git/request-tracker4$ git-dpm import-new-upstream --component ../request-tracker4_4.0.10.orig-third-party-source.tar.gz -p upstream ../request-tracker4_4.0.10.orig.tar.gz
error: duplicate parent 9d93f44b81e5d5ca6930f5b5925ad55818396ba8 ignored

(that -p doesn't make any difference, but I tried it just in case).

Next you need to call git-dpm rebase-patched.

dom at callisto:~/working/pkg-request-tracker-git/request-tracker4$ git checkout upstream
Switched to branch 'upstream'
Your branch and 'origin/upstream' have diverged,
and have 2 and 2 different commits each, respectively.
dom at callisto:~/working/pkg-request-tracker-git/request-tracker4$ git log --reverse|head -10
commit c86f9d94ca352cd1ee405497b00a758e453825ed
Author: Dominic Hargreaves <dom at earth.li>
Date:   Fri May 27 17:01:54 2011 +0100

    Initial upstream branch

commit 1da082c275c695f4b4954320f3bd9e1a4ab730b8
Author: Dominic Hargreaves <dom at earth.li>
Date:   Fri May 27 17:03:11 2011 +0100

dom at callisto:~/working/pkg-request-tracker-git/request-tracker4$ git log --reverse etc
commit c6a42345714c3d9c3f9c3dafa354bf36641cd0af
Author: Dominic Hargreaves <dom at earth.li>
Date:   Tue Mar 26 21:46:18 2013 +0000

    Import request-tracker4_4.0.10.orig.tar.gz



More information about the Git-dpm-user mailing list