summaryrefslogtreecommitdiff
path: root/git-debrebase
Commit message (Collapse)AuthorAge
* git-debrebase status: Print upstream commitidIan Jackson2023-02-04
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Break out treated_anchor_msgIan Jackson2023-02-04
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase(1): Remove launder-v0 from documentationIan Jackson2023-02-04
| | | | | | This was never really in a release and it doesn't deserve docs. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase --noop-ok: use default destinationIan Jackson2022-12-10
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase --noop-ok: support --no-noop-okIan Jackson2022-12-10
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: convert-from-dgit-view: Bail if output is wrongIan Jackson2022-11-11
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: conversion: bail a little earlier on snagsIan Jackson2022-11-11
| | | | | | | This avoids printing more messages that aren't going to be very helpful. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Fix "stripeoch" typoIan Jackson2022-11-11
| | | | | | | | Fixes messages like this from git-debrebase convert-from-dgit-view Can't locate object method "stripeoch" via package "3.41" (perhaps you forgot to load "3.41"?) at /home/ian/things/Dgit/dgit/git-debrebase line 2754. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Fix handling of tag during convert-from-dgitIan Jackson2022-11-11
| | | | | | We need Commit to point to a commit, not a tag object or something. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: convert-from-dgit-view: turn off ignore-newIan Jackson2022-05-28
| | | | | | | | | Pass this option in the place where it's needed. Via the config file so things still work with old gbp. Part of #1005873. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: new-upstream: Do not treat late options as versionIan Jackson2020-06-22
| | | | | | | | | | | Instead of a new upstream version, the user may wish to pass -i. (Or other git-rebase options.) This is handled correctly when we are deciding whether to treat further arguments as additional piece specifications, but the new optional upstream version commitish was mishandled in this respect. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Fix error message for wrong use of -iIan Jackson2020-06-22
| | | | | | | | | | | | | | | Getopt::Long with "i:s" parses "-i something" as "-i" with a value of "something". Maybe I didn't know this when I wrote this code, and thought the check for $val would only reject "-isomething". But "git-rebrebase ... -i something" is wrong because it would mean "git-rebase -i something" and we do not permit the user to specify their own base. So it is right to bail out in this case. However, the message was wrong, since it refers to cuddling, and it can be caused by a non-cuddled non-option argument. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Fix upstream_commitish_search APIIan Jackson2020-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | upstream_commitish_search used to return a commit. If it succeeded The caller could find the tag in $tried[-1]. Both callers relied on this unpleasant and error-prone API. In 0bb8e2a87e3c8b5be0fce5c2491b292e9273056e Dgit::upstream_commitish_search: fail if more than one tag exists the algorithm was changed to keep looking, so it can reject ambiguous situations. The result is that $tried[-1] is entirely wrong in the success case. (This is spotted by the tagupl-baredebian test.) It would have been possible to fix this by making upstream_commitish_search synthesise a suitable return value for putting in $tried, but that is absurd. Instead give this function a sensible calling convention. It now returns a list of the tag name (for messages etc.) and the commitish (for use). Change both call sites. CC: Sean Whitton <spwhitton@spwhitton.name> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Rename a variable $ups_tag to $ups_revIan Jackson2020-06-22
| | | | | | | This is a commit, not a tag. This is prepping for a change where the tag will be here in a variable too. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Provide @gitIan Jackson2019-07-21
| | | | | | | | | This clears the way for some parts of Dgit.pm to honour dgit's git invocation conventions. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Update copyright notices in many filesIan Jackson2019-07-20
| | | | | | Mostly, adding 2019. Also adding some missing credits to Sean Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: fix convert-from-dgit-view argv handlingNiko Tyni2019-07-01
| | | | | | | | [ S-o-b added after checking with ntyni on irc -iwj ] Signed-off-by: Niko Tyni <ntyni@debian.org> Closes: #930214 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Replace one open-coded hash-object with hash_commitIan Jackson2019-06-29
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move make_commit (git-commit-tree wrapper) from gdrIan Jackson2019-06-29
| | | | | | No functional change other than to no longer honour @git. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move read-tree wrappers from git-debrebaseIan Jackson2019-06-29
| | | | | | No functional change other than to no longer honour @git. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move resolve_upstream_version from git-debrebaseIan Jackson2019-06-29
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move upstream_commitish_search from git-debrebaseIan Jackson2019-06-29
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Replace `confess $!' with `confess "$!"', to actually print errnoIan Jackson2019-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ perl -e 'use Carp; open X, ">/dev/eacces" or die $!' Permission denied at -e line 1. $ perl -e 'use Carp; open X, ">/dev/eacces" or confess $!' at -e line 1. $ perl -e 'use Carp; open X, ">/dev/eacces" or confess "$!"' Permission denied at -e line 1. $ confess will get references to its arguments in @_. Its documentation says it saves/restores $!. I conjecture that these interact as we see here: $ perl -e '$!=1; sub x { print ">@_<\n"; } x $!;' >Operation not permitted< $ perl -e '$!=1; sub x { local $!; print ">@_<\n"; } x $!;' >< Quoting "$!" averts the reference (and it will also ensure that we get the string value of $!, in case confess were to do anything in the future which would mess that up). This commit was made like this: perl -i -pe 's/confess \$!/confess "\$!"/g' dgit perl -i -pe 's/confess \$!/confess "\$!"/g' git-debrebase perl -i -pe 's/confess \$!/confess "\$!"/g' Debian/Dgit.pm I have manually reviewed each hunk and it all looks good to me. Closes: #929549 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: convert-*: Fix two broken error messagesIan Jackson2019-03-01
| | | | | | | | If you failed to specify the upstream version, some of the messages would still attempt to report what you specified, causing a crash. Closes: #922462 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: resolve_upstream_version: Return $used tooIan Jackson2019-03-01
| | | | | | | Update both callers but right now they just throw the information away. So no overall functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Provide convert-from-unapplied aa alias for -gbpIan Jackson2018-11-08
| | | | | Closes: #905433. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: usage message: Mention only convert-from-*Ian Jackson2018-11-08
| | | | | | | | There is convert-from-dgit-view which was not mentioned, and we're going to make another one in a moment. We don't want to list the whole lot here. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Dgit.pm: Move changedir_git_toplevel from git-debrebaseIan Jackson2018-10-11
| | | | | | NFC other than hardcoded qw(git). Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: git-debrebase: mark final batch of messages (5)Ian Jackson2018-10-04
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: git-debrebase: mark some messages (4)Ian Jackson2018-10-04
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: git-debrebase: mark some messages (3)Ian Jackson2018-10-04
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: anchor: Print the anchor, not the breakwater tip (!)Ian Jackson2018-10-02
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: git-debrebase: mark some messages (2)Ian Jackson2018-10-02
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: new-upstream: Drop `sleep 2' (!)Ian Jackson2018-10-02
| | | | | | This is leftover debugging code. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Refactor fail_unprocessable message constructionIan Jackson2018-10-02
| | | | | | | | Clearer and easier to mark up for translation. No functional change (verified by grepping the test logs). Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: git-debrebase: mark some messages (1)Ian Jackson2018-10-02
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Replace `git-debrebase:' with `$us:' in bad usage msgIan Jackson2018-10-02
| | | | | | | This is a different pattern as it is in a translated message, so we change __ to f_. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Replace several `git-debrebase:' with `$us:'Ian Jackson2018-10-02
| | | | | | | | | In ""-strings in as-yet-untranslated messages. This is more proper and more generic and also slightly shorter (although more complex). Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Improve two error messagesIan Jackson2018-10-02
| | | | | | | | | Print a proper message for failure to opendir the bpd and for failure to chdir to the toplevel. Doing this now makes the translation markup auditable. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: git-debrebase: Change a lot of die to confessIan Jackson2018-10-02
| | | | | | | | | | | These are internal errors or unexpected syscall failures. Printing a stack trace is reasonably helpful there. (Also, some of them are in the experimental merge resolution code.) Audited with i18n-diff-auditor; reviewed one questionable change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: Rename ___ to f_Ian Jackson2018-09-29
| | | | | | | | I have decided that's a better name. Not _f because, unlike printf (where f is done first, and then print), here the _ is done first and then f. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: Flag a handful of messages for translationIan Jackson2018-09-29
| | | | | | This is just useful for testing the forthcoming machinery, so far. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: Source-level framework: call setlocale, provide __ and ___Ian Jackson2018-09-29
| | | | | | | This is the general plumbing for looking up translated messages - the consumer-side. No actual messages are flagged for translation yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Use debchange for new-upstream changelog entryIan Jackson2018-08-26
| | | | | | Closes: #905888. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebse: merge handling: Handle absence of patches via $anyIan Jackson2018-08-25
| | | | | | | This saves testing for $seriesfile existence and makes the code slightly less tangled. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: make-patches: Handle case when there are no patchesIan Jackson2018-08-25
| | | | | | Previously, we would bomb out. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: keycommits: Fix doc commentIan Jackson2018-08-25
| | | | | | There's no $dgitimport; that's $trouble. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: convert-to-gbp: Handle no-patches case betterIan Jackson2018-08-25
| | | | | | In this case it's very like git-debrebase forget-was-debrebase. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: convert-to-gbp: Actually start from breakwaterIan Jackson2018-08-25
| | | | | | | Contrary to the documentation, this operation would start from HEAD. It should rewind to the breakwater. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: make_patches_staged: Return flag, are there any patches?Ian Jackson2018-08-25
| | | | | | All callers currently ignore the return value, so NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>