The first patch is another attempt at adding a global option to toggle the pager. It uses util.parsebool() to handle boolean values. The second patch makes it so the pager isn't launched if hg has no output. So if you're doing "hg diff" and nothing has changed, you won't get an empty pager.