chiark / gitweb /
dgit.git
5 years agotest suite: lib-baredebian: Provide `origbase'
Ian Jackson [Sun, 30 Jun 2019 11:16:17 +0000 (12:16 +0100)]
test suite: lib-baredebian: Provide `origbase'

Was just a local variable `orig'.  Make it available.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: baredebian-multitar: New test
Ian Jackson [Sun, 30 Jun 2019 00:17:20 +0000 (01:17 +0100)]
test suite: baredebian-multitar: New test

We should exercise all that tarball import machinery.

The test doesn't yet really examine the results.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: lib-baredebian: Machinery for multiple origs
Ian Jackson [Sun, 30 Jun 2019 00:19:03 +0000 (01:19 +0100)]
test suite: lib-baredebian: Machinery for multiple origs

No functional change with existing caller.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: baredebian: Break out baredebian-tarball-mode
Ian Jackson [Sun, 30 Jun 2019 10:00:22 +0000 (11:00 +0100)]
test suite: baredebian: Break out baredebian-tarball-mode

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: baredebian-tarball: New test
Ian Jackson [Sat, 29 Jun 2019 14:59:45 +0000 (15:59 +0100)]
test suite: baredebian-tarball: New test

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: lib-baredebian: Tolerate uvtag not being set
Ian Jackson [Sun, 30 Jun 2019 09:59:41 +0000 (10:59 +0100)]
test suite: lib-baredebian: Tolerate uvtag not being set

No functional change with the existing test.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: New quilt mode "baredebian+tarball"
Ian Jackson [Sat, 29 Jun 2019 16:08:25 +0000 (17:08 +0100)]
dgit: New quilt mode "baredebian+tarball"

No documentation yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: lib-baredebian: Break out $uvtag
Ian Jackson [Sun, 30 Jun 2019 10:11:50 +0000 (11:11 +0100)]
test suite: lib-baredebian: Break out $uvtag

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: lib-baredebian: Break out $uv everywhere
Ian Jackson [Sat, 29 Jun 2019 14:57:50 +0000 (15:57 +0100)]
test suite: lib-baredebian: Break out $uv everywhere

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: lib-baredebian: Split up big function
Ian Jackson [Sat, 29 Jun 2019 14:55:44 +0000 (15:55 +0100)]
test suite: lib-baredebian: Split up big function

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: baredebian: move setting of $quiltmode to lib
Ian Jackson [Sun, 30 Jun 2019 10:23:43 +0000 (11:23 +0100)]
test suite: baredebian: move setting of $quiltmode to lib

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: lib-baredebian: Introduce $quiltmode
Ian Jackson [Sat, 29 Jun 2019 14:52:52 +0000 (15:52 +0100)]
test suite: lib-baredebian: Introduce $quiltmode

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: return $r1authline from import_tarball_commits
Ian Jackson [Sun, 30 Jun 2019 00:18:03 +0000 (01:18 +0100)]
dgit: return $r1authline from import_tarball_commits

No functional change for existing caller, which just discards it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: import_tarball_tartrees: Provide OrigPart
Ian Jackson [Sat, 29 Jun 2019 23:46:32 +0000 (00:46 +0100)]
dgit: import_tarball_tartrees: Provide OrigPart

No functional change for existing caller.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: import_tarball_tartrees: Handle @dfi==1 case in caller
Ian Jackson [Sat, 29 Jun 2019 17:11:52 +0000 (18:11 +0100)]
dgit: import_tarball_tartrees: Handle @dfi==1 case in caller

We are going to introduce a caller which doesn't want this check.

No overall functional change other than to debugging output.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: import_tarball_tartrees: Honour Path in dfis
Ian Jackson [Sat, 29 Jun 2019 17:02:59 +0000 (18:02 +0100)]
dgit: import_tarball_tartrees: Honour Path in dfis

These do not appear in information collected from a .dsc; in that
case, the files are arranged to be in the playground where they can be
simply picked up.

But we are going to want to direct import_tarball_tartrees to tarballs
found elsewhere.

No functional change with the current sources of dfi information.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Break out import_tarball_commits
Ian Jackson [Sat, 29 Jun 2019 16:27:12 +0000 (17:27 +0100)]
dgit: Break out import_tarball_commits

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Break out import_tarball_tartrees
Ian Jackson [Sat, 29 Jun 2019 16:17:31 +0000 (17:17 +0100)]
dgit: Break out import_tarball_tartrees

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoDgit.pm: read_tree_*: Treat '' as meaning 'delete this'
Ian Jackson [Sat, 29 Jun 2019 16:08:39 +0000 (17:08 +0100)]
Dgit.pm: read_tree_*: Treat '' as meaning 'delete this'

No functional change with existing callers.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Break out $quilt_options_re
Ian Jackson [Sat, 29 Jun 2019 15:04:05 +0000 (16:04 +0100)]
dgit: Break out $quilt_options_re

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: baredebian: break out lib-baredebian, baredebian-test
Ian Jackson [Sat, 29 Jun 2019 14:51:12 +0000 (15:51 +0100)]
test suite: baredebian: break out lib-baredebian, baredebian-test

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: baredebian: Add missing dependency quil
Ian Jackson [Sun, 30 Jun 2019 13:55:09 +0000 (14:55 +0100)]
test suite: baredebian: Add missing dependency quil

This was simply missing and causes the formal adt run to fail.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: lib: Add missing dependencies for git-deborig
Ian Jackson [Sun, 30 Jun 2019 13:46:59 +0000 (14:46 +0100)]
test suite: lib: Add missing dependencies for git-deborig

I seem to have overlooked the 2nd line of the relevant part of the
devscripts package description.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: baredebian-push: Add missing dependency DEBORIG
Ian Jackson [Sun, 30 Jun 2019 13:34:57 +0000 (14:34 +0100)]
test suite: baredebian-push: Add missing dependency DEBORIG

Our enumeration system does not capture dependencies from
t-setup-import.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: t-setup-done: Arrange to save all DGIT_TEST_REAL_*
Ian Jackson [Sun, 30 Jun 2019 19:31:20 +0000 (20:31 +0100)]
test suite: t-setup-done: Arrange to save all DGIT_TEST_REAL_*

Otherwise the importer may end up with our stunt versions on their
PATH, but without the necessary DGIT_TEST_REAL_* variables which stop
infinite recursion.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit(1): split view: Talk about `your local git clone'
Ian Jackson [Sat, 29 Jun 2019 13:59:43 +0000 (14:59 +0100)]
dgit(1): split view: Talk about `your local git clone'

Suggested-by: Sean Whitton <spwhitton@spwhitton.name>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit(1): document --quilt=bareebian
Ian Jackson [Sat, 29 Jun 2019 12:30:17 +0000 (13:30 +0100)]
dgit(1): document --quilt=bareebian

Closes: #903392
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: baredebian-push: Test rejection of -wgf
Ian Jackson [Sat, 29 Jun 2019 12:50:34 +0000 (13:50 +0100)]
test suite: baredebian-push: Test rejection of -wgf

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: baredebian: Reject --clean=git
Ian Jackson [Sat, 29 Jun 2019 11:43:16 +0000 (12:43 +0100)]
dgit: baredebian: Reject --clean=git

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: baredebian-push: Check that history is roughly right
Ian Jackson [Sat, 29 Jun 2019 12:33:55 +0000 (13:33 +0100)]
test suite: baredebian-push: Check that history is roughly right

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: baredebian: Note upstream commitish source in prose
Ian Jackson [Sat, 29 Jun 2019 01:11:49 +0000 (02:11 +0100)]
dgit: baredebian: Note upstream commitish source in prose

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: baredebian: Provide $quilt_upstream_commitish_message
Ian Jackson [Sat, 29 Jun 2019 01:09:34 +0000 (02:09 +0100)]
dgit: baredebian: Provide $quilt_upstream_commitish_message

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: baredebian: Note upstream version and commitish source
Ian Jackson [Sat, 29 Jun 2019 11:19:02 +0000 (12:19 +0100)]
dgit: baredebian: Note upstream version and commitish source

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: baredebian-push: Actually test --quilt=baredebian
Ian Jackson [Sat, 29 Jun 2019 12:04:16 +0000 (13:04 +0100)]
test suite: baredebian-push: Actually test --quilt=baredebian

This is all quite awful really.  I think that is inherent.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: baredebian setup, and a skeleton to run it
Ian Jackson [Sat, 29 Jun 2019 00:10:19 +0000 (01:10 +0100)]
test suite: baredebian setup, and a skeleton to run it

The baredebian-push test will be fleshed out in a moment.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoi18n: Add translator notes about ASCII art changes display
Ian Jackson [Sat, 29 Jun 2019 11:54:02 +0000 (12:54 +0100)]
i18n: Add translator notes about ASCII art changes display

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: baredebian: New quilt mode
Ian Jackson [Sat, 29 Jun 2019 11:53:56 +0000 (12:53 +0100)]
dgit: baredebian: New quilt mode

This is the bulk of the implementation including all essential
changes.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: baredebian: Introduce --upstream-commitish
Ian Jackson [Sat, 29 Jun 2019 11:52:55 +0000 (12:52 +0100)]
dgit: baredebian: Introduce --upstream-commitish

Not documented yet.  Nor, used, since $quilt_mode is not ever
baredebian yet.

So currently just an option you can pass to make dgit bomb out.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: Add DEBORIG pseudo-dependency
Ian Jackson [Sat, 29 Jun 2019 11:00:08 +0000 (12:00 +0100)]
test suite: Add DEBORIG pseudo-dependency

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoDgit.pm: resolve_upstream_version: Return a message too
Ian Jackson [Sat, 29 Jun 2019 00:56:21 +0000 (01:56 +0100)]
Dgit.pm: resolve_upstream_version: Return a message too

No functional change for existing callers.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Introduce $uhead and $uhead_whatshort
Ian Jackson [Fri, 28 Jun 2019 23:02:11 +0000 (00:02 +0100)]
dgit: Introduce $uhead and $uhead_whatshort

No overall functional change other than (sadly) to complicate the life
of translators.  I will add some notes for translators after I've made
this string actually vary.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Make $format available in build_or_push_prep_modes
Ian Jackson [Fri, 28 Jun 2019 21:55:53 +0000 (22:55 +0100)]
dgit: Make $format available in build_or_push_prep_modes

By returning it from determine_whether_split_brain.

No functional change yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agogit-debrebase: Replace one open-coded hash-object with hash_commit
Ian Jackson [Fri, 28 Jun 2019 23:26:32 +0000 (00:26 +0100)]
git-debrebase: Replace one open-coded hash-object with hash_commit

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoDgit.pm: Move hash_commit from dgit
Ian Jackson [Fri, 28 Jun 2019 23:25:14 +0000 (00:25 +0100)]
Dgit.pm: Move hash_commit from dgit

No functional change other than to no longer honour @git.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoDgit.pm: Move make_commit (git-commit-tree wrapper) from gdr
Ian Jackson [Fri, 28 Jun 2019 23:23:39 +0000 (00:23 +0100)]
Dgit.pm: Move make_commit (git-commit-tree wrapper) from gdr

No functional change other than to no longer honour @git.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoRename various *make_commit* to *hash_commit*
Ian Jackson [Fri, 28 Jun 2019 23:22:01 +0000 (00:22 +0100)]
Rename various *make_commit* to *hash_commit*

This avoids a subroutine name clash with make_commit in gdr.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoDgit.pm: Move read-tree wrappers from git-debrebase
Ian Jackson [Fri, 28 Jun 2019 23:11:49 +0000 (00:11 +0100)]
Dgit.pm: Move read-tree wrappers from git-debrebase

No functional change other than to no longer honour @git.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoDgit.pm: Move resolve_upstream_version from git-debrebase
Ian Jackson [Fri, 28 Jun 2019 16:30:55 +0000 (17:30 +0100)]
Dgit.pm: Move resolve_upstream_version from git-debrebase

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoDgit.pm: Move upstream_commitish_search from git-debrebase
Ian Jackson [Fri, 28 Jun 2019 16:29:02 +0000 (17:29 +0100)]
Dgit.pm: Move upstream_commitish_search from git-debrebase

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodocs: Document --split-view and change terminology
Ian Jackson [Fri, 28 Jun 2019 15:48:37 +0000 (16:48 +0100)]
docs: Document --split-view and change terminology

We now speak in the docs of
  * splitting quilt mode(s)
  * split view (being) in operation

Closes: #926640
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: new test forcesplit-linear
Ian Jackson [Tue, 18 Jun 2019 19:23:01 +0000 (20:23 +0100)]
test suite: new test forcesplit-linear

Test split view with non-splitting quilt mode.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: forcesplit-overwrite: Test with bare --overwrite
Ian Jackson [Tue, 18 Jun 2019 18:45:15 +0000 (19:45 +0100)]
test suite: forcesplit-overwrite: Test with bare --overwrite

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: forcesplit-overwrite: Test without --overwrite
Ian Jackson [Tue, 18 Jun 2019 18:44:15 +0000 (19:44 +0100)]
test suite: forcesplit-overwrite: Test without --overwrite

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: forcesplit-overwrite: Break out "try"
Ian Jackson [Tue, 18 Jun 2019 18:41:42 +0000 (19:41 +0100)]
test suite: forcesplit-overwrite: Break out "try"

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: forcesplit-overwrite: Check -pushed-good
Ian Jackson [Tue, 18 Jun 2019 17:58:05 +0000 (18:58 +0100)]
test suite: forcesplit-overwrite: Check -pushed-good

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite; New test forcesplit-overwrite
Ian Jackson [Sat, 15 Jun 2019 10:22:25 +0000 (11:22 +0100)]
test suite; New test forcesplit-overwrite

Still needs:
 * checking that we didn't move HEAD
 * checking HEAD tree is equal

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Reject split view with correct message
Ian Jackson [Sat, 15 Jun 2019 10:49:33 +0000 (11:49 +0100)]
dgit: Reject split view with correct message

Now, it is not just a splitting quilt mode which might cause this, but
also an explicit request for split view.

This has some duplicated text, which I understand is easier for
translators.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Support split view in non-splitting quilt modes
Ian Jackson [Sat, 15 Jun 2019 10:49:17 +0000 (11:49 +0100)]
dgit: Support split view in non-splitting quilt modes

Provide --split-view|brain=auto|always|never and the corresponding
access cfg option .split-view.

This is not documented or tested yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: In code, rename splitbrain quilt modes to splitting
Ian Jackson [Fri, 28 Jun 2019 14:17:53 +0000 (15:17 +0100)]
dgit: In code, rename splitbrain quilt modes to splitting

A "splitting" quilt mode is going to be one which requires split brain
mode.  But split brain mode is going to be possible in other quilt
modes too.

The existing name of the splitbrain quilt cache is correct: it is used
precisely for quilt fixup, in split brain modes (even for non
splitting quilt modes, now).  In split brain mode without quilt, it is
not needed or used.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Reject dgit pull in split brain mode
Ian Jackson [Fri, 28 Jun 2019 14:13:52 +0000 (15:13 +0100)]
dgit: Reject dgit pull in split brain mode

In splitting quilt modes dgit pull would have to back-convert the
changes and currently there is no code to do this, and these cases
were correctly rejected before.

But in other quilt modes it would still have to strip off pseudomerges
or quilt fixup commits.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Move determine_whether_split_brain further up the file
Ian Jackson [Fri, 28 Jun 2019 14:13:17 +0000 (15:13 +0100)]
dgit: Move determine_whether_split_brain further up the file

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Break out determine_whether_split_brain
Ian Jackson [Fri, 28 Jun 2019 14:10:19 +0000 (15:10 +0100)]
dgit: Break out determine_whether_split_brain

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Crash if we forgot to set $do_split_brain
Ian Jackson [Fri, 28 Jun 2019 14:09:13 +0000 (15:09 +0100)]
dgit: Crash if we forgot to set $do_split_brain

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Put !! inside do_split_brain()
Ian Jackson [Fri, 28 Jun 2019 14:06:36 +0000 (15:06 +0100)]
dgit: Put !! inside do_split_brain()

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Introduce do_split_brain()
Ian Jackson [Fri, 28 Jun 2019 14:04:42 +0000 (15:04 +0100)]
dgit: Introduce do_split_brain()

No functional change yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit(1): Tidying up after tag format: Drop splitbrain conditional
Ian Jackson [Fri, 28 Jun 2019 13:42:19 +0000 (14:42 +0100)]
dgit(1): Tidying up after tag format: Drop splitbrain conditional

Now, debiantags is always just debiantag_new plus
debiantag_maintview.  So we can drop this complexity.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Tidying up after tag format: Drop debiantag
Ian Jackson [Fri, 28 Jun 2019 13:24:37 +0000 (14:24 +0100)]
dgit: Tidying up after tag format: Drop debiantag

Remove the now-superfluous level of indirection.

No functional change.

At some future point we may rename debiantag_new to debiantag
everywhere, but not right now.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoDgit.pm: Tidying up after tag format: Drop debiantag_old
Ian Jackson [Fri, 28 Jun 2019 13:22:29 +0000 (14:22 +0100)]
Dgit.pm: Tidying up after tag format: Drop debiantag_old

The one remaining call site was in debiantags, where
debiantag_maintview is (also) correct.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit(1): Tidying up after tag format: Drop qualifications
Ian Jackson [Fri, 28 Jun 2019 13:36:14 +0000 (14:36 +0100)]
dgit(1): Tidying up after tag format: Drop qualifications

All servers are now assumed to cope with split view tags.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit(1): Correct --always-dep14tag
Ian Jackson [Fri, 28 Jun 2019 13:35:21 +0000 (14:35 +0100)]
dgit(1): Correct --always-dep14tag

This was documented as --always-dep14tag but dgit only accepts
--dep14tag-always.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Tidying up after tag format: Collapse $dodep14tag test
Ian Jackson [Fri, 28 Jun 2019 13:20:30 +0000 (14:20 +0100)]
dgit: Tidying up after tag format: Collapse $dodep14tag test

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agoinfra: Drop support for old tag name on server side
Ian Jackson [Fri, 28 Jun 2019 13:19:25 +0000 (14:19 +0100)]
infra: Drop support for old tag name on server side

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Introduce $protovsn 5; part of tidying up after tag format
Ian Jackson [Fri, 28 Jun 2019 11:56:55 +0000 (12:56 +0100)]
dgit: Introduce $protovsn 5; part of tidying up after tag format

This drops the tagformat param; the semantics are as if `new'
were specified.  Eventually, when we can drop support for
$protovsn 4, all traces of this parameter can then be gone.

