Re: [PATCH] git.__remotes_from_dir() should only return lists
- From
- Pavel Roskin <proski@gnu.org>
- Date
- Sep 6, 2007, 12:38 UTC
- Message-ID
- <1189082306.3695.5.camel@gx>
- In-Reply-To
- <20070906112645.GA31888@diana.vm.bytemark.co.uk>
On Thu, 2007-09-06 at 13:26 +0200, Karl Hasselström wrote:
Show 7 quoted lines
> 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.
Show 5 quoted lines
> > 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