summaryrefslogtreecommitdiff
path: root/dgit
Commit message (Collapse)AuthorAge
* build modes handling: Check for stray .changes on all split brain build entriesIan Jackson2016-10-25
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* build changes handling: Break out midbuild_checkchangesIan Jackson2016-10-25
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* build changes handling: Run mergechanges when needed in non-sbuild build modesIan Jackson2016-10-25
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* build changes handling: Introduce postbuild_mergechangesIan Jackson2016-10-25
| | | | | | | | | | | | | | | Affects only the `sbuild' subcommand. Mostly code motion. Other changes include: * Provide in_parent, and use it. * "sbuild" changed to "build" in the msg_if_onlyone failure message * Unapply patches before merging changelogs * Reorganise so that it is possible to use this code when there is only one output changes file. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Import: Allow --force to enable/disableIan Jackson2016-10-24
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Ignore unknown force options (with a warning)Ian Jackson2016-10-24
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Provide --force-dsc-changes-mismatchIan Jackson2016-10-24
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Provide --force-unsupported-source-formatIan Jackson2016-10-24
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Import: Use absurd `git apply' emulation if gbp pq import failsIan Jackson2016-10-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gbp import can fail due to git apply not understanding patches. This is #841867 (against dgit). The underlying problem is #841866 (in gbp pq) which exposes things like #841865 and #829067 (in git). I imagine there are other lurking incompatibilities between git-apply and dpkg-source. We could in principle reimplement the gbp patch metadata extraction. But that would be quite tiresome and have its own compatibility problems. The real problem is just `git apply'. (Indeed gbp already tries git apply without, and then with, a whitespace fix option.) We work around the trouble by providing our own implementation of `git apply'. Specifically: We try to do things the sane way (just running gbp pq import) first. If that works, great. If it doesn't, we put /usr/share/dgit/absurd on the PATH. That contains only a sh script called `git'. This sh script figures out whether the caller is trying to invoke `git apply'. If not, it runs the real git. If the caller wanted git-apply, the absurd git script emulates it using dpkg-source --before-build. Conveniently, we know that the series file will not be touched by patches. So we can write just the patch we care about into the series file, and run --before-build, which applies just that one patch. The results are committed (minus the .pc), and for the next patch, dpkg-source sees again a tree with simply a single patch to apply. We try ordinary gbp pq first because our absurd approach is very slow on a big tree. Also we would like to maximise our chances of the import working. If git and/or gbp ever work better by themselves, all of this craziness will simply not happen. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Build system substitutions, for absurditiesIan Jackson2016-10-24
| | | | | | | | | | * Introduce absurddir, which is where the absurdities will go * Substitute the absurddir into the dgit script during make all * Install the substituted scripts rather than the originals in make install * Provide a default in dgit, based on $0 * Clean the substitutions up in make clean Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Provide --force-unrepresentable.Ian Jackson2016-10-23
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: --force-*: Provide frameworkIan Jackson2016-10-23
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: ftpmaster api fetch: Check http error code (!)Ian Jackson2016-10-23
| | | | | | | | | We are going to want to handle 404 specially so do not just use -f. Handle file:/// specially since curl just always invents 000 for the http error code in that case. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* curl invocation: archive-api-query subcommand: pass -f to curlIan Jackson2016-10-23
| | | | | | This makes it fail properly when it should. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* curl invocation: Always honour @curlIan Jackson2016-10-23
| | | | | | | Use --curl= and --curl: in ftpmaster api queries and in http git checks. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* curl invocation: Remove -f from @curl, and add it at the call siteIan Jackson2016-10-23
| | | | | | No significant functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Provide --gbp and --dpm as aliases for --quilt=gbp and --quilt=dpm.Ian Jackson2016-10-23
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* solit brain: Do not crash in when the two brains are actually identical.Ian Jackson2016-10-23
| | | | | | | | | | | The dgit-view ref is created by quiltify_splitbrain_needed, which is not always called. But, quiltify_splitbrain_needed's other function is to switch branches. If it was called then HEAD will refer to dgit-view. If it wasn't then the original HEAD is fine. Closes:#841770. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* default config: Switch to new archive/ tag formatIan Jackson2016-10-22
| | | | | | | Even in non-split-brain mode. Also change the test suite to expect this. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* split brain cache: Add a dummy ref update when necessaryIan Jackson2016-10-20
| | | | | | | | | | | | | | | git-update-ref does not make a new reflog entry if the ref is not actually being changed. This can mean that `dgit build' might fail to find a good cache entry, but also fail to generate one that push will accept. In this case, generate a dummy reflog update. We make a spurious child of the $dgitview, as that's straightforward. Giving it the same tree and a parent means that human use of reflog commands will produce empty results rather than lots of confusing output. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* split brain cache: Use git log -gIan Jackson2016-10-20
| | | | | | git-reflog is Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* split brain cache: Fix a wrong implicit reference to $_. Closes:#841383.Ian Jackson2016-10-20
| | | | | | | | | Otherwise we can get: Use of uninitialized value $_ in pattern match (m//) at /usr/bin/dgit line 4364. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit-cache reflog: Make note in comment about --create-reflogIan Jackson2016-10-20
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit gbp-build: No longer invent a --git-debian-branch option.Ian Jackson2016-10-18
| | | | | | | | Usually the user is a maintainer using split brain, and we should rely on their own gbp configuration to specify the right check. Closes:#841100. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* pseudomerge: Suppress checks in split brain mode with --overwriteIan Jackson2016-10-18
| | | | | | | | | | | | | | | If the user has specified an appropriate --overwrite (=VERSION with the archive's version, or without a version and the archive's version being in debian/changelog), do not do all the automatic checks. Instead, in this case, simply make the dgit view be a descendant of the archive, as instructed. Closes:#841101. When generating split brain pseudomerge with --overwrite Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* pseudomerge: When generating pseudomerge in quilt split brain mode due to ↵Ian Jackson2016-10-18
| | | | | | --overwrite, actually include the version number in the commit message. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* pseudomerge: Abolish confusing $dgitview variableIan Jackson2016-10-18
| | | | | | | | This seems mostly to have existed to avoid writing `my $cachekey' separately. It has no separate function from $dgithead AFAICT. Abolish it. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* pseudomerge: In non-splitbrain, do not look at previous tagsIan Jackson2016-10-18
| | | | | | | | | | | We only want to know: is the current archive version what was specified in --overwrite=VERSION, or mentioned in the changelog with --overwrite (without VERSION). In that case we want to overwrite whatever it is, even if the tags are missing or broken. Prompted by #841101. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Detect SIGPIPE (and SIGCHLD) being blocked or ignored. Closes:#841085.Ian Jackson2016-10-17
| | | | | | | | In fact, it seems in my test that Perl resets SIGCHLD itself, printing something to stderr, so that trip does not actually fire. But it makes sense to keep it. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* debian config; actually make split brain mode work. Closes:#841085.Ian Jackson2016-10-17
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Import handling Do not crash due in cloneIan Jackson2016-10-16
| | | | | | | | | | | Previously we failed to handle dpkg-parsechangelog SIGPIPE. Closes:#840989. Fixes: dgit: failed command: dpkg-parsechangelog --format rfc822 --all dgit: subprocess died due to fatal signal PIPE Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git- prefixes: Change `git-foo' to `git foo' in messagesIan Jackson2016-10-16
| | | | | | No change other that to error messages, debug output, etc. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git- prefixes: Change `git-foo' to `git foo' in docs and commentsIan Jackson2016-10-16
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Improve two error messages relating to .changes handling and sbuildIan Jackson2016-10-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Copyright: Add notices to some more of the (larger) filesIan Jackson2016-10-11
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: When generating patch filenames from titles, first transliterate them ↵Ian Jackson2016-10-11
| | | | | | (lossily) to ascii. Closes:#834807. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: HEAD/.dsc mismatch error: Much better messageIan Jackson2016-10-11
| | | | | | Closes:#809516. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Get sense of failed clone failed cleanup error reporting check correct.Ian Jackson2016-10-10
| | | | | | Closes:#796773. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: New config option slurping approachIan Jackson2016-10-10
| | | | | | | | | Allows local git config options to override user-global ones, as is proper. Closes:#835858. Also, we now need to handle -c options ourselves. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Better error message if HEAD contains changes unrepresentableIan Jackson2016-10-10
| | | | | | by `3.0 (quilt)'. Closes:#834618. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: quilt analysis: quiltify_trees_differ: provide new $unrepres argIan Jackson2016-10-10
| | | | | | No-one passes this yet, so no functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: quilt analysis: Print orig and HEAD tree hashes.Ian Jackson2016-10-10
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: quilt analysis: Replace H2O with O2HIan Jackson2016-10-10
| | | | | | | | Right now the direction of the diff does not matter, but soon it will, and the natural direction is O2H, not O2H. Change all references. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Better error message if non-split-brain patch stack no longer appliesIan Jackson2016-10-10
| | | | | | (due to new upstream version, or user messing with it). Closes:#833025. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Before committing to push, check that .dsc and .changes correspond.Ian Jackson2016-10-10
| | | | | | Closes:#800060. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Break out @files_csum_info_fields (nfc)Ian Jackson2016-10-10
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Arrange for the special dgit remote to be skipped by git fetch --all etc.Ian Jackson2016-10-10
| | | | | | | | | | Closes:#827892. Not quite the patch from Sean: we want to do this on every fetch, and we don't overwrite the user's configuration if for some reason they have set this (hopefully they haven't...) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Don't break if user has push.followTags=true. Closes:#827878.Ian Jackson2016-10-10
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Make --quilt=gbp the default for dgit gbp-build.Ian Jackson2016-10-10
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Quilt output: Honour and strip Gbp-pq headersIan Jackson2016-10-10
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>