[Gambas-user] IDE patch functionality
Tobias Boege
taboege at ...626...
Sat Jan 26 00:17:29 CET 2013
On Sun, 20 Jan 2013, Beno?t Minisini wrote:
> - There must not be local absolutes paths in the patch file, only
> relative ones.
>
Done by editing the in-memory patch buffer before saving it. This seemed to
be the easiest solution to me.
> - You should not call extern utilities (like 'find') if you can do what
> you need in Gambas directly.
>
You are right.
BTW, I have done the patch editing above by using Split(sPatch, "\n") to
easily work with each line. This may be a place where calling an extern
utility, namely sed, is more useful but I would need GNU extensions to make
it easy. What is the directive here?
> - That patch feature should be accessed through a special dialog that
> will allow to see the diff before applying it (there is already a "diff"
> highlighting in the 'gb.eval.highlight' component).
>
There is a window for that now. The patch can be viewed read-only. I changed
the menu structure in FMain accordingly. Feel free to change the names of
the menu items.
> - That dialog should allow to apply the patch to some specific files,
> not all. If it is possible of course.
>
I wrote a small Patch parser class which allows to easily select or deselect
individual hunks from the patch, coalesce different patches to one and
potentially more. You can actually compose a patch of different files at
present but not save it.
Hope, it's better.
Regards,
Tobi
P.S.: Try to click on the Expander on FPatch. I will write a separate email
for this.
More information about the User
mailing list