ycaihua / svnx

Automatically exported from code.google.com/p/svnx
1 stars 0 forks source link

FileMerge is not comparing repository copy with working copy. #141

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Clicking on Diff button in Working Copy Panel.

What is the expected output? What do you see instead?
Expected : Should compare with file in working copy
Actual : It is comparing with the file @ path other than working copy(example : 
svn-PMDWkL - /var/folders/5O/5OTEYnP4FcidMzfh52NWOk+++TM/-Tmp-)

What version of the product are you using? On what operating system?
svnX : 1.3
MacOsX : 10.6.8
svn command line client : 1.6.17

Please provide any additional information below.
Earlier it was comparing with corresponding file in working copy. I don't know 
what setting got changed. I observed that saved changes are not getting 
retained in working copy & later i found that FileMerge ware comparing with a 
copy of file which was not there in checked out working copy.

Original issue reported on code.google.com by anand.wa...@gmail.com on 26 Jul 2011 at 11:07

GoogleCodeExporter commented 8 years ago
Apparently in 1.6.17 they’ve quietly changed the names of the temp files 
(again).
[r1096986 
http://svn.apache.org/repos/asf/subversion/branches/1.6.x/subversion/libsvn_subr
/io.c]
This is probably the cause of the problem.

Please try the following & let me know if this fixes the problem:
Line 34 of …/svnX.app/Contents/Resources/svndiff.sh should be:
    tmpFileFlag=`echo "$7" | sed -E 's/.*\/(tempfile|svndiff)(\.[0-9]+)?\.tmp$/1/'`

Change it to:
    tmpFileFlag=`echo "$7" | sed -E 's/.*\/(svn-[[:alnum:]]{6}|(tempfile|svndiff)(\.[0-9]+)?\.tmp)$/1/'`
[Note: the above should be 1 line.]

Also please report the `svn info` (ctrl+I in svnX) for your problem file & the 
diff command that was displayed in
the Activity window as this will help me to reproduce this issue in future.
[You should redact any passwords etc.]

Original comment by chris...@gmail.com on 26 Jul 2011 at 6:04

GoogleCodeExporter commented 8 years ago
I did not get how to report the issue in svnX info window but have replaced the 
line you mentioned & it is working fine now. I suppose this issue will be 
addressed in next version. Thanks you. 

Original comment by anand.wa...@gmail.com on 27 Jul 2011 at 5:31

GoogleCodeExporter commented 8 years ago
> I did not get how to report the issue in svnX info window

* In your svnX WC window right-click the same file that you had problems 
diffing & choose ‘Info’ from the menu.
   (Or select the file & type ctrl+I.)
* Then copy the output displayed & paste it into a new comment message here.
* Then in svnX execute the Diff command on the same file.
* Choose Window > Activity.
* Click the ‘Info’ button.
* Then copy the command displayed & paste it into the same comment message here.
* Redact any passwords.
* Send message.

Thanks for reporting this.
And, yes I’ll probably release a minor update soon.

Original comment by chris...@gmail.com on 27 Jul 2011 at 7:20

GoogleCodeExporter commented 8 years ago
1) This problem was not happening for particular file(it was happening for all 
the files). 

2) I have already made changes in "svnX.app/Contents/Resources/svndiff.sh" as 
you mentioned above & the problem is fixed for all the files.

3) Do you want me to recreate that problem & follow your steps or follow your 
steps for fixed one?

  I suppose it will not solve the purpose if I follow your steps for fixed one.

Original comment by anand.wa...@gmail.com on 28 Jul 2011 at 12:56

GoogleCodeExporter commented 8 years ago
Well Diff only works on modified (text) files.
I don’t see this problem on any files on any WCs.
It’s due to Subversion creating a temp copy of the WC file.
I’m trying to ascertain why/when this happens so that I can duplicate it.
[Are you using Keyword Substitution or automatically end-of-line conversion for 
example?]
So I need the `svn info` & `svn diff` command for a file that exhibits 
(exhibited) the problem in the hope that it may contain a clue.
If you’ve already committed the file then it may not be suitable.
But if you have changed another file & you are (absolutely) sure that it would 
have exhibited the same problem then you can use it.

So, to clarify, the change I gave you does not effect the output of `svn info` 
or `svn diff` command.  But committing a file will.
I would still like the info. It doesn’t matter if you use the original svnX 
1.3 or your modified version,
but you can easily download 1.3 again & use it to determine that problem files 
still exist.

Original comment by chris...@gmail.com on 28 Jul 2011 at 4:34

GoogleCodeExporter commented 8 years ago

*) I have removed svnX from my mac system & downloaded a fresh copy of dmg from 
this site. After modifying a file in WC I was able to reproduce this issue. 
Find the details as below

*) Right-Click on the modified file in WC & clicking on info shows as below
Path: /Users/Me/Desktop/MyProject/Source/Voice/iPad/CTSmileyChooserController.m
Name: CTSmileyChooserController.m
URL: 
http://{DomainName}/svn/ind_abc_iphones/branches/projName_iOS_r3.5_BR/developmen
t/abcOTT_3.0/Source/Mail%20+%20DIgital%20Voice/iPad/CTSmileyChooserController.m
Repository Root: http://{DomainName}/svn/ind_abc_iphones
Repository UUID: 5cc7f7f5-fbeb-4089-8b3a-6ad2e3b318dc
Revision: 7737
Node Kind: file
Schedule: normal
Last Changed Author: myUserName
Last Changed Rev: 7736
Last Changed Date: 2011-07-28 17:55:29 +0530 (Thu, 28 Jul 2011)
Text Last Updated: 2011-07-28 17:47:23 +0530 (Thu, 28 Jul 2011)
Checksum: 08091bbf8ede34bd58b48a9718b630b7

*) Window->Activity->info shows as below
/opt/subversion/bin/svn diff --diff-cmd 
/Applications/svnX.app/Contents/Resources/svndiff.sh --extensions filemerge 
--username myUserName --password myPassword --non-interactive 
/Users/Me/Desktop/MyProject/Source/Voice/iPad/CTSmileyChooserController.m

Original comment by anand.wa...@gmail.com on 29 Jul 2011 at 9:09

GoogleCodeExporter commented 8 years ago
Having scoured the Subversion source code I discovered that it makes a 
temporary copy of a WC file if it has a property such as svn:eol-style=native 
or similar.
So I can reproduce the original problem now.  My fix is good.
Thanks for your help.

Fixed in svnX 1.3.1.

Original comment by chris...@gmail.com on 1 Aug 2011 at 2:46