facebook / between-meals

A library to provide calculations between Chef diffs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

file paths with whitespace cause rev parsing to fail with hg

joshuamiller01 opened this issue · comments

When parsing a hg revision to extract the changes, parse_status(changes) will try to regex the hg log output with something like 'when /^A (\S+)$/' , but if the path has whitespace in it, it will fail to match the regex and fail the call. This might be a problem with the other repo types (git, svn) as well.

Sample:
A ../../some/path/to/a/file/abcd stuffafteraspace

Maybe it's safe to assume chef repo contents won't have spaces in them, but the repo in play could have all kinds of other crap; maybe it should filter out said crap prior to mapping?

This is a dupe of facebook/grocery-delivery#22

Which... ya know people should not do that, which is why we marked it wishlist. Bad engineers, bad.

@jaymzh is GD handling this more gracefully somehow? for me taste-tester is completely stuck until you dump everything and re upload on a revision that's ahead of the "bad entry"

No, gd will get fucked to, we're just smart enough to not put spaces in filenames, cause that's insane.

On September 2, 2016 2:10:09 PM PDT, Joshua Miller notifications@github.com wrote:

@jaymzh is GD handling this more gracefully somehow? for me
taste-tester is completely stuck until you dump everything and re
upload on a revision that's ahead of the "bad entry"

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#52 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

"we" is a pretty strong word.

I give you permission to verbally smack down people putting spaces in filenames in our chef repo ;)

@jaymzh how lenient are chef-zero and chef-server about what one can put in the path? tt/gd should match exactly that, and leave in user's discretion to narrow it down.

I like my ☃

@odcinek they allow it primarily because they work on windows. WHich is why I didn't close this as wontfix it's a valid feature request. However it's wishlist for all the reasons stated.

Got bit for this again today. Turns out "we" aren't smart.

Fixed with #111