hg clone vs. VFAT problem
Adrian Buehlmann
adrian at cadifra.com
Tue Sep 30 07:39:56 CDT 2008
On 30.09.2008 12:26, Sebastian Krämer wrote:
> Hi there!
>
> I've just run into a problem when I tried to clone my local hg repository
> on my vfat formatted usb stick. It appears from the traceback and some few
> reports on the web that this is due to filesystem problems, in this case
> the chmod command:
>
> hg --traceback clone ~/src/cvblobs-hg/cvblob-master cvBlob
> Traceback (most recent call last):
> File "/usr/lib/python2.5/site-packages/mercurial/dispatch.py", line 45,
> in _runcatch
> return _dispatch(ui, args)
> File "/usr/lib/python2.5/site-packages/mercurial/dispatch.py", line 364,
> in _dispatch
> ret = _runcommand(ui, options, cmd, d)
> File "/usr/lib/python2.5/site-packages/mercurial/dispatch.py", line 417,
> in _runcommand
> return checkargs()
> File "/usr/lib/python2.5/site-packages/mercurial/dispatch.py", line 373,
> in checkargs
> return cmdfunc()
> File "/usr/lib/python2.5/site-packages/mercurial/dispatch.py", line 358,
> in <lambda>
> d = lambda: func(ui, *args, **cmdoptions)
> File "/usr/lib/python2.5/site-packages/mercurial/commands.py", line 535,
> in clone
> update=not opts['noupdate'])
> File "/usr/lib/python2.5/site-packages/mercurial/hg.py", line 188, in
> clone
> force_copy(src_repo.join("00changelog.i"), dummy_changelog)
> File "/usr/lib/python2.5/site-packages/mercurial/hg.py", line 170, in
> force_copy
> util.copyfiles(src, dst)
> File "/usr/lib/python2.5/site-packages/mercurial/util.py", line 676, in
> copyfiles
> shutil.copy(src, dst)
> File "/usr/lib/python2.5/shutil.py", line 81, in copy
> copymode(src, dst)
> File "/usr/lib/python2.5/shutil.py", line 60, in copymode
> os.chmod(dst, mode)
> OSError: [Errno 1] Operation not permitted:
> '/mnt/usb/usbstick/cvblob/cvBlob/.hg/00changelog.i'
> abort: Operation not permitted:
> /mnt/usb/usbstick/cvblob/cvBlob/.hg/00changelog.i
>
> I found a corresponding error report on the issue tracker
> (http://www.selenic.com/mercurial/bts/issue1172) but reported workaround
> (mount with -quiet option) doesn't work for me.
>
> This all is kind of sad. I had high hopes that mercurial would enable me to
> transfer source code between platforms.
Sure it does.
> Of course, hg itself probably does
> that -- I might try to change the usb stick filesystem to ntfs and see if
> that helps. After all I'm wondering about the small count of error reports
> I found on the web :) . Am I overlooking something? Or am I the only one
> who transfers source code from/to windows with a mobile device?
The repository format on unix/Linux and windows is the same, so you
can copy the files between them (as long as you don't hit the
maximum path length limit of 260 characters on Windows).
So, as a workaround, you can copy the repository root directory
to the usb stick using normal recursive directory copy commands
(e.g. "cp -R" on FreeBSD).
This is perfectly safe to do as long as no other processes are writing
to the source repository during the copying of the files.
And you can even work around that too if needed by doing a
"hg clone" to a "quiet" copy repository on your harddisk and
then "cp -R" that to the usb stick.
More information about the Mercurial
mailing list