<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/devel, branch 0.20.2</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.20.2</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.20.2'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2015-04-01T04:16:06Z</updated>
<entry>
<title>nmbug-status: Use 'show-ref --heads' for loading configs</title>
<updated>2015-04-01T04:16:06Z</updated>
<author>
<name>W. Trevor King</name>
<email>wking@tremily.us</email>
</author>
<published>2015-03-22T22:51:41Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=244f8739543dd2f6cde1188074fc4b32272e8446'/>
<id>urn:sha1:244f8739543dd2f6cde1188074fc4b32272e8446</id>
<content type='text'>
When loading configs from Git, the bare branch name (without a
refs/heads/ prefix or similar) matches all branches of that name
(including remote-tracking branches):

  .nmbug $ git show-ref config
  48f3bbf1d1492e5f3d2f01de6ea79a30d3840f20 refs/heads/config
  48f3bbf1d1492e5f3d2f01de6ea79a30d3840f20 refs/remotes/origin/config
  4b6dbd9ffd152e7476f5101eff26747f34497cee refs/remotes/wking/config

Instead of relying on the ordering of the matching references, use
--heads to ensure we only match local branches.
</content>
</entry>
<entry>
<title>nmbug-status: Clarify errors for illegible configs</title>
<updated>2015-03-15T08:28:15Z</updated>
<author>
<name>W. Trevor King</name>
<email>wking@tremily.us</email>
</author>
<published>2014-05-10T19:16:38Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=bed8b6743d1cfffe8193c6b3571ef460b92e4ade'/>
<id>urn:sha1:bed8b6743d1cfffe8193c6b3571ef460b92e4ade</id>
<content type='text'>
Carl Worth pointed out that errors like:

  $ ./nmbug-status
  fatal: Not a git repository: '/home/cworth/.nmbug'
  fatal: Not a git repository: '/home/cworth/.nmbug'
  Traceback (most recent call last):
    File "./nmbug-status", line 254, in &lt;module&gt;
      config = read_config(path=args.config)
    File "./nmbug-status", line 73, in read_config
      return json.load(fp)
    File "/usr/lib/python2.7/json/__init__.py", line 290, in load
      **kw)
    File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
      return _default_decoder.decode(s)
    File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
      raise ValueError("No JSON object could be decoded")
  ValueError: No JSON object could be decoded

are not particularly clear.  With this commit, we'll get output like:

  $ ./nmbug-status
  fatal: Not a git repository: '/home/wking/.nmbug'
  No local branch 'config' in /home/wking/.nmbug.  Checkout a local
  config branch or explicitly set --config.

which is much more accessible.  I've also added user-friendly messages
for a number of other config-parsing errors.
</content>
</entry>
<entry>
<title>lib: make notmuch_query_count_messages explicitely exact</title>
<updated>2015-03-13T06:58:55Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2014-10-14T16:32:54Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=6d44e5ac4743f618513c9a080733d91afa683f16'/>
<id>urn:sha1:6d44e5ac4743f618513c9a080733d91afa683f16</id>
<content type='text'>
The default is actually exact if no checkatleast parameter is
specified. This change makes that explicit, mainly for documentation,
but also to be safe in the unlikely event of a change of default.

[ commit message rewritten by db based on id:87lho0nlkk.fsf@nikula.org
]
</content>
</entry>
<entry>
<title>nmbug: Add a 'help' command for folks who don't like --help</title>
<updated>2015-01-18T10:00:51Z</updated>
<author>
<name>W. Trevor King</name>
<email>wking@tremily.us</email>
</author>
<published>2014-10-03T18:20:58Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=9d25c97d8b4464e65f8bd6705db47603c94af275'/>
<id>urn:sha1:9d25c97d8b4464e65f8bd6705db47603c94af275</id>
<content type='text'>
The 'if args.func == help' block at the end avoids:

    AttributeError: 'functools.partial' object has no attribute '__code__'
