summaryrefslogtreecommitdiff
path: root/dgit
Commit message (Collapse)AuthorAge
...
* i18n: Add translator notes about ASCII art changes displayIan Jackson2019-06-29
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: baredebian: New quilt modeIan Jackson2019-06-29
| | | | | | | This is the bulk of the implementation including all essential changes. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: baredebian: Introduce --upstream-commitishIan Jackson2019-06-29
| | | | | | | | | 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>
* dgit: Introduce $uhead and $uhead_whatshortIan Jackson2019-06-29
| | | | | | | | 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>
* dgit: Make $format available in build_or_push_prep_modesIan Jackson2019-06-29
| | | | | | | | By returning it from determine_whether_split_brain. No functional change yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move hash_commit from dgitIan Jackson2019-06-29
| | | | | | No functional change other than to no longer honour @git. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Rename various *make_commit* to *hash_commit*Ian Jackson2019-06-29
| | | | | | | | This avoids a subroutine name clash with make_commit in gdr. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Reject split view with correct messageIan Jackson2019-06-28
| | | | | | | | | | 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>
* dgit: Support split view in non-splitting quilt modesIan Jackson2019-06-28
| | | | | | | | | 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>
* dgit: In code, rename splitbrain quilt modes to splittingIan Jackson2019-06-28
| | | | | | | | | | | | | 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>
* dgit: Reject dgit pull in split brain modeIan Jackson2019-06-28
| | | | | | | | | | | 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>
* dgit: Move determine_whether_split_brain further up the fileIan Jackson2019-06-28
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Break out determine_whether_split_brainIan Jackson2019-06-28
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Crash if we forgot to set $do_split_brainIan Jackson2019-06-28
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Put !! inside do_split_brain()Ian Jackson2019-06-28
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Introduce do_split_brain()Ian Jackson2019-06-28
| | | | | | No functional change yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit(1): Tidying up after tag format: Drop splitbrain conditionalIan Jackson2019-06-28
| | | | | | | | | 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>
* dgit: Tidying up after tag format: Drop debiantagIan Jackson2019-06-28
| | | | | | | | | | | 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>
* dgit: Tidying up after tag format: Collapse $dodep14tag testIan Jackson2019-06-28
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Introduce $protovsn 5; part of tidying up after tag formatIan Jackson2019-06-28
| | | | | | | | | | | 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>
* dgit: Drop $protovsn < 4; part of tidying up after tag formatIan Jackson2019-06-28
| | | | | | | | | | 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>
* dgit: Tidying up after tag format: drop ..._can_splitbrainIan Jackson2019-06-28
| | | | | | Substitute this fixed value into its call sites. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Drop support for old tag formatIan Jackson2019-06-28
| | | | | | | | | | 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>
* dgit: tag format: Add missing $protovsn comment re tagformat paramIan Jackson2019-06-28
| | | | | | | 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>
* dgit: Do split brain cache and saving in build_maybe_quilt_fixupIan Jackson2019-06-28
| | | | | | | 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>
* dgit: Fix --dgit-view-save optionIan Jackson2019-06-28
| | | | | | | 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>
* dgit: quiltify: Go back to dgit-view if appropriateIan Jackson2019-06-28
| | | | | | | | | 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>
* dgit: Move git chedckout master out of quiltifyIan Jackson2019-06-28
| | | | | | | | | 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>
* dgit: When propagating pseudomerge error, strip leading \nIan Jackson2019-06-28
| | | | | | | | 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>
* dgit: Split out default_from_access_cfgIan Jackson2019-06-28
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: clean mode: Correctly reject bad modes from configIan Jackson2019-06-28
| | | | | | Add the missing ^ and $ (which do not appear in $cleanmode_re). Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: split brain reorg: Slight internal error check improvementsIan Jackson2019-06-28
| | | | | | | 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>
* dgit: split brain reorg: Rename $made_split_brainIan Jackson2019-06-28
| | | | | | | | 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>
* dgit: split brain reorg: Check $split_brain against $do_split_brainIan Jackson2019-06-28
| | | | | | | | | | | | 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>
* dgit: split brain reorg: debug print quilt mode in XXXIan Jackson2019-06-28
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Fix check for --include-dirty --quilt=<splitting>Ian Jackson2019-06-28
| | | | | | | | 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>
* dgit: split brain reorg: Move do_split_brain settingIan Jackson2019-06-28
| | | | | | | | | | | | | | | | | | | | | 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>
* dgit: Add a comment about a bug we are about to eliminate.Ian Jackson2019-06-28
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: split brain reorg: Move some split brain code further out.Ian Jackson2019-06-28
| | | | | | | | | | | | | | | | 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>
* dgit: split brain reorg: Change an internal error die to confessIan Jackson2019-06-28
| | | | | | No functional change in non-error cases. This was wrong before. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Reject split brain quilt modes with single-debian-patchIan Jackson2019-06-28
| | | | | | | | 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>
* dgit: split brain reorg: Check quilt cache iff $do_split_brain (2)Ian Jackson2019-06-28
| | | | | | | | | | | | 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>
* dgit: split brain reorg: Check quilt cache iff $do_split_brain (1)Ian Jackson2019-06-28
| | | | | | | | | | | 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>
* dgit: Write down quilt mode split brain plans in a commentIan Jackson2019-06-28
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Move quilt_need_fake_dsc into the places that require itIan Jackson2019-06-28
| | | | | | No overall functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: gdr linear quilt fixup: Do it in a playtreeIan Jackson2019-06-28
| | | | | | | | It will work there, since this operation does not need any of the magic gdr refs. And this means that it will DTRT in split brain mode, when we enable that. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: quilt_need_fake_dsc: Make idempotentIan Jackson2019-06-28
| | | | | | No overall functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: unpack_playtree_need_cd_work: Make idempotentIan Jackson2019-06-28
| | | | | | | | | | | | | | | This won't be able to recover from a truly-messed-up "work" but this is good enough not to have to explicitly arrange for each place that uses it to know whether it has been done already. Checking in the filesystem is OK because mktree_in_ud_here calls playtree_setup which expects the playground to have been set up already - ie, all our callers have called prep_ud already. Add a comment about this requirement. No overall functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: rename unpack_playtree_mk_cd_work (from _mkwork)Ian Jackson2019-06-28
| | | | | | | | This makes the effect on cwd less confusing. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: quilt fixup: Move split brain branch creation out a bitIan Jackson2019-06-28
| | | | | | | | | | | | | | Move the playtree git branch, and the setting $split_brain from quiltify_splitbrain (inside quilt_fixup_multipatch, conditional on quiltmode_splitbrain) to quilt_fixup_multipatch. This is still not quite right - it needs to be further out, because it should affect quilt_fixup_singlepatch too. Right now singlepatch DTWT in split brain mode. No functional change for now, anyway. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>