You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Khang K Tran <kh...@schmingle.com> on 2007/08/20 19:19:49 UTC

svn diff with externals

hello all,

this is my first post so apologies if i'm not following etiquette or
anything (feel free to correct me at any time).

anyway, my question has to do with using svn diff (v1.4.3) in the presence
of externally linked files.  here's an example of my repo:

- trunk
    - core
    - modules
- branches
    - test1
        - core (svn:externals points to trunk's core folder)
        - modules

let's say i check out test1 and make a change to the file foo.c in core.
from the top of my sandbox, i type "svn diff core/foo.c" and i can see the
diff, everything's fine.  however, if i just type "svn diff" without
specifying foo.c (that is, i'm relying on the default recursive behavior),
then nothing shows up.  it ignores the diff in the core folder completely.
this seems to only be the case with external files because diffs in the
branch-local modules folder show up fine in both uses of svn diff.

any ideas?  is this known behavior?  i wasn't able to find anything on this
in the issues mailing list.

thanks in advance for your help!

best,
khang


-- 

khang k tran

Re: svn diff with externals

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 21, 2007, at 01:50, Khang K Tran wrote:

> On 8/20/07, Ryan Schmidt wrote:
>
>> On Aug 20, 2007, at 14:19, Khang K Tran wrote:
>>
>> > my question has to do with using svn diff ( v1.4.3) in the presence
>> > of externally linked files.  here's an example of my repo:
>> >
>> > - trunk
>> >     - core
>> >     - modules
>> > - branches
>> >     - test1
>> >         - core (svn:externals points to trunk's core folder)
>> >         - modules
>> >
>> > let's say i check out test1 and make a change to the file foo.c in
>> > core.  from the top of my sandbox, i type "svn diff core/foo.c" and
>> > i can see the diff, everything's fine.  however, if i just type
>> > "svn diff" without specifying foo.c (that is, i'm relying on the
>> > default recursive behavior), then nothing shows up.  it ignores the
>> > diff in the core folder completely.  this seems to only be the case
>> > with external files because diffs in the branch-local modules
>> > folder show up fine in both uses of svn diff.
>> >
>> > any ideas?  is this known behavior?  i wasn't able to find anything
>> > on this in the issues mailing list.
>>
>> The behavior is expected. If you have changes in the external
>> directory, you must commit them in the external directory. If you
>> have changes outside of the main working copy, you must commit them
>> there. If you have changes in both places, you must commit twice.
>>
>> See the book:
>>
>> http://svnbook.red-bean.com/en/1.4/svn.advanced.externals.html
>>
>> "The support that exists for externals definitions in Subversion is
>> less than ideal, though. ... [T]he working copies created via the
>> externals definition support are still disconnected from the primary
>> working copy (on whose versioned directories the svn:externals
>> property was actually set). And Subversion still only truly operates
>> on non-disjoint working copies. So, for example, if you want to
>> commit changes that you've made in one or more of those external
>> working copies, you must run svn commit explicitly on those working
>> copies—committing on the primary working copy will not recurse into
>> any external ones."
>
> so, is there any way to coerce svn into working that way? ;-)

I think you would need to fix these bugs:

http://subversion.tigris.org/issues/show_bug.cgi?id=1167

http://subversion.tigris.org/issues/show_bug.cgi?id=2793

Related:

http://subversion.tigris.org/issues/show_bug.cgi?id=2325


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


Re: svn diff with externals

Posted by Khang K Tran <kh...@schmingle.com>.
so, is there any way to coerce svn into working that way? ;-)


On 8/20/07, Ryan Schmidt <su...@ryandesign.com> wrote:
>
> On Aug 20, 2007, at 14:19, Khang K Tran wrote:
>
> > my question has to do with using svn diff (v1.4.3) in the presence
> > of externally linked files.  here's an example of my repo:
> >
> > - trunk
> >     - core
> >     - modules
> > - branches
> >     - test1
> >         - core (svn:externals points to trunk's core folder)
> >         - modules
> >
> > let's say i check out test1 and make a change to the file foo.c in
> > core.  from the top of my sandbox, i type "svn diff core/foo.c" and
> > i can see the diff, everything's fine.  however, if i just type
> > "svn diff" without specifying foo.c (that is, i'm relying on the
> > default recursive behavior), then nothing shows up.  it ignores the
> > diff in the core folder completely.  this seems to only be the case
> > with external files because diffs in the branch-local modules
> > folder show up fine in both uses of svn diff.
> >
> > any ideas?  is this known behavior?  i wasn't able to find anything
> > on this in the issues mailing list.
>
> The behavior is expected. If you have changes in the external
> directory, you must commit them in the external directory. If you
> have changes outside of the main working copy, you must commit them
> there. If you have changes in both places, you must commit twice.
>
> See the book:
>
> http://svnbook.red-bean.com/en/1.4/svn.advanced.externals.html
>
> "The support that exists for externals definitions in Subversion is
> less than ideal, though. ... [T]he working copies created via the
> externals definition support are still disconnected from the primary
> working copy (on whose versioned directories the svn:externals
> property was actually set). And Subversion still only truly operates
> on non-disjoint working copies. So, for example, if you want to
> commit changes that you've made in one or more of those external
> working copies, you must run svn commit explicitly on those working
> copies—committing on the primary working copy will not recurse into
> any external ones."
>
>
>


-- 

khang k tran

Re: svn diff with externals

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 20, 2007, at 14:19, Khang K Tran wrote:

> my question has to do with using svn diff (v1.4.3) in the presence  
> of externally linked files.  here's an example of my repo:
>
> - trunk
>     - core
>     - modules
> - branches
>     - test1
>         - core (svn:externals points to trunk's core folder)
>         - modules
>
> let's say i check out test1 and make a change to the file foo.c in  
> core.  from the top of my sandbox, i type "svn diff core/foo.c" and  
> i can see the diff, everything's fine.  however, if i just type  
> "svn diff" without specifying foo.c (that is, i'm relying on the  
> default recursive behavior), then nothing shows up.  it ignores the  
> diff in the core folder completely.  this seems to only be the case  
> with external files because diffs in the branch-local modules  
> folder show up fine in both uses of svn diff.
>
> any ideas?  is this known behavior?  i wasn't able to find anything  
> on this in the issues mailing list.

The behavior is expected. If you have changes in the external  
directory, you must commit them in the external directory. If you  
have changes outside of the main working copy, you must commit them  
there. If you have changes in both places, you must commit twice.

See the book:

http://svnbook.red-bean.com/en/1.4/svn.advanced.externals.html

"The support that exists for externals definitions in Subversion is  
less than ideal, though. ... [T]he working copies created via the  
externals definition support are still disconnected from the primary  
working copy (on whose versioned directories the svn:externals   
property was actually set). And Subversion still only truly operates  
on non-disjoint working copies. So, for example, if you want to  
commit changes that you've made in one or more of those external  
working copies, you must run svn commit explicitly on those working  
copies—committing on the primary working copy will not recurse into  
any external ones."


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