fivre
fivre

Reputation: 41

Merging fails in mercurial with "Operation not supported"

I've set up my ~/.hgrc as per https://www.mercurial-scm.org/wiki/MergingWithVim to use vimdiff.

[ui]
merge = vimdiff

[merge-tools]
vimdiff.executable = vim
vimdiff.args = -d $base $local $output $other +close +close

However, when I try to run the actual merge, it just fails out not very helpfully with the following:

bash-3.2$ hg --debug merge
  searching for copies back to rev 7
resolving manifests
 overwrite None partial False
 ancestor 88aaf3a2e10f local 311bb03b96cd+ remote 29bec6ac5dd3
 junk: versions differ -> m
preserving junk for resolve of junk
updating: junk 1/1 files (100.00%)
picked tool 'vimdiff' for junk (binary False symlink False)
abort: Operation not supported: /Accounts/rainest/mtest/junk.orig

Any idea why it's doing this?

Upvotes: 1

Views: 310

Answers (2)

fivre
fivre

Reputation: 41

I've figured it out.

It turns out there's a very specific bug in Python2.6's shutil library that occurs if you're working with NFS mounts on a BSD-like system. More information, and the fix, can be found at http://bugs.python.org/issue7512.

Upvotes: 2

Ry4an Brase
Ry4an Brase

Reputation: 78350

Depending on how you installed it Mercurial usually comes with vimdiff pre-configured for merging. On my machine that's in /etc/mercurial/hgrc.d/mergetools.rc but I imagine it's different in your OSX box.

You might want to check to see if it doesn't already use vimdiff for merging if you remove all of that from your .hgrc.

You can use the command hg showconfig --debug to see all the per-user, per-repo, and system-wide configuration items that are in effect. If you see vimdiff in there after the lines you've added are removed then you might be good to go.

Upvotes: 1

Related Questions