chiark / gitweb /
dgit.git
2 years agodgit: dsc Dgit field handling: Parse additional data
Ian Jackson [Sun, 8 Jan 2017 00:03:53 +0000 (00:03 +0000)]
dgit: dsc Dgit field handling: Parse additional data

So far we don't do much with it, so this akes no change except to
messages.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit: Dgit parsing: Move @ourdscfield loop into parse_dsc_field
Ian Jackson [Sat, 7 Jan 2017 18:51:37 +0000 (18:51 +0000)]
dgit: Dgit parsing: Move @ourdscfield loop into parse_dsc_field

This gives it the $dsc.  Also it means that import-dsc will understand
very old .dscs with Vcs-Dgit-Master.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit: Enforce a syntax for nominal distros
Ian Jackson [Sat, 7 Jan 2017 18:45:59 +0000 (18:45 +0000)]
dgit: Enforce a syntax for nominal distros

These appear in various interchange output like tags.  They should be
sane.  They're going to appear in Dgit: too where people will need to
use them.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit: Dgit parsing: Refactor into parse_dsc_field
Ian Jackson [Sat, 7 Jan 2017 18:44:26 +0000 (18:44 +0000)]
dgit: Dgit parsing: Refactor into parse_dsc_field

No functional change other than changes to messages.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoProtocol change: Add distro info to Dgit field
Ian Jackson [Fri, 6 Jan 2017 18:29:00 +0000 (18:29 +0000)]
Protocol change: Add distro info to Dgit field

Downstream clients may need this to get the relevant git commits.
Worse, with the new rewrite functionality, they may get the _wrong_
commits because they may not be rewritten.

For now we implement the publication side.  The reader side is
theoretically straightforward, but probably not so simple in reality,
and certainly fiddly to test.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit: Option parsing: Move notpushing call in fetch/pull
Ian Jackson [Sun, 8 Jan 2017 12:01:36 +0000 (12:01 +0000)]
dgit: Option parsing: Move notpushing call in fetch/pull

We should use the calculated $idistro and $isuite

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit: Option parsing: combine parseopts_late_defaults and finalise_opts_opts
Ian Jackson [Sat, 7 Jan 2017 16:48:26 +0000 (16:48 +0000)]
dgit: Option parsing: combine parseopts_late_defaults and finalise_opts_opts

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit: Option parsing: Move parseopts_late_defaults textually
Ian Jackson [Sat, 7 Jan 2017 16:44:17 +0000 (16:44 +0000)]
dgit: Option parsing: Move parseopts_late_defaults textually

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit: Option parsing: Fix distro/suite reference bugs
Ian Jackson [Sat, 7 Jan 2017 16:41:56 +0000 (16:41 +0000)]
dgit: Option parsing: Fix distro/suite reference bugs

By moving parseopts_late_defaults call.

This is conceptually the same as finalise_late_opts, so do it there.
We have to add a missing call to build_prep_early, as otherwise we
call massage_dbp_args too soon.

Also move a nopushing() call until after $isuite is set

All of this means that we now honour $isuite (and sometimes $idistro)
much better.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit: Option parsing: Make function parseopts_late_defaults
Ian Jackson [Sat, 7 Jan 2017 16:31:58 +0000 (16:31 +0000)]
dgit: Option parsing: Make function parseopts_late_defaults

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit: Option parsing: Provide call to build_prep_early in build_source
Ian Jackson [Sat, 7 Jan 2017 18:15:13 +0000 (18:15 +0000)]
dgit: Option parsing: Provide call to build_prep_early in build_source

This means $isuite is set a bit earlier, etc.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit: Option parsing: quilt-fixup: Use build_prep_early
Ian Jackson [Sat, 7 Jan 2017 17:30:13 +0000 (17:30 +0000)]
dgit: Option parsing: quilt-fixup: Use build_prep_early

This means $isuite is set early enough.

As a side-effect, we correctly reject -p.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: Allow overriding of -dtest-dummy dgit argument
Ian Jackson [Sat, 7 Jan 2017 17:18:49 +0000 (17:18 +0000)]
test suite: Allow overriding of -dtest-dummy dgit argument

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: lib-reprepro: Allow configuring for another distro
Ian Jackson [Sat, 7 Jan 2017 15:54:50 +0000 (15:54 +0000)]
test suite: lib-reprepro: Allow configuring for another distro

