You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Neels Hofmeyr <ne...@elego.de> on 2013/01/08 11:03:41 UTC

svn patch and missing targets

I've just used 'svn patch'. There were missing target files, but I only
noticed a lot later; because all the text conflicts had .svnpatch.rej
files, but the missing targets were only listed in 'svn patch' output.

So in my particular case it would have helped to have .svnpatch.rej
files for missing targets. I would have noticed the lack of a target
and I could have immediately looked at the diff chunks without
having to browse through the original patch file. Does that
generally make sense? It would sometimes need to create parent folders
to place a rej file...

~Neels

Re: svn patch and missing targets

Posted by Neels Hofmeyr <ne...@elego.de>.
On Tue, 8 Jan 2013 12:40:17 +0100
Stefan Sperling <st...@apache.org> wrote:

> Assume for a second that 'svn patch' already had the ability to flag
> conflicts in the working copy (this is a planned feature). Should we
> then still create an unversioned skip file or do something else?

I like the idea of being able to look at the diff chunks that didn't
succeed without too much fuss. For example, if I found the correct
target, I would like to just apply the diff to that file. If the
"missing" chunks are still in the middle of a large patch, that gets a
bit cumbersome. If there's a file with the diff chunks, bam, done!

~Neels

Re: svn patch and missing targets

Posted by Julian Foad <ju...@btopenworld.com>.
Stefan Sperling wrote:
> On Tue, Jan 08, 2013 at 11:03:41AM +0100, Neels Hofmeyr wrote:
>>  I've just used 'svn patch'. There were missing target files, but I only
>>  noticed a lot later; because all the text conflicts had .svnpatch.rej
>>  files, but the missing targets were only listed in 'svn patch' output.
>> 
>>  So in my particular case it would have helped to have .svnpatch.rej
>>  files for missing targets. I would have noticed the lack of a target
>>  and I could have immediately looked at the diff chunks without
>>  having to browse through the original patch file. Does that
>>  generally make sense? It would sometimes need to create parent folders
>>  to place a rej file...
>> 
>>  ~Neels
> 
> Yes, it should probably do that.
> However, simple user errors such as using the wrong --strip argument
> can create a *lot* of skips. So I'd prefer a single 
> 'svnpatch.skipped.rej'
> within the target dir, rather than littering the working copy with
> a lot of 'svnpatch.rej' files.
> 
> Note that UNIX patch creates a single Oops.rej files for files which
> don't exist.
> 
> Assume for a second that 'svn patch' already had the ability to flag
> conflicts in the working copy (this is a planned feature). Should we
> then still create an unversioned skip file or do something else?

My preference: We should create conflicts in the WC, containing sufficient info for the user, including a reference to the original patch file when possible, and *not* write reject file(s) into the WC for skipped targets.  Also I would seriously consider doing the same for all conflicting or otherwise rejected hunks, not writing any .rej files at all (after giving due thought to backward compatibility and so on).

- Julian

Re: svn patch and missing targets

Posted by Stefan Sperling <st...@apache.org>.
On Tue, Jan 08, 2013 at 11:03:41AM +0100, Neels Hofmeyr wrote:
> I've just used 'svn patch'. There were missing target files, but I only
> noticed a lot later; because all the text conflicts had .svnpatch.rej
> files, but the missing targets were only listed in 'svn patch' output.
> 
> So in my particular case it would have helped to have .svnpatch.rej
> files for missing targets. I would have noticed the lack of a target
> and I could have immediately looked at the diff chunks without
> having to browse through the original patch file. Does that
> generally make sense? It would sometimes need to create parent folders
> to place a rej file...
> 
> ~Neels

Yes, it should probably do that.
However, simple user errors such as using the wrong --strip argument
can create a *lot* of skips. So I'd prefer a single 'svnpatch.skipped.rej'
within the target dir, rather than littering the working copy with
a lot of 'svnpatch.rej' files.

Note that UNIX patch creates a single Oops.rej files for files which
don't exist.

Assume for a second that 'svn patch' already had the ability to flag
conflicts in the working copy (this is a planned feature). Should we
then still create an unversioned skip file or do something else?