</content>
</entry>
<entry>
<title>build: eliminate use of python execfile command</title>
<updated>2015-01-03T14:18:54Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-01-03T13:14:03Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2bb906a6dd21fe109cc921590a512c1af7ff150d'/>
<id>urn:sha1:2bb906a6dd21fe109cc921590a512c1af7ff150d</id>
<content type='text'>
As discussed in
id:8cc9dd580ad672527e12f43706f9803b2c8e99d8.1405220724.git.wking@tremily.us,
execfile is unavailable in python3.

The approach of this commit avoids modifying the python module path,
which is arguably preferable since it avoids potentially accidentally
importing a module from the wrong place.
</content>
</entry>
<entry>
<title>devel: man-to-mdwn.pl: add GPLv3+ notice to manpages.mdwn</title>
<updated>2014-11-02T18:46:17Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2014-11-01T10:47:12Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=34d2c62b8220ea96902e6776251f82058c4a5bdc'/>
<id>urn:sha1:34d2c62b8220ea96902e6776251f82058c4a5bdc</id>
<content type='text'>
Make the generated head manual page (in the notmuchmail wiki)
display the licence information the whole notmuch software is licenced
under.
</content>
</entry>
<entry>
<title>devel: make man-to-mdwn.pl to work with generated manual pages</title>
<updated>2014-11-02T18:46:06Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2014-08-04T17:39:32Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f7be8f4ebf4157a80f5ffad75be988c30267c950'/>
<id>urn:sha1:f7be8f4ebf4157a80f5ffad75be988c30267c950</id>
<content type='text'>
The new manual pages converted from rst using sphinx or rst2man
has somewhat different syntax. man-to-mdwn.pl is now adjusted
to produce even better output from this syntax. The changes also
include using utf-8 locale (e.g. for tables and generated hypens)
and and quite a few bugs fixes.
This tool still produces better results than just using the
html pages generated using sphinx / rst2html. For example those
tools don't create inter-page hyperlinks -- and the preformatted
pages written by man-to-mdwn.pl just works well with manual page
content.
</content>
</entry>
<entry>
<title>nmbug: Translate to Python</title>
<updated>2014-10-05T05:16:29Z</updated>
<author>
<name>W. Trevor King</name>
<email>wking@tremily.us</email>
</author>
<published>2014-10-03T18:20:57Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7f2cb3be4e8a48f351e1bed75e2a4b9d80c47431'/>
<id>urn:sha1:7f2cb3be4e8a48f351e1bed75e2a4b9d80c47431</id>
<content type='text'>
This allows us to capture stdout and stderr separately, and do other
explicit subprocess manipulation without resorting to external
packages.  It should be compatible with Python 2.7 and later
(including the 3.x series).

Most of the user-facing interface is the same, but there are a few
changes, where reproducing the original interface was too difficult or
I saw a change to make the underlying Git UI accessible:

* 'nmbug help' has been split between the general 'nmbug --help' and
  the command-specific 'nmbug COMMAND --help'.

* Commands are no longer split into "most common", "other useful", and
  "less common" sets.  If we need something like this, I'd prefer
  workflow examples highlighting common commands in the module
  docstring (available with 'nmbug --help').

* 'nmbug commit' now only uses a single argument for the optional
  commit-message text.  I wanted to expose more of the underlying 'git
  commit' UI, since I personally like to write my commit messages in
  an editor with the notes added by 'git commit -v' to jog my memory.
  Unfortunately, we're using 'git commit-tree' instead of 'git
  commit', and commit-tree is too low-level for editor-launching.  I'd
  be interested in rewriting commit() to use 'git commit', but that
  seemed like it was outside the scope of this rewrite.  So I'm not
  supporting all of Git's commit syntax in this patch, but I can at
  least match 'git commit -m MESSAGE' in requiring command-line commit
  messages to be a single argument.

