You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Madan U Sreenivasan <ma...@collab.net> on 2006/06/26 10:13:23 UTC

Re: svn commit: r20246 - trunk/subversion/tests/cmdline/svntest

On Mon, 26 Jun 2006 03:04:06 +0530, <lg...@tigris.org> wrote:

> Author: lgo
> Date: Sun Jun 25 14:34:06 2006
> New Revision: 20246
>
[snip]
> Modified: trunk/subversion/tests/cmdline/svntest/main.py
> URL:  
> http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/svntest/main.py?pathrev=20246&r1=20245&r2=20246
> ==============================================================================
> --- trunk/subversion/tests/cmdline/svntest/main.py	(original)
> +++ trunk/subversion/tests/cmdline/svntest/main.py	Sun Jun 25 14:34:06  
> 2006
> @@ -161,6 +161,10 @@
>  pristine_wc_dir = os.path.join(temp_dir, "wc")
>  default_config_dir = config_dir
> +# calculate repo url from pristine_dir
> +pristine_url = test_area_url + '/' + pristine_dir
> +if windows == 1:
> +  pristine_url = string.replace(pristine_url, '\\', '/')

why not os.path.join() here?

Regards,
Madan.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r20246 - trunk/subversion/tests/cmdline/svntest

Posted by Lieven Govaerts <lg...@mobsol.be>.
Quoting Madan U Sreenivasan <ma...@collab.net>:
..
> But anyways, I think we should do the pristine_url backslash replacement
> part before we prepend the test_area_url. Like:
>
> >> >+if windows == 1:
> >> >+  pristine_url = string.replace(pristine_url, '\\', '/')
> >> >+# calculate repo url from pristine_dir
> >> >+pristine_url = test_area_url + '/' + pristine_dir

Madan,

I just copied the code from its original location, didn't do any refactoring.
Frankly, while your remark makes the code cleaner, I don't care enough to
change it myself. But I'll support (or commit if needed) your patch.

thanks for the review,

Lieven.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r20246 - trunk/subversion/tests/cmdline/svntest

Posted by Madan U Sreenivasan <ma...@collab.net>.
On Mon, 26 Jun 2006 15:45:11 +0530, Malcolm Rowe  
<ma...@farside.org.uk> wrote:

> On Mon, Jun 26, 2006 at 03:43:23PM +0530, Madan U Sreenivasan wrote:
>> >+# calculate repo url from pristine_dir
>> >+pristine_url = test_area_url + '/' + pristine_dir
>> >+if windows == 1:
>> >+  pristine_url = string.replace(pristine_url, '\\', '/')
>>
>> why not os.path.join() here?
>>
>
> Looks like it's building a URL (which always has forward slashes),
> not a path (which would contain backslashes on Windows).  How would
> os.path.join help?

hmmmm, you are right. I was stuck at why the pristine_url replacement is  
happening.

But anyways, I think we should do the pristine_url backslash replacement  
part before we prepend the test_area_url. Like:

>> >+if windows == 1:
>> >+  pristine_url = string.replace(pristine_url, '\\', '/')
>> >+# calculate repo url from pristine_dir
>> >+pristine_url = test_area_url + '/' + pristine_dir

[snip]

> PS. Please don't cc: the svn@ list - that's for commit emails only.

oh, sorry. I must have missed that.

Regards,
Madan.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r20246 - trunk/subversion/tests/cmdline/svntest

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Mon, Jun 26, 2006 at 03:43:23PM +0530, Madan U Sreenivasan wrote:
> >+# calculate repo url from pristine_dir
> >+pristine_url = test_area_url + '/' + pristine_dir
> >+if windows == 1:
> >+  pristine_url = string.replace(pristine_url, '\\', '/')
> 
> why not os.path.join() here?
> 

Looks like it's building a URL (which always has forward slashes),
not a path (which would contain backslashes on Windows).  How would
os.path.join help?

Regards,
Malcolm

PS. Please don't cc: the svn@ list - that's for commit emails only.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org