We can now make a second `distro' this way, with some additional
optional arguments.

No functional change for existing call sites.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: lib-reprepro: Add a couple of comments
Ian Jackson [Sat, 7 Jan 2017 15:58:36 +0000 (15:58 +0000)]
test suite: lib-reprepro: Add a couple of comments

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: Refactor lib-reprepro
Ian Jackson [Sat, 7 Jan 2017 15:52:51 +0000 (15:52 +0000)]
test suite: Refactor lib-reprepro

* Break out t-reprepro-cfg.
* Introduce the variables `mir' and `etcapt' to many functions.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: Add t-stunt-parsechangelog to a few tests which were missing it.
Ian Jackson [Sat, 7 Jan 2017 15:13:45 +0000 (15:13 +0000)]
test suite: Add t-stunt-parsechangelog to a few tests which were missing it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: Parse Dgit: field properly (look for initial \w+ only)
Ian Jackson [Sat, 7 Jan 2017 16:37:43 +0000 (16:37 +0000)]
test suite: Parse Dgit: field properly (look for initial \w+ only)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit: import-dsc: Parse `Dgit:' field properly, using only \w+
Ian Jackson [Sat, 7 Jan 2017 17:27:25 +0000 (17:27 +0000)]
dgit: import-dsc: Parse `Dgit:' field properly, using only \w+

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: gbp-orig: Add a missing -m
Ian Jackson [Sat, 7 Jan 2017 17:40:25 +0000 (17:40 +0000)]
test suite: gbp-orig: Add a missing -m

Without this, it would run an editor if stdout was a tty (!)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Do not investigate symrefs
Ian Jackson [Sat, 7 Jan 2017 17:05:31 +0000 (17:05 +0000)]
dgit-badcommit-fixup: Do not investigate symrefs

Closes:#850547.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit-badcommit-fixup:
* Do not investigate symrefs.  Closes:#850547.

2 years agotest suite: lib-orig-include-exclude Strip block count out of find -ls
Ian Jackson [Sun, 8 Jan 2017 22:12:41 +0000 (22:12 +0000)]
test suite: lib-orig-include-exclude Strip block count out of find -ls

This is unstable!  I have just seen it vary spontaneously in the
middle of a test run, resulting in this:

 ++ diff -u ../before ../after
 --- ../before   2017-01-08 21:39:48.176033763 +0000
 +++ ../after    2017-01-08 21:39:48.208033833 +0000
 @@ -1,2 +1,2 @@
 -   208380      4 -rw-rw-r--   9 ian      ian           236 Nov  6 20:49 /home/ian/things/Dgit/2dgit/tests/tmp/orig-include-exclude-chkquery/mirror/pool/main/example_1.0.orig-docs.tar.gz
 -   208381      4 -rw-rw-r--   8 ian      ian           373 Nov  6 20:49 /home/ian/things/Dgit/2dgit/tests/tmp/orig-include-exclude-chkquery/mirror/pool/main/example_1.0.orig.tar.gz
 +   208380      4 -rw-rw-r--  10 ian      ian           236 Nov  6 20:49 /home/ian/things/Dgit/2dgit/tests/tmp/orig-include-exclude-chkquery/mirror/pool/main/example_1.0.orig-docs.tar.gz
 +   208381      4 -rw-rw-r--   9 ian      ian           373 Nov  6 20:49 /home/ian/things/Dgit/2dgit/tests/tmp/orig-include-exclude-chkquery/mirror/pool/main/example_1.0.orig.tar.gz
 + test 1 = 0
 + t-report-failure

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: lib-orig-include-exclude: Introduce origs_findls
Ian Jackson [Sun, 8 Jan 2017 22:07:43 +0000 (22:07 +0000)]
test suite: lib-orig-include-exclude: Introduce origs_findls

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoArrange to pass --debug-quick-random to gpg-agent.
Ian Jackson [Sun, 8 Jan 2017 21:04:31 +0000 (21:04 +0000)]
Arrange to pass --debug-quick-random to gpg-agent.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agobadcommit-rewrite: Fix operation using installed version of fixup.
Ian Jackson [Sun, 8 Jan 2017 21:03:50 +0000 (21:03 +0000)]
badcommit-rewrite: Fix operation using installed version of fixup.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: Generalise DGIT_TEST_REAL_<FOO> handling
Ian Jackson [Sun, 8 Jan 2017 13:40:14 +0000 (13:40 +0000)]
test suite: Generalise DGIT_TEST_REAL_<FOO> handling

