[issue3200] corrupted symbolic link during/after merge

Thomas De Schampheleire bugs at mercurial.selenic.com
Fri Jan 13 07:23:29 CST 2012


New submission from Thomas De Schampheleire <patrickdepinguin+mercurial at gmail.com>:

In one of our repositories we are facing a corrupt symbolic link: the
destination of the link is no longer a path, but rather the text of a file
(C code).

We are unsure how exactly this came about. We are able to reproduce this on
the same repository, but attempts to reproduce this on a simpler test case
failed.

Devws140:/repo/CO_VXPRJ $ hg up -r e36ae7c71562 -C
2157 files updated, 0 files merged, 84 files removed, 0 files unresolved
Devws140:/repo/CO_VXPRJ $ hg merge -r e0c813e5f4ae
remote changed CO_VXPRJ/nglt-a/Makefile which local deleted
use (c)hanged version or leave (d)eleted? d
[other merges]
tool meld can't handle symlinks
tool kdiff3 can't handle symlinks
tool gvimdiff can't handle symlinks
tool vimdiff can't handle symlinks
tool merge can't handle symlinks
 no tool found to merge CO_VXPRJ/nglt-a/config.h
keep (l)ocal or take (o)ther? l
[other merges]
79 files updated, 12 files merged, 4 files removed, 0 files unresolved
(branch merge, don't forget to commit)
Devws140:/repo/CO_VXPRJ $ cd nglt-a
Devws140:/repo/CO_VXPRJ/nglt-a $ ll
total 4.0K
lrwxrwxrwx 1 user we2 328 Jan  2 12:33 config.h -> #ifndef     INCconfigh
#define INCconfigh

#define excVecInit asamexcVecInit

extern unsigned long dbg_baud;
extern unsigned long dbg_line;

#include "configAll.h"
#ifndef PRJ_BUILD
#include <krnlcfg/bspParams.h>
#endif


#endif  /* INCconfigh */
#if defined(PRJ_BUILD)
#include "prjParams.h"
#endif

Devws140:/repo/CO_VXPRJ/nglt-a $     

In e36ae7c71562, the nglt-a directory does not exist.
In e0c813e5f4ae, the directory does exist, and contains the config.h symlink.

During the merge, if I choose "other", I get the right symlink ; if I choose
"local", I get the wrong result.

In fact, before answering the question, the symbolic link is already wrong.
'hg merge' must have put it in that state.

I don't really understand why Mercurial asks for this, as the symlink only
exists in one of the two revisions. There must be something special in the
history of these files/directories, that makes it a non-trivial merge.

We're unsure which information is needed to determine what went wrong. Any
pointers are welcome.

----------
messages: 18618
nosy: Mathiasdm, pdp
priority: bug
status: unread
title: corrupted symbolic link during/after merge

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3200>
____________________________________________________


More information about the Mercurial-devel mailing list