* [PATCH] Be tolerant to repos without .git/remotes/ or .git/branches/.
@ 2007-02-02 23:00 Yann Dirson
2007-02-02 23:03 ` Catalin Marinas
0 siblings, 1 reply; 2+ messages in thread
From: Yann Dirson @ 2007-02-02 23:00 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
__remotes_from_dir() was not robust against non-existent dirs.
This a Git 1.5 compat issue, since repos do not have .git/remotes any
more.
Signed-off-by: Yann Dirson <ydirson@altern.org>
---
This problem prevented me from seeing the t1200 regression you
reported, but once this one is fixed I do hit a problem there.
stgit/git.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/stgit/git.py b/stgit/git.py
index 022d607..069833d 100644
--- a/stgit/git.py
+++ b/stgit/git.py
@@ -904,7 +904,11 @@ def __remotes_from_config():
return config.sections_matching(r'remote\.(.*)\.url')
def __remotes_from_dir(dir):
- return os.listdir(os.path.join(basedir.get(), dir))
+ absdir=os.path.join(basedir.get(), dir)
+ if os.path.isdir(absdir):
+ return os.listdir(absdir)
+ else:
+ return []
def remotes_list():
"""Return the list of remotes in the repository
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Be tolerant to repos without .git/remotes/ or .git/branches/.
2007-02-02 23:00 [PATCH] Be tolerant to repos without .git/remotes/ or .git/branches/ Yann Dirson
@ 2007-02-02 23:03 ` Catalin Marinas
0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2007-02-02 23:03 UTC (permalink / raw)
To: Yann Dirson; +Cc: git
On 02/02/07, Yann Dirson <ydirson@altern.org> wrote:
> __remotes_from_dir() was not robust against non-existent dirs.
> This a Git 1.5 compat issue, since repos do not have .git/remotes any
> more.
I already included the same patch from Pavel Roskin.
--
Catalin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-02 23:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-02 23:00 [PATCH] Be tolerant to repos without .git/remotes/ or .git/branches/ Yann Dirson
2007-02-02 23:03 ` Catalin Marinas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.