You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Näslund <da...@longitudo.com> on 2010/08/01 14:36:22 UTC

[PATCH] Clarify that 'svn patch' can only apply changes to targets that are dirs

Hi!

resolve_target_path() makes a few assumptions about the target for a
patch file beeing a wc_dir. Currently we can only invoke svn patch like
this:

  svn patch PATCH_FILE WC_DIR_PATH

Is this the intended behavoiour?

[[[

Make it clearer that the patch code can only use base paths that are
dirs.

* subversion/svn/main.c
  (svn_opt_subcommand_desc2_t): Clarify help text.

* subversion/include/svn_client.h
  (svn_client_patch): Replace parameter 'local_abspath' with
    'base_dir_abspath'.

* subversion/libsvn_client/patch.c
  (resolve_target_path,
   svn_client_patch): Replace parameter 'local_abspath' with
    'base_dir_abspath'
]]]
  
Cheers,
Daniel

Re: [PATCH] Clarify that 'svn patch' can only apply changes to targets that are dirs

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Daniel Näslund wrote on Sun, Aug 01, 2010 at 16:36:22 +0200:
> resolve_target_path() makes a few assumptions about the target for a
> patch file beeing a wc_dir. Currently we can only invoke svn patch like
> this:
> 
>   svn patch PATCH_FILE WC_DIR_PATH
> 
> Is this the intended behavoiour?

For patch files which contain hunks only for a single file (possible with
its properties), I (as a user) think it would make sense to support

	svn patch PATCH_FILE FILE_TO_PATCH

(where FILE_TO_PATCH may have a different basename than predicted by
PATCH_FILE, even.)

IIRC, patch(1) supports this too.

Re: [PATCH] Clarify that 'svn patch' can only apply changes to targets that are dirs

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Daniel Näslund wrote on Sun, Aug 01, 2010 at 16:36:22 +0200:
> resolve_target_path() makes a few assumptions about the target for a
> patch file beeing a wc_dir. Currently we can only invoke svn patch like
> this:
> 
>   svn patch PATCH_FILE WC_DIR_PATH
> 
> Is this the intended behavoiour?

For patch files which contain hunks only for a single file (possible with
its properties), I (as a user) think it would make sense to support

	svn patch PATCH_FILE FILE_TO_PATCH

(where FILE_TO_PATCH may have a different basename than predicted by
PATCH_FILE, even.)

IIRC, patch(1) supports this too.