QOF code question?
linux at codehelp.co.uk
Sat Aug 7 13:26:31 EDT 2004
On Saturday 07 August 2004 4:16, blfs wrote:
> > > So what has to be done to keep the GnuCash code
> > > manually in sync with the QOF code?
> > Cut-and-paste.. Manually make the changes to both sets of code.
> Could you please give a specific example?
Open an editor
View the file
Select an area that contains a change
Open the other file
Find the same line
What did you expect? We don't set the characters by adjusting the hard disc
platter with our bare hands and a microscope, we use applications like
everyone else. The specific application is of no consequence, the file is
viewed, the changes identified and the new code copied and pasted into the
other file. Start with the QOF file, paste into the gnucash/engine file.
Start with gnucash/engine, paste into the QOF file. What's so difficult to
There are other ways, perhaps use the diff command and then patch the file but
that's only a change in application, not in method - diff identifies the
changes, patch copies the change and pastes it into the other file.
diff -pu original-file changed-file
This produces a list of lines that are new (+) or that have been replaced (-)
that patch can use to make the changes in the other file.
It's more efficient to use diff+patch than to just copy the entire file - a
change may only be 5-10 lines in a 1,000 line file but sometimes diff
highlights other changes that you don't want to copy across.
I use manual sync with my PHP project - I have working code and project code.
Sometimes I make changes to the working code that are not finalised, don't
work or are just for debugging - when I want to copy the worthwhile changes
across to the project code, I use the same manual process. I view both files
using a Split View in Kate in my case, compare them visually and identify
those changes that I do want to use and those that I want to ignore. This is
what diff can't do. There's no point in making a patch then, the code is
already visible and it's easier to just select in one window, copy and then
paste into the other window.
What's so hard to understand?
Sometimes automation (like diff) just can't do what you need and you have to
involve the human to make some decisions about what gets changed and what
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20040807/443cd8ae/attachment.bin
More information about the gnucash-devel