summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Test suite: t-commit: honour $majorv for major versionIan Jackson2016-09-05
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Honour t_dgit_xoptsIan Jackson2016-09-05
| | | | | | No callers. This may come in useful, though, at some point. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: examplegit: Make two pushes to unstableIan Jackson2016-09-05
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: examplegit: Save mirror as part of setupIan Jackson2016-09-05
| | | | | | incoming has nothing in it. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: t-setup-*: Fix lock pathIan Jackson2016-09-05
| | | | | | Needs to be not in a directory which may not exist yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Provide t-setup-* machineryIan Jackson2016-09-05
| | | | | | | | | | | | | | | | | | | | | Setups are, essentially, prefixes to test cases. We arrange to be able to reuse their state (as explicitly recorded in t-setup-done), so that manual runs of the test suite can be faster. We save the tmp base directory (the directory shared by tests), if there is one. That will be used for cacheing of setups. And we save the environment in form we can use xargs and env to restore. We use a conventional with-lock-ex and stamp file pattern for the cache. The IMPORT file (containing shell variables) doubles as the stamp. The setup execution rune is exciting. This mostly results from the fact that we want xargs to pass all the env vars to env, and that xargs cannot be persuaded to append fixed arguments to the arguments read from its input file. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: examplegit setup scriptIan Jackson2016-09-05
| | | | | | | | | | We are going to have `setup' scripts which explain how to set up the preconditions for one or more tests. This is the first one. Right now it runs to completion, generating its deliverables in $tmp, but then crashes due to the as-yet-unimplemented t-setup-done call. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: t-commit: Permit specification of the suite in $3Ian Jackson2016-09-05
| | | | | | | | | This also means that we need to default $2 with ${2:-} since callers want need to pass an empty value for the version, to get the default. No functional change since none of the call sites use this yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: t-pushed-good: Support other suitesIan Jackson2016-09-05
| | | | | | | | Honour $2 being the suite codename, defaulting to sid. No functional change, since no-one passes this argument right now. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: t-archive-none: Support multiple suitesIan Jackson2016-09-05
| | | | | | | | | | t-archive-none now honours `suitespecs', which defaults to just `sid:unstable'. No overall functional change since no-one sets suitespecs to a non-default value. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* TODO.BRANCH: Synthetic ff is not to do with $tag, reallyIan Jackson2016-09-05
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* TODO.BRANCH: Have checked all uses of $split_brainIan Jackson2016-09-05
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* TODO.BRANCH: Update following split tag workIan Jackson2016-09-05
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* TODO.BRANCH: More notes about our plansIan Jackson2016-09-05
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Split brain: Test case: Do pushIan Jackson2016-09-05
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Split brain: TODOsIan Jackson2016-09-05
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Split tags: Push the maintainer view tag, where supportedIan Jackson2016-09-05
| | | | | | | | | | | | | | | | | We introduce a new `maint' possibility in to the dgit-tag-format access cfg list, presence of which indicates that the receiver is content to receive DEP-14-style maintainer-view (ie, non-dgit0 tags. For now, we default this to true. However, repos handled by dgit-repos-server cannot currently cope with this, because: * dgit-repos-server currently tries to be compatible with old dgits which send DEP-14-named dgit tags; * dgit-repos-server doesn't currently permit the creation of `extraneous' (ie, non-dgit) tags and branches. So for Debian, we do not set this flag. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Split tags: Genrate maintainer-view tag tooIan Jackson2016-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | push_tagwants gets a new argument, $maintviewhead, which is defined iff the quilt mode means we want split tags. It then specifies the generation of both tags. push_mktags gains the ability to make the new `maint' view tag (and checks that the view is not something else unexpected). Introduce a function debiantag_maintview for calculating the maintainer's idea of the tag. Currently we use DEP-14 encoding (and this function is a clone-and-hack of Dgit.pm::debiantag_old, but perhaps we should do something more complicated (depending on the quilt mode). For now we do not push the maint view tag anywhere. The ability to do that, where appropriate, will come in a moment. This commit introduces protocol version 4, which includes the new `maint-view' param. When have a split brain quilt mode, we need to be sure that we're using protocol version 4 or out peer may not honour this, resulting in an annoying failure later (the responder sending a different number of tags to the number expected). We also have to check that we're using the new tag format (or we might want to try to generate two different tags with the same name, which is madness). When the quilt mode is not a split brain one, this whole commit should produce no overall functional change (even though a higher protocol version may be negotiated). Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Split tags: Preparation: Rename tag variables etc. in dopushIan Jackson2016-09-05
| | | | | | | | | | | | | | We are going to have different branches at once. Rename some variables to permit this distinction. We have $actualhead (whatever HEAD is), $dgithead (the dgit view), and $maintviewhead (the maintainer's view if different, or undef if not0. Change the existing references. Also change one reference to HEAD to $dgithead: when we update the local tracking ref for the dgit view, we need to use $dgitview. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Split tags: Preparation: Reorganise tagwants and mktagsIan Jackson2016-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are going to want to generate two tags. The current code structure is not really set up for this. Also the knowledge of what tags are being made needs to be used both in dopush and in the push responder. So: * Introduce push_tagwants, which calculates which tags we are going to be making, including some details of them. * `View' indicates which tag this is. For now there is only one, `dgit'. But the tags are going to be in a defined order - or, at least, the `dgit' tag will come first. * Have push_parse_changelog no longer return the single tag name, and abolish the corresponding $i_tag varaiable. * push_mktag bcomes push_mktags and takes much of its instruction from @$tagwants. * push_mktags does more than just making tags - it also updates the dsc, and does some checks, so it needs to fish the relevant object id out of the dgit view tag. * $mktag in push_tagwants can now operate on a tagwant, and the tag-making part of push_mktags just iterates over the tagwants. * The filename plumbing in dopush is somewhat generalised: we collect the filenames out of push_mtags or responder_receive_files, and then substitute them into the tagwants. * The tag checking iterates over the tagwants. * The push spec computation iterates over the tagwants. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Split tags: Preparation: Break out (and fix) need_tagformatIan Jackson2016-09-05
| | | | | | | | | | No major functional change. However, we do preserve the previous override value, so that need_tagformat's caller is happy, we still override the access configuration. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Split tags: Preparation: Break out access_cfg_tagformatsIan Jackson2016-09-05
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Split tags: Preparation: move select_tagformat into a new sectionIan Jackson2016-09-05
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Split tags: Introduce $mktag in push_mktagIan Jackson2016-09-05
| | | | | | | | | | | | | | push_mktag is going to want to become push_mktags, and make perhaps two tags. For now, break the actual tag-making out into a subref. Rename the arguments to push_mktag to ensure we caught all the references in $mktag. push_mktag now wants to return an array; make sure that the call sites all give it array context. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Tag change: Double check agreement in rpush protocolIan Jackson2016-08-14
| | | | | | | Send the tag format as a param and check that it is the same at both ends. This check _ought_ not ever to fail, but I want to be sure. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Tag change: Rename $tagformat to $tagformat_wantIan Jackson2016-08-14
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* TODO.BRANCH: Recognise {oldtag,newtag}-clone-nogitIan Jackson2016-08-14
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* TODO.BRANCH: Want to test upgrade smoothnessIan Jackson2016-08-14
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* TODO.BRANCH: Have grepped tests/lib for tagIan Jackson2016-08-14
| | | | | | | Well, we have done this well enough that t-pushed-good works in newtag-clone-nogit. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* TODO.BRANCH: Some desires for protovsn 4Ian Jackson2016-08-14
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* TODO.BRANCH: "previously" is fine.Ian Jackson2016-08-14
| | | | | | | | | | | git_fetch_us fetches all of refs/heads and refs/tags into dgit-fetch, and then with deliberately_not_fast_forward we process each of those. This is correct. This is for replay protection and for this purpose it doesn't matter whether the tags we are stopping being unwound are dgit tags or something else. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Canonicalise json output when generating aqIan Jackson2016-08-14
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: run-all: record outputIan Jackson2016-08-14
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Use GIT_COMMITTER_DATE for automatic patchIan Jackson2016-08-14
| | | | | When automatically generating quilt patch, honour GIT_COMMITTER_DATE for filename creation (makes filename deterministic in test suite).
* Test suite: Test pushing with forcing old and new tag formatIan Jackson2016-07-31
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Tag change: Calculate desired tag formatIan Jackson2016-07-31
| | | | | | | | | | | | Introduce machinery for deciding what format tag to make, during push. The computation is slightly ad-hoc. Currently it always returns `old' and does as before, so no overall functional change with existing configs and existing command lines. Reserve protocol version 4 for new tag support. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Tag change: dgit: Fetch both old ane new format tagsIan Jackson2016-07-31
| | | | | | We are going to want to know about all of these. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Tag change: Test suite: Introduce $tagpfxIan Jackson2016-07-31
| | | | | | | | | | | | | | Currently this is `test-dummy' (the distro the tests work with). Have checked that after this commit find tests -type f | xargs perl -i~ -pe 's/\$tagpfx/test-dummy/g' puts everything back. (This does not prove I have changed the right set of occurrences, but it does suggest that each actual change is good.) No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Tag change: Update dgit-repos-policy-debianIan Jackson2016-07-31
| | | | | | | | The only place where we call debiantag, and the only place where we know about tag names, is in vsn_in_our_history. We need to change it to query multiple tags. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Tag change: Update dgit-repos-serverIan Jackson2016-07-31
| | | | | | | | | | Change the calls to debiantag_old to changes to debiantags, and the regexp to tolerate either tag name. We need an additional check that we are not receiving the tag named by debiantag_new when debiantag_old already exists. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Tag change: Provide debiantags in Dgit.pmIan Jackson2016-07-31
| | | | | | No callers yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Tag change: Make git_for_each_ref support multiple patternsIan Jackson2016-07-31
| | | | | | | By passing $patterns= [ ... ]. No functional change yet as no call site does this. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Tag change: Declare intent in docs etc.Ian Jackson2016-07-31
| | | | | | | Provide debiantag_new as well as debiantag_old. Change the docs and an important comment. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Tag change: Rename debiantag to debiantag_oldIan Jackson2016-07-31
| | | | | | | | | | | | | | | | | We are going to change the tag name of the main signed tag used by dgit to signal the user's intent to the archive server. Prepare for this by changing debiantag to debiantag_old and changing all call sites outside dgit itself. dgit will want to be able to generate either, depending on whether it's cooperating in an rpush with a new or old dgit so reintroduce a wrapper called debiantag there. This will also allow us to have dgit generate old tags for testing. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* TODO.BRANCH search whole tree for "tag"Ian Jackson2016-07-31
|
* changelog: Document test suite better infoIan Jackson2016-07-31
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Print better info on t-ref-same failureIan Jackson2016-07-31
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Print better info on failuresIan Jackson2016-07-31
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: rpush protocol comment: Add some missing protocol elementsIan Jackson2016-07-31
| | | | | | | progress, supplementary-message, previously, and param csuite, were all missing. Document them. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: cmdoutput: Handle undef in arg crash betterIan Jackson2016-07-31
| | | | | | | | | | 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>