git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: "Karl Hasselström" <kha@treskal.com>
Cc: Catalin Marinas <catalin.marinas@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] git.__remotes_from_dir() should only return lists
Date: Thu, 06 Sep 2007 08:38:26 -0400	[thread overview]
Message-ID: <1189082306.3695.5.camel@gx> (raw)
In-Reply-To: <20070906112645.GA31888@diana.vm.bytemark.co.uk>

On Thu, 2007-09-06 at 13:26 +0200, Karl Hasselström wrote:
> On 2007-09-05 12:57:22 -0400, Pavel Roskin wrote:
> 
> > If there are no remotes, return empty list, not None. The later
> > doesn't work with builtin set().
> 
> Thanks. But I guess an even nicer fix would be to make this function
> return a set in the first place.

Fine with me.  But it was returning a list or None, so the simplest fix
was to return a list in all cases.

> > This fixes t1001-branch-rename.sh
> 
> Hmm. I don't believe I saw t1001 break without this patch (I run the
> test suite before I push, but I might have made a mistake of course).
> Does the user's environment leak into the test sandbox?

I don't think it's the user environment, at least on my side.  I'm using
Fedora 7, which has python-2.5-12.fc7.  That's the error from the t1001
before my patch:

Traceback (most recent call last):
  File "/home/proski/src/stgit/t/../stg", line 43, in <module>
    main()
  File "/home/proski/src/stgit/stgit/main.py", line 284, in main
    command.func(parser, options, args)
  File "/home/proski/src/stgit/stgit/commands/branch.py", line 163, in func
    parentremote = git.identify_remote(parentbranch)
  File "/home/proski/src/stgit/stgit/git.py", line 994, in identify_remote
    for remote in remotes_list():
  File "/home/proski/src/stgit/stgit/git.py", line 963, in remotes_list
    | set(__remotes_from_dir('branches')))
TypeError: 'NoneType' object is not iterable

-- 
Regards,
Pavel Roskin

  reply	other threads:[~2007-09-06 12:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-05 16:57 [PATCH] git.__remotes_from_dir() should only return lists Pavel Roskin
2007-09-06 11:26 ` Karl Hasselström
2007-09-06 12:38   ` Pavel Roskin [this message]
2007-09-06 14:26     ` Karl Hasselström
2007-09-06 23:11     ` Karl Hasselström

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1189082306.3695.5.camel@gx \
    --to=proski@gnu.org \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kha@treskal.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).