[PATCH 2 of 5] Add util.endswithsep() and use it instead of using os.sep directly
Matt Mackall
mpm at selenic.com
Mon Jan 7 22:40:40 UTC 2008
On Sun, 2008-01-06 at 21:26 +0900, Shun-ichi Goto wrote:
> # HG changeset patch
> # User Shun-ichi GOTO <shunichi.goto at gmail.com>
> # Date 1199621768 -32400
> # Node ID 43ff7c5ed8446a721a7bad5655ddd59f8fc62e7b
> # Parent 6b70720b93c7fd612cf286fbfb7501bcf3a8735b
> Add util.endswithsep() and use it instead of using os.sep directly.
>
> This is required for workaround of 0x5c issue.
>
> +
> +def endswithsep(path):
> + '''Check path ends with os.sep or os.altsep.'''
> + return path.endswith(os.sep) or os.altsep and path.endswith(os.altsep)
Confused. This appears to simply be fixing the fact that we don't check
against os.altsep? If so, then the patch description is a little
misleading.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list