No overall functional change.
No immediate compatibility implications.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Drop $protovsn < 4; part of tidying up after tag format
Ian Jackson [Fri, 28 Jun 2019 11:09:20 +0000 (12:09 +0100)]
dgit: Drop $protovsn < 4; part of tidying up after tag format

This drops support for rpush where our peer is older than dgit 2.0.
(This does not include the dgit in any Debian release.)

No nontrivial functional change, since we already rejected older dgits
due to them implying the old tag format.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Tidying up after tag format: drop ..._can_splitbrain
Ian Jackson [Fri, 28 Jun 2019 11:06:39 +0000 (12:06 +0100)]
dgit: Tidying up after tag format: drop ..._can_splitbrain

Substitute this fixed value into its call sites.  No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Drop support for old tag format
Ian Jackson [Thu, 27 Jun 2019 19:29:27 +0000 (20:29 +0100)]
dgit: Drop support for old tag format

access_cfg_tagformats_can_splitbrain always returns true now.  We'll
delete it in a moment.

We now insist on protocol version 4 because older ones imply the old
tag format.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: tag format: Add missing $protovsn comment re tagformat param
Ian Jackson [Fri, 28 Jun 2019 11:53:50 +0000 (12:53 +0100)]
dgit: tag format: Add missing $protovsn comment re tagformat param

