Hi Stefan!
I want to be able to reuse the match and apply step in patch.c. Hence I
suggest introducing text_info_target_t [1] and prop_info_target_t [2].
The idea is that apply/match uses those structs and thus only deals with
streams.
Later when we want to install our new text and properties we would use
the text_file and prop_files fields in patch_target_t [3].
And for notification we have all the rest of the fields in
patch_target_t [3].
The problem is that init_patch_target() only allows dirs for targets. I
could introduce some logic saying that if we only have property changes,
then a dir is ok.
Any thoughts?
Thanks,
Daniel
[3] patch_target_t
node_kind, kind_on_disk,
was_filtered, had_text_rejects, had_prop_rejects, was_skipped
text_local_mods
prop_local_mods
text_added, text_deleted, text_replaced
prop_added, prop_deleted, prop_replaced
reject_path
local_relpath, local_abspath, canon_path_from_patchfile
text_file
prop_files = {}
text_info_target
prop_info_targets = {}
text_hunk_info = []
prop_hunk_info = {}
[1 text_info_target_t
# Text must deal with translation of eols and keywords, thus the
# extra fields compared to prop_info_target_t.
current_line
lines
eol_style
eol_str
target_stream
patched_stream
patched_raw_stream
reject_stream
[2] prop_info_target_t
current_line
lines
target_stream
patched_stream
reject_stream
Received on 2010-07-15 13:23:05 CEST