FOSDEM 2012 vcsh talk

785 views
701 views

Published on

Talk held at FOSDEM 2012 about vcsh

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
785
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

FOSDEM 2012 vcsh talk

  1. 1. Intro Technical details Using vcsh Outlook Outro vcsh manage config files in $HOME via fake bare git repositories Richard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.com 2012-02-04Richard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  2. 2. Intro Technical details Using vcsh Outlook OutroOutline 1 Intro 2 Technical details 3 Using vcsh 4 Outlook 5 OutroRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  3. 3. Intro Technical details Using vcsh Outlook OutroOutline 1 Intro 2 Technical details 3 Using vcsh 4 Outlook 5 OutroRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  4. 4. Intro Technical details Using vcsh Outlook OutroWho am I? Project & Network Operations Manager at Globalways AG freenode & OFTC staff Passionate about FLOSS Author of vcshRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  5. 5. Intro Technical details Using vcsh Outlook OutroWhat is git? Version control system Distributed No need for central repository Allows you to commit while offline Full history in every checkout Best version control system available (imo...)Richard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  6. 6. Intro Technical details Using vcsh Outlook OutroOutline 1 Intro 2 Technical details 3 Using vcsh 4 Outlook 5 OutroRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  7. 7. Intro Technical details Using vcsh Outlook OutroWhat is vcsh? Implemented in POSIX shell; portable ”version control shell” or ”version control system $HOME” Based on git git unable to maintain several working copies in one directory Sucks if you want to keep your configs in git vcsh uses fake bare git repositories to work around this Think of it as an extension to gitRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  8. 8. Intro Technical details Using vcsh Outlook Outrofake bare.. what? Normal git repo: working copy in $GIT WORK TREE git data in $GIT WORK TREE/.git aka $GIT DIR Bare git repo: git data in $GIT DIR no $GIT WORK TREE Fake bare git repo: working copy in $GIT WORK TREE git data in $GIT DIR $GIT WORK TREE == $HOME $GIT DIR == $XDG CONFIG HOME/vcsh/repo.d/$repo.vcsh core.bare = falseRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  9. 9. Intro Technical details Using vcsh Outlook OutroProblems with fake bare git repos Fake bare repos are messy to set up and use Reason why git disallows shared $GIT WORK TREE: complexity due to context-dependency Mistakes lead to confusion or data loss; imagine $GIT WORK TREE set and git add git reset --hard HEAD~1 git checkout -- * git clean -fRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  10. 10. Intro Technical details Using vcsh Outlook OutroSolution: vcsh Wraps around git Hides complexity and does sanity checks Several git repos checked out into $HOME at once One repo for zsh, vim, mplayer, etc Enables specific subsets of repos per host Manages complete repo life-cycleRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  11. 11. Intro Technical details Using vcsh Outlook OutroOutline 1 Intro 2 Technical details 3 Using vcsh 4 Outlook 5 OutroRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  12. 12. Intro Technical details Using vcsh Outlook OutroCreate new repo # create new repo vcsh init vim # add files to it vcsh run vim git add .vim .vimrc # commit using shorthand form vcsh vim commit # push using longhand form vcsh run vim git pushRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  13. 13. Intro Technical details Using vcsh Outlook OutroMade-up life-cycle # clone repo into new name zsh vcsh clone git://github.com/RichiH/zshrc.git zsh # optionally update legacy repos vcsh setup zsh # display all files managed by this repo vcsh run zsh git ls-files # rename repo just because vcsh rename zsh zshrc # delete repo vcsh delete zshrcRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  14. 14. Intro Technical details Using vcsh Outlook Outrorun vs enter # do everything from outside vcsh run zsh git add .zshrc vcsh run zsh git commit vcsh run zsh git push # the same, but from within vcsh enter zsh git add .zshrc git commit git push exitRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  15. 15. Intro Technical details Using vcsh Outlook OutroPlaying nice with others shells can display exported ENV in $PROMPT vcs info mr via plugin, mainline soon git-annex to manage non-configuration files Simple but powerful hook systemRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  16. 16. Intro Technical details Using vcsh Outlook OutroOutline 1 Intro 2 Technical details 3 Using vcsh 4 Outlook 5 OutroRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  17. 17. Intro Technical details Using vcsh Outlook OutroFuture work More unit tests Get vcsh into more distributions Spread awareness to reach critical mass Maybe extend support to subversion, mercurial, etcRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  18. 18. Intro Technical details Using vcsh Outlook OutroOutline 1 Intro 2 Technical details 3 Using vcsh 4 Outlook 5 OutroRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  19. 19. Intro Technical details Using vcsh Outlook OutroWhere to get it git clone git://github.com/RichiH/vcsh.git Native packages for Debian Ubuntu Arch Linux (AUR) Small bug in README.md, use v0.20120203 or gitRichard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh
  20. 20. Intro Technical details Using vcsh Outlook OutroThanks! Thanks for listening! Questions? Follow me outside when my time-slot is over. See slide footer for further contact Information.Richard Hartmann, RichiH@{freenode,OFTC,IRCnet}, richih.mailinglist@gmail.comvcsh

×