You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by N D <ni...@gmail.com> on 2008/09/24 15:59:21 UTC

problem in svn switch on a text file

In my code I have a txt file where i store a version number. This file is
called version.txt

Now if my working copy is from TRUNK, and I switch it to some branch, all
the stuff from the branch is taken into the working copy

properly, with proper message alphabets D, A, U etc. But for the version.txt
file, I get a C, C = Conflict. The file in my working copy is contaminated
something like:

<<<<<<< .mine
rev_num0=======
rev_num1>>>>>>> .r<rev_num1>

and files by the name version.txt.2.r<rev_num1>, version.txt.mine,
version.txt.r<rev_num1> are created in the directory. FRom the testing so
far, such files will not allow me to commit the working copy into svn.

But the above problem does not happen frequently. IT happens sometimes. Has
this anything to do with SVN treating text files as binary files?

Can anyone please help/comment?

Re: problem in svn switch on a text file

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 24, 2008, at 17:28, N D wrote:

> On Wed, Sep 24, 2008 at 9:34 PM, Ryan Schmidt wrote:
>
>> On Sep 24, 2008, at 10:59, N D wrote:
>>
>>> In my code I have a txt file where i store a version number. This  
>>> file is called version.txt
>>>
>>> Now if my working copy is from TRUNK, and I switch it to some  
>>> branch, all the stuff from the branch is taken into the working copy
>>>
>>> properly, with proper message alphabets D, A, U etc. But for the  
>>> version.txt file, I get a C, C = Conflict. The file in my working  
>>> copy is contaminated something like:
>>>
>>> <<<<<<< .mine
>>> rev_num0=======
>>> rev_num1>>>>>>> .r<rev_num1>
>>>
>>> and files by the name version.txt.2.r<rev_num1>,  
>>> version.txt.mine, version.txt.r<rev_num1> are created in the  
>>> directory. FRom the testing so far, such files will not allow me  
>>> to commit the working copy into svn.
>>>
>>> But the above problem does not happen frequently. IT happens  
>>> sometimes. Has this anything to do with SVN treating text files  
>>> as binary files?
>>>
>>> Can anyone please help/comment?
>>
>> A conflict occurred. You had locally changed version.txt, then  
>> switched to a branch where version.txt contained a different  
>> change on the exact same line where you had previously made a  
>> change. You must now resolve the conflict by editing version.txt  
>> and making the file look correct, for whatever your definition of  
>> correct is. Then run "svn resolved version.txt" to tell Subversion  
>> you have resolved the conflict.
>>
>> You can read about conflicts in the book:
>>
>> http://svnbook.red-bean.com/en/1.5/ 
>> svn.tour.cycle.html#svn.tour.cycle.resolve
>
> I do not manually change the version.txt file. the only way it  
> changes is thru the build script that runs. but some times it get  
> conflicted, i do no understand when and how, and why only version.txt
>
> yes, the number is present on the same line

Please reply to all, not just to me, so the discussion can continue  
to take place on the mailing list.

As far as I know, the only way you can have gotten a conflict is for  
you to have had local changes in the file when doing the switch.


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

Re: problem in svn switch on a text file

Posted by Trevor Harmon <tr...@vocaro.com>.
On Sep 24, 2008, at 7:52 PM, David Weintraub wrote:

> if it touches the timestamp, I believe Subversion thinks the file  
> was modified.

No, Subversion does not get fooled by timestamp-only changes. For  
example, running "touch" on a repository file, then doing "svn stat"  
reports no modifications.

Trevor


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

Re: problem in svn switch on a text file

Posted by David Weintraub <qa...@gmail.com>.
On Wed, Sep 24, 2008 at 6:28 PM, N D <ni...@gmail.com> wrote:
> I do not manually change the version.txt file. the only way it changes is
> thru the build script that runs. but some times it get conflicted, i do no
> understand when and how, and why only version.txt
>
> yes, the number is present on the same line

When you run a private build, does that touch the version.txt file? It
might replace the version ID with the same number, but if it touches
the timestamp, I believe Subversion thinks the file was modified.

