tags:

views:

106

answers:

2

I've never seen that,internally generated?How does it work?

Can check what I meen here: http://issues.apache.org/jira/secure/attachment/12401970/nutch_0.9_OR.patch

search "java~"

and you can see "java.old" there,what's that again?

+2  A: 

Are you sure its generated from some java process? ~ in files typically means a temporary file created by editors, such as vim when you modify something.

yx
no,see my update.
Shore
it looks like they just accidentally left the temporary file in there, and when the patch notes were released, they did a diff on all files to find changes and showed up in there as well. Notice that it had both a Query.java and a Query.java~ and the diff for those two are exactly the same.
yx
and you can see "java.old" there,what's that again?
Shore
same with .old, NutchAnalysis.java and NutchAnalysis.java.old, just a different form of backup with another text editor instead of ~. They should have removed them from the patch but they didn't, not a big deal. Safe to delete those files if you really wanted to.
yx
Thanks,and what is supposed to happen when I apply that patch?I tried,but only files under "src.orig/" are modified,with files under "src/" untouched.
Shore
if you look at the file path of the modified files, they are all in src.orig/java/org/apache... If you renamed your src folder, then you'll have to copy those files over manually. You can safely ignore the ~ and .old files though.
yx
but --- means old file,+++ means new ones,why only old files are modified?
Shore
+5  A: 

It's probably some cruft leftover from emacs. With emacs, whenever you save a file, it saves a backup of the previous version of the file, and the backup is named with the original filename with a tilde appended to it. If this is the case (which you can easily verify by comparing file with file~), then you can safely ignore all of the files named with tildes.

Adam Rosenfield
...also vi leaves those files
victor hugo
But it's included in a patch,how come?
Shore
Like he said, its cruft. It was added to the repository by mistake because whoever made the patch didn't exclude those files.
Soviut