[ILUG] Subversion not seeing working copy changes
Éibhear
eibhear.geo at gmail.com
Thu Oct 22 15:35:48 IST 2009
Hi Sean,
Your problem is in your find command:
find . -type f...
will find *all* files, including all the files in the .svn directories.
The sed command will be executed on both the working copy files, and the
meta-data versions that subversion keeps for local comparison purposes.
Therefore, svn doesn't see that the files have changed, as the "backups"
it maintains are changed in exactly the same way.
You'll need to exclude all files in all .svn directories from your find
command. Off the top of my head, I don't know how you'd do that.
One possibility is:
find . -type f -print | grep -v '\.svn' | \
xargs sed -i 's/FILE1.h/FILE2.h/g'
though I haven't tested this.
Éibhear
Sean Ryan wrote:
> Kevin,
> Apologies - time stamp does seem to be updated - that I'm afraid was
> hypothesis on my part.
>
> Even though the content of the file has changed - subversion is not seeing
> that the file has been modified.
>
> Hmm - guess I'll take it to the svn list.
>
> Thanks again,
> Sean
>
>
> On 21/10/2009 21:33, "Kevin Lyda" <kevin at ie.suberic.net> wrote:
>
>> On Wed, Oct 21, 2009 at 5:40 PM, Sean Ryan <sryan at iel.ie> wrote:
>>> find . -type f -exec sed -i 's/FILE1.h/FILE2.h/g' {} \;
>>>
>>> Now this seems to work just fine all files are updated, but the last
>>> modification time is not changed.
>>
>> Really? Are you sure sed changed the files? I just did:
>>
>> : lyda at parsley on pts/21 ; echo moo > foo
>> : ok ; : Wed 21 21:28 ; cd ~
>> : lyda at parsley on pts/21 ; touch -r /etc/profile foo
>> : ok ; : Wed 21 21:28 ; cd ~
>> : lyda at parsley on pts/21 ; ls -l foo
>> -rw-r----- 1 lyda lyda 4 Mar 10 2009 foo
>> : ok ; : Wed 21 21:28 ; cd ~
>> : lyda at parsley on pts/21 ; sed -i -e s/moo/boo/ foo
>> : ok ; : Wed 21 21:28 ; cd ~
>> : lyda at parsley on pts/21 ; ls -l foo
>> -rw-r----- 1 lyda lyda 4 Oct 21 21:28 foo
>>
>> Even in the case where nothing changes, the timestamp is changed.
>>
>> Kevin
>
>
>
>
--
Éibhear Ó hAnluain
Gibiris.org
Dublin
Ireland
More information about the ILUG
mailing list