No fuctional change.  We are going to get rid of this in a moment, but
this change makes clearer what is going on.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: Drop all testing of old tag formats, and compatibility
Ian Jackson [Thu, 27 Jun 2019 18:57:12 +0000 (19:57 +0100)]
test suite: Drop all testing of old tag formats, and compatibility

This is quite old now.  We are dropping support for it.

The new tags came in in dgit 2.0 in October 2016.  No version of dgit
without them was in any Debian release.  We don't expect there are any
sites using old servers which do not support the new format, or anyone
using a dgit client older than 2.x who cannot upgrade.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: break out t-splitbrain-rm-1-patch
Ian Jackson [Thu, 27 Jun 2019 18:33:13 +0000 (19:33 +0100)]
test suite: break out t-splitbrain-rm-1-patch

We are going to call this from one of the force split tests.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agotest suite: t-{unapplied,dpm}-pushed-good: set $suite
Ian Jackson [Sat, 22 Jun 2019 23:04:25 +0000 (00:04 +0100)]
test suite: t-{unapplied,dpm}-pushed-good: set $suite

t-pushed-good-core wants suite to be set.  Rather than having it
implicit, make it an argument.  Fix the two call sites where suite was
not trivially `sid'.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Do split brain cache and saving in build_maybe_quilt_fixup
Ian Jackson [Tue, 18 Jun 2019 19:28:15 +0000 (20:28 +0100)]
dgit: Do split brain cache and saving in build_maybe_quilt_fixup

This wants to happy whenever we have a split brain, not only in
splitting multipatch modes.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Fix --dgit-view-save option
Ian Jackson [Tue, 18 Jun 2019 19:11:03 +0000 (20:11 +0100)]
dgit: Fix --dgit-view-save option

This was supposed to be an alias for --save-dgit-view but didn't work
because || forced scalar context.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: quiltify: Go back to dgit-view if appropriate
Ian Jackson [Tue, 18 Jun 2019 19:06:40 +0000 (20:06 +0100)]
dgit: quiltify: Go back to dgit-view if appropriate

Going back to master is fine with a unified view, but we are going to
want to cope with a split view here.

No functional change since $do_split_brain is not ever set here, yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Move git chedckout master out of quiltify
Ian Jackson [Tue, 18 Jun 2019 19:02:30 +0000 (20:02 +0100)]
dgit: Move git chedckout master out of quiltify

This is closer to where it is going to be used, and a bit less
confusing.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: When propagating pseudomerge error, strip leading \n
Ian Jackson [Sat, 15 Jun 2019 15:13:14 +0000 (16:13 +0100)]
dgit: When propagating pseudomerge error, strip leading \n

fail adds an initial \n to provide a blank line separating the error
message from previous output.  We want to strip any such thing away
again.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Split out default_from_access_cfg
Ian Jackson [Sat, 15 Jun 2019 10:23:47 +0000 (11:23 +0100)]
dgit: Split out default_from_access_cfg

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: clean mode: Correctly reject bad modes from config
Ian Jackson [Sat, 15 Jun 2019 10:23:01 +0000 (11:23 +0100)]
dgit: clean mode: Correctly reject bad modes from config

Add the missing ^ and $ (which do not appear in $cleanmode_re).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: split brain reorg: Slight internal error check improvements
Ian Jackson [Thu, 6 Jun 2019 15:33:10 +0000 (16:33 +0100)]
dgit: split brain reorg: Slight internal error check improvements

Move the $made_split_brain and $do_split_brain checks outside various
conditionals.  And change a die to a confess.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: split brain reorg: Rename $made_split_brain
Ian Jackson [Thu, 6 Jun 2019 15:28:57 +0000 (16:28 +0100)]
dgit: split brain reorg: Rename $made_split_brain

This variable is not technnically necessary any more.  But tracking
this means if we introduce bugs which mean that we didn't do the split
brain work, we will get much saner misbehaviour: a crash.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: split brain reorg: Check $split_brain against $do_split_brain
Ian Jackson [Thu, 6 Jun 2019 15:23:43 +0000 (16:23 +0100)]
dgit: split brain reorg: Check $split_brain against $do_split_brain

I think by now, $do_split_brain is always set early enough that
$split_brain here implies $do_split_brain.  And if $split_brain were
not set but $do_split_brain was, that would mean we hadn't actually
done the necessary work (constructing the and switching to the
dgit-view branch in the playtree or computing $dgithead).

Double check this with a couple of calls to confess.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: split brain reorg: debug print quilt mode in XXX
Ian Jackson [Thu, 6 Jun 2019 14:22:03 +0000 (15:22 +0100)]
dgit: split brain reorg: debug print quilt mode in XXX

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Fix check for --include-dirty --quilt=<splitting>
Ian Jackson [Thu, 6 Jun 2019 14:02:05 +0000 (15:02 +0100)]
dgit: Fix check for --include-dirty --quilt=<splitting>

This needs to know whether we are actually in split brain mode.
build_or_push_prep_modes has just determined the answer, so put it
there.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: split brain reorg: Move do_split_brain setting
Ian Jackson [Thu, 6 Jun 2019 14:01:48 +0000 (15:01 +0100)]
dgit: split brain reorg: Move do_split_brain setting

We have to introduce a new "time", build_or_push_prep_modes, which is
the point at which we know we have a working tree, and know the quilt
mode, and know we are pushing or building.

There is one call to build_or_push_prep_modes near every call to
build_or_push_prep_early - after pushing/notpushing (which also means
after parseopts_late_defaults).

There is one nontrivial functional difference: Now we use the format
from the working tree, rather than from the .dsc.  But these ought to
be identical in any sane situation.  If they are not then the user has
done something very strange.  The quilt fixup machinery may go wrong,
but we should detect a problem later, during the dpkg-source -x check,
so nothing wrong will be pushed anywhere.

Otherwise no overall functional change other than to debug output.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Add a comment about a bug we are about to eliminate.
Ian Jackson [Thu, 6 Jun 2019 13:53:17 +0000 (14:53 +0100)]
dgit: Add a comment about a bug we are about to eliminate.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: split brain reorg: Move some split brain code further out.
Ian Jackson [Thu, 6 Jun 2019 12:54:48 +0000 (13:54 +0100)]
dgit: split brain reorg: Move some split brain code further out.

We are going to want this in other quilt modes.  Logically, it should
occur in build_maybe_quilt_fixup.  Specifically, move:
 * the quilt cache check
 * the splitting of the dgit-view branch and setting $split_brain
out of quilt_fixup_multipatch.  quilt_fixup_multipatch now gets
$upstreamversion as a parameter.

Right now this logic in build_maybe_quilt_fixup is a bit flabby and
confusing.  We hope to tidy it up a bit later.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: split brain reorg: Change an internal error die to confess
Ian Jackson [Thu, 6 Jun 2019 11:54:33 +0000 (12:54 +0100)]
dgit: split brain reorg: Change an internal error die to confess

No functional change in non-error cases.  This was wrong before.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Reject split brain quilt modes with single-debian-patch
Ian Jackson [Fri, 31 May 2019 19:36:37 +0000 (20:36 +0100)]
dgit: Reject split brain quilt modes with single-debian-patch

Right now, this malfunctions in dgit: we do not do the split brain
stuff.  And most of these combinations do not appear to make very much
sense.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: split brain reorg: Check quilt cache iff $do_split_brain (2)
Ian Jackson [Fri, 31 May 2019 19:17:16 +0000 (20:17 +0100)]
dgit: split brain reorg: Check quilt cache iff $do_split_brain (2)

When $do_split_brain becomes set when !quiltmode_splitbrain(), we want
to check the cache even in the non split brain case.

Change the quilt fixup, just before generating a new multipatch
conversion.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: split brain reorg: Check quilt cache iff $do_split_brain (1)
Ian Jackson [Fri, 31 May 2019 19:13:46 +0000 (20:13 +0100)]
dgit: split brain reorg: Check quilt cache iff $do_split_brain (1)

When $do_split_brain becomes set when !quiltmode_splitbrain(), we want
to check the cache even in the non split brain case.

Change in dopush, where we check the cache.

No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agodgit: Write down quilt mode split brain plans in a comment
Ian Jackson [Fri, 31 May 2019 19:11:01 +0000 (20:11 +0100)]
dgit: Write down quilt mode split brain plans in a comment

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