comparison tests/test-pathconflicts-basic.t @ 34552:33c8a6837181

merge: check for path conflicts when updating (issue5628) When updating to a new revision, check for path conflicts caused by unknown files in the working directory, and handle these by backing up the file or directory and replacing it. Differential Revision: https://phab.mercurial-scm.org/D781
author Mark Thomas <mbthomas@fb.com>
date Mon, 02 Oct 2017 14:05:30 -0700
parents 34c8080d12ac
children 0217d66846f7
comparison
equal deleted inserted replaced
34551:1609a5afc4f5 34552:33c8a6837181
35 35
36 $ hg up -q 0 36 $ hg up -q 0
37 $ mkdir a 37 $ mkdir a
38 $ echo 3 > a/b 38 $ echo 3 > a/b
39 $ hg up file 39 $ hg up file
40 abort: *: '$TESTTMP/repo/a' (glob) 40 a: untracked file differs
41 abort: untracked files in working directory differ from files in requested revision
41 [255] 42 [255]
42 $ hg up --clean file 43 $ hg up --clean file
43 abort: *: '$TESTTMP/repo/a' (glob) 44 abort: *: '$TESTTMP/repo/a' (glob)
44 [255] 45 [255]
45 46
51 Basic update - untracked file conflicts with remote directory 52 Basic update - untracked file conflicts with remote directory
52 53
53 $ hg up -q 0 54 $ hg up -q 0
54 $ echo untracked > a 55 $ echo untracked > a
55 $ hg up --config merge.checkunknown=warn dir 56 $ hg up --config merge.checkunknown=warn dir
56 abort: *: '$TESTTMP/repo/a/b' (glob) 57 a: replacing untracked file
57 [255] 58 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
58 59 (activating bookmark dir)
59 Repo is in a very bad state now - recover manually
60
61 $ rm -f a
62 $ hg up -q --clean 0
63 60
64 Basic clean update - local directory conflicts with changed remote file 61 Basic clean update - local directory conflicts with changed remote file
65 62
66 $ hg up -q file 63 $ hg up -q file
67 $ rm a 64 $ rm a