"Sven Steiniger" <Sven.Steiniger@newtron.net> writes:
> Nothing really matches.
> During an checkout (merge) one may get conflicts which needs to be
> resolved. For text files, svn inserts the cute <<<< >>>> marker in the
> files. For binary files it just keeps one version.
Actually, it keeps all three versions -- the original unmodified, your
possibly-modified version, and the new version, so you can choose.
> We are using some scripts for working with CVS. Those scripts have now
> been ported to work with Subversion. For user satisfaction most stuff has
> been automated. To safely resolve an conflict file in Subversion, we do
> the following:
> - for text files, check if there are any <<< or >>> inside. If not resolve it
> - for binary files, check wheter they have been touched after checkout.
> if yes, the resolve it
> As I don't know what Subversion treats as text-file, I need an
> command line option to query it. Getting the mime-type to check this is
> just a worka-round.
Use 'svn status' to see if the file is marked as conflicted ('C')
after a merge.
My previous mail answered your question about what is treated as text,
> -----Ursprüngliche Nachricht-----
> Von: email@example.com [mailto:firstname.lastname@example.org]
> Gesendet: Freitag, 20. August 2004 15:30
> An: Sven Steiniger
> Cc: email@example.com
> Betreff: Re: Identify an text file
> "Sven Steiniger" <Sven.Steiniger@newtron.net> writes:
> > I just wondered if there is a safe way to ask subversion if an working file
> > is treated as an text file or not.
> > I am currently getting the 'svn:mime-type' property and check if it's empty or
> > starts with "text/". But the documentation tells
> > "For example, if a file's svn:mime-type property is set to a
> > non-text MIME type (generally, something that doesn't
> > begin with text/, though there are exceptions)"
> Actually, your question probably need to be expanded.
> What, precisely, do you mean by "is treated as text"? That is, are
> you talking about end-of-line translation, or keyword substitution, or
> responsiveness to 'svn diff' and/or 'svn merge', or some combination
> thereof, or something else entirely?
> If you're just interested in mime-types, our (not entirely
> satisfactory) solution for now is the function
> svn_mime_type_is_binary() in subversion/libsvn_subr/validate.c. See
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Tue Aug 24 16:33:59 2004