1

I have a few users using Mercurial over Linux Samba shares, mounted on their Macs.

The Samba server has the following veto rules (well discussed both here on this site and elsewhere) to prevent Macs from creating resource forks, which wreak havoc with all sorts of things, especially on developers' directories:

veto files = /._*/.DS_Store/
delete veto files = yes

The problem is that sometimes, randomly, Mercurial will choke with this error:

$ hg ci
trouble committing stylesheets/custom.css!
transaction abort!
rollback completed
abort: Permission denied: '/Volumes/xxx/yyy/.hg/store/data/stylesheets/._custom.css.i-JdxA5R'

Why is Mercurial trying to create a resource fork inside its own data store?

If I comment the veto rule, the commit succeeds, but it leaves no such resource fork on the server. So it appears to be a temporary resource fork, or that of a temporary file.

How can I prevent hg from creating it, or ignore the error, or make Samba swallow it silently?

Edit: I suppose (but I'm not certain) hg is creating a temp file called custom.css.i-JdxA5R and for some reason OS X tries to attach a resource fork to it. When that fails, as it's vetoed by Samba, OS X returns an error for the entire temp file operation.

1 Answer 1

-1

You didn't understand the syntax of the veto files (doc link) option. The / actually separates two rules, and doesn't have the dir separator meaning as in unix paths.

Essentially, you have two rules there, the first one blocking ._*, which matches ._custom.css.i-JdxA5R.

4
  • Yes, that is the purpose of that veto files rule.
    – Tobia
    Feb 26, 2015 at 11:33
  • My question is: why does Mercurial try to create a ._* file in the first place; how can I prevent it from doing so; or as a last, resort make Samba silently discard it instead of returning permission denied.
    – Tobia
    Feb 26, 2015 at 11:34
  • Yeah, but apparently hg wants to create a temp file with that name, not a resource fork. Just discarding it is an interesting idea - "oh, I don't like this file name. Let's just discard it and lie to the client that I actually stored it"...
    – Sven
    Feb 26, 2015 at 11:35
  • Are you sure hg is creating an actual temp file that begins with ._? I'm very dubious. Hg is probably just creating a temp file called custom.css.i-JdxA5R, but for some reason OS X tries to attach a resource fork. When that fails, as it's vetoed by Samba, OS X returns an error for the entire temp file operation. My second option above would be for Samba to silently discard the resource fork, not the temp file, but I agree that it's sub-optimal.
    – Tobia
    Feb 26, 2015 at 12:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .