Re: [GNC-dev] Comments in the state file

2020-01-11 Thread Geert Janssens
Op vrijdag 20 december 2019 14:50:30 CET schreef Robert Fewell:
> Hi,
> Need some advise on this problem I found when trying to fix a budget state
> file issue...
> Currently the register full name is being added as a comment to the
> register sections of the state file based on the group, so we have...
> 
> #Register state for "Assets:Current Assets:Savings Account"
> [Register 5ca76dbe6668a75daeffd33b1229fa0e]
> date_width=111
> ...
> Unfortunately, when the state file is loaded it strips out all the comments
> and it is only the registers that have been open in the current session
> that get there comments added back on save.
> There is a key file flag that can be set, G_KEY_FILE_KEEP_COMMENTS but this
> has the disadvantage of ending up with the comment being added on every
> close so you end up with multiple comments like ...
> 
> #Register state for "Assets:Current Assets:Savings Account"
> 
> #Register state for "Assets:Current Assets:Savings Account"
> [Register 5ca76dbe6668a75daeffd33b1229fa0e]
> date_width=111
> ...
> This does not happen if the comment is for a key, so if the date_width was
> used you get...
> 
> [Register 5ca76dbe6668a75daeffd33b1229fa0e]
> #Register state for "Assets:Current Assets:Savings Account"
> date_width=111
> ...
> So my first idea was to make the changes for above on maint and then in
> master make the key file flag change but this would not work, if some one
> from a version less than 3.8 upgraded to 4.0, there key file would still
> have group comments and they would start multiplying on each save. I did
> try removing the group comment but that does not work with the new key file
> flag,
> 
> The only other thing I can think of is add a dummy key and put the register
> full name in that which what I had done originally. The reason for asking
> is I want to add a similar comment for the budget as it is only
> identifiable by the guid and was looking at the lack of saving of the
> invoice sheet layout hoping to get that sorted on master.
> 
> Regards,
> Bob

Have you tried completely removing a group from the key file before updating 
it ? Perhaps deleting the group will also delete its related comment.

Regards,

Geert


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] archive of GnuCash

2020-01-11 Thread Geert Janssens
Op woensdag 13 november 2019 18:54:50 CET schreef Stephen M. Butler:
> On 11/13/19 9:40 AM, Geert Janssens wrote:
> > Op woensdag 13 november 2019 17:39:41 CET schreef Stephen M. Butler:
> >> On 11/13/19 5:13 AM, Geert Janssens wrote:
> >>> Op woensdag 13 november 2019 05:28:30 CET schreef Stephen M. Butler:
>  git worktree add ../v3.7 3.7
> >>> 
> >>> Assuming you're in maint that does indeed add an additional worktree.
> >> 
> >> Figured that I might end up destroying that by accident and being able
> >> to recreate locally is a whole lot faster than cloning from github!
> >> 
> >> Then again, I might be making this too complicated for myself.  We'll
> >> see over time if this was a good idea or a bad one (for me).
> > 
> > For the record, I'm a heavy user of worktrees myself. The only change
> > compared to your setup is that I have chosen to clone a bare repo and tie
> > my worktrees to that bare repo. That way I can even have a worktree for
> > the maint branch.
> Can you explain more what you mean by a bare repo?
> 
> --Steve

It's a repo that you create with
git clone --bare 

It differs from an ordinary repo that it doesn't have its own working 
directory and only holds the contents of what would be in the .git 
subdirectory or an ordinary repo.

Regards,

Geert


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel