Wrye-bash: Renaming Fixups Round 2

Created on 23 Feb 2021  Â·  7Comments  Â·  Source: wrye-bash/wrye-bash

Ghost of #259 - there are bugs:

308:

  • [x] currently renaming multiple installers is broken:
    Traceback (most recent call last):
      File "bash\gui\events.py", line 165, in _post
        result = listener(*listener_args)
      File "bash\basher\__init__.py", line 2421, in OnLabelEdited
        name_new = self.new_name(newName)
      File "bash\basher\__init__.py", line 2448, in new_name
        renaming_type = to_rename and type(self.data_store[to_rename[0]])
      File "bash\bolt.py", line 1125, in __getitem__
        return self._data[key]
    KeyError: bolt.Path(u'lololi.7z.rar')

yep it's not there we just renamed it

  • [x] screens have various glitches -> mostly fixed in 020404e0c557e808424a02680aa3f45cbddcf0d8
  • [x] renaming bak files (a complex thing) must be implemented (a lot of ad hoc code, overrides etc) -> 5a985d84b81e6197f672b2adf1d8d1998772cedd

    • [x] _handle_left_down still checks for u'(autosave|quicksave)' -> acc5a05162612bb4d83fd96c5c1d07b247da7dad

309:

  • [ ] try_rename needs more work to chop off more overrides - and probably needs @conversation
  • [ ] refresh code should be guarded for exceptions and have a base method that takes the output lists of try_rename
  • [ ] especially screen info (so we move the GPath handling to the model)
  • [ ] scan 9f236feec92b8c740a6364a160f8222b1fab035e for ##: loose ends
  • [ ] TODO commit -> 689bc48b07c3f5e2e648024cbcd52221a74dac2d
  • [ ] (un)ghosting does not properly abort if the file we want to add the .ghost extension to is locked

.. but most importantly the model is half baked - the handling of the names (new name and co) belongs to the infos, handling of the messages to basher and so on - blocks #543 - renames are all about those keys (surprise!) and the handling should be centralized.

That being said this is the final renames issue - we want to discourage people from renaming stuff (apart from installers) mods/saves names play a role and hence the monumental complexity of this code. So with this merge we forget about renames (no, no tweaks renames thanks)

C-bug A-bain C-refactoring A-saves A-cosaves A-bsas A-inis A-screenshots M-relnotes

All 7 comments

Some discussions from #400 that are related to this issue:

  1. https://github.com/wrye-bash/wrye-bash/issues/400#issuecomment-783456175 and onwards
  2. https://github.com/wrye-bash/wrye-bash/issues/400#issuecomment-786720816 and onwards

Renaming an installer on nightly right now:

Traceback (most recent call last):
  File "bash\gui\events.pyo", line 165, in _post
  File "bash\basher\__init__.pyo", line 2403, in OnLabelEdited
  File "bash\balt.pyo", line 1333, in SelectItemsNoCallback
  File "bash\balt.pyo", line 1323, in SelectItem
  File "bash\balt.pyo", line 1455, in GetIndex
  File "bash\gui\list_ctrl.pyo", line 263, in FindIndexOf
KeyError: bolt.Path(u'.7z')

Edit: It was a rename from Test - 1.7z to Test.7z

Thanks Inf I have an updated local version will test it tomorrowish -
we're near

Maybe a regex failure?

On Fri, Feb 26, 2021, 7:05 PM Infernio notifications@github.com wrote:

Renaming an installer on nightly right now:

Traceback (most recent call last):
File "bash\gui\events.pyo", line 165, in _post
File "bash\basher__init__.pyo", line 2403, in OnLabelEdited
File "bash\balt.pyo", line 1333, in SelectItemsNoCallback
File "bash\balt.pyo", line 1323, in SelectItem
File "bash\balt.pyo", line 1455, in GetIndex
File "bash\gui\list_ctrl.pyo", line 263, in FindIndexOf
KeyError: bolt.Path(u'.7z')

—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/wrye-bash/wrye-bash/issues/580#issuecomment-786772332,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKNIV4WQIVT553KZT26X63TA7IE5ANCNFSM4YDGLBDQ
.

When the user enables/disables a plugin, if auto-ghosting is on we try to unghost/ghost it as a result. If the plugin is locked (e.g. by xEdit) the result is that the plugin is enabled, but is still on disk as a ghost.
This leaves you with a plugin that's enabled but also a ghost (a nonsensical state). There's no warning or error that aborts this when we can't perform the .ghost rename because the file is locked.

I have reproduced the installers bug - fixing will post a new iteration soon

It _did_ take all day - I included the Vmad fixes in bc8555f2c02806afebd7df725c9861b1f47e3e56 - gosh that drained me (I broke CI but should be an easy fix). Now I leave the fate of this issue to you - can be moved to 309 - or be split so the fixes are linked to 308.

I could use a drink :P

Thanks! Will have a look once I find time.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Utumno picture Utumno  Â·  13Comments

Arthmoor picture Arthmoor  Â·  5Comments

Utumno picture Utumno  Â·  22Comments

StormDancer46 picture StormDancer46  Â·  26Comments

Infernio picture Infernio  Â·  15Comments