tag: Display error message when creating tag with invalid name

When an invalid name is supplied during tag creation, there was no error
displayed to the user. It would always say "Created a new tag named [tag
name]" even though no tag is actually created.

This change will display error message instead of tag creation message
when git tag command fails.

Reported-by: Ｖ字龍(Vdragon) <pika1021@gmail.com>
Signed-off-by: Minarto Margoliono <lie.r.min.g@gmail.com>
Tag: Fix error message display on tag creation

The error message was displayed using information dialog. As a result,
it is displaying git-cola icon instead of error icon.

This change use the proper error dialog instead of information dialog.

Reported-by: Ｖ字龍(Vdragon) <pika1021@gmail.com>
Signed-off-by: Minarto Margoliono <lie.r.min.g@gmail.com>
Tag: Move error handling code to widget

The error message was handled in cmds.py while the success code was
handled in createtag.py. This will make it harder to maintain later.

This change move the error handling code to the same location as success
handling code.

Reported-by: Ｖ字龍(Vdragon) <pika1021@gmail.com>
Signed-off-by: Minarto Margoliono <lie.r.min.g@gmail.com>
po: fix all po headers from git-gui to git-cola

This commit updates all po headers to the project named 'git-cola',
following the gettext po format.
* Basically, s/git-gui/git-cola/g
* Copyright declaration
    * Previous contributers of git-gui translation are still preserved
    * update copyright year according to git-cola's commit history
      https://github.com/git-cola/git-cola/commits/master/po/*.po
* point Report-Msgid-Bugs-To entry to https://github.com/git-cola/git-
cola/issues
* reset all language team mailing lists since that only applies for git-
gui

Signed-off-by: Ｖ字龍(Vdragon) <pika1021@gmail.com>

Conflicts:
	po/zh_TW.po
Merge pull request #300 from Vdragon/fix_pot_metadata

po: fix all po headers from git-gui to git-cola

Signed-off-by: David Aguilar <davvid@gmail.com>
cmds: fix decode error when launching misconfigured editor

We were casting to unicode() where we were previously casting to str()
to fix a unicode decode error.

The right solution is to not convert at all and get the error
message directly from e.strerror instead.

Closes #298

Reported-by: Ｖ字龍(Vdragon) <pika1021@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
dag: rework layout to avoid sizing issues

We were adding to the bottom dock area, which Qt implicitly keeps sized
to a large area that cannot be resized.  This means that the default
layout used by git-dag creates a diff widget that cannot be made
smaller.

Use the left and right regions instead so that each widget can be freely
sized.

Closes #299

Reported-by: Stanisław Halik <sthalik@misaki.pl>
Signed-off-by: David Aguilar <davvid@gmail.com>
doc: fix URL in v2.0.4 release notes draft

Signed-off-by: David Aguilar <davvid@gmail.com>
Merge pull request #301 from Vdragon/translation_zh_TW

zh_TW.po: update translation, fix force push error issue

Signed-off-by: David Aguilar <davvid@gmail.com>
Merge pull request #296 from mmargoliono/286

tag: Display error message when creating tag with invalid name

Closes #286

Signed-off-by: David Aguilar <davvid@gmail.com>
doc: update v2.0.4 release notes draft

Signed-off-by: David Aguilar <davvid@gmail.com>
gitcfg: add a built-in config reader

We may be able to use this to avoid calling "git config".  This code is
not enabled by default, but it was useful while debugging win32 unicode
issues.

It might be worth using it if we find that it improves startup time.

Signed-off-by: David Aguilar <davvid@gmail.com>
compat: add PY2 and WIN32 symbols

Related-to: #302

Signed-off-by: David Aguilar <davvid@gmail.com>
core: use the Windows unicode API when accessing paths

win32 requires unicode strings to properly work with file paths.

Add a mkpath() helper function that transforms its arguments into bytes
for UNIX and unicode for Windows.

Use mkpath() in all of the core wrapper functions.

Related-to: #302

Signed-off-by: David Aguilar <davvid@gmail.com>
win32: support launching git-cola from non-ascii paths

Adjust the startup scripts so that byte strings are used on python2 when
concatenating paths.  This avoids unicode decode errors and ensures that
we find the correct paths on Windows when doing the sys.path setup.

Related-to: #302
Reported-by: Ｖ字龍(Vdragon) <pika1021@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Merge branch 'win32/unicode-source-tree'

* win32/unicode-source-tree:
  win32: support launching git-cola from non-ascii paths
  core: use the Windows unicode API when accessing paths
  compat: add PY2 and WIN32 symbols
  gitcfg: add a built-in config reader

Closes #302

Signed-off-by: David Aguilar <davvid@gmail.com>
gitcfg: honor gui.encoding when showing diffs

When no per-file attributes have been set via .gitattributes then we
should respect gui.encoding as the default file encoding.

This allows users to use non-utf-8 file content by setting the
gui.encoding variable, as is described in git-config(1).

Related-to: #303
Suggested-by: Reported-by: Ｖ字龍(Vdragon) <pika1021@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
doc: update v2.0.4 release notes draft

Signed-off-by: David Aguilar <davvid@gmail.com>
Merge branch 'gui-encoding'

* gui-encoding:
  doc: update v2.0.4 release notes draft
  gitcfg: honor gui.encoding when showing diffs

Closes #303

Signed-off-by: David Aguilar <davvid@gmail.com>
app: avoid unicode errors when printing the "not a directory" error message

If the supplied repo contains unicode characters we would error out when
writing to stderr because the encodings don't match.

Let the core.stderr() function handle it.

Related-to: #305
Reported-by: Ｖ字龍(Vdragon) <pika1021@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>