cmdln / flashbake

Scripts to gather information for including in version history comments and to make using source control a bit simpler for non-technical projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Modified files get not recognized

christianlupus opened this issue · comments

Hello,

I just tried flashbake using my ubuntu 14.04LTS. The effect was - well - catastrophic. Flashbake did not recognize any modifications of any file. Thus I installed the most recent version from github but without success.

A bit more verbose:

  • Create a new folder. Create a git repo therein (git init).
  • Create a dummy config file. In my case it was just

plugins:flashbake.plugins.timezone:TimeZone
a

b

  • Create the file "a" and do a flashbake on the directory. The file gets checked in (ok so far).
  • Create a second file "b" and uncomment in the config file. Using flashbake it gets checked in.
  • Modify either file. git status shows the modifications clearly. When I apply flashbreak I get the message that no constent to be checked in has changed. (???)

Please note a small "bug": You seem to parse the output of git in some sense. If the user has a different language than English, you get into trouble. In this case (I am German) flashbreak did not even check in the very first version. I had to manually export LANG=C before. Maybe you might alter the LANG environment variable on calling git such that English is always used.

Hope this helps.
Christian Wolf

I have a similar problem but with other solution. (I am Russian, but it does not matter)
My solution is - removing # from line 47 in file commit.py.

 pending_re = re.compile('#\s*(renamed|copied|modified|new file):.*')

Hello,

thanks for your help. That did the trick. I append here a diff for those who can put it upstream.
The modification of the language is not yet done by the script
diff --git a/setup.py b/setup.py
old mode 100644
new mode 100755
diff --git a/src/flashbake/commit.py b/src/flashbake/commit.py
index 8488224..1f825ef 100755
--- a/src/flashbake/commit.py
+++ b/src/flashbake/commit.py
@@ -44,7 +44,7 @@ def commit(control_config, hot_files, quiet_mins):
_handle_fatal(hot_files, git_status)

     # in particular find the existing entries that need a commit
-    pending_re = re.compile('#\s*(renamed|copied|modified|new file):.*')
+    pending_re = re.compile('\s*(renamed|copied|modified|new file):.*')

     now = datetime.datetime.today()
     quiet_period = datetime.timedelta(minutes=quiet_mins)

Can confirm. This also resolves an issue with globs not working in nested directories.

This is likely a consequence of my ignorance to git porcelain, where output would be less subject to change and hence more amenable to parsing. If I ever get time to work on this repo in earnest, I would drop the custom output processing altogether anyway. I'll make this change and cut a new release.

OK, cut 0.27.1 if all/any of you want to grab, test, and then feel free to close this issue.

Pulled and tested this evening. Works as advertised. Thanks, Thomas!
On Nov 13, 2015 1:55 PM, "Thomas Gideon" notifications@github.com wrote:

OK, cut 0.27.1 if all/any of you want to grab, test, and then feel free to
close this issue.


Reply to this email directly or view it on GitHub
#20 (comment)
.