0.9.5 : bug when moving directory then creating file or symlink
Patrick Mézard
pmezard at gmail.com
Tue May 6 11:49:06 UTC 2008
Paul R a écrit :
> Hi,
>
> there seems to be a bug with pulling (and merging) from a repository
> that performed the following operation since last fetch from it :
> 1. Moved a directory 'oldDirPlace' to 'newDirPlace', or removed
> 'oldDirPlace'
> 2. Created a file or a symlink whose name is 'oldDirPlace'
>
> To reproduce, follow those steps :
> - create a repository "up" and clone it to "down"
> - cd up
> - mkdir foodir; touch foodir/foofile; hg add foodir/foofile
> - hg commit -m "add foodir dir"
> - cd ../down
> - hg fetch
> - cd ../up
> - hg rm foodir; hg commit -m "rm foodir dir"
> - touch foodir (or ln -s whatever foodir)
> - hg add foodir; hg commit -m "add foodir file or symlink"
> - cd ../down
> - hg fetch
This bug is related to "update" and is fixed in 1.0. Here the other version I understood on IRC, closer to what is described above: move a directory then replace it with a file, in another branch change a directory file, merge. Run with crew it gives:
"""
$ hg init t
$ cd t
$ mkdir foo
$ echo a > foo/a
$ hg ci -Am create
adding foo/a
$ hg mv foo bar
moving foo/a to bar/a
$ echo a > foo
$ hg ci -Am move
adding foo
$ hg up -C 0
1 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ echo b >> foo/a
$ hg ci -m change
created new head
$ hg merge --debug
resolving manifests
overwrite None partial False
ancestor b485793ff0a4 local 32887cc33e7f+ remote 2c1f7e91b9e0
searching for copies back to rev 1
unmatched files in other:
bar/a
foo
all copies found (* = to merge, ! = divergent):
bar/a -> foo/a *
checking for directory renames
dir foo/ -> bar/
foo/a: remote moved to bar/a -> m
foo: remote created -> g
preserving foo/a for resolve of bar/a
removing foo/a
getting foo
abort: Is a directory: /Users/pmezard/dev/dismoiou/trunk/Client/player/t/foo
"""
I don't really know what to expect. A theory may be the merge tool should handle that, but AFAIK, the merge tool is not called here (but might a configuration issue).
--
Patrick Mézard
More information about the Mercurial
mailing list