From 54a69a5df4195988711bd20e816d3108a181fa35 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 24 Feb 2020 07:45:33 -0700 Subject: add .build to .gitignore Signed-off-by: Sean Whitton --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d42646b..31b1bfa 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /Git-Annex-* +/.build -- cgit v1.2.3 From f1b9bcc7e22c710c7bccf0baa08057cdbd53491b Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 10 Mar 2020 12:00:49 -0700 Subject: annex-to-annex: Fix path when looking for missing files Signed-off-by: Sean Whitton --- Changes | 2 ++ lib/App/annex_to_annex.pm | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 4eec01b..5b10f77 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for Git::Annex {{$NEXT}} + - annex-to-annex: Fix path passed to git-annex-find(1) when + looking for missing files. 0.002 2020-02-24 07:33:02-07:00 America/Phoenix - Fix logic in an example in Git::Annex::BatchCommand SYNOPSIS. diff --git a/lib/App/annex_to_annex.pm b/lib/App/annex_to_annex.pm index d68cc4a..cd054cc 100644 --- a/lib/App/annex_to_annex.pm +++ b/lib/App/annex_to_annex.pm @@ -109,9 +109,9 @@ sub main { #>>> } - my $base = basename $source; my @missing - = $annex->annex->find("--not", "--in", "here", $base); + = $annex->annex->find("--not", "--in", "here", + abs2rel $source, $annex->toplevel); if (@missing) { say "Following annexed files are not present in this repo:"; say for @missing; -- cgit v1.2.3 From cb1ecb856ab48bbc29a3ad7f2f41f665dd54d592 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 10 Mar 2020 13:09:43 -0700 Subject: fix some more paths, passed to --batch commands Signed-off-by: Sean Whitton --- Changes | 6 ++++++ lib/App/annex_to_annex.pm | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 5b10f77..ffb86d5 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,12 @@ Revision history for Git::Annex {{$NEXT}} - annex-to-annex: Fix path passed to git-annex-find(1) when looking for missing files. + - annex-to-annex: Fix path passed to git-annex-lookupkey(1) when + determining whether source files are annexed. + - annex-to-annex: Pass relative path to git-annex-find(1) when + determining if a file was unlocked in the source annex. + Workaround for bug in git-annex: git-annex-find(1) returns + incorrect response for absolute paths when in --batch mode. 0.002 2020-02-24 07:33:02-07:00 America/Phoenix - Fix logic in an example in Git::Annex::BatchCommand SYNOPSIS. diff --git a/lib/App/annex_to_annex.pm b/lib/App/annex_to_annex.pm index cd054cc..af4346b 100644 --- a/lib/App/annex_to_annex.pm +++ b/lib/App/annex_to_annex.pm @@ -130,7 +130,7 @@ sub main { die "$target already exists!\n" if -e $target and !-d $target; - my $key = $lk->ask($rel); + my $key = $lk->ask($File::Find::name); if ($key) { # this is an annexed file my $content = rel2abs $cl->ask($key), $annex->toplevel; my $content_device_id = (stat $content)[0]; @@ -147,7 +147,8 @@ sub main { # to the source, or anything like that system "git", "-C", $dest, "annex", "add", $rel; system "git", "-C", $dest, "annex", "unlock", $rel - if $find->ask($rel); + if $find->ask(abs2rel $File::Find::name, + $annex->toplevel); # if using the default backend, quick sanity check if ($key =~ /^SHA256E-s[0-9]+--([0-9a-f]+)/) { -- cgit v1.2.3 From 44fe39bc870dddb47b5a3241b3d6940c5ba61114 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 11 Mar 2020 14:34:51 -0700 Subject: bump version Signed-off-by: Sean Whitton --- dist.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist.ini b/dist.ini index 5d4923d..a85f87c 100644 --- a/dist.ini +++ b/dist.ini @@ -4,7 +4,7 @@ license = GPL_3 copyright_holder = Sean Whitton copyright_year = 2019-2020 -version = 0.002 +version = 0.003 [PkgVersion] [PodWeaver] -- cgit v1.2.3 From da45800bee048182963e444a62413c5f4db2b773 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 11 Mar 2020 14:37:03 -0700 Subject: v0.003 - annex-to-annex: Fix path passed to git-annex-find(1) when looking for missing files. - annex-to-annex: Fix path passed to git-annex-lookupkey(1) when determining whether source files are annexed. - annex-to-annex: Pass relative path to git-annex-find(1) when determining if a file was unlocked in the source annex. Workaround for bug in git-annex: git-annex-find(1) returns incorrect response for absolute paths when in --batch mode. Signed-off-by: Sean Whitton --- Changes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changes b/Changes index ffb86d5..7d72e95 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for Git::Annex {{$NEXT}} + +0.003 2020-03-11 14:35:04-07:00 America/Phoenix - annex-to-annex: Fix path passed to git-annex-find(1) when looking for missing files. - annex-to-annex: Fix path passed to git-annex-lookupkey(1) when -- cgit v1.2.3