[Buildbot-devel] sourcedirIsUpdatable function under Windows

Esther Baruk esther.baruk at lexifi.com
Fri Nov 30 17:14:27 UTC 2012


Hi,

Le 30/11/2012 00:09, Tom Prince a écrit :
> Esther Baruk <esther.baruk at lexifi.com> writes:
>
>> After searching for a little while, it appearsthat the function
>> sourcedirIsUpdatable (located in master/buildbot/steps/source/svn.py)
>> always returned false.
> Are you sure it is the stat causing it to return False?

Yes, I'm sure because the "svn info" following the stat is not done.

>
>> Looking at the code of this function, the command "stat" is called on a
>> value which is : {'file': self.workdir + '/.svn', 'logEnviron':
>> self.logEnviron,}.
>> This doesn't seemcorrect to me, as the separator under Cygwin is "\".
> As far as I know, although the canonical path seperator on windows and
> cygwin is "\", "/" generally work as well.

I can assure you that "/" doesn't work on Windows, we are forced to use 
"\" when specifying workdirs for instance.
>> I think the 'file' attribute should be : self.workdir + os.sep + '.svn',
>> is that correct ?
> The code to get the correct seperator is more complex:
> https://github.com/buildbot/buildbot/commit/7b97f3114bbca6966415b51c31de68b9cc7595f3
> os.sep is the seprator for the whereever the master is running. But we
> want the seperator for the slave.

Yes, indeed.

>    Tom

--

Esther Baruk




More information about the devel mailing list