[issue3176] hg remove on added largefle gets confused

Peter Linss bugs at mercurial.selenic.com
Sun Jan 1 15:11:42 CST 2012


New submission from Peter Linss <peter.linss at hp.com>:

If you add a largefile, then remove it, mercurial acts both as if the file
is still added and removed depending on operation.

'hg forget' works and cleans up state (but gives error message in doing so).

Also note 'hg rm' gives different error on largefile.

Steps to reproduce:
$ hg init test
$ cd test/
$ echo "foo" > foo.txt
$ hg add foo.txt 
$ hg stat
A foo.txt
$ hg rm foo.txt 
not removing foo.txt: file has been marked for add (use forget to undo)
$ echo "bar" > bar.txt
$ hg add --large bar.txt 
$ hg rm bar.txt 
not removing bar.txt: file has been marked for add (use -f to force removal)
  ** Note different message **
$ hg stat
A bar.txt
A foo.txt
$ hg rm -f foo.txt 
$ hg stat
A bar.txt
? foo.txt
  ** works as expected **
$ hg rm -f bar.txt 
$ hg stat
A bar.txt
? foo.txt
  ** bar.txt still in added state **
$ hg forget bar.txt 
not removing bar.txt: file is already untracked
$ hg stat
? bar.txt
? foo.txt
  ** bar.txt now really removed despite error message **
$ echo "baz" baz.txt
baz baz.txt
$ echo "baz" > baz.txt
$ hg add --large baz.txt 
$ hg stat
A baz.txt
? bar.txt
? foo.txt
$ hg forget baz.txt 
$ hg stat
? bar.txt
? baz.txt
? foo.txt
  ** works as expected **

----------
messages: 18463
nosy: plinss
priority: bug
status: unread
title: hg remove on added largefle gets confused
topic: largefiles

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


More information about the Mercurial-devel mailing list