summaryrefslogtreecommitdiff
path: root/dgit
Commit message (Collapse)AuthorAge
* dgit(7): Add discussion of quilt fixup error messagesIan Jackson2018-06-27
| | | | | | | And add cross-references to dgit(1) and the actual error. Somewhat apropos of #842614. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Better message formatting when --overwrite may be neededIan Jackson2018-06-27
| | | | | | Closes:891031. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Do not introduce duplicate origs in .changes filesIan Jackson2018-06-27
| | | | | | | | | | | | | | | | | | The .dsc and .changes matching code contained roughly $fieldbody =~ / \Q$item\E\n/m but this is wrong when the $fieldbody matches $item in its last line, and there is no trailing newline (as would be usual). This code is obviouslu confused because m affects only ^ $ which don't appear in the regexp. Change these to / \Q$item\E$/m which is what ought to have been, and probably was, intended. In one case we are trying to delete a line. In that case we need to remove the leading newline. The field body always starts with a newline so the use of \n rather than ^ is fine. Closes:#869146. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* ref updates: Introduce update_ref_cmdIan Jackson2018-06-26
| | | | | | | | | | | | | | | | | | Currently the comment about `message may be modified' is rather misleading, since there is no code to do that - but it explains the semantics of the new function. We change the appropriate subset of the git update-ref call sites. These are precisely the ones where we previously specified a message with -m, except for the quilt cache (where we use the reflog message as the cache lookup key). The calls are updates of internal refs etc. We end up using qw(git) rather than @git. Otherwise no functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: git-debrebase interop: Actually tolerate git-debrebase status 7Ian Jackson2018-06-22
| | | | | | make-patches exiting with status 7 causes $?==7*256, not 7. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: git-debrebase interop: Add a missing debugcmd debugging print.Ian Jackson2018-06-22
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: warn if vcs-git seems out of dateIan Jackson2018-06-21
| | | | | | | Print a warning to stderr on `dgit fetch sid', if your vcs-git remote url disagrees with what's in sid's .dsc. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Provide `update-vcs-git' subcommandIan Jackson2018-06-21
| | | | | | | This is for creating and adjusting the vcs-git remote url. Useful for transition from alioth to salsa. Closes:#902006. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: --overwrite now no longer crashes if there is no $archive_hashIan Jackson2018-06-21
| | | | | | | | | | Ie there is nothing to overwrite (eg, when used with --new). Instead, it is simply ignored, as it is ignored in situations where the push is fast forward. Closes:#863576. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Non-noop git fetch is not available with --dry-run, so failIan Jackson2018-06-21
| | | | | | | | | | | | | | | | When fetch or push wants git fetch (other than in a situation where it happes to be a noop) but --dry-run was specified, we would loop with a false coplaint about git fetch. False, because we didn't actually run git fetch so of course it didn't do anything. Instead, fail with an explanation. Closes:#871317. This does not occur, and we do not fail, if git-fetch would be a no-op. We can tell when this is the case, because we use git-ls-remote too. This leads to one suggestion for a workaround for the user, which is to do a not --dry-run fetch first. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit, Dgit.pm: Clarify error framing a bitIan Jackson2018-06-21
| | | | | | | | | Add a newline and "error:" before most error messages. Thius makes the output clearer, by distinguishing informational output (which might or might not relate to any error which is occurring) from things which are definitely wrong. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Improve message for discrepant quilt fixupIan Jackson2018-06-21
| | | | | | | When quilt fixup fails because of discrepancies, print a git diff rune which will show them. Closes:#865446. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: quiltify_splitbrain: Pass $oldtiptree (o+d/p) tooIan Jackson2018-06-21
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: commit_quilty_patch: Handle other file statuses tooIan Jackson2018-06-21
| | | | | | | | | | | | | | | | In particular, R can occur if all Debian changes have been removed in a package with single-debian-patch, in which case we would fail to commit the patch queue removal. I don't think dpkg-source will remove files in other cases, so this is probably the only actually buggy case. I don't think the other letters are particularly likely but if they occur they should be committed too. I have deliberately excluded U which should definitely not occur. Closes:#893263. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit build: Better message when network is offline.Ian Jackson2018-06-20
| | | | | | | | | When build fails because the archive access fails, mention that this was tried because --since-version was not specified. Closes:#883340. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move shell_cmd from dgitIan Jackson2018-06-20
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: gitattributes: Defuse working-tree-encodingIan Jackson2018-06-20
| | | | | | | | | | | | | | | | | | | * Add -working-tree-encoding to $negate_harmful_gitattrs. * Add new arrangements for updating an existing dgit-defuse-attrs macro definition: - is_gitattrs: say whether the macro is up to date - setup_gitattrs: update an existing out-of-date macro - minor message changes - document the new behaviour One consequence is that we have had to breach the promise about how to stop future dgit setup-new-tree runs messing with this: it is now necessary to disapply the macro, rather than redefine it. Closes:#901900. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: gitattributes: Minor refactoring to prep for adding new squashIan Jackson2018-06-20
| | | | | | | | | | | | * is_gitattrs_setup: Break out $gitattrs_ourmacro_re * is_gitattrs_setup: Reorganise very slightly * is_gitattrs_setup: Add a debug print * setup_gitattrs: Introduce $new * setup_gitattrs: Add a blank line No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Interoperate with git-debrebase, automaticallyIan Jackson2018-06-17
| | | | | | | | | | | | | * Recognise gdr branches, by the presence of corresponding ffq-prev or debrebase-last refs. * Before trying to do our own multi-patch linear quilt fixup, on a gdr branch, see if gdr can do it. If so that is faster and better. * If our branch is an unstitched gdr branch, which would be ff from the archive if we were to stitch it, then do so. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Prepare for calling git-debrebaseIan Jackson2018-06-17
| | | | | | | Provide the --git-debrebase= option, and pass it in the test suite. Nothing uses this yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Commentary: explain why pseudomerges are the way round they areIan Jackson2018-06-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Bail if single-debian-patch needs committing with --quilt=nofixIan Jackson2018-06-16
| | | | | | Also, if the user invokes dgit push with uncommitted debian/patches/. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Break out quiltify_nofix_bail (nfc)Ian Jackson2018-06-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* exit status: Fix dgit to use Debian::Dgit::ExitStatusIan Jackson2018-06-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: In quilt_fixup_multipatch, work around git checkout pathsIan Jackson2018-06-16
| | | | | | | git checkout paths does not delete files. This is a hypothetical bug AFAIAA. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: break out git_check_unmodified from dgitIan Jackson2018-06-16
| | | | | | We (have to) use just "git" rather than @git, but this is OK I think. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm, dgit: Break $extra_orig_namepart_re out into Dgit.pm.Ian Jackson2018-06-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Break out git_get_symrefIan Jackson2018-06-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move $playground global to dgit.Ian Jackson2018-06-16
| | | | | | | | It makes the interface to the playground functions confusing. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: archive-api-query: Avoid crashing due to lack of $isuiteIan Jackson2018-01-07
| | | | | | | | | | Otherwise: Use of uninitialized value $isuite in concatenation (.) or string at dgit line 705. This breaks the infrastructure. Closes:#886592. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Update some copyright infoSean Whitton2018-01-07
| | | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: New command: push-sourceSean Whitton2018-01-07
| | | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Implement test_source_only_changesSean Whitton2018-01-07
| | | | | | | No functional change. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: build_source bypasses dpkg-buildpackageSean Whitton2018-01-07
| | | | | | | | | | | | This is to avoid the inclusion of .buildinfo in the .changes. Quoting <https://lists.debian.org/debian-dpkg/2017/06/msg00005.html>: A .buildinfo file is not useful for a source-only upload which is veried to be identical to the intended source as present in the uploader's version control (eg, by the use of dgit). Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Merge branch stable into masterIan Jackson2018-01-07
|\ | | | | | | | | | | Also regenerate debian/tests/control Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
| * dgit: Add missing `use' for Dpkg::Compresson et al.Ian Jackson2017-10-22
| | | | | | | | | | | | | | Closes:#879526. Reported-by: Didier 'OdyX' Raboud Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | dgit: When source discrepancy involves mode changes, report them specially.Ian Jackson2018-01-06
| | | | | | | | | | | | Closes:#886442. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | dgit: Fix suggested diff rune in split brain modeIan Jackson2018-01-06
| | | | | | | | | | | | | | | | | | | | | | In split brain mode, with unexpected diffs, print dgit view commitid in suggested diff rune. HEAD is wrong in this case. Closes:#886443. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | dgit: Fix message about missing quilt cache entryIan Jackson2018-01-06
| | | | | | | | | | | | | | | | Should refer to HEAD rather than tree, since dgit needs a commit. Closes:#884646. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | dgit: Fix trailing whitespaceSean Whitton2017-08-15
| | | | | | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* | dgit: dpkg_source_ignores: Exclude the right set of thingsIan Jackson2017-08-04
| | | | | | | | | | | | | | | | | | Change the dpkg-source -i argument to exclude exactly the right set of things. (Sadly this is not a simple rune.) Previously we might exclude `foo.git', for example ! Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | dgit: Properly shellquote --git-builder argument to gbpIan Jackson2017-08-04
| | | | | | | | | | | | | | | | This is about to contain more exciting shell metacharacters. (Even now, it is wrong without quoting as we end up telling gbp to pass -i.git/ rather than -i\.git/ to dpkg-source.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | dgit: print-dpkg-source-ignores actionIan Jackson2017-08-04
| | | | | | | | | | | | | | New print-dpkg-source-ignores option to print the big rune you need to pass to dpkg-source to make it work exactly the right. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | dgit: Break out -i -I rune into a variableIan Jackson2017-08-04
| | | | | | | | | | | | | | There is also an instance in dgit-maint-merge.7.pod but that's trickier to unify. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | dgit: Make commit_getclogp not leave a lot of detritus in .git/dgitIan Jackson2017-08-03
| | | | | | | | | | | | | | Have it use a fixed filename instead. It's only needed right away so that's fine. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | directory refactor: open_main_gitattrs confesses if $maindir not setIan Jackson2017-08-03
| | | | | | | | | | | | | | This improves the error message considerably for "didn't call record_maindir" bugs. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | worktree support: dgit: Fix for .git/logs/refs/Ian Jackson2017-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | Experimentally, both the common dir and the worktree's git dir have a .git/logs. But, as might be expected, the worktree's one has the reflog for its HEAD and not any of the refs/ reflogs. Implicitly, we are deciding here that the dgit quilt cache is shared between all worktrees. That seems fine. I think we don't ever rely on its actual current value, so even concurrent dgit runs ought to be fine. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | worktree support: dgit: Fix for .git/info/attributesIan Jackson2017-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Experimentally, this file is in the common dir, not the per-worktree dir. Honour $maindir_gitcommon everywhere. Rename `open_main_gitattrs'. Previously it could in theory be used in the playtree (but, it isn't). Now it always operates on the main tree. Indeed, as we require, the `setup' stuff is only done in the main tree. The gitattributes fixes for playtrees are done, unconditionally, with the much simpler hammer in playtree_setup. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | directory handling: dgit: Introduce dgit_privdir and use itIan Jackson2017-08-03
| | | | | | | | | | | | This removes another pile of open-coded references to .git/ Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | directory handling: dgit: Use $maindir rather than ../../..Ian Jackson2017-08-03
| | | | | | | | | | | | | | Replace all the open-coded ../.. constructs with references to $maindir. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>