line-ending conversion and keyword substitution
From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2001-12-11 00:36:18 CET
In case you don't subscribe to the commit mails, here's the document I
LIBSVN_WC : TRANSPARENT SUBSTITUTIONS
NEW USER-VISIBLE FEATURES:
1. keyword expansion
A certain pattern in a file can be 'replaced' with dynamic
2. newline conversion
Text files in the working copy can (optionally) automatically
DESIGN GOAL
* Purely client-side substitutions.
The repository stores data, pure and simple. It has no
- Ramification: this means that all working copy 'text-bases' are
- Sub-Ramification: svn_wc_text_modified_p() is going to have
- Sub-Ramification: the conversions need to happen at the right
HOW TO KNOW WHEN A FILE IS TEXT
Working proposal, based on status quo:
* a file is text iff it has a mime-type property of 'text/*', OR if it
I. NEWLINE CONVERSION
A. HOW TO TOGGLE NEWLINE CONVERSION
Newline conversions only happen on text files.
Our experience is that most people want newline conversion.
(Later, if we need to, we can deactivate via directory
B. HOW A CLIENT DOES NEWLINE CONVERSION
* Gstein and Pilchie proposed per-directory default line-ending styles.
(Latest proposal by Branko, agreed to by Ben, Karl and Greg Hudson:) ]
- all text files have a "line-ending-style". Specifically, this
- a line-ending-style can be explicitly given via file property:
'svn:line-ending-style : DOS', etc.
- define a 'default' line-ending style to SOME convention that
- When updating/checking out, the client looks at the file's
- When committing, if working file's style doesn't match the
- See DESIGN section; svn_wc_text_modified_p, diff, and patch all
II. KEYWORD EXPANSION
A. HOW TO TOGGLE KEYWORD EXPANSION
Our experience is that most people do *not* want keyword
Also note: as Branko requestss, nothing prevents a user from
B. HOW A CLIENT DOES KEYWORD EXPANSION
- When committing, if the property is 'on', then an
- See DESIGN section; svn_wc_text_modified_p, diff, and patch all
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.