Fossil SCM

fossil merge doesn't create directories for renames

Open

ef44b52161243aa… · opened 12 years, 9 months ago

Type
Code_Defect
Priority
Severity
Important
Resolution
Open
Subsystem
Created
June 16, 2013 7:48 p.m.

$ fossil merge trunk

ADDED ...

UPDATE ...

MERGE ...

RENAME include/GL/glfw3.h -> include/GLFW/glfw3.h

fossil: cannot open "/Users/donny/Developer/wilderness/input_handler/include/GLFW/glfw3.h" for writing

Rolling back prior filesystem changes...

DELETE ...

UNDO ...

UNDO ...

NEW ...

NEW ...

DELETE include/GLFW/glfw3.h

$

In the trunk I renamed include/GL/glfw3.h to include/GLFW/glfw3.h using fossil mv followed by a commit. In one of my branches I tried to merge the trunk into it. The file include/GL/glfw3.h exists in the branch, and there is no include/GLFW/ directory. So when fossil merges with the trunk, it tries to move/rename include/GL/glfw3.h to include/GLFW/glfw3.h, but fails because no directory named GLFW exists. If I go and manually create an empty GLFW folder (include/GLFW/), fossil merge works correctly.

This occured on Mac OS X 10.8.

Comments (2)

nobody 12 years, 9 months ago

$ fossil merge trunk

ADDED ...

UPDATE ...

MERGE ...

RENAME include/GL/glfw3.h -> include/GLFW/glfw3.h

fossil: cannot open "/Users/donny/Developer/wilderness/input_handler/include/GLFW/glfw3.h" for writing

Rolling back prior filesystem changes...

DELETE ...

UNDO ...

UNDO ...

NEW ...

NEW ...

DELETE include/GLFW/glfw3.h

$

In the trunk I renamed include/GL/glfw3.h to include/GLFW/glfw3.h using fossil mv followed by a commit. In one of my branches I tried to merge the trunk into it. The file include/GL/glfw3.h exists in the branch, and there is no include/GLFW/ directory. So when fossil merges with the trunk, it tries to move/rename include/GL/glfw3.h to include/GLFW/glfw3.h, but fails because no directory named GLFW exists. If I go and manually create an empty GLFW folder (include/GLFW/), fossil merge works correctly.

This occured on Mac OS X 10.8.

Donny 12 years, 9 months ago

This also fails on Ubuntu 12.04. I have narrowed the issue to here: [http://www.fossil-scm.org/fossil/artifact/6fc0771be17cc7f5fa3162a630c6bfd0d3c9f7b4?ln=364,365]

It appears to me that fossil_fopen will fail if an intermediate directory does not exist. I believe the solution would be to generate intermediate directories, but I do not possess enough knowledge of the codebase to introduce an elegant solution to recursively create any parent directories that are missing.

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button