No overall functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: tests/run-all: Use a bit more cpu
Ian Jackson [Sun, 8 Jan 2017 13:14:53 +0000 (13:14 +0000)]
test suite: tests/run-all: Use a bit more cpu

Make allowance for tests that do a bit of downloading or whatever.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: start 2.17~ (again)
Ian Jackson [Sat, 7 Jan 2017 15:09:17 +0000 (15:09 +0000)]
changelog: start 2.17~ (again)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: finalise 2.16.2 archive/debian/2.16.2 debian/2.16.2
Ian Jackson [Sat, 7 Jan 2017 13:32:10 +0000 (13:32 +0000)]
changelog: finalise 2.16.2

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup; In --check mode, exit status 2 if things are not fine
Ian Jackson [Sat, 7 Jan 2017 13:23:58 +0000 (13:23 +0000)]
dgit-badcommit-fixup; In --check mode, exit status 2 if things are not fine

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Fix crash when running for 2nd time in bare repo.
Ian Jackson [Sat, 7 Jan 2017 13:23:28 +0000 (13:23 +0000)]
dgit-badcommit-fixup: Fix crash when running for 2nd time in bare repo.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: start 2.17~ (again)
Ian Jackson [Sat, 7 Jan 2017 13:05:49 +0000 (13:05 +0000)]
changelog: start 2.17~ (again)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: finalise 2.16.1 debian/2.16.1
Ian Jackson [Sat, 7 Jan 2017 13:05:09 +0000 (13:05 +0000)]
changelog: finalise 2.16.1

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: New mode --check which is readonly.
Ian Jackson [Sat, 7 Jan 2017 13:00:41 +0000 (13:00 +0000)]
dgit-badcommit-fixup: New mode --check which is readonly.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: start 2.17~
Ian Jackson [Sat, 7 Jan 2017 12:53:58 +0000 (12:53 +0000)]
changelog: start 2.17~

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: finalise 2.16 archive/debian/2.16 debian/2.16
Ian Jackson [Fri, 6 Jan 2017 20:46:43 +0000 (20:46 +0000)]
changelog: finalise 2.16

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Put our version in our rewrite map commit message
Ian Jackson [Fri, 6 Jan 2017 20:28:01 +0000 (20:28 +0000)]
dgit-badcommit-fixup: Put our version in our rewrite map commit message

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Skip our own output refs
Ian Jackson [Fri, 6 Jan 2017 20:23:30 +0000 (20:23 +0000)]
dgit-badcommit-fixup: Skip our own output refs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Instructions comment
Ian Jackson [Fri, 6 Jan 2017 20:23:20 +0000 (20:23 +0000)]
dgit-badcommit-fixup: Instructions comment

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoShell bug: avoid local=$(....) as it defeats set -e
Ian Jackson [Fri, 6 Jan 2017 19:49:23 +0000 (19:49 +0000)]
Shell bug: avoid local=$(....) as it defeats set -e

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: badcommit-rewrite: Check HEAD manipulation is right
Ian Jackson [Fri, 6 Jan 2017 18:15:01 +0000 (18:15 +0000)]
test suite: badcommit-rewrite: Check HEAD manipulation is right

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Do not detach HEAD - this is not needed
Ian Jackson [Fri, 6 Jan 2017 18:13:34 +0000 (18:13 +0000)]
dgit-badcommit-fixup: Do not detach HEAD - this is not needed

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: New test for history-rewriting
Ian Jackson [Fri, 6 Jan 2017 18:09:54 +0000 (18:09 +0000)]
test suite: New test for history-rewriting

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Now seems to work
Ian Jackson [Fri, 6 Jan 2017 18:09:27 +0000 (18:09 +0000)]
dgit-badcommit-fixup: Now seems to work

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Debugging (commented out)
Ian Jackson [Fri, 6 Jan 2017 18:08:52 +0000 (18:08 +0000)]
dgit-badcommit-fixup: Debugging (commented out)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: lib-core: Provide DGIT_BADCOMMIT_FIXUP
Ian Jackson [Fri, 6 Jan 2017 17:51:29 +0000 (17:51 +0000)]
test suite: lib-core: Provide DGIT_BADCOMMIT_FIXUP

