topgit-0.19.8
tag5d4c7ac8c659180249a1f80e1804c75a9b7a4302
object 32e2c028587c2ebbe00b7a49fdce7002ff0c21d5
authorKyle J. McKay <mackyle@gmail.com>
Tue, 27 Jun 2017 10:09:09 +0000 (27 03:09 -0700)
TopGit-0.19.8 - Wayback to POSIX Proficiency
============================================

_Reminder_

>  TopGit 0.19.4 (2017-02-14) introduced support for a new top-bases location
   under heads.  This new location will become the default as of the TopGit
   0.20.0 release.  The current location under refs will continue to be
   supported in the future.  See `tg help migrate-bases` for more details.

This release is primarily a bug fix and maintenance release.  A few extra
options may have slipped in here and there.  The test suite has grown immensely
which should help reduce future regressions.  One new feature did rear its head
way back at the last minute though.


POSIX Propaganda
----------------

With this release TopGit should be fully POSIX compliant once it has been
installed.  Installation and testing also require Perl, but as of this release
even the test suite can be run with just POSIX + Perl.  (If you want to make
the .html docs you will also need a .rst processor, but "shhhh" about that.)
It even works with some awks (I'm looking at you "mawk{1}") that aren't
actually fully POSIX compliant.


Maintenance Maintenance Maintenance
-----------------------------------

A veritable plethora of fixes pervades this release.  There are now over 875
individual tests in 33 files.  Some things that probably should have worked
before (like `tg export --quilt --force` and `@` and `HEAD` being accepted as
aliases for the current branch everywhere it makes sense) do now.

Some more commands that should have worked in a read-only bare repository but
didn't now do.

There's more tolerance for "not-quite-POSIX" shells when running in what they
claim to be is a "POSIX" mode but really isn't all that.  Before choosing one
of them as TopGit's shell be sure to first run the test suite using that shell.
Not to worry, both bash and dash (when running as `/bin/sh`) are fine.

Bare branches (a TopGit branch with neither a .topmsg nor a .topdeps file) are
officially tolerated.  They mostly worked before; they work better now.

And speaking of `.topdeps` files, manually edited ones (naughty, naughty) that
are not quite up to snuff should cause fewer problems now.

An overall overhaul of `tg summary` resulted in a nice speed boost there
(probably the last it's likely to get as its stone has been squeezed dry now).


Options Galore
--------------

The `tg export --quilt` mode now understands how to `--force` outputting to a
directory that already exists (and no longer commplains if the directory does
exist but is empty).

A new branch can be `tg create`d using `--no-update` to skip the final update
when more than one dependency is listed.

The `tg summary` command in list mode will include annihilated branches now
if you ask nicely (`--list --verbose --verbose` or just `-vvl`) and `tg info`
will even describe them properly too.

But back to `tg export` and its two other `--collapse` and `--linearize` modes;
It got a new `-s <mode>` option to specify how to handle subject lines
primarily focused on removal of `[PATCH]` and similar tags.  Instead of blindly
stripping everything off, the default now is to delicately remove only the
first `[...]` tag and only if it's one of the four TopGit knows about (those
would be "PATCH", "BASE", "ROOT" and "STAGE").  This should result in patches
that are imported and then exported keeping their same subject line.  But there
are five possible modes (including the previous "strip it all off") available
in an attempt to make sure everybody gets happy.

And last but not least there's one new global option...


The Wayback Machine
-------------------

A new feature slipped into this release at the last minute.  It comes with a
new global `-w <tgtag>` option and a new `shell` subcommand.

By specifying the name of a tag created using `tg tag` (or even automatically
via the auto stash functionality), a TopGit command can be run in the context
of the refs namespace recorded in that `tg tag`.  Either with all other refs
present and unchanged or with all other refs pruned away.

This functionality can be particularly useful in combination with `tg export`
to easily produce copies of older versions of a patch set.

The global `-w` option only permits use with read-only TopGit subcommands and
the new `shell` subcommand.

The new `tg shell` command will spawn a new copy of the shell (or execute a
specific command) with the current working directory set to a temporary
repository that shares the objects but has had its refs namespace altered to
the specified wayback state.  When the shell is exited it's all cleaned up
automatically, but there's even an option to place that "temporary" directory
somewhere else so that it can persist and be reused.

```
Kyle J. McKay (188):
      tg.sh: next version is 0.19.8
      Makefile: add "target" target
      Makefile.sh: add v_sort function
      Makefile.sh: add v_filter and v_filter_out functions
      Makefile: make sure $(MAKE) is passed to Makefile.sh
      Makefile.mak: compute TG-BUILD-SETTINGS differently
      Makefile.sh: support sub makes
      t/Makefile: switch to gnomake system
      t/Makefile.mak: improve DEFAULT_TEST_TARGET handling
      Makefile: run $(MAKE) -f Makefile.mak using -e
      tg-create.sh: add missing ">/dev/null" to rev-parse test
      tg-create.sh: allow "@" and "HEAD" as dep shortcuts
      test-lib-tg: consistently use "tg_test" or "TG_TEST" prefix
      Makefile.mak: work around broken sh behavior
      Makefile.sh: make sure CONFIGMAK is always set
      Makefile.mak: do not use non-POSIX make -C option
      awk: make sure close function calls use parentheses
      README: fix several typos
      Makefile.sh: correct default location of hooksdir
      hooks/pre-commit: make it work properly in test environment
      README: add topgit.{cc,cc,to,subjectPrefix} links to vars section
      README: minor tg-checkout doc updates
      t/test-lib-main.sh: include $this_test in comments
      README: add a "TESTING TOPGIT" section
      t/Makefile.mak: introduce TESTLIB_MAKE_OPTS make variable
      t/Makefile.mak: avoid bloat when making self
      test-lib: bail quickly and with line number
      test-lib: move BASH_XTRACEFD assignment into test_lib_main_init_specific
      test-lib-main.sh: workaround broken bash
      test-lib-main.sh: enable line numbers when using bash
      test-lib-functions.sh: allow test_commit to skip the tag
      t/README*: cleanup whitespace and typo errors
      README-TESTLIB: improve test_tick documentation
      test-lib: introduce TRASHTMP_DIRECTORY and test_get_temp
      test-lib: make test_when_finished fully functional
      Makefile.sh: add dependency lines for awk scripts
      awk/ref_match.awk: minor optimizations and typo fixes
      test-lib-functions.sh: initialize empty $test_tick
      test-lib-functions.sh: test_commit: ignore more invalid tag names
      test-lib: change default author and committer names
      test-lib-functions-tg: tg_test_create_branches does it all
      t8000: add tests for broken git mailinfo -b
      hooks/pre-commit.sh: remove superfluous trailing ';'
      all: unset ksh errors
      test-lib.sh: correct typographical error in comment
      all: unset and unalias zsh traps
      tg.sh: update/add some comments
      test-lib-functions: add wc wrapper
      tests: renumber t0001 and t0002
      test-lib-main: bless use of $color for debug output
      test-lib: improve test_cmp_rev utility function
      test-lib: introduce test_clear_when_finished
      t/t0003-testlib-git.sh: add tests for git utility functions
      awk/ref_match.awk: minor optimizations
      testlib: allow "test_plan'?'"
      t2000: test hook and merge setup happens
      testlib: add an example for test_pause
      testlib-tg: add tg_test_setup_topgit function
      t2020: test bare mode hook restrictions
      t2010: basic hook sanity checking tests
      t2030: test hook sequestration
      t0001: add test for broken awk implementation
      t0001: test for awk pattern {m[,[n]]} support
      awk: don't mock mawk
      gnomake.sh: move Makefile.sh utility functions to separate file
      tg.sh: add internal command --awk-path
      ref_match.awk: add dupesok knob
      ref_match.awk: correctly match multiple patterns
      t1300: test ref_match.awk functionality
      t0001: add POSIX awk ENVIRON and POSIX tr NUL tests
      Makefile: always clear .SUFFIXES before setting it
      test-lib-functions.sh: make test_expect_code work with set -e
      t1310: test ref_prefixes.awk functionality
      tg.sh: add fatal function
      pre-commit.sh: complain about everything
      tg: refactor remote top-bases sniff out code
      t2020: include more commands in setup checks
      tg.sh: allow --top-bases to work for remotes
      tg: document and tolerate "bare branches"
      tg-info.sh: support --dependencies for the pedantically challenged
      README: add missing verbiage to correct grammatical error
      tg.sh: do not do hook or merge setup in a bare repository
      tg: call ensure_work_tree where needed
      test-lib-functions.sh: add test_diff that uses git diff --no-index
      tg: find added lines missing final \n
      .topdeps: tolerate missing \n on last line
      tg-export.sh: minor correction and efficiency
      tg-create.sh: fix code typo
      aggregate-results.sh: purge expr and show all failures
      tg-export: understand more ranges and purge expr
      ref_prepare.awk: improve default headbase for multi-level remotes
      ref_prepare.awk: remove refs file on request even if not read
      tg-create: require format.signoff for active sob line
      tg-info.sh: show a message when the remote base is missing
      testlib: pimp out test_plan
      gnomake: suppress unwanted gratuitous "Entering directory ..." lines
      ChangeLog: start one
      t0001: add export unset works test
      tg.sh: make sure GIT_OBJECT_DIRECTORY is never set to ""
      testlib: quiet verbose only sanity
      tg-create.sh: turn template <patch description> into comment
      tg.sh: implement full GIT_ALTERNATE_OBJECT_DIRECTORIES quoting rule
      Makefile.mak: create a tgx bin-wrapper
      testlib: make --run implicitly activate --quiet without --no-quiet
      t1080: add miscellaneous tg.sh tests
      tg-create.sh: with --no-deps (aka --base) allow any committish
      help: improve formatting of plain text and fix typo
      t2100: test tg create branch creation
      t2100: add some --no-commit tests
      tg-create: support new --no-update option
      tg-create.sh: strip leading spaces off --topmsg argument
      tg-create: align -n with Git and improve --no-edit
      t2110: test tg create --topmsg, --no-edit and friends
      tg-update.sh: improve --base message handling
      testlib: allow die function to accept a message
      t5000: add tg update --base tests
      tg.sh: make sure tg_tmp_dir is not a frankenpath
      testlib: suppress superfluous messages from rm
      tg: always pass the correct empty blob to awk
      ref_prepare.awk: support arbitrary blob checking
      tg.sh: add support for --make-empty-blob
      test-lib-functions-tg: tg_test_create_branches really does do it all
      topgit_{deps,msg}_prepare.awk: provide missing blob action
      Makefile.mak: help tg wrapper find itself
      tg--awksome.sh: create empty blob on demand
      tg: bare more functionality
      t4000: add bare branch sanity checks
      t/Makefile.mak: suppress superfluous messages from rm
      testlib: improve test target handling
      testlib: quick reference and other doc updates
      tg-summary.sh: always show all with no options or arguments
      topgit_recurse.awk: include excess visit counts
      tg-summary: append ^ to rdeps-once branches with elided deps
      tg-summary: show annihilated with -v -v -l
      tg-summary: introduce --with-related option
      t4100: add several summary tests
      tg-summary: use run_awk_topgit_msg for all messages
      tg-summary: the last of the great speed-ups
      tg.sh: use correct remote branch list for recurse_deps_internal
      tg: provide global --pager (-p) option
      tg.sh: make needs_update return 1 for out-of-date remote
      tg.sh: enhance needs_update_check to check branch itself
      testlib: improve test_merge utility function
      helper/needs_update_check.sh: allow test scripts access
      tg.sh: improve needs_update_check remote base handling
      t4200: test the out-of-date checking code
      topgit_deps.awk: scrutinize incoming branch names
      tg: disambiguate refs/heads/refs/remotes/<name>/<branch>
      tg-export.sh: construct playground before trying to use it
      tg-export.sh: contravene collapse collisions
      tests: require proper POSIX tr NUL behavior
      tg-summary.sh: allow -v and -l options to bundle
      t8200: test export subject stripping behaviors
      test-lib-main.sh: compute TRASH_DIRECTORY differently
      tg: avoid bogus missing status for solitary branches
      topgit_msg.awk: allow extracting multiple headers
      topgit_msg.awk: mostly avoid outputting blank lines
      tg-info.sh: switch to nicer subject formatting
      tg-export.sh: support --quilt --force and tidy up usage
      create-html-usage.pl: unwrap multi-line usage lines
      help: polish up the plain text help a bit
      testlib: support TESTLIB_TEST_TAP_ONLY for sanity
      testlib: warn if there's no TG-TEST-SETTINGS file
      make: remake TG-BUILD-SETTINGS and TG-TEST-SETTINGS on config mods
      tg-export: add subject [...] handling modes
      tg--awksome.sh: make run_awk_topmsg_header see the truth
      tg-revert.sh: correct missing reftype in damaged tag message
      tg.sh: make sure noalt_setup takes effect when it should
      t4100: shake up one of the .topmsg subjects a bit
      hooks/pre-commit: stop using cat_file -i
      tg--awksome.sh: -tm= for topmsg_header and correct comments
      tg-info.sh: make full use of run_awk_topmsg_header
      tg: add missing --tgish-only argument
      tg-summary.sh: overhaul it all
      tg.sh: fully enable caching as designed
      tg-revert.sh: minor optimizations
      tg.sh: add is_empty_dir function
      tg-export.sh: allow --quilt export to pre-existing empty dir
      topgit_msg: expose bare branches
      testlib-tg: add tg_test_create_tag utility function
      test-lib-main.sh: promote test_done messages to TAP status
      tg: add wayback machine
      topgit.html: clean up the generated XHTML
      tg export: no need for merge or hook setup
      README-TESTLIB-TG: fix typo
      tg-export: wayback to older patch sets
      ChangeLog: topgit-0.19.8 release
      t8400: export tests for all three modes with remotes
```
-----BEGIN PGP SIGNATURE-----

iQPcBAABAgAGBQJZUi7FAAoJEFh5SEJa2uvTMKwd/AifWjry4Ltp8+EsmwnoFCLE
ji7xXhbx3YUZEMXUu5X7kv+j+bfqBcJsRlTrOkJg+ipeQ+ZveCm6WmZceQ1QxCy1
1gCZlHMbAi/sCefbh4zV6ycCa2P6sA5bG+OtuRiDtKY/8OIIryL8iy8+Xf45MKe6
qLePE0r8I/8uZZAei6FezYjEtc+B4Cvs8cVv4XLv/OSg6G1fBvA332oEheT1N+0Q
J0rMvYf3cXVH1ipsa7DLA8XIoBcP3Lu+D9njE0vozj8bknhjM3cjDxXXQRtbO6cK
WEs6jAoUv5hpSgWsFNhxPbvAFMIyEMtG8OsgQkMsy8yy3Ht1BHui8J3EfTgRQh3Q
/hiSxTmAeFQ6XhJFgH3h/WAb4qaJBxUmCwkeDaLhLzbCtplnQt82jF2lv2CPjkVd
0twW9AEIzFb2DwtPmV4X8iwl+naYYC/LLDQzyP/J4eLYVlSLqswOTdOmrGBB2qGU
YXQ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