Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Deal with unlocked files in a robust fashion #33

Closed
mih opened this issue Oct 28, 2018 · 0 comments
Closed

Deal with unlocked files in a robust fashion #33

mih opened this issue Oct 28, 2018 · 0 comments

Comments

@mih
Copy link
Member

mih commented Oct 28, 2018

This is the sibling issue of datalad/datalad#1651

Here is the replay using -revolution code:

(datalad3-dev) mih@meiner /tmp % datalad rev-create /tmp/testunlock
[INFO   ] Creating a new annex repo at /tmp/testunlock 
create(ok): /tmp/testunlock (dataset)
(datalad3-dev) mih@meiner /tmp % cd testunlock
(datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % echo 123 > 123
(datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % datalad rev-save
add(ok): 123 (file)
save(ok): .
action summary:
  add (ok: 1)
  save (ok: 1)
(datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % datalad unlock 123
unlock(ok): /tmp/testunlock/123 (file)
(datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % datalad rev-save
add(ok): 123 (file)
action summary:
  add (ok: 1)
  save (notneeded: 1)
(datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % datalad unlock 123
unlock(ok): /tmp/testunlock/123 (file)
(datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % cat .gitattributes

* annex.backend=MD5E
**/.git* annex.largefiles=nothing%                                                              (datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % printf '\n* annex.largefiles=(not(mimetype=text/*' >> .gitattributes  
(datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % cat .gitattributes

* annex.backend=MD5E
**/.git* annex.largefiles=nothing
* annex.largefiles=(not(mimetype=text/*%                                                        (datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % datalad save -m 'all text files go to git' .gitattributes
save(ok): /tmp/testunlock (dataset)
(datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % git st
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        typechange: 123

no changes added to commit (use "git add" and/or "git commit -a")
(datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % datalad unlock 123
(datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % datalad rev-save 123
add(ok): 123 (file)
add(ok): 123 (file)
Failed to run ['git', '-c', 'receive.autogc=0', '-c', 'gc.auto=0', 'commit', '-m', '[DATALAD] Recorded changes', '--', '123'] under '/tmp/testunlock'. Exit code=1. out= err=git-annex: Cannot make a partial commit with unlocked annexed files. You should `git annex add` the files you want to commit, and then run git commit.

git-annex: Cannot make a partial commit with unlocked annexed files. You should `git annex add` the files you want to commit, and then run git commit.
(datalad3-dev) 1 mih@meiner /tmp/testunlock (git)-[master] % git st
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        typechange: 123

(datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % git reset HEAD 123
Unstaged changes after reset:
T       123
(datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % datalad rev-save
add(ok): 123 (file)
add(ok): 123 (file)
Failed to run ['git', '-c', 'receive.autogc=0', '-c', 'gc.auto=0', 'commit', '-m', '[DATALAD] Recorded changes', '--', '123'] under '/tmp/testunlock'. Exit code=1. out= err=git-annex: Cannot make a partial commit with unlocked annexed files. You should `git annex add` the files you want to commit, and then run git commit.

git-annex: Cannot make a partial commit with unlocked annexed files. You should `git annex add` the files you want to commit, and then run git commit.
(datalad3-dev) 1 mih@meiner /tmp/testunlock (git)-[master] % datalad rev-save 123
Failed to run ['git', '-c', 'receive.autogc=0', '-c', 'gc.auto=0', 'commit', '-m', '[DATALAD] Recorded changes', '--', '123'] under '/tmp/testunlock'. Exit code=1. out= err=git-annex: Cannot make a partial commit with unlocked annexed files. You should `git annex add` the files you want to commit, and then run git commit.

git-annex: Cannot make a partial commit with unlocked annexed files. You should `git annex add` the files you want to commit, and then run git commit.
(datalad3-dev) 1 mih@meiner /tmp/testunlock (git)-[master] % git st
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        typechange: 123

(datalad3-dev) mih@meiner /tmp/testunlock (git)-[master] % datalad rev-save
Failed to run ['git', '-c', 'receive.autogc=0', '-c', 'gc.auto=0', 'commit', '-m', '[DATALAD] Recorded changes', '--', '123'] under '/tmp/testunlock'. Exit code=1. out= err=git-annex: Cannot make a partial commit with unlocked annexed files. You should `git annex add` the files you want to commit, and then run git commit.

git-annex: Cannot make a partial commit with unlocked annexed files. You should `git annex add` the files you want to commit, and then run git commit.

mih added a commit that referenced this issue Nov 5, 2018
Likely fixes via a git-annex update.
mih added a commit that referenced this issue Nov 5, 2018
Likely fixes via a git-annex update.
@mih mih closed this as completed in a015482 Nov 5, 2018
mih added a commit that referenced this issue Nov 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant