Sunday, August 5, 2012

Fossil Command Line Tips

For small projects, Fossil is a great choice for revision control. Fossil’s command line interface is very easy to use and plays nice with utilities like grep, gawk and xargs. The following are examples of common operations:
  • Check in only edited files: fossil changes | grep EDITED | gawk '{print $2}' | xargs fossil commit -m "Added feature X."
  • Add only files with name containing "pattern" to repo: fossil extras | grep pattern | xargs fossil add
  • Move files in repo to match move on filesystem: fossil changes | grep MISSING | gawk '{print "fossil mv " $2 " subdir/" $2}' | sh

No comments:

Post a Comment