summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | dgit-maint-merge(7): Add ' ' around -i\.git/Ian Jackson2017-08-04
| | | | | | | | | | | | | | | | | | | | This manpage should present a shell rune, not a half-quoted thing whose interpretation is left as a tricky exercise to othe reader. The ' ' protect the \ so that it would actually get passed to dpkg-buildpackage. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | dgit-maint-merge(7): Reformat slightlyIan Jackson2017-08-04
| | | | | | | | | | | | | | Introduce semantic newlines around the dpg-buildpackage -i -I rune. This will make it easier to test. 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>
* | test suite: Break out t-dgit-manpageIan Jackson2017-08-04
| | | | | | | | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | test suite: stunt gnupg: Much better logging of race errorsIan Jackson2017-08-04
| | | | | | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | test suite: stunt gnupg runs gpg again if it exits status 2Ian Jackson2017-08-04
| | | | | | | | | | | | | | | | | | Work around gnupg agent connection races by having our stunt gpg wrapper simply try running gpg again, once, if it exits 2. This does not fully suppress the bug but it does significantly reduce the probability. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | test suite: Make t-dgit print pwd to stderr, not stdoutIan Jackson2017-08-03
| | | | | | | | | | | | | | This means that tests can capture the output from t-dgit without going wrong. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | changelog: Document worktree supportIan Jackson2017-08-03
| | | | | | | | 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>
* | playground refactor: Dgit.pm: fresh_playground: Improve error messageIan Jackson2017-08-03
| | | | | | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | test suite: gitworktree: New testIan Jackson2017-08-03
| | | | | | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | test suite: Tolerate worktrees when trying to git-fsckIan Jackson2017-08-03
| | | | | | | | | | | | | | | | | | A `git worktree' has a file for .git. We still want to fsck them. We can simply run the fsck in the directory containing .git, instead. That works for ordinary trees with a .git directory, and for worktrees. 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>
* | worktree support: Fix playtree_setupIan Jackson2017-08-03
| | | | | | | | | | | | | | In a worktree, .git is not a directory. We need to use $maindir_common. Add a comment, too. 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>
* | test suite: sbuild-gitish: Insist on using "build" chrootIan Jackson2017-08-03
| | | | | | | | | | | | | | | | | | | | In "test suite: sbuild-gitish: Find sbuild rune in the manpage" aka f5c0d33ede8a we accidentally switched from "build" to "jessie". Randomly messing about with the user's "jessie" chroot is not very nice. (And it would break in a hypothetical formal test providing the x-dgit-schroot-build capability.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | worktree support: Fix ensure_a_playground (gives absolute path now)Ian Jackson2017-08-03
| | | | | | | | | | | | | | | | | | | | | | Make it honour $maindir_gitdir so it will DTRT in a `git worktree'. The .git/dgit play area ends up in the .git/worktrees/<worktreename> for this worktree. It now returns an absolute path. The only call site that needs adjusting is the one in fresh_playground. 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>
* | directory refactoring: dgit clone: call record_maintree in multisuite tooIan Jackson2017-08-03
| | | | | | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | directory refactoring: dgit clone: call record_maintreeIan Jackson2017-08-03
| | | | | | | | | | | | | | | | | | | | | | We are making up our own tree, here. We will need to call record_maintree in case we need to use information which it obtains. Currently, we don't. But git worktrees are complicated: we are going to have to depend on the new $maindir_git* variables, in setup_new_tree. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | directory refactoring: most invocations: call record_maintreeIan Jackson2017-08-03
| | | | | | | | | | | | | | | | | | | | | | We need to call record_maintree so that $maindir and its friends are set, since we're going to rely on them heavily. Most operations will need them. Any operation that is invoked in a git tree should definitely have this called. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | directory refactoring: Rename no_local_git_cfgIan Jackson2017-08-03
| | | | | | | | | | | | | | | | This is actually called when we don't know that we are starting in a git tree. We want to use this knowledge to control an automatic call to record_maindir, too. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | worktree support: Dgit.pm: Introduce $maindir_gitdir and _commondirIan Jackson2017-08-03
| | | | | | | | | | | | | | | | | | | | | | | | A "git worktree" separates out some of the things which used to be found in .git, into "common" things and "gitdir" things. In this patch we simply collect the relevant informaation. No-one uses it yet so there is no significant functional change. However, while we are here, we do improve an error message slightly. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | playground refactoring: Dgit.pm: Provide ensure_a_playgroundIan Jackson2017-08-03
| | | | | | | | | | | | | | dgit wants to make a lot of temporary things in .git/dgit. That's like a playground, but dgit doesn't want it wiped. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | playground refactoring: Dgit.pm: Honour $maindir in fresh_playgroundIan Jackson2017-08-03
| | | | | | | | | | | | | | | | | | | | Previously, fresh_playground expected that the playground argument has exactly the depth .git/FOO/BAR. Now, it expects that $maindir is set. In dgit (the only caller right now) this is always true because dgit now uses fresh_playground. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | playground refactoring: dgit: Use playground facilitiesIan Jackson2017-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Replace implementation of prep_ud with a call to fresh_playground * Replace references to $ud with $playground * Replace hardcoded changedir ../../.. etc. with $maindir The overall functional change is fairly minimal. We now call getcwd more often, and when we want to return to the maindir we changedir to an absolute path instead of a relative one. Later, we may rename prep_ud, mktree_in_ud_here, etc. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | playground refactoring: Dgit.pm: Provide fresh_playground etc.Ian Jackson2017-08-03
| | | | | | | | | | | | | | These functions will shortly replace the similar, but less-flexible, ad-hoc functions in dgit proper. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | playground refactoring: Dgit.pm: Expose $local_git_cfgIan Jackson2017-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | This is now the default for playtree_setup. The caller can simply set it explicitly. We make this part of a new :playground export tag for Dgit.pm, which is going to gain other bits shortly. And, we add some comments, and move the global; more code and commentary will appear around this. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | playground refactoring: dgit: Make prep_ud no longer take a directoryIan Jackson2017-08-03
| | | | | | | | | | | | | | Nothing passes this argument, so no functional change. This will make forthcoming changes more obviously correct. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | Revert "Dgit: Introduce in_workarea and fresh_workarea"Ian Jackson2017-08-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit aa073c5bdde68a1ab5026ba4daaf29c8bf361532. These functions are not used on this branch. I originally put them here because I thought dgit would want to use them, but actually it doesn't really. There are no tests for them here and we are about to engage in refactoring which will probably accidentally break them. Instead, delete them. This revert should itself be re-reverted when these functionsn are going to be used. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | playground: playtree: rename from workareaIan Jackson2017-08-02
| | | | | | | | | | | | | | We are going to use "playground" for containing temporary directory, and playtree for git trees within it. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | Dgit: break must_getcwd out into Dgit.pmIan Jackson2017-08-02
| | | | | | | | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | changelog: document refactoringIan Jackson2017-07-26
| | | | | | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | dgit: factor out build_or_push_prep_early subSean Whitton2017-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to permit code deduplication between the commands for pushing and building. Both these sets of commands deny usage of -p, and set $isuite, $package and $version based on the changelog. In particular, a command that will perform a build /and/ a push can first perform the check for -p, set $package and then call functions to do the build. These latter functions will not complain that $package is set thanks to the $build_or_push_prep_early_done logic. No functional change. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | cmd_push: Factor out all prep codeSean Whitton2017-07-26
| | | | | | | | | | | | | | Will be re-used by cmd_push_source. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | dgit: Refactor to create human-readable $subcommandSean Whitton2017-07-26
| | | | | | | | | | | | | | | | | | $cmd,$subcommand now global vars. No functional change. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | Dgit.pm: in_workarea: Use changedirIan Jackson2017-07-19
| | | | | | | | | | | | This produces better debug output. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | Dgit.pm: changedir: Break out from dgitIan Jackson2017-07-19
| | | | | | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | Dgit: Introduce in_workarea and fresh_workareaIan Jackson2017-07-19
| | | | | | | | | | | | No callers yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | Dgit.pm: git_slurp_config_src: Break out from dgitIan Jackson2017-07-19
| | | | | | | | | | | | | | | | | | | | We are going to want this so we can provide better subtree setup functions in Dgit.pm, including the config transfer. No functional change, except that we now run just "git" from the path, rather than honouring dgit's @git (which is not available in Dgit.pm). Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | Dgit.pm: workarea_setup: Break out from dgitIan Jackson2017-07-18
| | | | | | | | | | | | | | | | | | | | | | This subroutine needs a hash of the main tree's git config, so that some of the config settings which affect the object store can be properly honoured. Purely code motion, except for the changed reference to $gitcfgs. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | dgit: simplify gitattrs setup in mktree_in_ud_hereIan Jackson2017-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are going to want to break the meat of mktree_in_ud here out into Dgit.pm. Dgit.pm doesn't have access_cfg, is_gitattrs_setup, and so on. On the other hand, we don't need any of that here: this is a fresh tree of our own (so there is no existing .git/info/attributes to combine with our new settings), and we ignore the config already. So overall, little functional change: the .git/info/attributes in our private working areas are now slightly simpler: they don't indirect via git-defuse-attrs. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | Dgit.pm: $negate_harmful_gitattrs: Break out from dgitIan Jackson2017-07-18
| | | | | | | | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | Dgit.pm: runcmd: Break out from dgitIan Jackson2017-07-18
| | | | | | | | | | | | | | | | | | | | | | | | Move runcmd into Dgit.pm. We need to change dgit-repos-server too, but luckily its definition is essentially equivalent. No functional change to dgit. dgit-repos-server now prints somewhat better error messages when subprocesses fail. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | test suite: sbuild-gitish: Find sbuild rune in the manpageIan Jackson2017-07-18
| | | | | | | | | | | | | | This avoids duplicating this rune (so the manpage can't get out of date). Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | dgit-user(7): Provide information about how to use sbuildIan Jackson2017-07-18
| | | | | | | | | | | | Quite ugly due to #868527. Closes:#868526. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | dgit-user(7): Fixed example rune to use curlIan Jackson2017-07-18
| | | | | | | | | | | | | | curl prints to stdout, as the rune expects. Reported-by: Simon Tatham Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* | sbuild-gitish: New test case to check running sbuild from gitIan Jackson2017-07-18
| | | | | | | | | | | | | | This involves creating a new "gitish-only" branch in the example worktree. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>