vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Tue, 26 Oct 2004, Fabio Olive Leite wrote: > Addition below... > > On Tue, Oct 26, 2004 at 09:00:50AM -0300, Fabio Olive Leite wrote: > > On Tue, Oct 26, 2004 at 01:18:44AM -0500, Jared Yanovich wrote: > > > > > > No one has tried or even thought about this? Even ideas as to how the > > > parsing may be approached are welcomed, or other constraints, etc. > > > > I have thought a bit about it, but I currently don't have any spare > > time to code anything, so I have chosen to keep quiet and "shut up > > while I can't hack". > > > > But now that comments were asked again: I'm thinking about splitting > > the rest of the line after the ---, +++ or *** (?) markers into > > substrings on the white-space characters, having the pieces after the > > first with their own white-space prepended (this is confusing, will > > try again), so that we can loop trying to find a filename with the > > first piece, and if it can't be found then we append the second piece > > and try again, and so on. This soudns awfully complicated, especially when keeping in mind that patch should handle paths with non-existent components... -Otto > > > > Example: > > > > +++ sys/kern/Oh my god who commited spaces??? SomeTime SomeRev > > > > We get the pieces as "sys/kern/Oh", " my", " god", " who", > > " commited", " spaces???", " SomeTime" and " SomeRev". In case > > it's not a CVS diff we don't get the " SomeRev" piece. > > > > Now we loop trying to find a file named "sys/kern/Oh", and if it can't > > be found, we try "sys/kern/Oh my", and then "sys/kern/Oh my god" and > > so on. > > > > If the damn file exists, it's bound to be found by this construct. Of > > course there will be flaws in the oddest cases, but this heuristic is > > about as close to what a human would try as possible. > > > > Comments? Sorry, as I said, no patch for now... > > In the cases where patches have to create non-existing files, we just > toss out the last piece if it starts with "r?[0-9]+\.[0-9]+" and then > toss out the last 5 pieces again (timestamp, hopefuly). This sucks, > but what else could be done? > > -- > I drowned in the universal pool of entropy > Eris has saved me, and she has set me free |