File Introduced as Both a Largefile and Regular File?

Na'Tosha Bard natosha at unity3d.com
Thu Nov 3 09:55:41 CDT 2011


Hello,

We ran into a very interesting bug here and I'm not sure what the proper
fix should be.  Test case:

$ hg init foo
$ cd foo/
$ echo "n1" > n1
$ hg add
adding n1
$ hg commit -m "Add as normal file"
$ echo "b1" > b1
$ hg add --large b1
$ hg commit -m "Add as largefile"
$ hg update -r 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
getting changed largefiles
0 largefiles updated, 1 removed
$ echo "b2" > b1
$ hg add
adding b1
$ hg commit -m "Add as normal file"
created new head
$ hg merge
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
getting changed largefiles
1 largefiles updated, 0 removed
$ hg commit -m "Merge two heads"

Now we have "b1" in the history, both as a regular file AND as a
largefile.  Of course this happens because Mercurial is tracking the
standin, and not the actual largefile, but *logically* they should be the
same file.

Also, if I make a clone of foo, b1 is immediately modified according to
"status":

$ hg clone foo bar
updating to branch default
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
getting changed largefiles
0 largefiles updated, 0 removed
$ cd bar
$ hg status
M b1

What should we do in this case?  Should we look for a name collision
between the files the standins represent and and regular files on the two
sides of the merge and abort the merge?

Cheers,
Na'Tosha

-- 
*Na'Tosha Bard*
Build & Infrastructure Developer | Unity Technologies

*E-Mail:* natosha at unity3d.com
*Skype:* natosha.bard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20111103/d88897d7/attachment.html>


More information about the Mercurial-devel mailing list