+++ /dev/null
-Backport from HEAD, fixes following issues:
-
-* File -> Clone doesn't work
-* Clone doesn't work with --prompt
-* Always checks out $HOME.git if HOME is under git controll, when launched from desktop launcher
-* Same for opening bookmarks
-
-From 6a09349645ca4b576a0eeac69e83adadbd7887e4 Mon Sep 17 00:00:00 2001
-From: David Aguilar <davvid@gmail.com>
-Date: Fri, 15 Apr 2011 01:37:14 -0700
-Subject: [PATCH 2/9] bookmarks: Handle home directories with unicode characters
-
-Closes #74
-
-Signed-off-by: David Aguilar <davvid@gmail.com>
----
- cola/controllers/bookmark.py | 4 +++-
- 1 files changed, 3 insertions(+), 1 deletions(-)
-
-diff --git a/cola/controllers/bookmark.py b/cola/controllers/bookmark.py
-index 61b9c79..57cc954 100644
---- a/cola/controllers/bookmark.py
-+++ b/cola/controllers/bookmark.py
-@@ -5,6 +5,7 @@ import sys
-
- from PyQt4 import QtGui
-
-+from cola import core
- from cola import utils
- from cola import qtutils
- from cola.qobserver import QObserver
-@@ -19,7 +20,7 @@ def save_bookmark():
-
- """
- model = settings.SettingsManager.settings()
-- model.add_bookmark(os.getcwd())
-+ model.add_bookmark(core.decode(os.getcwd()))
- settings.SettingsManager.save()
- qtutils.information("Bookmark Saved")
-
-@@ -31,6 +32,7 @@ def manage_bookmarks():
- ctl = BookmarkController(model, view)
- view.show()
-
-+
- class BookmarkController(QObserver):
- """Handles interactions with the bookmarks dialog
- """
---
-1.7.3.4
-
-
-From bc5940bd362a4750b2b37107a9c6272302f93bd4 Mon Sep 17 00:00:00 2001
-From: David Aguilar <davvid@gmail.com>
-Date: Fri, 15 Apr 2011 01:38:00 -0700
-Subject: [PATCH 3/9] guicmds: Handle cloning repos that contain unicode characters
-
-Closes #74
-
-Signed-off-by: David Aguilar <davvid@gmail.com>
----
- cola/guicmds.py | 10 ++++++----
- 1 files changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/cola/guicmds.py b/cola/guicmds.py
-index b98a445..353bee0 100644
---- a/cola/guicmds.py
-+++ b/cola/guicmds.py
-@@ -134,7 +134,7 @@ def cherry_pick():
- cola.notifier().broadcast(signals.cherry_pick, commits)
-
-
--def clone_repo(parent, spawn=True):
-+def clone_repo(spawn=True):
- """
- Present GUI controls for cloning a repository
-
-@@ -142,7 +142,7 @@ def clone_repo(parent, spawn=True):
-
- """
- url, ok = qtutils.prompt('Path or URL to clone (Env. $VARS okay)')
-- url = os.path.expandvars(url)
-+ url = os.path.expandvars(core.encode(url))
- if not ok or not url:
- return None
- try:
-@@ -168,12 +168,14 @@ def clone_repo(parent, spawn=True):
- return None
-
- # Prompt the user for a directory to use as the parent directory
-+ parent = QtGui.QApplication.instance().activeWindow()
- msg = 'Select a parent directory for the new clone'
- dirname = qtutils.opendir_dialog(parent, msg, cola.model().getcwd())
- if not dirname:
- return None
- count = 1
-- destdir = os.path.join(dirname, default)
-+ dirname = core.decode(dirname)
-+ destdir = os.path.join(dirname, core.decode(default))
- olddestdir = destdir
- if os.path.exists(destdir):
- # An existing path can be specified
-@@ -186,7 +188,7 @@ def clone_repo(parent, spawn=True):
- while os.path.exists(destdir):
- destdir = olddestdir + str(count)
- count += 1
-- cola.notifier().broadcast(signals.clone, url, destdir,
-+ cola.notifier().broadcast(signals.clone, core.decode(url), destdir,
- spawn=spawn)
- return destdir
-
---
-1.7.3.4
-
-
-From 00f6b77ee15eba1f707dc8aab02359c0483ecff8 Mon Sep 17 00:00:00 2001
-From: David Aguilar <davvid@gmail.com>
-Date: Fri, 15 Apr 2011 01:38:46 -0700
-Subject: [PATCH 4/9] settings: Handle home directories with unicode characters
-
-Closes #74
-
-Signed-off-by: David Aguilar <davvid@gmail.com>
----
- cola/settings.py | 3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/cola/settings.py b/cola/settings.py
-index 74ef101..66a12b3 100644
---- a/cola/settings.py
-+++ b/cola/settings.py
-@@ -5,11 +5,12 @@
- import os
- import user
-
-+from cola import core
- from cola import serializer
- from cola.models import observable
-
- # Here we store settings
--_rcfile = os.path.join(user.home, '.cola')
-+_rcfile = os.path.join(core.decode(user.home), '.cola')
-
-
- class SettingsModel(observable.ObservableModel):
---
-1.7.3.4
-
-
-From 73a7191758d366e1865e729a0c834eff43a5cbda Mon Sep 17 00:00:00 2001
-From: David Aguilar <davvid@gmail.com>
-Date: Fri, 15 Apr 2011 01:40:07 -0700
-Subject: [PATCH 5/9] startup: Handle repository paths with unicode characters
-
-Closes #74
-
-Signed-off-by: David Aguilar <davvid@gmail.com>
----
- cola/models/main.py | 3 ++-
- cola/views/main.py | 4 ++--
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/cola/models/main.py b/cola/models/main.py
-index b924f45..c155f65 100644
---- a/cola/models/main.py
-+++ b/cola/models/main.py
-@@ -139,7 +139,8 @@ class MainModel(ObservableModel):
- is_valid = self.git.is_valid()
- if is_valid:
- self._init_config_data()
-- self.set_project(os.path.basename(self.git.worktree()))
-+ basename = os.path.basename(self.git.worktree())
-+ self.set_project(core.decode(basename))
- return is_valid
-
- def _init_config_data(self):
-diff --git a/cola/views/main.py b/cola/views/main.py
-index d1efbec..0fd1395 100644
---- a/cola/views/main.py
-+++ b/cola/views/main.py
-@@ -243,7 +243,7 @@ class MainView(MainWindow):
- def _update_callback(self):
- """Update the title with the current branch and directory name."""
- branch = self.model.currentbranch
-- curdir = os.getcwd()
-+ curdir = core.decode(os.getcwd())
- msg = 'Repository: %s\nBranch: %s' % (curdir, branch)
- self.commitdockwidget.setToolTip(msg)
-
-@@ -266,7 +266,7 @@ class MainView(MainWindow):
- merge_msg_path = gitcmds.merge_message_path()
- if merge_msg_path is None:
- return
-- merge_msg_hash = utils.checksum(merge_msg_path)
-+ merge_msg_hash = utils.checksum(core.decode(merge_msg_path))
- if merge_msg_hash == self.merge_message_hash:
- return
- self.merge_message_hash = merge_msg_hash
---
-1.7.3.4
-
-
-From 1db197ca4d7c23587d7adb85704381a8473abacb Mon Sep 17 00:00:00 2001
-From: David Aguilar <davvid@gmail.com>
-Date: Fri, 15 Apr 2011 01:58:41 -0700
-Subject: [PATCH 6/9] bookmarks: Pass '--repo' when launching git-cola on a bookmark
-
-Otherwise git-cola launches in-place when opening a bookmark.
-
-Closes #75
-
-Signed-off-by: David Aguilar <davvid@gmail.com>
----
- cola/controllers/bookmark.py | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/cola/controllers/bookmark.py b/cola/controllers/bookmark.py
-index 57cc954..446d852 100644
---- a/cola/controllers/bookmark.py
-+++ b/cola/controllers/bookmark.py
-@@ -57,7 +57,7 @@ class BookmarkController(QObserver):
- if not selection:
- return
- for item in selection:
-- utils.fork(['git', 'cola', item])
-+ utils.fork([sys.executable, sys.argv[0], '--repo', item])
-
- def delete(self):
- """Removes a bookmark from the bookmarks list"""
---
-1.7.3.4
-
-
-From 9b666a5e031e48b76e575ccb756928727beea05e Mon Sep 17 00:00:00 2001
-From: David Aguilar <davvid@gmail.com>
-Date: Fri, 15 Apr 2011 02:11:01 -0700
-Subject: [PATCH 7/9] main: Add a '--prompt' option and use it in the desktop launchers
-
-git-cola assumes that the current directory is a git repository.
-This is less helpful when launching git-cola through a launcher icon
-because it may find a git repository in $HOME.
-
-Add a '--prompt' flag and use it in all of the launchers.
-This forces git-cola to prompt the user for a repository before
-launching the main GUI.
-
-Closes #75
-
-Signed-off-by: David Aguilar <davvid@gmail.com>
----
- cola/main.py | 9 ++++++++-
- darwin/git-cola | 2 +-
- share/applications/cola.desktop | 2 +-
- win32/install.iss | 6 +++---
- 4 files changed, 13 insertions(+), 6 deletions(-)
-
-diff --git a/cola/main.py b/cola/main.py
-index 25330f8..e155261 100644
---- a/cola/main.py
-+++ b/cola/main.py
-@@ -62,6 +62,13 @@ def main():
- metavar='PATH',
- default=os.getcwd())
-
-+ # Specifies that we should prompt for a repository at startup
-+ parser.add_option('--prompt',
-+ help='Prompt for a repository before starting the main GUI.',
-+ dest='prompt',
-+ action='store_true',
-+ default=False)
-+
- # Used on Windows for adding 'git' to the path
- parser.add_option('-g', '--git-path',
- help='Specifies the path to the git binary',
-@@ -156,7 +163,7 @@ def main():
- # Ensure that we're working in a valid git repository.
- # If not, try to find one. When found, chdir there.
- model = cola.model()
-- valid = model.use_worktree(repo)
-+ valid = model.use_worktree(repo) and not opts.prompt
- while not valid:
- startup_dlg = startup.StartupDialog(app.activeWindow())
- gitdir = startup_dlg.find_git_repo()
-diff --git a/darwin/git-cola b/darwin/git-cola
-index 79e5f73..b37575d 100755
---- a/darwin/git-cola
-+++ b/darwin/git-cola
-@@ -8,4 +8,4 @@ export PATH
- # Contents/Resources
- macos="$(dirname "$0")"
- contents="$(dirname "$macos")"
--exec python "$contents/Resources/bin/git-cola"
-+exec python "$contents/Resources/bin/git-cola" --prompt
-diff --git a/share/applications/cola.desktop b/share/applications/cola.desktop
-index 44e8d8a..2fdefe0 100644
---- a/share/applications/cola.desktop
-+++ b/share/applications/cola.desktop
-@@ -1,7 +1,7 @@
- [Desktop Entry]
- Name=Cola Git GUI
- Comment=A highly caffeinated git GUI
--Exec=git-cola
-+Exec=git-cola --prompt
- Icon=/usr/share/git-cola/icons/git.svg
- StartupNotify=true
- Terminal=false
---
-1.7.3.4
-
-
-From effa175c909084424c3c49e0ca855d0716a32645 Mon Sep 17 00:00:00 2001
-From: Justin Lecher <jlec@gentoo.org>
-Date: Sat, 16 Apr 2011 11:45:12 +0200
-Subject: [PATCH 9/9] Fix for issue 77, Clone doesn't work with --prompt.
-
-Signed-off-by: Justin Lecher <jlec@gentoo.org>
----
- cola/views/startup.py | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/cola/views/startup.py b/cola/views/startup.py
-index 7ec5b6e..a2addd9 100644
---- a/cola/views/startup.py
-+++ b/cola/views/startup.py
-@@ -102,7 +102,7 @@ class StartupDialog(QtGui.QDialog):
- self.accept()
-
- def _clone(self):
-- gitdir = guicmds.clone_repo(self, spawn=False)
-+ gitdir = guicmds.clone_repo(spawn=False)
- if gitdir:
- self._gitdir = gitdir
- self.accept()
---
-1.7.3.4
-