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

This commit is contained in:
Joey Hess 2016-08-08 10:39:42 -04:00
commit 3226880a0f
Failed to extract signature
9 changed files with 160 additions and 0 deletions

View file

@ -0,0 +1,11 @@
[[!comment format=mdwn
username="branchable@1f03006a73aeda463532c8138da071037870395b"
nickname="branchable"
subject="Transcrypt? "
date="2016-08-05T07:28:27Z"
content="""
Any experience with using transcrypt instead of git crypt?
https://github.com/elasticdog/transcrypt
"""]]

View file

@ -0,0 +1,31 @@
### Please describe the problem.
Reports success although file is not added to git, since ignored due to .gitignore
Although not sure yet if that is annex could actually take care about since probably annex stages those for 'add' command to git so wouldn't know right when addurl is called for a specific file?
### What steps will reproduce the problem?
see below
### What version of git-annex are you using? On what operating system?
6.20160728+gitg9a2fe62-1~ndall+1
[[!format sh """
$> rm -rf /tmp/123; mkdir /tmp/123; cd /tmp/123; git init; echo "*exclude*" >| .git/info/exclude; git annex init; { echo "http://www.onerussian.com/tmp/1exclude.txt 1exclude.txt"; echo "2nd one" >&2; echo "http://www.onerussian.com/tmp/2.txt 2.txt"\; } | git annex addurl -c annex.largefiles=exclude=*.txt --batch --json --with-files
Initialized empty Git repository in /tmp/123/.git/
init ok
(recording state in git...)
2nd one
{"command":"addurl","key":null,"file":"1exclude.txt","note":"downloading http://www.onerussian.com/tmp/1exclude.txt ...","note":"non-large file; adding content to git repository","success":true}
{"command":"addurl","key":null,"file":"2.txt;","note":"downloading http://www.onerussian.com/tmp/2.txt ...","key":"SHA256E-s2--53c234e5e8472b6ac51c1ae1cab3fe06fad053beb8ebfd8977b010655bfdd3c3.txt","success":true}
The following paths are ignored by one of your .gitignore files:
1exclude.txt
Use -f if you really want to add them.
git-annex: user error (xargs ["-0","git","--git-dir=.git","--work-tree=.","--literal-pathspecs","-c","annex.largefiles=exclude=*.txt","add","--"] exited 123)
"""]]
[[!meta author=yoh]]

View file

@ -0,0 +1,26 @@
[[!comment format=mdwn
username="JohnFisher"
subject="didn't work for me, perhaps I did the attributes wrong?"
date="2016-08-04T20:43:15Z"
content="""
I created .gitattributes in the root of my repo:
jfisher@buildos1:~/annex$ cat .gitattributes
* annex.largefiles=(largerthan=100mb)
jfisher@buildos1:~/annex$ git config -l
user.email=jfisher@intouchhealth.com
user.name=John Fisher
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
annex.uuid=75d91aa9-f5fc-45b8-b62c-e6050ed7c3d5
annex.version=5
where I intend for all users of the repo to automatically add all files larger than 100Mb as annexed and add all other files as conventional git.
I ran
git annex add
and small text files were staged as links, as well as a large file
Comment? Ideas?
"""]]

View file

@ -0,0 +1,19 @@
[[!comment format=mdwn
username="JohnFisher"
subject="re-format for readability"
date="2016-08-04T20:48:55Z"
content="""
jfisher@buildos1:~/annex$ cat .gitattributes
* annex.largefiles=(largerthan=100mb)
jfisher@buildos1:~/annex$ git config -l
user.email=jfisher@intouchhealth.com
user.name=John Fisher
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
annex.uuid=75d91aa9-f5fc-45b8-b62c-e6050ed7c3d5
annex.version=5
"""]]

View file

@ -0,0 +1,12 @@
Hi,
I am using git annex 5.20151208-1build1 on my local machine and 5.20151208-g5ef6ed8 on "origin". I can not drop files anymore. "git annex sync --content" has the same problem when it tries to drop files:
$ git annex drop xyz
drop xyz (locking origin...) <-- waits here for ever
$ git annex sync --content
[git annex is pulling and merging stuff]
drop xyz (locking origin...) <-- waits here for ever
What can I do? Thanks!

