Skip to content

Commit bb2fa1c

Browse files
committed
update
1 parent 3a10cbe commit bb2fa1c

File tree

10 files changed

+577
-66
lines changed

10 files changed

+577
-66
lines changed

demo/quickstart/release/2014072100004/base-2014072100004.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/quickstart/release/2014072100004/page/p1-2014072100004.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
define("p2",[],function(){console.log("p2 ok!"),document.write("p2 ok lcs!</br>")});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
define("p3",[],function(){console.log("p3 ok!"),document.write("p3 ok!</br>")});

demo/quickstart/test.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
serverDomain: 'http://localhost:6600',
4444
buildType: 'project',
4545
//ver:'2014052900062'
46-
ver: '2014053000003'
46+
ver: '2014072100004'
4747
//ver: '2014053000002'
4848
//ver: '2014051200050'
4949
};

java/src/com/storeinc/DiffUtil.java java/src/com/storeinc/ChunkDiff.java

+10-6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.io.BufferedReader;
44

5+
6+
57
import java.io.File;
68
import java.io.FileInputStream;
79
import java.io.InputStreamReader;
@@ -16,7 +18,7 @@
1618
/**
1719
* @author waynelu 计算两个文件之间的增量,并返回增量文件
1820
*/
19-
public class DiffUtil {
21+
public class ChunkDiff {
2022
class DiffItem {
2123
private boolean isMatch;
2224
private String data;
@@ -204,6 +206,7 @@ else if (matchTrunkIndex >= 0) {
204206

205207
public JSONObject makeIncDataFile(String oldFile, String newFile,
206208
int chunkSize) {
209+
//System.out.println("new chunkDiff");
207210
JSONObject resultFile = new JSONObject();
208211
resultFile.put("modify", true);
209212
// resultFile.modify=true;
@@ -295,6 +298,7 @@ public String readFile(String file, String encode) {
295298
while ((rLine = bfin.readLine()) != null) {
296299
strBuffer.append(rLine);
297300
}
301+
bfin.close();
298302
} catch (Exception ex) {
299303

300304
}
@@ -311,7 +315,7 @@ public JSONObject makeIncDataFromFile(String oldFile, String newFile,
311315

312316
}
313317

314-
public DiffUtil() {
318+
public ChunkDiff() {
315319
// TODO Auto-generated constructor stub
316320
}
317321

@@ -320,12 +324,12 @@ public DiffUtil() {
320324
*/
321325
public static void main(String[] args) {
322326
// TODO Auto-generated method stub
323-
DiffUtil dUtil = new DiffUtil();
327+
ChunkDiff dUtil = new ChunkDiff();
324328
JSONObject json = dUtil
325329
.makeIncDataFromFile(
326-
"/Users/waynelu/storeinc/demo/static/hello/dist/1.0.6/main-1.0.6.js",
327-
"/Users/waynelu/storeinc/demo/static/hello/dist/1.0.7/main-1.0.7.js",
328-
12);
330+
"/Users/waynelu/nginxhtmls/jetty/webapps/mtwebapp/release/2014071500017/base-2014071500017.js",
331+
"/Users/waynelu/nginxhtmls/jetty/webapps/mtwebapp/release/2014071500016/base-2014071500016.js",
332+
12);
329333
System.out.println(json.toJSONString());
330334
}
331335

0 commit comments

Comments
 (0)