So that tests can test this program.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: t-make-badcommit: Generate a commit we can fix up
Ian Jackson [Fri, 6 Jan 2017 17:50:08 +0000 (17:50 +0000)]
test suite: t-make-badcommit: Generate a commit we can fix up

This is very like a commit generated by #849041.  The wrongness is the
same.  The difference is that it's not in a dgit-generated merge, but
the fixup script doesn't care about that.

The existing test case which uses this (drs-push-rejects) still sees
badness and is therefore still happy.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Bugfixes
Ian Jackson [Fri, 6 Jan 2017 17:49:49 +0000 (17:49 +0000)]
dgit-badcommit-fixup: Bugfixes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoChange name of rewrite map ref (needs an extra / for git)
Ian Jackson [Fri, 6 Jan 2017 17:48:38 +0000 (17:48 +0000)]
Change name of rewrite map ref (needs an extra / for git)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: Break out t-make-badcommit
Ian Jackson [Fri, 6 Jan 2017 17:11:03 +0000 (17:11 +0000)]
test suite: Break out t-make-badcommit

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit: Honour dgit-rewrite-map
Ian Jackson [Fri, 6 Jan 2017 17:01:48 +0000 (17:01 +0000)]
dgit: Honour dgit-rewrite-map

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoDgit.pm: Provide git_cat_file
Ian Jackson [Fri, 6 Jan 2017 17:01:14 +0000 (17:01 +0000)]
Dgit.pm: Provide git_cat_file

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Implement dgit-rewrite-map
Ian Jackson [Fri, 6 Jan 2017 16:36:06 +0000 (16:36 +0000)]
dgit-badcommit-fixup: Implement dgit-rewrite-map

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Break out filter_updates
Ian Jackson [Fri, 6 Jan 2017 16:26:19 +0000 (16:26 +0000)]
dgit-badcommit-fixup: Break out filter_updates

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Remove obsolete variable
Ian Jackson [Fri, 6 Jan 2017 16:23:10 +0000 (16:23 +0000)]
dgit-badcommit-fixup: Remove obsolete variable

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Do update sameness filtering a bit later
Ian Jackson [Fri, 6 Jan 2017 16:22:28 +0000 (16:22 +0000)]
dgit-badcommit-fixup: Do update sameness filtering a bit later

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Remove failing approach
Ian Jackson [Fri, 6 Jan 2017 16:16:33 +0000 (16:16 +0000)]
dgit-badcommit-fixup: Remove failing approach

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Ship
Ian Jackson [Fri, 6 Jan 2017 16:15:21 +0000 (16:15 +0000)]
dgit-badcommit-fixup: Ship

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-badcommit-fixup: Rename
Ian Jackson [Fri, 6 Jan 2017 16:11:52 +0000 (16:11 +0000)]
dgit-badcommit-fixup: Rename

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agobadcommit-fixup: Merge from a filtered view of my personal playground
Ian Jackson [Fri, 6 Jan 2017 16:09:39 +0000 (16:09 +0000)]
badcommit-fixup: Merge from a filtered view of my personal playground

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: start 2.16~
Ian Jackson [Fri, 6 Jan 2017 16:09:29 +0000 (16:09 +0000)]
changelog: start 2.16~

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agobadcommit-fixup: remove some debug
Ian Jackson [Thu, 5 Jan 2017 19:26:37 +0000 (19:26 +0000)]
badcommit-fixup: remove some debug

2 years agobadcommit-fixup: dummy add seems workingish
Ian Jackson [Thu, 5 Jan 2017 19:25:14 +0000 (19:25 +0000)]
badcommit-fixup: dummy add seems workingish

2 years agobadcommit-fixup: break out $bare
Ian Jackson [Thu, 5 Jan 2017 19:10:37 +0000 (19:10 +0000)]
badcommit-fixup: break out $bare

2 years agobadcommit-fixup: wip dummy commits
Ian Jackson [Thu, 5 Jan 2017 19:00:55 +0000 (19:00 +0000)]
badcommit-fixup: wip dummy commits

2 years agobadcommit-fixup: wip dummy commits
Ian Jackson [Thu, 5 Jan 2017 18:31:31 +0000 (18:31 +0000)]
badcommit-fixup: wip dummy commits

2 years agochangelog: finalise 2.15 (will not be uploaded) debian/2.15
Ian Jackson [Thu, 5 Jan 2017 18:20:42 +0000 (18:20 +0000)]
changelog: finalise 2.15 (will not be uploaded)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agobadcommit-fixup: break out $bare
Ian Jackson [Thu, 5 Jan 2017 17:42:01 +0000 (17:42 +0000)]
badcommit-fixup: break out $bare

2 years agobadcommit-fixup: reorganise arg parsing
Ian Jackson [Thu, 5 Jan 2017 17:40:45 +0000 (17:40 +0000)]
badcommit-fixup: reorganise arg parsing

2 years agotest suite: Do not tolerate any stderr output from git-fsck
Ian Jackson [Thu, 5 Jan 2017 15:47:06 +0000 (15:47 +0000)]
test suite: Do not tolerate any stderr output from git-fsck

We must tolerate
  notice: HEAD points to an unborn branch (master)
  notice: No default references
which are generated by some of our existing test cases and are pretty
much harmless.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: Introduce t-expect-fsck-fail
Ian Jackson [Thu, 5 Jan 2017 15:37:49 +0000 (15:37 +0000)]
test suite: Introduce t-expect-fsck-fail

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: Make expect_fsck_fail contain objids
Ian Jackson [Thu, 5 Jan 2017 15:30:13 +0000 (15:30 +0000)]
test suite: Make expect_fsck_fail contain objids

This will make it possible to be stricter.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agoMerge tag dgit/2.14 into `defence in dgit-repos-server' branch
Ian Jackson [Thu, 5 Jan 2017 14:01:38 +0000 (14:01 +0000)]
Merge tag dgit/2.14 into `defence in dgit-repos-server' branch

