Merge branch 'master' of ssh://git-annex.branchable.com

This commit is contained in:
Joey Hess 2013-06-14 11:53:59 -04:00
commit fe53456c1d
6 changed files with 333 additions and 0 deletions

View file

@ -0,0 +1,35 @@
### Please describe the problem.
I am receiving a weird error when trying to add a file into a git annex repo on Android. I can't explain how it got into this state, and I can't figure out how to fix it.
### What steps will reproduce the problem?
See the output below - I'm happy to run any debugging commands that are required.
### What version of git-annex are you using? On what operating system?
ASUS Transformer Infinity Android Tablet, Android 4.2.1.
[[!format sh """
git-annex version: 4.20130601-g7483ca4
build flags: Assistant Webapp Testsuite S3 WebDAV Inotify XMPP DNS
local repository version: 3
default repository version: 3
supported repository versions: 3 4
upgrade supported from repository versions: 0 1 2
"""]]
### Please provide any additional information below.
[[!format sh """
u0_a141@android:/sdcard/git-annex.home/Documents $ git annex add Music/MobileSheets/The\ New\ Real\ Book\ 1/New\ Real\ Book\ 1\ Eb_19.pdf
add Music/MobileSheets/The New Real Book 1/New Real Book 1 Eb_19.pdf (checksum...) unknown option -- reflink=auto
git-annex: /storage/emulated/legacy/git-annex.home/Documents/.git/annex/tmp/New Real Book 1 Eb15137.pdf: rename: does not exist (No such file or directory)
failed
git-annex: add: 1 failed
1|u0_a141@android:/sdcard/git-annex.home/Documents $ ls -la .git/annex/tmp/
drwxrwxr-x 2 root sdcard_r 4096 Jun 14 13:42 .
drwxrwxr-x 6 root sdcard_r 4096 Jun 14 13:35 ..
u0_a141@android:/sdcard/git-annex.home/Documents $
"""]]

View file

