Last Comment Bug 325805 - diff considers mozilla/security/nss/cmd/pk11util/scripts/pkey a binary file
: diff considers mozilla/security/nss/cmd/pk11util/scripts/pkey a binary file
Status: RESOLVED FIXED
:
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: 3.11
: All All
: -- normal (vote)
: 3.12
Assigned To: Julien Pierre
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-03 15:38 PST by Wan-Teh Chang
Modified: 2007-07-12 15:03 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Wan-Teh Chang 2006-02-03 15:38:24 PST
I found that CVS thinks that mozilla/security/nss/cmd/pk11util/scripts/pkey
is a binary file.  To see this, make a change to the file and then say
cvs diff pkey:

$ cvs diff pkey
Enter passphrase for key '/home/wtchang/.ssh/id_dsa':
Index: pkey
===================================================================
RCS file: /cvsroot/mozilla/security/nss/cmd/pk11util/scripts/pkey,v
retrieving revision 1.2
diff -r1.2 pkey
Binary files /tmp/cvsab08ci and pkey differ
Comment 1 Wan-Teh Chang 2006-02-03 15:41:50 PST
If you open the file 'pkey' in a text editor, you see
some junk characters at the beginning of the file.
Perhaps that's what makes CVS think it's a binary file.
If you do "cvs status pkey", you see that this file
doesn't have the -kb sticky option that a binary file
in CVS should have.
Comment 2 Nelson Bolyard (seldom reads bugmail) 2006-03-28 12:08:30 PST
I believe that it is the diff program, not CVS, that thinks these files are 
binary.  You've already observed that cvs stat doesn not show -kb or -ko 
sticky flags.  I think if you checkout the file, copy it, change the copy,
and then locally diff the original with the modified copy, without using 
CVS, and I think you'll see this same error, at least on some platforms.
Comment 3 Julien Pierre 2007-07-11 21:50:51 PDT
I verified Nelson's assertion in comment 2 .
I also checked that deleting the first few lines with the junk characters allows the diff program to realize it's a text file and not binary.
Those characters also confuse vi.

Bob, what are those characters for ? Should they be deleted ?
Comment 4 Robert Relyea 2007-07-12 09:36:50 PDT
I think it's just corrupted. I may actually be the output of saving a key written on top of a script.

I don't see any of the other scripts using pkey, so wither the bad characters or the whole file can be deleted.

bob
Comment 5 Julien Pierre 2007-07-12 15:02:08 PDT
Thanks, Bob. I removed the whole file.

Removing pkey;
/cvsroot/mozilla/security/nss/cmd/pk11util/scripts/pkey,v  <--  pkey
new revision: delete; previous revision: 1.2
done

Note You need to log in before you can comment on or make changes to this bug.