GithubHelp home page GithubHelp logo

clonkex / win32lfn-python3 Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 20 KB

Python 100.00%
long-file-name long-file-path mercurial python-3 python3 source-control unc mercurial-plugin universal-naming-convention

win32lfn-python3's Introduction

win32lfn-python3

This is a modified version of the original extension that supports Python 3. It's not extensively tested yet but it seems to be working for me on Windows 10 (build 19045) with Mercurial/TortoiseHg 6.5.1 (which appears to bundle Python 3.9.13).

Python 3 appears to have fixed some issues with handling of long paths, so less work required by this extension to fix issues. I've commented out a few lines that appear to be no longer necessary.

Feel free to open issues and PRs and I'll do my best to accomodate.

Original Readme

Mercurial extension which allows using working copies that contain filenames longer than Windows MAXPATH of 260 characters.

For full documentation see: https://wiki.mercurial-scm.org/Win32LongFileNamesExtension

Development

To run the tests:

set PYTHONPATH=C:\src\hg;c:\src\win32lfn\src
python c:\src\win32lfn\tests\testwin32lfn.py

License

The intent is that this code is under the same license as Mercurial. See https://repo.mercurial-scm.org/hg/file/tip/COPYING

This code is licensed under GPL version 2 or any later version ("GPLv2+"). This means it is completely free for most uses including redistribution.

win32lfn-python3's People

Contributors

clonkex avatar

Stargazers

 avatar

Watchers

 avatar  avatar

win32lfn-python3's Issues

Mercurial error on Update

Hi there,

there seems to be an issue with utf-8 in here. After installling the extension to Mercurial I get the following error message if I try to "Update" to a newer Revision of my repository.

** Mercurial version (6.4.2).  TortoiseHg version (6.4.2)
** Command: 
** CWD: C:\Program Files\TortoiseHg
** Encoding: cp1252
** Extensions loaded: mercurial_keyring unknown, rebase, strip, tortoisehg.util.configitems, win32lfn
** Python version: 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]
** Windows version: sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, service_pack='')
** Processor architecture: x64
** Qt-5.15.2 PyQt-5.15.7 QScintilla-2.13.3
Traceback (most recent call last):
  File "tortoisehg\hgqt\cmdui.pyc", line 649, in runCommand
  File "tortoisehg\hgqt\update.pyc", line 398, in runCommand
  File "tortoisehg\hgqt\update.pyc", line 342, in isclean
  File "mercurial\context.pyc", line 1460, in modified
  File "mercurial\util.pyc", line 1760, in __get__
  File "mercurial\context.pyc", line 1425, in _status
  File "mercurial\localrepo.pyc", line 3388, in status
  File "mercurial\context.pyc", line 432, in status
  File "mercurial\context.pyc", line 2001, in _buildstatus
  File "mercurial\context.pyc", line 1906, in _dirstatestatus
  File "mercurial\dirstate.pyc", line 1681, in status
  File "mercurial\dirstate.pyc", line 1505, in walk
  File "mercurial\windows.pyc", line 599, in statfiles
  File "C:/Program Files/TortoiseHg/win32lfn.py", line 116, in fn
    path = stringtobytes(uncabspath(args[0]))
  File "C:/Program Files/TortoiseHg/win32lfn.py", line 97, in uncabspath
    path = bytestostring(path)
  File "C:/Program Files/TortoiseHg/win32lfn.py", line 377, in bytestostring
    string = string.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xdc in position 43: invalid continuation byte

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.