[issue2845] update protects untracked but update --check does not

today bugs at mercurial.selenic.com
Tue Jun 7 14:12:19 CDT 2011


New submission from today <support at oemtech.com>:

note (1) hg update does not destroy untracked file
     (2) hg update does destroy untracked file

$ mkdir a; hg init a; hg clone a a-clone
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved

$ cd a-clone/
$ echo "tracked contents" > newfile; hg commit -A -m "newfile"; hg push
adding newfile
pushing to c:\Users\user\Desktop\a
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files

$ cd ../a
$ echo "working contents" > newfile
$ hg st
? newfile

$ # note (1)
$ hg update
abort: untracked file in working directory differs from file in requested 
revision: 'newfile'

$ # note (2)
$ hg update --check
1 files updated, 0 files merged, 0 files removed, 0 files unresolved

----------
messages: 16474
nosy: today
priority: bug
status: unread
title: update protects untracked but update --check does not

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


More information about the Mercurial-devel mailing list