Kurt Granroth wrote: > TK Soh wrote: >> On Wed, Sep 24, 2008 at 1:33 AM, Kurt Granroth >> <[EMAIL PROTECTED]> wrote: >>> I have sudden need for GUI support for the Forest extension. I have >>> only rudimentary python experience but the code looks pretty >>> straightforward. Maybe just replacing 'clone' with 'fclone', 'update' >>> with 'fupdate', etc would work. Alternatively, I could maybe just >>> duplicate all the functions with a forest equivalent. Seems reasonable >>> to me. >>> >>> The sticking point is that I am very much NOT setup for python >>> development under Windows. The source installation instructions look >>> pretty heavy, too, for such a simple change. >>> >>> I see that the file I'd need to modify is in the library.zip file. It's >>> already in byte-code by that point. So maybe there is a way to modify >>> the file using only the already-installed code? >>> >>> Specifically, might it be possible to edit a local copy of the file, >>> then force python to generate its bytecode, then unzip + replace the >>> file + re-zip the library.zip file? Would/could that work? >> This is a little over my head right now. >> >> Would you be able to run Tortoisehg (hgtk) on a unix/linux box? That >> might simplify the setup required for development. > > Hrm... perhaps if it is over your head then I should take the hint that > it's going to be waaaay over this python newbie's head ;-) > > I'm too stubborn to back down, though, so I'll give it a try anyway and > report back.
Reporting back... to answer my own question, the answer is YES! Yes, you can just copy the bytecode of a modified dialog into the library.zip file and it Just Works. Here's what I did (so far): 1. Cloned the TortoiseHg repo under Linux 2. Modified 'hggtk/clone.py' to support forests 3. Ran it under 'hgtk' in Linux to test that it worked. The .pyc was compiled at the same time 4. On Windows, opened up the c:\program files\tortoisehg\library.zip file using Explorer (in-place compressed "folder") 5. Copied my new clone.pyc (compiled under Linux) into the folder. Allowed it to overwrite the existing file. 6. Basked in the glory of it all working flawlessly under Windows, too :-D This still needs some work, but that's an awesome first step for only a few minutes of work. Thank you python for being so cross-platform friendly and thank you TortoiseHg devs for making the code so easy to understand to a newbie! Still to do: 1. Modify the status and synch (at least) dialogs for forest support 2. Maybe put a global entry in the user config? 3. Figure out how to modify the default Mercurial.ini 4. Figure out how to build the installer for local distribution
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ Tortoisehg-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss

