Discussion:
[9fans] hg on plan 9
(too old to reply)
erik quanstrom
2011-09-15 04:22:07 UTC
Permalink
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
Federico G. Benavento
2011-09-15 04:38:30 UTC
Permalink
erik, it the fs that doesn't support ' ' in file names...
Post by erik quanstrom
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
erik quanstrom
2011-09-15 05:21:39 UTC
Permalink
Post by Federico G. Benavento
erik, it the fs that doesn't support ' ' in file names...
Post by erik quanstrom
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
i know that. it's just more difficult than necessary to put stuff like
that in the repo.

- erik
dexen deVries
2011-09-15 10:22:09 UTC
Permalink
Post by erik quanstrom
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
/n/other/quanstro/nix-os/.hg/store/data/lib/font/bit/anonpro/_anonymous
_pro.ttf.i
there used to be a hack in Hg to safely store files with spaces (and other
potentially unsafe characters) in names, called `fncache repository format'.

http://mercurial.selenic.com/wiki/fncacheRepoFormat

seems you can toggle it on/off in config.
--
dexen deVries

[[[↓][→]]]

For example, if the first thing in the file is:
<?kzy irefvba="1.0" rapbqvat="ebg13"?>
an XML parser will recognize that the document is stored in the traditional
ROT13 encoding.

(( Joe English, http://www.flightlab.com/~joe/sgml/faq-not.txt ))
Akshat Kumar
2011-10-27 07:26:38 UTC
Permalink
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
Post by erik quanstrom
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
Loading...