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

Re[2]: --native-eol for checkout and update commands

From: Pavel Fedin <sonic_amiga_at_rambler.ru>
Date: 2006-12-18 14:54:50 CET

Hello Madan,

Monday, December 18, 2006, 4:18:34 PM, you wrote:

> To be honest, I do not understand the need for the patch

 In fact i've described the need. Okay, may be it's unclear, so:
 1) I work on some project at home under Linux. I don't have Internet
 connection there.
 2) I have Internet connection at work where i of course use Windows.
 3) The project's repository has svn:eol-style=native property set for
 text files.
 4) I checkout the project's tree at work and take it home. When i try
 to compile the tree all scripts fail because of 0x0D characters which
 are treated as usual printable characters.

> 1. Tabs should NOT be used

 Already fixed, here is the modified patch.
 Achieving this was easy (the most difficult was to understand the
internal structure and data flavour). Some functions were modified to have one
more const char *native_eol parameter. This specifier is passed down
into update editor via svn_wc_get_update_editor3() and stored in its edit_baton.
At the end of operation the editor passes it on into log runner via
svn_wc__run_log2() which stores it in struct log_runner. The log
runner uses modified function svn_wc_translated_file3() then which
takes the specifier and actually processes it then.

> 2. Changes to API function headers should be accompanied with
> corresponding comments.

 There are following public functions added (they are in fact modified
"original" functions):

 New Original
 svn_client_checkout3() svn_client_checkout2()
 svn_client_update3() svn_client_update2()
 svn_wc_get_update_editor3() svn_wc_get_update_editor3()
 svn_wc_translated_file3() svn_wc_translated_file2()
 svn_wc__run_log2() svn_wc__run_log()
 svn_wc__get_eol_style2() svn_wc__get_eol_style()

 They differ from original functions in one parameter added -
const char *native_eol. If this parameter is NULL it is ignored and
the function behaves like original. If it points to a EOL type specifier
it overrides svn:eol-style property value and linefeeds in all text files are converted to it.
 This value comes from --eol-style argument which is enabled for
checkout and update commands.
 Of course all original functions are left unchanged because i think
all of them are public.

> 3. We need a log if we get to check the patch in.

 How detailed one? Will "Added --native-eol support for checkout and
update" be enough?

 I am sorry but i don't have much time to work on this further. I do
it at work and it takes my time. I hope what i've described here is
enough.

-- 
Best regards,
 Pavel                            mailto:sonic_amiga@rambler.ru
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 18 14:55:31 2006

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