You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Küng <to...@gmail.com> on 2007/12/06 19:40:36 UTC

svn diff localpath ignores added files

Hi,

I don't know when this happened, but with a client built from trunk 'svn 
diff' does not include added files anymore in the resulting diff:

cd wc
svn revert -R .
svn mv somefile somefile1
svn diff > diff.txt

the resulting diff contains only the removed file (an entry with "Index: 
..." for 'somefile' with all lines removed, but no entry with "Index: 
..." for 'somefile1' with all lines added.

client build from r28185 of the svn trunk, but I haven't seen any 
changes to the diff part since then, so I assume it works the same with 
HEAD.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net

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

Re: svn diff localpath ignores added files

Posted by David Glasser <gl...@davidglasser.net>.
On Dec 10, 2007 11:24 AM, Stefan Küng <to...@gmail.com> wrote:
>
> David Glasser wrote:
> > On Dec 6, 2007 11:40 AM, Stefan Küng <to...@gmail.com> wrote:
> >> Hi,
> >>
> >> I don't know when this happened, but with a client built from trunk 'svn
> >> diff' does not include added files anymore in the resulting diff:
> >>
> >> cd wc
> >> svn revert -R .
> >> svn mv somefile somefile1
> >> svn diff > diff.txt
> >>
> >> the resulting diff contains only the removed file (an entry with "Index:
> >> ..." for 'somefile' with all lines removed, but no entry with "Index:
> >> ..." for 'somefile1' with all lines added.
> >>
> >> client build from r28185 of the svn trunk, but I haven't seen any
> >> changes to the diff part since then, so I assume it works the same with
> >> HEAD.
> >
> > Is this a regression? It looks to me like both trunk and 1.4.x show
> > diffs of copied files against the copy base (not the empty file), and
> > show no output if the file is not changed.
>
> Ops, you're absolutely right!
> That means the "apply patch" feature in TortoiseMerge has been broken
> for a long time...
>
> But I wonder: the 'svn diff > patchfile' is used to create patchfiles
> and send them to others. But the created patchfile has *no* indication
> of the renamed file: it only shows the old file with all lines removed.
> Which means: if I would rename a file, create a patch and sent this
> patch to someone else, that person would end up with a removed file and
> a missing new file.
>
> I would expect the diff to produce the diff for the 'added' file too.
> If I remove the file, then add it again with a new name (*not* a
> rename), then the diff contains the added file as expected.

Indeed, "svn diff" doesn't give the full information necessary to
apply a patch.  See Charles Acknin's work this summer...

--dave


-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

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


Re: svn diff localpath ignores added files

Posted by Stefan Küng <to...@gmail.com>.
David Glasser wrote:
> On Dec 6, 2007 11:40 AM, Stefan Küng <to...@gmail.com> wrote:
>> Hi,
>>
>> I don't know when this happened, but with a client built from trunk 'svn
>> diff' does not include added files anymore in the resulting diff:
>>
>> cd wc
>> svn revert -R .
>> svn mv somefile somefile1
>> svn diff > diff.txt
>>
>> the resulting diff contains only the removed file (an entry with "Index:
>> ..." for 'somefile' with all lines removed, but no entry with "Index:
>> ..." for 'somefile1' with all lines added.
>>
>> client build from r28185 of the svn trunk, but I haven't seen any
>> changes to the diff part since then, so I assume it works the same with
>> HEAD.
> 
> Is this a regression? It looks to me like both trunk and 1.4.x show
> diffs of copied files against the copy base (not the empty file), and
> show no output if the file is not changed.

Ops, you're absolutely right!
That means the "apply patch" feature in TortoiseMerge has been broken 
for a long time...

But I wonder: the 'svn diff > patchfile' is used to create patchfiles 
and send them to others. But the created patchfile has *no* indication 
of the renamed file: it only shows the old file with all lines removed.
Which means: if I would rename a file, create a patch and sent this 
patch to someone else, that person would end up with a removed file and 
a missing new file.

I would expect the diff to produce the diff for the 'added' file too.
If I remove the file, then add it again with a new name (*not* a 
rename), then the diff contains the added file as expected.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net

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

Re: svn diff localpath ignores added files

Posted by David Glasser <gl...@davidglasser.net>.
On Dec 6, 2007 11:40 AM, Stefan Küng <to...@gmail.com> wrote:
> Hi,
>
> I don't know when this happened, but with a client built from trunk 'svn
> diff' does not include added files anymore in the resulting diff:
>
> cd wc
> svn revert -R .
> svn mv somefile somefile1
> svn diff > diff.txt
>
> the resulting diff contains only the removed file (an entry with "Index:
> ..." for 'somefile' with all lines removed, but no entry with "Index:
> ..." for 'somefile1' with all lines added.
>
> client build from r28185 of the svn trunk, but I haven't seen any
> changes to the diff part since then, so I assume it works the same with
> HEAD.

Is this a regression? It looks to me like both trunk and 1.4.x show
diffs of copied files against the copy base (not the empty file), and
show no output if the file is not changed.

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

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