2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-26 14:56:29 +00:00
Commit Graph

7 Commits

Author SHA1 Message Date
Klaus Post
3804bc7493 Use bigger offset in test to avoid random test failures.
Since Windows cannot to a SIGHUP test to check if a process is live,
the test will fail because the lock isn't detected as stale if a process with
that ID exists. Process IDs are re-used agressively on Windows, so add 500000 makes
the test extremely unlikely (if not impossible) to fail.
2015-08-14 15:19:45 +02:00
Alexander Neumann
5cdcc99eba Use array instead of hash for backend.ID
Since backend.ID is always a slice of constant length, use an array
instead of a slice. Mostly, arrays behave as slices, except that an
array cannot be nil, so use `*backend.ID` insteaf of `backend.ID` in
places where the absence of an ID is possible (e.g. for the Subtree of a
Node, which may not present when the node is a file node).

This change allows to directly use backend.ID as the the key for a map,
so that arbitrary data structures (e.g. a Set implemented as a
map[backend.ID]struct{}) can easily be formed.
2015-07-25 18:01:57 +02:00
Alexander Neumann
781ec903e8 lock: add Refresh method 2015-07-12 21:02:00 +02:00
Alexander Neumann
0f09a7e46e Remove unreliable tests 2015-06-28 16:27:17 +02:00
Alexander Neumann
e657287eac cmd/restic: Add command unlock, improve error message 2015-06-28 13:52:23 +02:00
Alexander Neumann
fba912440d Add lock conflict check 2015-06-28 13:52:22 +02:00
Alexander Neumann
d51fd436b5 Add locking functions 2015-06-28 13:52:22 +02:00