summaryrefslogtreecommitdiff
path: root/git-debrebase
Commit message (Collapse)AuthorAge
* 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>
* git-debrebase: gbp_pq_export: 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>
* git-debrebase: Make all commit annotations have a COMMIT-TYPEIan Jackson2018-08-25
| | | | | | | | Omitting this sometimes turns out to have a mistake. We are going to want to distinguish at least split from other commits. Add a COMMIT-TYPE to the others as future-proofing. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: forget-was-ever-debrebase: New subcommandIan Jackson2018-08-24
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: convert-from-*: snag on discarding comments in seriesIan Jackson2018-08-24
| | | | | | | | | series files can contain #-comments. The conversion process will throw them away, so complain about that. Closes: #907198. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: classify: Do not misclassify patches in subdirsIan Jackson2018-08-24
| | | | | | | | | The old get_differs algorithm would recurse in debian/patches. The new one failed to do that. Fix that. Closes: #907206. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: trees_diff_walk: Support recursionIan Jackson2018-08-24
| | | | | | No-one specifies this yet, so NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Fix get_tree's memoisation wrt $recurseIan Jackson2018-08-24
| | | | | | | | | | | | | | $recurse needs to be part of the key to the memo hash! Luckily, there is only one caller which calls with $recurse==1, check_series_has_all_patches. It ends up mishandles this situation by complaining about the directory names, as if they were unused patches. And after that no-one needs to call get_tree. Closes: #907202. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: trees_diff_walk: Refactor $all to \%optsIan Jackson2018-08-24
| | | | | | No callers pass this so NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Provide hints for unprocessable commitsIan Jackson2018-08-20
| | | | | | | | | | Depending on the apparent branch ffq state. Closes:#905005. In particular, if it doesn't look like this branch was ever used with gdr, suggest that the user is on the wrong branch, or needs to use convert-from-*. Closes:#905279. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Introduce new `fail_unprocessable'Ian Jackson2018-08-20
| | | | | | | | | This is called when we want to call `fail' because we have found an unprocessable commit. NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: convert-from-*: leave debrebase-last refsIan Jackson2018-08-19
| | | | | | | To hint to everyone that this is now a gdr branch. This will make dgit push use gdr make-patches, for example. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: begin_convert_from: Break out $gdrlast_objIan Jackson2018-08-19
| | | | | | NFC Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Snag on repeated conversionsIan Jackson2018-08-19
| | | | | | | | | If debrebase-last says we are ahead of some previous gdr work, it is carrying on is unlikely to be helpful. It would only be sensible if the package is vacillating between branch formats, and this is reflected and visible in the branch history. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Refuse to start conversion if ffq-prev existsIan Jackson2018-08-19
| | | | | | | Trying to rerun git-debrebase convert-from-something, on an unstitched gdr branch, would end in tears. Forbid it utterly. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>