chiark / gitweb /
dgit.git
4 years agoTest suite: Print better info on t-ref-same failure
Ian Jackson [Sun, 24 Jul 2016 18:40:20 +0000 (19:40 +0100)]
Test suite: Print better info on t-ref-same failure

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoTest suite: Print better info on failures
Ian Jackson [Sun, 24 Jul 2016 18:40:06 +0000 (19:40 +0100)]
Test suite: Print better info on failures

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodgit: rpush protocol comment: Add some missing protocol elements
Ian Jackson [Sat, 30 Jul 2016 12:12:12 +0000 (13:12 +0100)]
dgit: rpush protocol comment: Add some missing protocol elements

progress, supplementary-message, previously, and param csuite, were
all missing.  Document them.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoDgit.pm: cmdoutput: Handle undef in arg crash better
Ian Jackson [Sun, 31 Jul 2016 17:12:59 +0000 (18:12 +0100)]
Dgit.pm: cmdoutput: Handle undef in arg crash better

Use `confess' which produces a stack trace.  And don't forget to use
Data::Dumper;

Bug introduced in e6ce71a87a1c "Move various useful functions into
Dgit.pm [...]".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoSplit brain: When pushing, find the dgit view in the cache
Ian Jackson [Sat, 16 Jul 2016 23:12:35 +0000 (00:12 +0100)]
Split brain: When pushing, find the dgit view in the cache

We now do set $split_brain, and we don't do anythig with the cached
dgit view, so we'll crash at the die, in a moment.

4 years agoInnards: Improve mktree_in_ud_from_only_subdir message
Ian Jackson [Sat, 16 Jul 2016 23:00:06 +0000 (00:00 +0100)]
Innards: Improve mktree_in_ud_from_only_subdir message

When it finds multiple subdirs, print them.

4 years agoSubprocess error handling: Initialise $? to -1
Ian Jackson [Sat, 16 Jul 2016 22:10:27 +0000 (23:10 +0100)]
Subprocess error handling: Initialise $? to -1

When system(3perl) fails due to syscall error, it sets only $!.  When
it succeeds it sets only $? and sometimes trashes $!.  Conversely,
close of a popened filehandle always sets both in all cases.

Document this in a comment.

So when using system and relying on $?/$! (rather than looking at
system's return value), such as when about to use failedcmd, it's
necessary to initialise $? to -1.

Fix the three call sites where system might be followed by failedcmd
but this wasn't done.

4 years agoSubprocess error handling: Fix when divert check fails
Ian Jackson [Sat, 16 Jul 2016 22:35:21 +0000 (23:35 +0100)]
Subprocess error handling: Fix when divert check fails

If the remote command failed, do not try to match the undef value
against the various regexps.

4 years agoSubprocess error handling: Do not call faildcmd when open fails
Ian Jackson [Sat, 16 Jul 2016 22:34:32 +0000 (23:34 +0100)]
Subprocess error handling: Do not call faildcmd when open fails

failecmd wants to look at $? too and anyway the full command is not of
much interest in these cases.

4 years agoSplit brain: Fix grammar in a message
Ian Jackson [Sat, 16 Jul 2016 17:22:07 +0000 (18:22 +0100)]
Split brain: Fix grammar in a message

4 years agoSplit brain: In dopush, get HEAD earlier (nfc)
Ian Jackson [Sat, 16 Jul 2016 17:20:57 +0000 (18:20 +0100)]
Split brain: In dopush, get HEAD earlier (nfc)

4 years agoSplit brain: Do not look at all of %INC for cache key
Ian Jackson [Sat, 16 Jul 2016 17:19:36 +0000 (18:19 +0100)]
Split brain: Do not look at all of %INC for cache key

Look only at dgit and Debian/Dgit.

The prompt for this is that some of our submodules seem to dynamically
load some of their components depending on what dgit does, making the
cache key unstable.

4 years agoquilt innards: Change calling convention for quilt_check_splitbrain_cache
Ian Jackson [Sat, 16 Jul 2016 16:59:07 +0000 (17:59 +0100)]
quilt innards: Change calling convention for quilt_check_splitbrain_cache

4 years agoquilt innards: Break out quilt_check_splitbrain_cache (nfc)
Ian Jackson [Sat, 16 Jul 2016 16:50:17 +0000 (17:50 +0100)]
quilt innards: Break out quilt_check_splitbrain_cache (nfc)

4 years agoquilt innards: Break out uilt_make_fake_dsc (nfc)
Ian Jackson [Sat, 16 Jul 2016 16:35:37 +0000 (17:35 +0100)]
quilt innards: Break out uilt_make_fake_dsc (nfc)

4 years agoquilt innards: Remove a couple of stray blank lines
Ian Jackson [Sat, 16 Jul 2016 16:31:58 +0000 (17:31 +0100)]
quilt innards: Remove a couple of stray blank lines

4 years agoquilt innards: Fix a formatting glitch
Ian Jackson [Sat, 16 Jul 2016 16:15:26 +0000 (17:15 +0100)]
quilt innards: Fix a formatting glitch

4 years agoQuilt mode reporting: Only print warning about quilt once
Ian Jackson [Sat, 16 Jul 2016 15:59:51 +0000 (16:59 +0100)]
Quilt mode reporting: Only print warning about quilt once

4 years agoTest suite: quilt-gbp: New test (not yet complete)
Ian Jackson [Sat, 4 Jun 2016 21:23:47 +0000 (22:23 +0100)]
Test suite: quilt-gbp: New test (not yet complete)

This test does not yet do all that we want, but it does some things
and then exits 0.

The current intent for the future is written in prose in the rest of
the file.

4 years agoTest suite: t-gbp-example-prep: Arrange to be FF from the archive
Ian Jackson [Sat, 16 Jul 2016 11:52:47 +0000 (12:52 +0100)]
Test suite: t-gbp-example-prep: Arrange to be FF from the archive

Otherwise pushes will necessarily (spuriously) fail.

4 years agoWhen synthesing a commit from a .dsc from the archive, stop internal git reset from...
Ian Jackson [Sat, 16 Jul 2016 11:52:05 +0000 (12:52 +0100)]
When synthesing a commit from a .dsc from the archive, stop internal git reset from printing a confusing message about HEAD.

4 years agoSplit brain: Use GZIP -1n to avoid spurious timestamp
Ian Jackson [Sat, 16 Jul 2016 11:33:51 +0000 (12:33 +0100)]
Split brain: Use GZIP -1n to avoid spurious timestamp

Otherwise the cache entry's .dsc contains the hash of a fake
debian.tar.gz which has had a timestamp put in it by gzip, defeating
the cache.

4 years agoSplit brain: Improve and rationalise progress messages
Ian Jackson [Sat, 16 Jul 2016 11:33:31 +0000 (12:33 +0100)]
Split brain: Improve and rationalise progress messages

4 years agoSplit brain: Provide --gbp= and --gbp:
Ian Jackson [Sat, 16 Jul 2016 11:30:42 +0000 (12:30 +0100)]
Split brain: Provide --gbp= and --gbp:

Not documented yet.

4 years agoSplit brain: With patches-unapplied trees, apply before running rules
Ian Jackson [Sat, 16 Jul 2016 10:54:45 +0000 (11:54 +0100)]
Split brain: With patches-unapplied trees, apply before running rules

Everywhere we invoke dpkg-buildpackage, check if we need to apply the
patches.  And at the end of every command that might have done this,
check if we did, and unapply them if so.

We don't try to unapply patches in case of error.  That seems likely
to be quite fragile.

Print a warning when we apply patches, suggesting ways to avoid the
need.

4 years agoSplit brain: Show progress message when dgit view created OK
Ian Jackson [Sat, 16 Jul 2016 10:54:06 +0000 (11:54 +0100)]
Split brain: Show progress message when dgit view created OK

4 years agoSplit brain: Do not leave STDOUT redirected to /dev/null (!)
Ian Jackson [Sat, 16 Jul 2016 10:53:08 +0000 (11:53 +0100)]
Split brain: Do not leave STDOUT redirected to /dev/null (!)

We use runcmd shell_cmd for gbp pq import, and the other commands not
produce undesirable output.

4 years agoSplit brain: Use `gbp pq' (which exists) not `gbp-pq' (which doesn't)
Ian Jackson [Sat, 16 Jul 2016 10:39:05 +0000 (11:39 +0100)]
Split brain: Use `gbp pq' (which exists) not `gbp-pq' (which doesn't)