@ -0,0 +1,248 @@
### Please describe the problem.
Using the windows port of git annex, I'm unable to directly access files that are retrieved from a remote ssh repository. Instead, the file contains a reference to ../.git/annex/objects....
**Update** This appears to be a problem with remote bare repositories only. I was able to get from a remote regular git repository without the stand-in symlinks. The stand-in symlink file gets replaced with the real content on "get" using a non-base repository.
### What steps will reproduce the problem?
[[!format sh """
** on ssh server **
git init --bare annex.git
cd annex.git
git annex init origin
** on windows laptop - add content main repository **
git init annex
cd annex
git annex init laptop
git remote add origin ssh://xxxxx/~/annex.git
echo hello > foo.txt
git annex add .
git commit -m "done"
git annex sync
git annex copy --to origin
git annex sync
git annex whereis foo.txt
** on windows laptop - backup repository **
cd ..
git init annex.backup
cd annex.backup
git annex init "backup"
git remote add origin ssh://joebo@xxxxx.com/~/annex.git
git fetch origin
git merge origin/synced/master
git annex sync
git annex get .
find . | xargs grep hello
./.git/annex/objects/d91/b11/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc7
163af34d08286a2e846f6be03.txt/SHA256E-s6--5891b5b522d5df086d0ff0b110fbd9d21bb4fc
7163af34d08286a2e846f6be03.txt:hello
** updating the file from windows laptop **
cd ..\annex
echo hello2 > foo.txt
git annex add .
git commit -m "updated"
git annex sync
git annex copy --to origin
git annex sync
cd ..\annex.backup
git fetch origin
git merge origin/synced/master
get annex sync
git annex get .
find . | xargs grep hello2
./.git/annex/objects/7ed/895/SHA256E-s9--3f70947299d2926028fd0107c4309e65ca33a9a
e0175fc4bc57792ca17240d18.txt/SHA256E-s9--3f70947299d2926028fd0107c4309e65ca33a9
ae0175fc4bc57792ca17240d18.txt:hello2
"""]]
### What version of git-annex are you using? On what operating system?
git-annex version: 4.20130601-gc01f842
build flags: Pairing Testsuite S3 WebDAV DNS
local repository version: 4
default repository version: 3
supported repository versions: 3 4
upgrade supported from repository versions: 2
### Please provide any additional information below.
[[!format sh """
# If you can, paste a complete transcript of the problem occurring here.
# If the problem is with the git-annex assistant, paste in .git/annex/daemon.log
joebo@joebo:~$ sudo rm -rf annex.git
joebo@joebo:~$ git init --bare annex.git
Initialized empty Git repository in /home/joebo/annex.git/
joebo@joebo:~$ cd annex.git
joebo@joebo:~/annex.git$ git annex init origin
init origin ok
C:\Users\joebo>cd annex
C:\Users\joebo\annex>git annex init laptop
init laptop
Detected a crippled filesystem.
Enabling direct mode.
Detected a filesystem without fifo support.
Disabling ssh connection caching.
ok
(Recording state in git...)
C:\Users\joebo\annex>
C:\Users\joebo\annex>git remote add origin ssh://joebo@xxxxx.com/~
cho hello > foo.txt
C:\Users\joebo\annex>git annex add .
add foo.txt (checksum...) ok
(Recording state in git...)
C:\Users\joebo\annex>git commit -m "done"
[master (root-commit) 7f54efa] done
1 file changed, 1 insertion(+)
create mode 120000 foo.txt
C:\Users\joebo\annex>git annex sync
commit
ok
pull origin
warning: no common commits
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 5 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (5/5), done.
From ssh://xxxxx.com/~/annex
* [new branch] git-annex -> origin/git-annex
ok
(merging origin/git-annex into git-annex...)
(Recording state in git...)
push origin
Counting objects: 18, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (16/16), 1.48 KiB, done.
Total 16 (delta 1), reused 0 (delta 0)
To ssh://joebo@xxxxx.com/~/annex.git
* [new branch] git-annex -> synced/git-annex
* [new branch] master -> synced/master
ok
C:\Users\joebo\annex>git annex copy --to origin
copy foo.txt (checking origin...) (to origin...)
foo.txt
0 100% 0.00kB/s 0:00:00 (xfer#1, to-check=0/1)
sent 67 bytes received 31 bytes 65.33 bytes/sec
total size is 0 speedup is 0.00
ok
(Recording state in git...)
C:\Users\joebo\annex>git annex sync
commit
ok
pull origin
ok
push origin
Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 446 bytes, done.
Total 5 (delta 1), reused 0 (delta 0)
To ssh://joebo@xxxxx.com/~/annex.git
ed1a701..c4c9cd0 git-annex -> synced/git-annex
ok
C:\Users\joebo\annex>git annex whereis foo.txt
whereis foo.txt (2 copies)
03573d86-d460-11e2-8500-ebab2910b225 -- origin
3b6b60fb-0979-4869-98de-38208182ab92 -- here (laptop)
ok
C:\Users\joebo\annex>cd ..
C:\Users\joebo>git init annex.backup
Initialized empty Git repository in C:/Users/joebo/annex.backup/.git/
C:\Users\joebo>cd annex.backup
C:\Users\joebo\annex.backup>git annex init "backup"
init backup
Detected a crippled filesystem.
Enabling direct mode.
Detected a filesystem without fifo support.
Disabling ssh connection caching.
ok
(Recording state in git...)
C:\Users\joebo\annex.backup>git remote add origin ssh://joebo@xxxxx.com/~/anne
x.git
C:\Users\joebo\annex.backup>git fetch origin
warning: no common commits
remote: Counting objects: 25, done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 25 (delta 4), reused 0 (delta 0)
Unpacking objects: 100% (25/25), done.
From ssh://xxxxx.com/~/annex
* [new branch] git-annex -> origin/git-annex
* [new branch] synced/git-annex -> origin/synced/git-annex
* [new branch] synced/master -> origin/synced/master
C:\Users\joebo\annex.backup>git merge origin/synced/master
C:\Users\joebo\annex.backup>git annex sync
(merging origin/git-annex origin/synced/git-annex into git-annex...)
(Recording state in git...)
commit
ok
pull origin
ok
push origin
Counting objects: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (8/8), 818 bytes, done.
Total 8 (delta 2), reused 0 (delta 0)
To ssh://joebo@xxxxx.com/~/annex.git
c4c9cd0..f403560 git-annex -> synced/git-annex
ok
C:\Users\joebo\annex.backup>git annex get .
get foo.txt (from origin...)
SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.txt
0 100% 0.00kB/s 0:00:00 (xfer#1, to-check=0/1)
sent 30 bytes received 145 bytes 116.67 bytes/sec
total size is 0 speedup is 0.00
ok
(Recording state in git...)
C:\Users\joebo\annex.backup>cat foo.txt
.git/annex/objects/fW/Gk/SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e4649
b934ca495991b7852b855.txt/SHA256E-s0--e3b0c44298fc1c149afbf4c8996fb92427ae41e464
9b934ca495991b7852b855.txt
C:\Users\joebo\annex.backup>ls
foo.txt
# End of transcript or log.
"""]]

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="https://www.google.com/accounts/o8/id?id=AItOawmhfodZquCI_EEl-f3h7HkROTszlsQL6yA"
nickname="Joe"
subject="Closed - not a bug"
date="2013-06-14T13:23:24Z"
content="""
It was a user error. I needed to have git-shell in my path. I had added it to the end of .bashrc and it needed to be before the part that returned if not interactive: http://stackoverflow.com/questions/940533/how-do-i-set-path-such-that-ssh-userhost-command-works
"""]]

