Enhance 'failed to find parent' error with relevant diagnostics

It will now tell you which files it looked for, and what the path
setting is.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
create_difference: allow the parent locator to be a relative path

If ~relative_path:true is provided then the absolute parent path will
be converted into one relative to the directory currently containing
the leaf. This matches more closely the behaviour of libvhd.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
test: check that parent locators of the form ../foo.vhd work

This problem was found by XenRT IntelliCache tests. This test
currently fails, because the workaround is only in vhd-tool.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Always search for parents relative to the directory containing the leaf

It is nolonger necessary for clients (such as sparse_dd) to pass in the
dirname of a vhd leaf: we will always interpret ".." "./foo/bar" in a
parent locator as relative to the current directory of the file containing
the locator.

This fixes the broken unit test.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Update CHANGES

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #15 from djs55/relative-paths

Improve handling of relative search paths
test: verify that we can open R/O files

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
test: switch to the "nobody" user so file read/only vs read/write checks work

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
test: if we fail to setuid, emit a warning and continue

Unfortunately we can't seem to setuid(nobody) on travis.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #16 from djs55/relative-paths

Add test for opening files read/only
copying differences: do a better job of identifying identical disks

To decide which blocks to copy, we need to work out which files
are the same on both paths up the vhd tree. Previously we used
string equality on filenames, which doesn't identify "foo" and "./foo"
as being the same. This would result in copying unnecessary blocks.

Instead we use a pair of vhd uuid (within the Footer) and
Filename.basename. The uuid should be enough by itself but I'm not
confident that all vhds will have been created with unique uuids
(for example I believe that qemu-img creates uuids full of zeroes)

Fixes #17

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Update CHANGES

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #18 from djs55/improve-delta-copy

copying differences: do a better job of identifying identical disks