4 years agoTest suite: unapplied-pq2qc: leave us on the qc/ branch
Ian Jackson [Sun, 10 Jul 2016 18:48:47 +0000 (19:48 +0100)]
Test suite: unapplied-pq2qc: leave us on the qc/ branch

The patch queue branch is not really very useful.  Certainly, the
build tests will require the patch queue branch.

4 years agoSplit brain: Include quilt mode in cache key
Ian Jackson [Sun, 10 Jul 2016 18:47:57 +0000 (19:47 +0100)]
Split brain: Include quilt mode in cache key

This can make a radical difference!

4 years agoSplit brain: Fix unapplied tree handling
Ian Jackson [Sun, 10 Jul 2016 18:46:40 +0000 (19:46 +0100)]
Split brain: Fix unapplied tree handling

Do the quiltify_splitbrain_needed if there _are_ patches, not if there
aren't.  And if we're told it was an unapplied tree, check that HEAD
and orig are indeed the same (excluding debian/*, of course) and print
a useful message if not.

4 years agoTest suite: When sbuild log file missing, make a note
Ian Jackson [Sun, 3 Jul 2016 23:30:46 +0000 (00:30 +0100)]
Test suite: When sbuild log file missing, make a note

This updates "Test suite: When sbuild fails, do not crash", to arrange
that in this situation we do leave a message in the $bmlog, where it
will be reported (eg) by diff.  This makes debugging less confusing in
cases where the log is indeed missing.

4 years agoTest suite: Provide t-gbp-example-prep [FOLD INTO QUILT-GBP TEST?]
Ian Jackson [Sat, 16 Jul 2016 14:57:01 +0000 (15:57 +0100)]
Test suite: Provide t-gbp-example-prep [FOLD INTO QUILT-GBP TEST?]

This function is useful for setting up a test case --quilt=gbp working
tree and corresponding archive contents, ready for substantive tests.

4 years agoTest suite: Move bm-quirk-sbuild-after-act to lib-build-modes
Ian Jackson [Sun, 3 Jul 2016 23:00:55 +0000 (00:00 +0100)]
Test suite: Move bm-quirk-sbuild-after-act to lib-build-modes

This will allow other tests to check dgit sbuild.

4 years agoTest suite: build-modes: Move sbuild knowledge to lib
Ian Jackson [Sun, 3 Jul 2016 22:57:50 +0000 (23:57 +0100)]
Test suite: build-modes: Move sbuild knowledge to lib

Teach bm-guess-e-source-e-targets about sbuild, so this knowledge can
be reused.

4 years agoTest suite: build-modes: Move `build-source' knowledge to lib
Ian Jackson [Sun, 3 Jul 2016 22:56:50 +0000 (23:56 +0100)]
Test suite: build-modes: Move `build-source' knowledge to lib

Teach bm-guess-e-source-e-targets about dgit build-source, so this
knowledge can be reused.

4 years agoTest suite: Break out bm-prep-ownpackage-branches
Ian Jackson [Sun, 3 Jul 2016 22:55:47 +0000 (23:55 +0100)]
Test suite: Break out bm-prep-ownpackage-branches

We are going to want to run some build modes tests on other exciting
trees.

4 years agoTest suite: quilt gbp: Provide example worktree tarball
Ian Jackson [Sat, 16 Jul 2016 14:53:41 +0000 (15:53 +0100)]
Test suite: quilt gbp: Provide example worktree tarball

This working tree has some patch queues etc. in it, which will be
useful for testing --quilt=gbp.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoTest suite: unapplied-pq2qc: move into lib as a t- subroutine
Ian Jackson [Sun, 19 Jun 2016 15:16:12 +0000 (16:16 +0100)]
Test suite: unapplied-pq2qc: move into lib as a t- subroutine

4 years agoTest suite: Provide tests/unapplied-pq2qc
Ian Jackson [Sat, 4 Jun 2016 21:22:41 +0000 (22:22 +0100)]
Test suite: Provide tests/unapplied-pq2qc

Utility script for invoking gbp pq.  I think I will want to swallow
this into a t-* function in tests/lib.

4 years agoProvide 3.0 (quilt) patches-unapplied with .gitignore test case
Ian Jackson [Mon, 7 Dec 2015 00:45:21 +0000 (00:45 +0000)]
Provide 3.0 (quilt) patches-unapplied with .gitignore test case

4 years agoSplit build: Add a bit more debugging output
Ian Jackson [Sun, 6 Dec 2015 23:36:24 +0000 (23:36 +0000)]
Split build: Add a bit more debugging output

4 years agoSplit brain: Run source build in dgit view directory
Ian Jackson [Sun, 6 Dec 2015 20:58:13 +0000 (20:58 +0000)]
Split brain: Run source build in dgit view directory

And, after the source build is done, copy the resulting files out into
the invocation directory's parent, where people expect to find them.

4 years agoSplit build: Split clean from source build in split build mode
Ian Jackson [Sun, 6 Dec 2015 20:12:20 +0000 (20:12 +0000)]
Split build: Split clean from source build in split build mode

4 years agoSplit brain: some work on integration into the rest of dgit
Ian Jackson [Sat, 28 Nov 2015 17:43:33 +0000 (17:43 +0000)]
Split brain: some work on integration into the rest of dgit

* Move the fast forward die to where we will need to make the
  synthetic commit, so that the tree equality check is done on the
  thing we will actually push.

* Crash if we are trying to do split brain without split build.
  (This should never happen.)

* Set split build if we need split brain.

4 years agodgit: Rename $suppress_clean to $clean_using_builder (nfc)
Ian Jackson [Sat, 4 Jun 2016 17:31:53 +0000 (18:31 +0100)]
dgit: Rename $suppress_clean to $clean_using_builder (nfc)

This variable name was very confusing.  Also, add a comment explaining
the semantics.

4 years agoSplit brain: Quieten dgit-view checkout
Ian Jackson [Sun, 6 Dec 2015 20:57:55 +0000 (20:57 +0000)]
Split brain: Quieten dgit-view checkout

4 years agoSplit brain: introduce quiltmode_splitbrain() (nfc)
Ian Jackson [Sun, 29 Nov 2015 18:29:42 +0000 (18:29 +0000)]
Split brain: introduce quiltmode_splitbrain() (nfc)

4 years agoSplit brain: Memoise (cache) split brain dgit-view in a reflog
Ian Jackson [Sat, 4 Jun 2016 16:10:17 +0000 (17:10 +0100)]
Split brain: Memoise (cache) split brain dgit-view in a reflog

4 years agoSplit brain: Actually get gbp pq output back onto dgit-view branch
Ian Jackson [Sat, 28 Nov 2015 17:40:53 +0000 (17:40 +0000)]
Split brain: Actually get gbp pq output back onto dgit-view branch

And explain why in a comment.

4 years agoSplit brain: Transfer gbp-pq patch application output to dgit-view branch
Ian Jackson [Sat, 4 Jun 2016 16:08:23 +0000 (17:08 +0100)]
Split brain: Transfer gbp-pq patch application output to dgit-view branch

This code does not work properly yet; it will be fixed soon.

4 years agoSplit brain: Generate .gitignore patch in deterministic order
Ian Jackson [Sat, 4 Jun 2016 16:03:41 +0000 (17:03 +0100)]
Split brain: Generate .gitignore patch in deterministic order

4 years agoSplit brain: Actually generate .gitignore patch
Ian Jackson [Sat, 4 Jun 2016 16:01:40 +0000 (17:01 +0100)]
Split brain: Actually generate .gitignore patch

Close our FH onto the file, and run git diff to fill it with the
actual diff.  Add the file to series.  Use git add and git commit to
commit the patch to the private git branch.

Now most of the code to generate the .gitignore properly is present, I
think, but not debugged.

4 years agoSplit brain: Create debian/patches in case it does not exist
Ian Jackson [Sat, 4 Jun 2016 16:00:51 +0000 (17:00 +0100)]
Split brain: Create debian/patches in case it does not exist

When we need to make the .gitignore patch, there may not yet be any
debian/patches directory.

4 years agoSplit brain: Add [dgit version ] tag to autogenerated .gitignore patch header
Ian Jackson [Sat, 4 Jun 2016 16:00:08 +0000 (17:00 +0100)]
Split brain: Add [dgit version ] tag to autogenerated .gitignore patch header

So far we still don't generate the patch.

4 years agoSplit brain: Provide a lot more information to quiltify_splitbrain (nfc)
Ian Jackson [Sat, 4 Jun 2016 15:59:26 +0000 (16:59 +0100)]
Split brain: Provide a lot more information to quiltify_splitbrain (nfc)

It is going to need this extra info in a moment.

4 years agoSplit brain: Provide optional $ignorenamesr argument to quiltify_trees_differ
Ian Jackson [Sat, 4 Jun 2016 15:57:35 +0000 (16:57 +0100)]
Split brain: Provide optional $ignorenamesr argument to quiltify_trees_differ

We are going to need this information to construct the substantive
diff for the .gitignores patch.

4 years agoSplit brain: quiltify_trees_differ: document $ignorenamesr
Ian Jackson [Sat, 4 Jun 2016 15:56:06 +0000 (16:56 +0100)]
Split brain: quiltify_trees_differ: document $ignorenamesr

4 years agoSplit brain: Print $unapplied tree hash to debug log, too
Ian Jackson [Wed, 25 Nov 2015 22:44:45 +0000 (22:44 +0000)]
Split brain: Print $unapplied tree hash to debug log, too

4 years agoSplit brain: Start work on generating gitignore patch
Ian Jackson [Sat, 4 Jun 2016 15:49:20 +0000 (16:49 +0100)]
Split brain: Start work on generating gitignore patch

Generate a patch header, for now.  Still not finished.

4 years agoSplit brain: Move GIT_COMMITTER_* setting to quiltify_splitbrain toplevel (nfc)
Ian Jackson [Sat, 4 Jun 2016 15:48:43 +0000 (16:48 +0100)]
Split brain: Move GIT_COMMITTER_* setting to quiltify_splitbrain toplevel (nfc)

We want this to apply to any commits we use git to make, not just
gbp-pq.

4 years agoSplit brain: Further improvements to split brain patch application
Ian Jackson [Sat, 4 Jun 2016 15:45:06 +0000 (16:45 +0100)]
Split brain: Further improvements to split brain patch application

* Direct gbp-pq's stdout to /dev/null
* Specify GIT_COMMITER_* so that the results are reproducible
* Detect .gitignore problem

4 years agoSplit brain: Pass $clogp to quiltify_splitbrain (nfc)
Ian Jackson [Sat, 4 Jun 2016 15:44:19 +0000 (16:44 +0100)]
Split brain: Pass $clogp to quiltify_splitbrain (nfc)

We are going to want this in a moment.

4 years agoSplit brain: Make clogp_authline capable of returning individual pieces (nfc)
Ian Jackson [Thu, 19 Nov 2015 01:10:47 +0000 (01:10 +0000)]
Split brain: Make clogp_authline capable of returning individual pieces (nfc)

We are going to want this (so that we can set GIT_... variables to the
pieces to make git construct commits the way we want).

Both current call sites provide scalar context, so no functional
change.

4 years agoSplit brain: Break out $git_authline_re
Ian Jackson [Thu, 19 Nov 2015 01:10:23 +0000 (01:10 +0000)]
Split brain: Break out $git_authline_re

This will make it a bit easier to reuse it.  Actually AFAICT it turns
out (looking at the rest of the branch) that this is not needed, but
it's nicer for the future I think.

4 years agoSplit brain: Start work on determining split brain necessity
Ian Jackson [Thu, 19 Nov 2015 00:32:00 +0000 (00:32 +0000)]
Split brain: Start work on determining split brain necessity

`Split brain' means the situation where `dgit push' makes private
commits, to push to the dgit repos server, which are not left on the
user's actual branch.

Check whether the quilt mode and tree differences, taken together,
mean that we need split brain.

If we do need split brain, use gbp pq to apply the patch series.

.gitignore changes are mishandled, still.  And we don't actually
follow through much yet.

Also, fix a case where quilt mode `apply' hadn't been changed to
`unapplied'.

4 years agoSplit brain: Introduce $diffbits (nfc)
Ian Jackson [Wed, 18 Nov 2015 18:59:35 +0000 (18:59 +0000)]
Split brain: Introduce $diffbits (nfc)

Replace ${user,{,un}applied}2${,un}applied with $diffbits->{[HOA]2[HOA]}

This encapsulates the info it nicely and makes it easy to pass
it to quiltify_splitbrain, which is going to need it.

4 years agoSplit brain: quiltify_trees_differ: Improve doc comment
Ian Jackson [Sat, 4 Jun 2016 11:58:32 +0000 (12:58 +0100)]
Split brain: quiltify_trees_differ: Improve doc comment

4 years agoSplit brain: Rename quilt mode `apply' to `unapplied'
Ian Jackson [Tue, 17 Nov 2015 01:28:04 +0000 (01:28 +0000)]
Split brain: Rename quilt mode `apply' to `unapplied'

4 years agoSplit brain: Start introducing gbp (split brain) quilt mode
Ian Jackson [Sat, 4 Jun 2016 14:25:23 +0000 (15:25 +0100)]
Split brain: Start introducing gbp (split brain) quilt mode

* Replace quilt_could_gbp with new calculation based on three calls to
  quiltify_trees_differ.

* Reworked messages about quilt differences.

* Start to provide the `gbp', `apply' and `dpm' quilt modes.
  Currently we crash with a die if any of these are used.
  Nevertheless, we allow `gbp' and `apply' to be specified.

4 years agoSplit brain: Make quiltify_trees_differ cleverer
Ian Jackson [Sat, 4 Jun 2016 14:04:28 +0000 (15:04 +0100)]
Split brain: Make quiltify_trees_differ cleverer

Have it be able to explain what was different, by returning a bitmask.
Update the call sites.

Incidentally, fix a bug where .gitignores other than in the toplevel
would not be ignored when they ought to have been.

4 years agoSplit brain: Include debian/tests/control in fake dsc
Ian Jackson [Sat, 4 Jun 2016 11:47:36 +0000 (12:47 +0100)]
Split brain: Include debian/tests/control in fake dsc

Found this in a commit "WIP SPLIT BRAIN NEW DIFFS SEEM GOOD".  Not
sure why (I thought) it was needed.  Maybe it should be reverted, but
it's probably harmless.

4 years agoSplit brain: Improve quiltify() message
Ian Jackson [Sat, 4 Jun 2016 11:41:23 +0000 (12:41 +0100)]
Split brain: Improve quiltify() message

Actually --quilt=gbp and --quilt=unapplied (well, what's called
--quilt=apply here) aren't going to be quite identical.

4 years agoSplit brain: Move $oldtiptree calculation out of quiltify (nfc)
Ian Jackson [Mon, 16 Nov 2015 23:05:55 +0000 (23:05 +0000)]
Split brain: Move $oldtiptree calculation out of quiltify (nfc)

And pass the result as an argument.  Code outside quiltify is going
to want this information.

4 years agoSplit brain: Detect patches-unapplied tree and print a suitable message
Ian Jackson [Sat, 4 Jun 2016 11:23:16 +0000 (12:23 +0100)]
Split brain: Detect patches-unapplied tree and print a suitable message

Note that the message refers to `--quilt=gbp' aka `--quilt=apply'
which do not exist yet (and which we're going to call something else,
later in this series).  Oh well.

4 years agoSplit brain: quiltify_trees_differ supports $ignoregitignore (nfc)
Ian Jackson [Sat, 4 Jun 2016 11:22:03 +0000 (12:22 +0100)]
Split brain: quiltify_trees_differ supports $ignoregitignore (nfc)

We are going to want to handle this specially.

4 years agoSplit brain: Rename $origtree to $unapplied (nfc)
Ian Jackson [Sat, 4 Jun 2016 11:19:21 +0000 (12:19 +0100)]
Split brain: Rename $origtree to $unapplied (nfc)

This is clearer.

4 years agoSplit brain: Capture patches-unapplied tree object
Ian Jackson [Sat, 4 Jun 2016 10:44:47 +0000 (11:44 +0100)]
Split brain: Capture patches-unapplied tree object

No functional change as yet.  But, now the correct value for $origtree
is passed to quiltify.

4 years agoSplit brain: Run dpkg-source --before-build separately (nfc)
Ian Jackson [Sat, 4 Jun 2016 10:40:06 +0000 (11:40 +0100)]
Split brain: Run dpkg-source --before-build separately (nfc)

We are going to want to capture the patches-unapplied state of the
tree as a git tree object.  So split out the patch application part of
the fake .dsc extraction.

No functional change as yet.

4 years agoSplit brain: Fake .dsc contains d/control and d/changelog too
Ian Jackson [Sat, 4 Jun 2016 10:36:22 +0000 (11:36 +0100)]
Split brain: Fake .dsc contains d/control and d/changelog too

We will want these because we're going to be doing more exciting
dpkg-source and gbp operations etc.

4 years agoSplit brain: Add $origtree argument to quiltify (nfc)
Ian Jackson [Sat, 4 Jun 2016 10:35:58 +0000 (11:35 +0100)]
Split brain: Add $origtree argument to quiltify (nfc)

Currently not used, nor any sensible value passed.

4 years agoSplit brain: Document the plan
Ian Jackson [Sun, 8 Nov 2015 23:00:15 +0000 (23:00 +0000)]
Split brain: Document the plan

4 years agoSplit brain: Make git tree in fake sooner (nfc)
Ian Jackson [Sun, 8 Nov 2015 22:59:46 +0000 (22:59 +0000)]
Split brain: Make git tree in fake sooner (nfc)

No overall functional change.

4 years agoSplit brain: Make prep_ud be able to make a different dir (nfc)
Ian Jackson [Sun, 8 Nov 2015 15:13:36 +0000 (15:13 +0000)]
Split brain: Make prep_ud be able to make a different dir (nfc)

We will want this later.  No users yet, so no functional change.

4 years agodgit: Add a comment about reason for commit_quilty_patch in push
Ian Jackson [Wed, 18 May 2016 20:21:03 +0000 (21:21 +0100)]
dgit: Add a comment about reason for commit_quilty_patch in push

4 years agoTest dgit-repos-policy-debian with multiple (identical, as it happens) existing taints.
Ian Jackson [Sat, 4 Jun 2016 18:46:42 +0000 (19:46 +0100)]
Test dgit-repos-policy-debian with multiple (identical, as it happens) existing taints.

4 years agodgit-repos-policy-debian.: fix git-cat-file-handling with multiple taints in db (!).
Ian Jackson [Sat, 4 Jun 2016 18:46:07 +0000 (19:46 +0100)]
dgit-repos-policy-debian.: fix git-cat-file-handling with multiple taints in db (!).

4 years agodgit-repos-policy-debian: Better error handling
Ian Jackson [Sat, 4 Jun 2016 18:45:12 +0000 (19:45 +0100)]
dgit-repos-policy-debian: Better error handling

Show more info when git-cat-file --batch goes wrong

4 years agodebian/changelog: Fix a formatting bug
Ian Jackson [Sat, 4 Jun 2016 17:56:59 +0000 (18:56 +0100)]
debian/changelog: Fix a formatting bug

4 years agoDgit.pm: Provide hashfile()
Ian Jackson [Sat, 28 Nov 2015 15:56:10 +0000 (15:56 +0000)]
Dgit.pm: Provide hashfile()

Call site(s) will come later.

4 years agoTest suite: Provide test for nonexistent --always-split-source-build
Ian Jackson [Sat, 7 Nov 2015 17:28:10 +0000 (17:28 +0000)]
Test suite: Provide test for nonexistent --always-split-source-build

We are going to introduce this option soon.  It is not supposed to
actually have very much overall effect, although it will replumb the
way dgit goes about making the source package.

So the tests are just the same as the normal tests only with the
additional option.

4 years agodgit: Internal change: Support forcing split source builds
Ian Jackson [Fri, 21 Aug 2015 16:27:40 +0000 (17:27 +0100)]
dgit: Internal change: Support forcing split source builds

We are going to start handling weirder kinds of git tree, which will
require a kind of `split brain': the dgit-using maintainer's view will
be a git tree which is not a dgit git tree.  dgit will convert them
during push.

For this to work we will have to have dgit always (in these cases)
generate the source package itself (with a separate invocation of
dpkg-source).  This will involve some dis- and re-entangling of the
way we generate arguments to dpkg-buildpackage.

We can profitably split this up into this pre-patch, which has no
overall functional change for normal users.

We do here provide a new --always-split-source-build option which
allows the new approach to be explicitly requested.  This allows us to
use the test suite to not only test that we didn't break any of the
existing building strategies, but also that the new strategies all do
what we expect.

But this option is not really semantically useful for users so we do
not document it.

4 years agoTest suite: tartree-edit: document gitfetchinfo-merge in usage message
Ian Jackson [Sun, 3 Jul 2016 22:12:02 +0000 (23:12 +0100)]
Test suite: tartree-edit: document gitfetchinfo-merge in usage message

4 years agoTest suite: run-all should use make -k
Ian Jackson [Sun, 3 Jul 2016 22:01:25 +0000 (23:01 +0100)]
Test suite: run-all should use make -k

Otherwise one failure causes the tests to be abandoned, which is not
usually desirable.

4 years agoTest suite: lib t-untar of an edited tartree: do not hardlink
Ian Jackson [Sun, 3 Jul 2016 22:00:16 +0000 (23:00 +0100)]
Test suite: lib t-untar of an edited tartree: do not hardlink

Some of the tools we use, it turns out, do not update properly: they
overwrite in place.  This can cause inadvertant changes to a tartree
opened for editing.

4 years agoTests: tartree-edit: gitfetchinfo: Better commit messages for dirty tress
Ian Jackson [Sun, 3 Jul 2016 22:03:17 +0000 (23:03 +0100)]
Tests: tartree-edit: gitfetchinfo: Better commit messages for dirty tress

4 years agoTest suite: tartree-edit: gitfetchinfo generates remote/TT-HEAD
Ian Jackson [Sun, 3 Jul 2016 22:02:37 +0000 (23:02 +0100)]
Test suite: tartree-edit: gitfetchinfo generates remote/TT-HEAD

Simply HEAD is not displayed by gitk, which is rather a shame.

4 years agoTest suite: tartree-edit: gitfetchinfo: Remerge on fetch
Ian Jackson [Sat, 2 Jul 2016 10:34:03 +0000 (11:34 +0100)]
Test suite: tartree-edit: gitfetchinfo: Remerge on fetch

When we unmerged some old A+B merged refs, make a note to merge them
again.  This saves the user calling gitfetchinfo-merge again.

4 years agoTest suite: tartree-edit: gitfetchinfo: Be a bit more careful
Ian Jackson [Sat, 2 Jul 2016 10:33:26 +0000 (11:33 +0100)]
Test suite: tartree-edit: gitfetchinfo: Be a bit more careful

* Turn on perl warnings
* Use strict
* When removing old merged refs, insist that we aren't handling A+A

4 years agoTest suite: tartree-edit: gitfetchinfo: Unmerge merged refs
Ian Jackson [Sat, 2 Jul 2016 10:25:54 +0000 (11:25 +0100)]
Test suite: tartree-edit: gitfetchinfo: Unmerge merged refs

The sequence
  gitfetchinfo-merge A B
  gitfetchinfo A
  gitfetchinfo-merge A B
might leave inappropriate A+B refs, because nothing would delete them.

So, have gitfetchinfo A unmerge any A+B or B+A refs.  (This does mean
that the user of gitfetchinfo A is now promising that any remotes A+B
or B+A were made with gitfetchinfo-merge.)