temp directory.

Benoit Boissinot bboissin at gmail.com
Thu Nov 18 08:15:52 UTC 2010


On Wed, Nov 17, 2010 at 11:42 PM, Matt Mackall <mpm at selenic.com> wrote:
> On Wed, 2010-11-17 at 16:13 -0600, Kevin Bullock wrote:
>> On Nov 17, 2010, at 2:25 PM, Paolo Minazzi wrote:
>>
>> >> If you want to avoid needless writes on the USB pen, I'd suggest doing
>> >> all your work on a separate clone on the hard disk, and push to the
>> >> pen drive after commit. Mercurial won't need a working copy inside the
>> >> pen drive repository, and it'll only write what's needed to record the
>> >> new revisions. And you'd get the additional benefit of an independent
>> >> separate copy of your project's whole history.
>> >> Regards,
>> >> Wagner
>> >
>> > Hi Wagner,
>> > thanks for your reply.
>> > Excuse me. My case is a little different.
>> > I have two PCs for developing.
>> > I want avoid to continue to copy/clone repository.
>> > My idea is to use only a USB pen, modify sources on it and do the build on harddisk.
>> >
>> > I have seen that if I use
>> >> mount -remount,ro /my_code (my_code is on the USB pen)
>> > "hg diff" does not work because it is a read-only filesystem.
>> > This means that "hg diff" try to write files on my USB pen.
>> > I want avoid this.
>
> Send us a traceback from hg diff --traceback.
>
>> I don't think it's really possible to do this. Most likely `hg diff`
>> is taking a lock on the repo, which requires it to be writeable.
>
> There's no locking for readers in Mercurial.

I think there's some code in status to update the dirstate in some
cases (file changed, but size didn't), but it shouldn't fail if
locking is not possible.

Benoit



More information about the Mercurial mailing list