commandline edited this page Sep 13, 2010 · 7 revisions

Ask me a question and I’ll answer it here if it seems like a general enough question to help others.

How do I prepare a directory for use with flashbake?

For the sake of example, let’s say you have a directory called /home/joe/projects that contains files you want to control with flashbake and git. /home/joe/projects is what the rest of the documentation refers to as a project directory. Once you complete the steps below, it will also be a git repository or repo.

  1. Make sure you have followed the full installation instructions, including git itself, python-setuptools and flashbake.
  2. Open your terminal program of choice.
  3.  joe/ $ cd /home/joe/projects
  4.  projects/ $ git init 
  5. You should see
    Reinitialized existing Git repository in /home/joe/projects/foo/.git/
  6. vim .flashbake

    Feel free to use the editor of your choice in place of vim.
  7. Write out the options and hot files per the Configuration page then save the file.

That’s it. /home/joe/projects is now a git repository and should have a valid flashbake configuration. You should now be able to run

joe/ $ flashbake /home/joe/projects

and you’ll see it run.

How do I see the history of a file?

flashbake doesn’t provide any additional tools (yet) for viewing the history git
is tracking for you. For the time being, you’ll need one of the graphical tools
listed at the Git project or use

git help log

to review changes from the command line.

Based on personal experience, I can recommend qgit. Although it is still a bit
odd for a non-hacker to use, it does allow you to drill down to a file of
interesting and move forward and backwards along its history. My best advice at
the moment is to experiment.

Does git or flashbake work with non-text files?

flashbake doesn’t care what kinds of files you work with.

git will work with files other than text files but things get a
bit…complicated with non-text files. The issue is that non-text, or binary,
files cannot be easily compared to see what is different.

This means that git cannot store just the differences as a file changes. It
will need to store the entire file every time that it changes. It also means
that the tools for viewing history that come with git won’t be able to show you
anything meaningful. As far as git will be able to tell, the entire file will
have changed.

I appreciate this seems odd to someone unused to working with program source
code. Source code is almost universal just text. Hackers are largely
accustomed to thinking of that code in terms of its smaller parts. Like
thinking about a narrative equally as paragraphs and sentences as well as a
whole.

High on my list of priorities is to write a history viewer for non-hackers that
provides a few more options for non-text files. This will take quite a bit of
time to develop, unless I get a volunteer, but from feedback I have been
getting, seems like a necessary part for git and flashbake to be as usable as
possible.

Certainly if anyone knows of an easier to use git history tool or is working on
one, let me know.

Do I have to work with each project directory individually?

For the time being, yes. If you have project directories /home/joe/projects and
/home/joe/pim, then you’d need to manually run

flashbake /home/joe/projects

or

flashbake /home/joe/pin

or set up a cron file like

*/15 * * * * flashbake /home/joe/projects 10
*/15 * * * * flashbake /home/joe/pim 10

You could make /home/joe a project directory and git repo. If you do, then
the hot files list would be longer and the filenames themselves will also be
longer. You also would not be able to have custom message plugins for each
project since you’d have one, larger project.

A future release may provide more or better scripts for users who have multiple
projects.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.