View file

@ -0,0 +1,20 @@
[[!comment format=mdwn
username="http://joeyh.name/"
nickname="joey"
subject="comment 2"
date="2013-06-14T15:40:04Z"
content="""
Your transcript shows `git annex get` apparently receiving the file. I don't see how that could possibly have worked if git-annex-shell were not in the path on the server, since that is the command it runs to send the file. Also, `git annex copy` is earlier used to send the file to origin, which again should not work if git-annex-shell was not in the path. I think this whole git-annex-shell not in path thing is a red herring.
What actually appears to be going on is this:
1. You create a new empty repository. Since this is Windows, it's forced into direct mode.
2. You manually merge origin/synced/master into this repository. Bypassing `git annex sync` in this way means that direct mode mappings are not updated for the files contained in that branch.
3. You run `git annex get` on a file from that branch. The file is retrieved. Since no direct mode mapping exists for the object it just retrieved, it stashes it in .git/annex/objects and the file is left with the fake symlink git uses on windows.
The manual merge in step 2 is the cause of the problem. The [[direct_mode]] documentation advises against using git commands that update the repository tree because it can lead to this kind of problem (as well as more serious data loss).
Of course, you had no choice but to merge from origin/synced/master, because git annex sync didn't push to origin/master, so simply cloning the bare repository wouldn't work. However, I did fix that a few days ago.
I see this as more evidence of there needing to be a [[todo/direct_mode_guard]] to block users from running unsafe git commands in direct mode repositories. This bug probably can be closed, assuming I correctly understand what happened.
"""]]

View file

@ -0,0 +1,21 @@
[[!comment format=mdwn
username="https://www.google.com/accounts/o8/id?id=AItOawkDb5BRI8VzliQuKRVM7NwMdudvxiUNPHI"
nickname="Richard"
subject="git annex add on Win7 NTFS"
date="2013-06-14T09:26:24Z"
content="""
Hello I took latest build from download #243.
running in CMD or in GIT bash as admin user.
git annex add, fails on all files.
Example:
add IS Breast/Changing IP Address of The Server/flowplayer-3.2.4.min.js (checksum...)
git-annex: C:\development storage\.git\annex\objects\e4b\168\SHA256E-s15723--f6950
bd995674741c600d0465a333f5491d5713e8ac2e3fc57d61cccadba522d.min.js\SHA256E-s15723--f6950bd995674741c600d0465a333f5491d57
13e8ac2e3fc57d61cccadba522d.min.js.cache: openFile: does not exist (No such file or directory)
Am I doing something wrong? I somehow understood that this should be ok now.
Thanks for your kind answer
"""]]

View file

@ -0,0 +1 @@
Using webapp I cannot get rid of box.com repository, it is locked in 'cleaning out' state for more than two weeks. How can I remove the repository from the list?