If you do a switch, and the file has not been changed or touched (that
is no timestamp change), Subversion should simply replace the file
with the version on the branch. Subversion will attempt a merge if it
believes the file has been touched.

Try doing a "svn status" before you do your "svn switch". See if
Subversion thinks the file was modified before you do the switch.

--
David Weintraub
qazwart@gmail.com

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

Fwd: problem in svn switch on a text file

Posted by N D <ni...@gmail.com>.
---------- Forwarded message ----------
From: N D <ni...@gmail.com>
Date: Thu, Sep 25, 2008 at 12:28 AM
Subject: Re: problem in svn switch on a text file
To: Ryan Schmidt <su...@ryandesign.com>


 I do not manually change the version.txt file. the only way it changes is
thru the build script that runs. but some times it get conflicted, i do no
understand when and how, and why only version.txt

yes, the number is present on the same line

  On Wed, Sep 24, 2008 at 9:34 PM, Ryan Schmidt <
subversion-2008c@ryandesign.com> wrote:

>
> On Sep 24, 2008, at 10:59, N D wrote:
>
> In my code I have a txt file where i store a version number. This file is
>> called version.txt
>>
>> Now if my working copy is from TRUNK, and I switch it to some branch, all
>> the stuff from the branch is taken into the working copy
>>
>> properly, with proper message alphabets D, A, U etc. But for the
>> version.txt file, I get a C, C = Conflict. The file in my working copy is
>> contaminated something like:
>>
>> <<<<<<< .mine
>> rev_num0=======
>> rev_num1>>>>>>> .r<rev_num1>
>>
>> and files by the name version.txt.2.r<rev_num1>, version.txt.mine,
>> version.txt.r<rev_num1> are created in the directory. FRom the testing so
>> far, such files will not allow me to commit the working copy into svn.
>>
>> But the above problem does not happen frequently. IT happens sometimes.
>> Has this anything to do with SVN treating text files as binary files?
>>
>> Can anyone please help/comment?
>>
>
> A conflict occurred. You had locally changed version.txt, then switched to
> a branch where version.txt contained a different change on the exact same
> line where you had previously made a change. You must now resolve the
> conflict by editing version.txt and making the file look correct, for
> whatever your definition of correct is. Then run "svn resolved version.txt"
> to tell Subversion you have resolved the conflict.
>
> You can read about conflicts in the book:
>
> http://svnbook.red-bean.com/en/1.5/
> svn.tour.cycle.html#svn.tour.cycle.resolve
>
>
>

Re: problem in svn switch on a text file

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 24, 2008, at 10:59, N D wrote:

> In my code I have a txt file where i store a version number. This  
> file is called version.txt
>
> Now if my working copy is from TRUNK, and I switch it to some  
> branch, all the stuff from the branch is taken into the working copy
>
> properly, with proper message alphabets D, A, U etc. But for the  
> version.txt file, I get a C, C = Conflict. The file in my working  
> copy is contaminated something like:
>
> <<<<<<< .mine
> rev_num0=======
> rev_num1>>>>>>> .r<rev_num1>
>
> and files by the name version.txt.2.r<rev_num1>, version.txt.mine,  
> version.txt.r<rev_num1> are created in the directory. FRom the  
> testing so far, such files will not allow me to commit the working  
> copy into svn.
>
> But the above problem does not happen frequently. IT happens  
> sometimes. Has this anything to do with SVN treating text files as  
> binary files?
>
> Can anyone please help/comment?

A conflict occurred. You had locally changed version.txt, then  
switched to a branch where version.txt contained a different change  
on the exact same line where you had previously made a change. You  
must now resolve the conflict by editing version.txt and making the  
file look correct, for whatever your definition of correct is. Then  
run "svn resolved version.txt" to tell Subversion you have resolved  
the conflict.

You can read about conflicts in the book:

http://svnbook.red-bean.com/en/1.5/ 
svn.tour.cycle.html#svn.tour.cycle.resolve



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