AUEB-BALab / RepoFS

Filesystem view of version control repositories

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow the specification of user and access permissions

dspinellis opened this issue · comments

Currently one needs to be root in order to access the repository.

What do you mean? On an Ubuntu machine I can create and access a mount directory without using the sudo command.

[dds@snf-800019 ~]$ src/RepoFS/src/repofs.py src/RepoFS mnt
Examining repository.  Please wait..
Ready! Repository mounted in 0:00:00.086920
Repository src/RepoFS is now visible at mnt
fuse: failed to exec fusermount: No such file or directory
Traceback (most recent call last):
  File "src/RepoFS/src/repofs.py", line 455, in <module>
    main()
  File "src/RepoFS/src/repofs.py", line 452, in main
    FUSE(repo, args.mount, nothreads=True, foreground=True)
  File "/usr/local/lib/python2.7/dist-packages/fuse.py", line 480, in __init__
    raise RuntimeError(err)
RuntimeError: 1

This error is produced because on the _first_year method of gitoper.py, head_branch contains "branch.master.remote\nbranch.setup.remote\n". This happens because on that specific repository there exist two branches.

This issue can be fixed by only keeping one branch inside the head_branch variable (maybe the first one). But, how will we choose which one to keep? I suggest that we use master if more than one branches exist in the repository.

Not sure why there is a problem with multiple branches. Most repos have multiple brnaches, right? We can use master if available as you suggest, printing a warning and providing an option to select the branch.

The issue arrises because we treat head_branch as if it contains only one branch. We already select master if head_branch is equal to None.

Why do we need to select a branch? (Maybe it's better to discuss this over Skype; call me if you want.)

I've changed the default access mode to be the same as the repository's mode in 7a344f2. The next step is to add a command line argument to specify access rights manually.