Mercurial Hosting > luan
comparison src/luan/modules/host/Hosting.luan @ 1083:e7fb974e0c26
add Io checksum and use it for push
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 21 Nov 2016 22:48:43 -0700 |
parents | 1a68fc55a80c |
children | bae2d0c2576c |
comparison
equal
deleted
inserted
replaced
1082:ece3567d4df5 | 1083:e7fb974e0c26 |
---|---|
26 tree = host.create(domain,password) | 26 tree = host.create(domain,password) |
27 end | 27 end |
28 | 28 |
29 local function process(there_parent,there,here) | 29 local function process(there_parent,there,here) |
30 if here.is_file() then | 30 if here.is_file() then |
31 if there == nil or there.last_modified < here.last_modified() then | 31 if there == nil or there.checksum ~= here.checksum() then |
32 print("copying "..here.to_string()) | 32 print("copying "..here.to_string()) |
33 host.copy_file(domain,password,there_parent.path,here.name(),here.read_binary()) | 33 host.copy_file(domain,password,there_parent.path,here.name(),here.read_binary()) |
34 end | 34 end |
35 elseif here.is_directory() then | 35 elseif here.is_directory() then |
36 if here.name() == "local" then | 36 if here.name() == "local" then |