running bzr commit on only modified files as a daily cron job

Martin Pool mbp at canonical.com
Thu Apr 3 02:48:13 BST 2008


On undefined, Rahul Nabar <rpnabar at gmail.com> wrote:
> A while ago I had posted on the group about versioning config and
>  script files scattered throughout my linux home dir using bazaar. I
>  got a good system up and running after many excellent suggestions I
>  got from other posters. (including a .bzignore with * etc.)
>
>  Here's a new idea I wanted more opinions  on: Frequently I edit a
>  script and forget to do a bzr commit. Could I set up a daily cron job
>  that does this (pseudocode):
>
>  foreach (filename in bzr inventory)
>  {
>            if (`bzr status filename` == M)
>            {
>                    `bzr commit  --message="todays date" filename`
>            }
>  }
>
>  Shouldn't this "idiot proof" my attempt to keep a versioned copy of
>  all my scripts and configs? i.e. if I did remember to commit then the
>  bazaar status will exclude that file from the daily cronjob. But for
>  those that I did forget I have a spare "daily" snapshot? ( I can
>  always keep doing manual commits after important changes just as
>  normal.)

It should work fine.   Why not just commit the whole tree though?

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list