You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mo DeJong <su...@bayarea.net> on 2001/09/13 10:18:41 UTC

New files need to appear in diff output by default.

Hi all.

If you have used CVS for long you have no doubt run into
the `cvs diff -N` flag. The -N flag to cvs diff will
add new files to a generated patch file. I really
could not tell you why it is not on by default in
CVS. Subversion needs to be able to add new files
to a patch file, but it should be safe to just
make this the default instead of adding a command
line switch for it. The current svn diff code will
silently fail in the case of a locally added file
since diff will try to compare the added file to
a non-existent one in the SVN/text-base dir.

I wrote up a quick fix for this problem, it
basically just does a touch of the file in the
SVN/text-base dir before running the diff and then
cleans up the temp file afterward. This patch is
still in the "rough draft" stage since I did not
take any race conditions into account.
Any reactions to this approach?

Mo DeJong

Re: New files need to appear in diff output by default.

Posted by Ben Collins-Sussman <su...@collab.net>.
Mo DeJong <su...@bayarea.net> writes:

> If you have used CVS for long you have no doubt run into
> the `cvs diff -N` flag. [...]

> I wrote up a quick fix for this problem, it
> basically just does a touch of the file in the
> SVN/text-base dir before running the diff and then
> cleans up the temp file afterward. This patch is
> still in the "rough draft" stage since I did not
> take any race conditions into account.
> Any reactions to this approach?

I will look at this soon... 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org