I made a change to hg:

mercurial/store.py:
in def _buildencodefun():
-    win_reserved = [ord(x) for x in '\\:*?"<>|']
+    win_reserved = [ord(x) for x in '\\:*?"<>| ']

in def _build_lower_encodefun():
-    win_reserved = [ord(x) for x in '\\:*?"<>|']
+    win_reserved = [ord(x) for x in '\\:*?"<>| ']

This got me through the errors with filenames
with spaces in them (it converts spaces to '~')
but I have errors of a different sort now:

cpu% hg clone https://code.google.com/p/nix-os/
destination directory: nix-os
requesting all changes
adding changesets
adding manifests
adding file changes
added 112 changesets with 14878 changes to 14527 files
updating working directory
Traceback (most recent call last):
  File "/bin/hg", line 31, in <module>
    mercurial.dispatch.run()
  File "./mercurial/dispatch.py", line 16, in run
  File "./mercurial/dispatch.py", line 27, in dispatch
  File "./mercurial/dispatch.py", line 43, in _runcatch
  File "./mercurial/dispatch.py", line 449, in _dispatch
  File "./mercurial/dispatch.py", line 317, in runcommand
  File "./mercurial/dispatch.py", line 501, in _runcommand
  File "./mercurial/dispatch.py", line 454, in checkargs
  File "./mercurial/dispatch.py", line 448, in <lambda>
  File "./mercurial/util.py", line 402, in check
  File "/sys/lib/python/commands.py", line 636, in clone

  File "/sys/lib/python/mercurial/hg.py", line 317, in clone
    _update(dest_repo, uprev)
  File "/sys/lib/python/mercurial/hg.py", line 335, in update
    stats = _merge.update(repo, node, False, False, None)
  File "/sys/lib/python/mercurial/merge.py", line 470, in update
    stats = applyupdates(repo, action, wc, p2)
  File "/sys/lib/python/mercurial/merge.py", line 308, in applyupdates
    repo.wwrite(f, t, flags)
  File "/sys/lib/python/mercurial/localrepo.py", line 555, in wwrite
    self.wopener(filename, 'w').write(data)
  File "./mercurial/util.py", line 874, in __call__
IOError: invalid mode: wb

Anyone have a more thorough patch?


Thanks,
ak

On Wed, Sep 14, 2011 at 8:58 PM, erik quanstrom <quans...@quanstro.net> wrote:
> looks like spaces in file names are a problem, at least
> on my system.
>
> minooka; hg clone https://code.google.com/p/nix-os/
> destination directory: nix-os
> requesting all changes
> adding changesets
> adding manifests
> adding file changes
> transaction abort!
> rollback completed
> abort: Bad file number: 
> /n/other/quanstro/nix-os/.hg/store/data/lib/font/bit/anonpro/_anonymous 
> _pro.ttf.i
>
> - erik
>
>

Reply via email to