On Thu, Jul 15, 2010 at 01:21:31PM +0200, Daniel Näslund wrote:
> 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].

What's the type of text_file and prop_files?

Are these like this one?

  /* The target file, read-only, seekable. This is NULL in case the target
   * file did not exist prior to patch application. */
  apr_file_t *file;

If so, where do the prop files come from?

> 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

You mean files, right?

> could introduce some logic saying that if we only have property changes,
> then a dir is ok.

Sure. Make sure the skipping behaviour is still right after you make
this change.

> Any thoughts?

The approach looks good to me. We'll definitely need to extend the
idea of 'patch target' in a manner that allows us to deal with
properties in a sane way.

Stefan

Reply via email to