[issue3084] Files can Co-Exist as Largefiles and Regular Files due to Merge (and Probably Rebase)

Na'Tosha Bard bugs at mercurial.selenic.com
Fri Nov 4 10:56:21 CDT 2011


New submission from Na'Tosha Bard <natosha at gmail.com>:

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?

----------
messages: 17936
nosy: natosha
priority: bug
status: unread
title: Files can Co-Exist as Largefiles and Regular Files due to Merge (and Probably Rebase)

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


More information about the Mercurial-devel mailing list