core: make fork() work on Windows under Python 3

Use the same approach in _fork_win32() that was used in commit ee990fbc
for start_command().

Signed-off-by: Daniel Harding <dharding@living180.net>
Don't make user acknowledge successful branch creation

When the user creates a new branch, there's no need to show a modal
dialog saying that this succeeded. If the user is interested in any
output from git, they can open the console pane to view it.
Merge pull request #250 from living180/fix_fork_on_windows_py3

Make fork() work on Windows under Python 3
Merge pull request #251 from takluyver/create-branch-noack

Don't make user acknowledge successful branch creation
doc: add Thomas to the credits

Signed-off-by: David Aguilar <davvid@gmail.com>
doc: update v2.0.3 release notes draft

Signed-off-by: David Aguilar <davvid@gmail.com>
[core] improve fork() on Windows

The Windows implementation of fork(), _fork_win32(), had some code to
try to allow commands like gitk to be executed.  However, this code did
not work for multiple reasons.  The main issue is that on Windows, gitk
is actually provided by a batch file named gitk.cmd.  If the first
element in the args list passed to subprocess.Popen() is simply "gitk",
the file won't be found and the command will fail.  This could be solved
by passing shell=True to Popen(), but that is not ideal.  The fix
provided here is to implement the same path searching algorithm that the
Windows shell uses to locate an executable, taking into account the
PATHEXT environment variable, and to use the result of that search as
the first element of the args list for subprocess.Popen().

Signed-off-by: Daniel Harding <dharding@living180.net>
git: don't pass shell=True to core.run_command()

On Windows, the Git.execute() method was passing shell=True to the
core.run_command() function.  This was to avoid a console window briefly
popping up on the screen each time git-cola invoked git, which could
happen if git-cola was invoked using "start pythonw git-cola".  But,
using shell=True is generally undesirable.  This change stops passing
shell=True and instead creates a STARTUPINFO structure and configures it
to ensure that any child process window is hidden.

Because the Windows shell is no longer being invoked, the replace_carot
function is no longer needed and is removed.

Signed-off-by: Daniel Harding <dharding@living180.net>
core: fix stdout()/stderr() helpers for Python 3

On Python 3, the core.stdout() and core.stderr() helper functions were
attempting to concatenate the message encoded as a bytestring with a
unicode string containing a newline, which raises a TypeError.  Fix this
by concatenating the newline first, and then only encoding the result if
on Python 2, since Python 3 wants unicode strings anyway.

Signed-off-by: Daniel Harding <dharding@living180.net>
Submit simple dialog on pressing enter

This makes it easy to switch between branches from the keyboard: Alt-B,
type branch name, Enter.
Merge pull request #252 from living180/improve_fork_on_windows

Improve fork() on Windows.

Signed-off-by: David Aguilar <davvid@gmail.com>
Merge pull request #253 from living180/no_shell_subprocess

Don't pass shell=True to core.run_command()
Merge pull request #255 from takluyver/checkout-enter

Submit simple dialog on pressing enter
Merge pull request #254 from living180/py3_fix_stdout_stderr

Fix stdout()/stderr() helpers for Python 3
doc: update v2.0.3 release notes draft

Signed-off-by: David Aguilar <davvid@gmail.com>
cmds: restart inotify when switching between bookmarks

Restart inotify when switching repositories using the bookmarks widget.
This ensures that inotify sees the new repository.

Closes #256

Reported-by: Charles <char101@ui.ac.id>
Signed-off-by: David Aguilar <davvid@gmail.com>
README.md: add more details about git-xbase

Signed-off-by: David Aguilar <davvid@gmail.com>
README.md: add documentation links

Signed-off-by: David Aguilar <davvid@gmail.com>
doc: fix formatting in CONTRIBUTING.md and update hotkeys URL

Signed-off-by: David Aguilar <davvid@gmail.com>
textwrap: special-case common trailers

Signed-off-by and other common trailers were being detected using a
regex that was too general.  Explicitly list the trailers we care about.

Closes #257

Reported-by: @wm4 via github.com
Signed-off-by: David Aguilar <davvid@gmail.com>