[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Post Commit Code Formatting

From: Saulius Grazulis <grazulis_at_akl.lt>
Date: 2005-06-23 15:46:47 CEST

On Thursday 23 June 2005 16:02, James FitzGibbon wrote:

> I must admit that I writing about the "Repository defined auto-props" this
> idea occurred
> to me, but the problem of platform cross-portability prevented me from
> mentioning it.

I understood this, but I think this is still a viable solution. Not many
people, I guess, have such a terrible zoo were no script running on all
platforms could ever be written ;)

> To make this work, you would have to write the script that the server sends
> in a portable
> fashion, which most people cannot do.  

Well, is it really so bad? I must admit I never use windows, but for all other
systems it should work...

> I'm not talking about choosing a
> cross-platform
> scripting language: you can easily write a script in Perl and then assume
> that your path
> separator is '/', making the "cross-platform" script unusable in Windows

I guess Perl has a module/mode where different path separators are taken into
account. In any case, you can in Perl define your $system_path_separator =
"\\" and then $path = join( $system_path_separator, @path );

And python also has such possibility in one of its modules, I guess.

And in C one can write a function to construct path strings, or to use #ifdefs
(ugly, but works).

> and older versions
> of MacOS.

Clueless about MacOS...

> I suspect that such a feature would generate a large number of user
> requests to the list
> saying "why doesn't this work?" deserving a boilerplate "because you don't
> know
> how to develop for cross-platform" response.  Of course, to use this as a
> reason to not
> implement such a feature is leveraging a technical limitation for the wrong
> reasons.

Well, sure. Users should have a tool to solve their problems. As generic,
simple and powerful as possible.

If some people misuse or do not understand their tools, then what? This is not
a reason to take these tools away from all others who do understand.

In short, the client-side hooks could provide a tool for people to implement
whatever pre-commit checks or modifications they want. And existing repertoir
of programming languages allows to write platform-independent solution for
all (most?) sites. Of cource, every such solution would be site-dependent.
E.g. we do not have MacOS, so our scripts would most probably not run on
MacOS (but we do not care anyway...).

> At this point, the part of me that likes to make things more complex than
> they deserve to be
> says "so embed a truly cross-platform language in the svn client!".  

Oh, this would probably be an overkill ;)

> Then
> the rational part
> gets some hired goons to go and beat that part of me up and all is good in
> the world again.

I hope you do not get beaten too bad ;)

-- 
Saulius Gražulis
Visuomeninė organizacija "Atviras Kodas Lietuvai"
P.Vileišio g. 18
LT-10306 Vilnius
Lietuva (Lithuania)
tel/fax:      (+370-5)-210 40 05
mobilus:      (+370-684)-49802, (+370-614)-36366

  • application/pgp-signature attachment: stored
Received on Thu Jun 23 15:43:28 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.