Fix up semantic conflict: the new git-fsck test (in 2.14) fails on the
new broken commits (in the `defence in dgit-repos-server' branch).

We need to disable this.  Ideally we would make a tighter test, but
that's too much to do in a merge.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: Test bad commit defence in drs-push-rejects
Ian Jackson [Thu, 5 Jan 2017 13:47:40 +0000 (13:47 +0000)]
test suite: Test bad commit defence in drs-push-rejects

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-repos-server: Defend against bad commits (from eg #849041).
Ian Jackson [Thu, 5 Jan 2017 13:46:34 +0000 (13:46 +0000)]
dgit-repos-server: Defend against bad commits (from eg #849041).

Right now, this causes the test `debpolicy-quilt-gbp' to fail,
because in this branch #849041 is unfixed.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agobadcommit-fixup: only detach bare
Ian Jackson [Thu, 5 Jan 2017 02:04:12 +0000 (02:04 +0000)]
badcommit-fixup: only detach bare

2 years agobadcommit-fixup: fix a git-
Ian Jackson [Thu, 5 Jan 2017 02:00:48 +0000 (02:00 +0000)]
badcommit-fixup: fix a git-

2 years agobadcommit-fixup: seems to work
Ian Jackson [Thu, 5 Jan 2017 01:56:43 +0000 (01:56 +0000)]
badcommit-fixup: seems to work

2 years agobadcommit-fixup: seems to do main thing
Ian Jackson [Thu, 5 Jan 2017 01:43:22 +0000 (01:43 +0000)]
badcommit-fixup: seems to do main thing

2 years agobadcommit-fixup: wip
Ian Jackson [Thu, 5 Jan 2017 01:34:05 +0000 (01:34 +0000)]
badcommit-fixup: wip

2 years agobadcommit-fixup: wip g-f-b
Ian Jackson [Thu, 5 Jan 2017 01:15:43 +0000 (01:15 +0000)]
badcommit-fixup: wip g-f-b

2 years agobadcommit-fixup: wip g-f-b
Ian Jackson [Thu, 5 Jan 2017 01:15:39 +0000 (01:15 +0000)]
badcommit-fixup: wip g-f-b

2 years agobadcommit-fixup: before no g-f-b
Ian Jackson [Thu, 5 Jan 2017 00:24:54 +0000 (00:24 +0000)]
badcommit-fixup: before no g-f-b

2 years agobadcommit-fixup: more wip
Ian Jackson [Thu, 5 Jan 2017 00:13:37 +0000 (00:13 +0000)]
badcommit-fixup: more wip

2 years agochangelog: finalise 2.14 archive/debian/2.14 debian/2.14
Ian Jackson [Wed, 4 Jan 2017 22:53:49 +0000 (22:53 +0000)]
changelog: finalise 2.14

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agobadcommit-fixup wip
Ian Jackson [Wed, 4 Jan 2017 22:52:44 +0000 (22:52 +0000)]
badcommit-fixup wip

2 years agochangelog: Document changes
Ian Jackson [Wed, 4 Jan 2017 22:09:39 +0000 (22:09 +0000)]
changelog: Document changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit: Do not generate bogus commits
Ian Jackson [Wed, 4 Jan 2017 21:47:53 +0000 (21:47 +0000)]
dgit: Do not generate bogus commits

There were two places in the code where ill-formed commits were
generated: both psedumerges.

One is in dgit import-dsc, a fairly minor problem.

The other is in --overwrite and is very bad because that's an
important option.

Nothing in git seems to notice, unless you run git-fsck.  Even a git
server does not, by default.  However, some other popular git servers
do reject these broken commits.

I have tested this changes with git-fsck (by using the test suite
patches which follow in this series) and now everything seems fine.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: Clean out erroneous reflog in a worktree
Ian Jackson [Wed, 4 Jan 2017 21:02:03 +0000 (21:02 +0000)]
test suite: Clean out erroneous reflog in a worktree

git-reflog expire --expire-unreachable=now --all

Without this, this worktree causes git-fsck to complain!

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: Run git-fsck a lot
Ian Jackson [Wed, 4 Jan 2017 20:52:11 +0000 (20:52 +0000)]
test suite: Run git-fsck a lot

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: Add some missing calls to t-ok.
Ian Jackson [Wed, 4 Jan 2017 20:43:12 +0000 (20:43 +0000)]
test suite: Add some missing calls to t-ok.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agotest suite: Introduce t-ok.
Ian Jackson [Wed, 4 Jan 2017 20:35:49 +0000 (20:35 +0000)]
test suite: Introduce t-ok.

No functional change.

 perl -i~ -pe 's/^echo ok\.$/t-ok/' tests/tests/*[^~]
 perl -i~ -pe 's/^echo ok\.$/t-ok/' tests/setup/*[^~]
 perl -i~ -pe 's/^echo done\.$/t-ok/' tests/tests/*[^~]
 perl -i~ -pe 's/^echo done\.$/t-ok/' tests/setup/*[^~]

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: start 2.14
Ian Jackson [Wed, 21 Dec 2016 14:13:30 +0000 (14:13 +0000)]
changelog: start 2.14

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: start 2.14
Ian Jackson [Wed, 21 Dec 2016 14:13:30 +0000 (14:13 +0000)]
changelog: start 2.14

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: finalise 2.13 archive/debian/2.13 debian/2.13
Ian Jackson [Wed, 21 Dec 2016 01:32:54 +0000 (01:32 +0000)]
changelog: finalise 2.13

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agochangelog: document dgit-sponsorship fix
Ian Jackson [Tue, 20 Dec 2016 23:33:41 +0000 (23:33 +0000)]
changelog: document dgit-sponsorship fix

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-sponsorship(7): Update in light of fixed #844129
Sean Whitton [Mon, 19 Dec 2016 21:32:51 +0000 (21:32 +0000)]
dgit-sponsorship(7): Update in light of fixed #844129

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
2 years agochangelog: document dgit-maint-gbp fix
Ian Jackson [Tue, 20 Dec 2016 23:31:37 +0000 (23:31 +0000)]
changelog: document dgit-maint-gbp fix

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2 years agodgit-maint-gbp(7): Remove reference to closed bug.
Sean Whitton [Mon, 19 Dec 2016 21:14:32 +0000 (21:14 +0000)]
dgit-maint-gbp(7): Remove reference to closed bug.

Thanks Felipe Sateler for the bug report.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
2 years agoImport fix: Switch back to unpa branch on patch import iterations.
Ian Jackson [Tue, 20 Dec 2016 21:40:15 +0000 (21:40 +0000)]
Import fix: Switch back to unpa branch on patch import iterations.

In particular, do not fail utterly if dpkg-source and gbp
disagree. Closes:#848843.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>