You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Max <ip...@gmail.com> on 2010/03/12 14:03:47 UTC

svn diff ignores externals

Hi,

I have a repository with a structure which mixes some normal and external  
repositories as follows

- code_dir
|
`- src_dir
  |
  `- external_1
  |
  `- dir_1
  |
  `- external_2

where code_dir, src_dir and dir_1 are located on a repository under my 
control, while external_1 and external_2 are defined by means svn:externals 
keywords.

I have noticed that old svn versions were able to track down modified files 
both in dir_1 and external_* directories. The last version (I am running 
1.6.9) completely ignores external_1 and external_2 and give a list of 
modified files located in dir_1 only. If I run "svn diff 
code_dir/src_dir/external_1" I am able to see the list of modified files in 
that directory too, of course.

I know I am missing something trivial, but what? I have not found any hint in 
the svn book...

Thanks in advance for your help,
Max

Re: svn diff ignores externals

Posted by Max <ip...@gmail.com>.
Hi Stefan,

thank you very much for your explanations. Actually, I am not complaining 
about what default behavior should be - either the recursive or not recursive 
one would be to me perfectly valid. Unfortunately, svn diff is not able to 
recursively follow externals, as it does not accept the option -R

svn diff -R
Subcommand 'diff' doesn't accept option '-R [--recursive]'

so I have not any option to check all dirs at once (sigh)

So, as you have suggested, I am going to file an enhancement request, it may 
be someone will take up the challenge ;) I will be also willing to test the 
modification once it will be implemented!

Have a nice day,
Max

On Saturday 13 March 2010, Stefan Sperling wrote:
>  On Sat, Mar 13, 2010 at 12:19:03PM +0100, iprmaster wrote:
>  > Hi Neels,
>  >
>  > thank you for your answer, but I can confirm that other commands
>  > (i.e. svn update) do step into external folders, even in the latest
>  > version ;)
>  >
>  > Does anyone else have any suggestion?
>  
>  Some commands step into externals, and some don't.
>  E.g. commit certainly does *not* recurse into externals by default.
>  
>  I don't know what the plan was for 'svn diff' wrt externals.
>  It happens to not recurse, but I'm not sure if this was a concious
>  decision or not. Skimming the code (in libsvn_wc/diff.c) for 5 minutes
>  does not really turn up an answer. It probably just happened to behave
>  the way it does now, and nobody ever questioned this behaviour (until
>  you showed up :)
>  
>  If you really care a lot about this, please file an issue asking
>  for an enhancement such that svn diff shows modifications to externals
>  by default, but does not if --ignore-externals is specified.
>  
>  But there really is no reason for defaulting to one way or the other,
>  either use case is perfectly valid. Though having to list all externals
>  explicitly to have them included in the diff is probably less easy than
>  specifying --ignore-externals if you don't want to see modifications
>  made to externals in the diff. Not sure.
>  
>  Stefan
>  

Re: svn diff ignores externals

Posted by Stefan Sperling <st...@elego.de>.
On Sat, Mar 13, 2010 at 12:19:03PM +0100, iprmaster wrote:
> Hi Neels,
> 
> thank you for your answer, but I can confirm that other commands
> (i.e. svn update) do step into external folders, even in the latest
> version ;) 
> 
> Does anyone else have any suggestion?

Some commands step into externals, and some don't.
E.g. commit certainly does *not* recurse into externals by default.

I don't know what the plan was for 'svn diff' wrt externals.
It happens to not recurse, but I'm not sure if this was a concious
decision or not. Skimming the code (in libsvn_wc/diff.c) for 5 minutes
does not really turn up an answer. It probably just happened to behave
the way it does now, and nobody ever questioned this behaviour (until
you showed up :)

If you really care a lot about this, please file an issue asking
for an enhancement such that svn diff shows modifications to externals
by default, but does not if --ignore-externals is specified.

But there really is no reason for defaulting to one way or the other,
either use case is perfectly valid. Though having to list all externals
explicitly to have them included in the diff is probably less easy than
specifying --ignore-externals if you don't want to see modifications
made to externals in the diff. Not sure.

Stefan

Re: svn diff ignores externals

Posted by iprmaster <ip...@gmail.com>.
Hi Neels,

thank you for your answer, but I can confirm that other commands
(i.e. svn update) do step into external folders, even in the latest
version ;) 

Does anyone else have any suggestion?

Thanks a lot,
Max

On Fri, 12 Mar 2010 17:50:21 +0100
neels <ne...@gmail.com> wrote:

> On 12 March 2010 15:03, Max <ip...@gmail.com> wrote:
> > Hi,
> >
> > I have a repository with a structure which mixes some normal and
> > external repositories as follows
> >
> > - code_dir
> > |
> > `- src_dir
> >  |
> >  `- external_1
> >  |
> >  `- dir_1
> >  |
> >  `- external_2
> >
> > where code_dir, src_dir and dir_1 are located on a repository under
> > my control, while external_1 and external_2 are defined by means
> > svn:externals keywords.
> >
> > I have noticed that old svn versions were able to track down
> > modified files both in dir_1 and external_* directories. The last
> > version (I am running
> 
> AFAIK subversion never stepped into externals folders, did it? If you
> want an svn command to run in the externals folder, you have to step
> into it (or supply it on the cmdline explicitly)
> 
> ~Neels
> 
> > 1.6.9) completely ignores external_1 and external_2 and give a list
> > of modified files located in dir_1 only. If I run "svn diff
> > code_dir/src_dir/external_1" I am able to see the list of modified
> > files in that directory too, of course.
> >
> > I know I am missing something trivial, but what? I have not found
> > any hint in the svn book...
> >
> > Thanks in advance for your help,
> > Max
> >

Re: svn diff ignores externals

Posted by neels <ne...@gmail.com>.
On 12 March 2010 15:03, Max <ip...@gmail.com> wrote:
> Hi,
>
> I have a repository with a structure which mixes some normal and external
> repositories as follows
>
> - code_dir
> |
> `- src_dir
>  |
>  `- external_1
>  |
>  `- dir_1
>  |
>  `- external_2
>
> where code_dir, src_dir and dir_1 are located on a repository under my
> control, while external_1 and external_2 are defined by means svn:externals
> keywords.
>
> I have noticed that old svn versions were able to track down modified files
> both in dir_1 and external_* directories. The last version (I am running

AFAIK subversion never stepped into externals folders, did it? If you
want an svn command to run in the externals folder, you have to step
into it (or supply it on the cmdline explicitly)

~Neels

> 1.6.9) completely ignores external_1 and external_2 and give a list of
> modified files located in dir_1 only. If I run "svn diff
> code_dir/src_dir/external_1" I am able to see the list of modified files in
> that directory too, of course.
>
> I know I am missing something trivial, but what? I have not found any hint in
> the svn book...
>
> Thanks in advance for your help,
> Max
>