Changeset 845 in tailor


Ignore:
Timestamp:
09/25/05 00:48:43 (8 years ago)
Author:
lele@…
Hash name:
20050924224843-97f81-7e739e319fece74901d7ec90ee6474d586f9493b
Message:

Use mercurial's own normpath()
At the API layer, mercurial always expects UNIX style pathnames.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/hglib.py

    r825 r845  
    1414 
    1515from target import SyncronizableTargetWorkingDir, TargetInitializationFailure 
    16 from mercurial import ui, hg, commands 
     16from mercurial import ui, hg, commands, util 
    1717 
    1818class HglibWorkingDir(SyncronizableTargetWorkingDir): 
     19 
     20    def _normalizeEntryPaths(self, entry): 
     21        """ 
     22        Normalize the name and old_name of an entry. 
     23 
     24        This implementation uses ``mercurial.util.normpath()``, since 
     25        at this level hg is expecting UNIX style pathnames, with 
     26        forward slash"/" as separator, also under insane operating systems. 
     27        """ 
     28 
     29        entry.name = util.normpath(entry.name) 
     30        if entry.old_name: 
     31            entry.old_name = util.normpath(entry.old_name) 
     32 
    1933    def _addPathnames(self, names): 
    2034        from os.path import join, isdir 
Note: See TracChangeset for help on using the changeset viewer.