View file

@ -0,0 +1,31 @@
[[!comment format=mdwn
username="fiatjaf"
subject="How I got it working"
date="2016-08-06T23:51:48Z"
content="""
I'm using [pipsi](https://github.com/mitsuhiko/pipsi) to install packages without polluting the system, [Michael's fork](https://github.com/mikemccracken/flickrannex) from magthe's fork from TobiasTheViking repo (I don't know if the other branches are better or worse, but this is working).
## Instructions
**First thing**: go to https://www.flickr.com/services/apps/create/noncommercial/? and create an app (if you use the keys provided in the flickrannex repository you'll be giving access to your flickr to everybody).
Now follow the steps:
```
wget https://github.com/mikemccracken/flickrannex/archive/master.zip
unzip master.zip
cd flickrannex-master/
edit setup.py # replace 'flickrapi' with 'flickrapi==1.4.5'
# otherwise it will install a wrong version of the dependency.
edit flickrannex # on lines 46 and 47, replace the api_key and api_secret
# with the values from the application you created in the
# first step.
pipsi install ./
cd
flickrannex # go through the oauth setup, will open a window in the browser
# some commands will appear after you're successful. ignore them.
cd ~/annex # your git-annex folder
git config annex.flickr-hook $HOME/.local/bin/flickrannex
git annex initremote flickr type=hook hooktype=flickr encryption=none
```
"""]]

View file

@ -0,0 +1,24 @@
If you use [ranger](https://github.com/ranger/ranger), the console-based file manager, you can benefit of its plugin system to get it easily entangled with git-annex. As far as I know, there 2 main types of extensions:
## Custom commands
ranger lets you [define custom commands](https://github.com/ranger/ranger/wiki/Commands) that can be called. Basically you could easily write proxy ranger commands for all git-annex commands you use. [Here](https://github.com/fiatjaf/dotfiles/blob/master/ranger-commands.py) have written `:ga_whereis` for outputting whereis information, and `:ga_set` and `:ga_tag` for metadata settting.
## Linemodes
The small string of information that shows on each file line, aligned to the right, is called a `infostring`. [Linemodes in ranger](https://github.com/ranger/ranger/wiki/Custom-linemodes) lets you change between its default linemodes or add your own custom linemodes. I have written two git-annex linemodes:
* [git-annex-metadata](https://github.com/fiatjaf/dotfiles/blob/5087963cead99f65afee153be672c8e5e624d638/ranger-plugins/linemode_gitannex.py#L8-L51), which shows tags and metadata fields from git-annex; and
* [git-annex-whereis](https://github.com/fiatjaf/dotfiles/blob/5087963cead99f65afee153be672c8e5e624d638/ranger-plugins/linemode_gitannex.py#L54-L104), which shows the name of the repositories where each file is (except the current repository, as that should be clear from the ranger colours).
To switch linemodes, just type `:linemode git-annex-whereis` or `:linemode git-annex-metadata`.
You can also set `default_linemode path=/your/annex/path/.* git-annex-whereis`, for example, to have that linemode automatically set whenever you browse your git-annex folder on ranger.
Beware of folders with too many files, as this will read output from git-annex for all the files, so ranger can freeze for some seconds.
---
As I didn't have any better place to put the code, eveything here is referenced in my [dotfiles repository on GitHub](https://github.com/fiatjaf/dotfiles). Just copy the two referenced files to your `~/.config/ranger/plugins/` folder and `~/.config/ranger/commands.py` file to get this working.
Much other interesting commands and plugins can still be added. Modify this page if you come up with other ideas.

View file

@ -0,0 +1,3 @@
ATM 'annex merge' does not accept any parameter to specify which remotes to consider -- it merges all. In some cases it might be desirable to merge only information from some remotes (e.g. I keep some annex remote "private" or smth like that)
[[!meta author=yoh]]

View file

@ -0,0 +1,3 @@
As we briefly discussed via email, it would be nice if sync could sync only some branches (e.g. git-annex) not all at once.
[[!meta author=yoh]]