* The default repository for 'nmbug push' and 'nmbug fetch' is now the
  current branch's upstream (branch.&lt;name&gt;.remote) instead of
  'origin'.  When we have to, we extract this remote by hand, but
  where possible we just call the Git command without a repository
  argument, and leave it to Git to figure out the default.

* 'nmbug push' accepts multiple refspecs if you want to explicitly
  specify what to push.  Otherwise, the refspec(s) pushed depend on
  push.default.  The Perl version hardcoded 'master' as the pushed
  refspec.

* 'nmbug pull' defaults to the current branch's upstream
  (branch.&lt;name&gt;.remote and branch.&lt;name&gt;.merge) instead of hardcoding
  'origin' and 'master'.  It also supports multiple refspecs if for
  some crazy reason you need an octopus merge (but mostly to avoid
  breaking consistency with 'git pull').

* 'nmbug log' now execs 'git log', as there's no need to keep the
  Python process around once we've launched Git there.

* 'nmbug status' now catches stderr, and doesn't print errors like:

    No upstream configured for branch 'master'

  The Perl implementation had just learned to avoid crashing on that
  case, but wasn't yet catching the dying subprocess's stderr.

* 'nmbug archive' now accepts positional arguments for the tree-ish
  and additional 'git archive' options.  For example, you can run:

    $ nmbug archive HEAD -- --format tar.gz

  I wish I could have preserved the argument order from 'git archive'
  (with the tree-ish at the end), but I'm not sure how to make
  argparse accept arbitrary possitional arguments (some of which take
  arguments).  Flipping the order to put the tree-ish first seemed
  easiest.

* 'nmbug merge' and 'pull' no longer checkout HEAD before running
  their command, because blindly clobbering the index seems overly
  risky.

* In order to avoid creating a dirty index, 'nmbug commit' now uses
  the default index (instead of nmbug.index) for composing the commit.
  That way the index matches the committed tree.  To avoid leaving a
  broken index after a failed commit, I've wrapped the whole thing in
  a try/except block that resets the index to match the pre-commit
  treeish on errors.  That means that 'nmbug commit' will ignore
  anything you've cached in the index via direct Git calls, and you'll
  either end up with an index matching your notmuch tags and the new
  HEAD (after a successful commit) or an index matching the original
  HEAD (after a failed commit).
</content>
</entry>
<entry>
<title>nmbug: Handle missing @upstream in is_unmerged</title>
<updated>2014-07-16T22:31:28Z</updated>
<author>
<name>W. Trevor King</name>
<email>wking@tremily.us</email>
</author>
<published>2014-07-06T20:40:20Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=567aab405b05d9ef79ddf1b62302806b9ddbeaad'/>
<id>urn:sha1:567aab405b05d9ef79ddf1b62302806b9ddbeaad</id>
<content type='text'>
If we don't have an upstream, there is nothing to merge, so nothing is
unmerged.  This avoids errors like:

  $ nmbug status
  error: No upstream configured for branch 'master'
  error: No upstream configured for branch 'master'
  fatal: ambiguous argument '@{upstream}': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git &lt;command&gt; [&lt;revision&gt;...] -- [&lt;file&gt;...]'
  'git rev-parse @{upstream}' exited with nonzero value

You might not have an upstream if you're only using nmbug locally to
version-control your tags.
</content>
</entry>
<entry>
<title>nmbug: Add a git_with_status helper function</title>
<updated>2014-07-16T09:31:23Z</updated>
<author>
<name>W. Trevor King</name>
<email>wking@tremily.us</email>
</author>
<published>2014-07-06T20:40:19Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4697e86a523fbbe43bf7ef38169f526adcbd710c'/>
<id>urn:sha1:4697e86a523fbbe43bf7ef38169f526adcbd710c</id>
<content type='text'>
Sometimes we want to catch Git errors and handle them, instead of
dying with an error message.  This lower-level version of git() allows
us to get the error status when we want it.
</content>
</entry>
</feed>
