|
1
|
# |
|
2
|
# Copyright (c) 2016 D. Richard Hipp |
|
3
|
# |
|
4
|
# This program is free software; you can redistribute it and/or |
|
5
|
# modify it under the terms of the Simplified BSD License (also |
|
6
|
# known as the "2-Clause License" or "FreeBSD License".) |
|
7
|
# |
|
8
|
# This program is distributed in the hope that it will be useful, |
|
9
|
# but without any warranty; without even the implied warranty of |
|
10
|
# merchantability or fitness for a particular purpose. |
|
11
|
# |
|
12
|
# Author contact information: |
|
13
|
# [email protected] |
|
14
|
# http://www.hwaci.com/drh/ |
|
15
|
# |
|
16
|
############################################################################ |
|
17
|
# |
|
18
|
# Testing "merge" command warnings |
|
19
|
# |
|
20
|
|
|
21
|
test_setup |
|
22
|
|
|
23
|
write_file f1 "f1" |
|
24
|
fossil add f1 |
|
25
|
fossil commit -m "add f1" --tag pivot |
|
26
|
|
|
27
|
write_file f2 "f2" |
|
28
|
fossil add f2 |
|
29
|
fossil commit -m "add f2" |
|
30
|
|
|
31
|
fossil update pivot |
|
32
|
fossil rm --hard f1 |
|
33
|
write_file f2 "f2.1" |
|
34
|
write_file f3 "f3" |
|
35
|
fossil add f2 f3 |
|
36
|
fossil commit -b b -m "delete f1, add f2 and f3" --tag mrg |
|
37
|
|
|
38
|
write_file f4 "f4" |
|
39
|
fossil add f4 |
|
40
|
fossil commit -m "add f4" |
|
41
|
|
|
42
|
fossil update trunk |
|
43
|
write_file f1 "f1.1" |
|
44
|
write_file f3 "f3.1" |
|
45
|
fossil merge --integrate mrg -expectError |
|
46
|
test_status_list merge_warn-1 $RESULT { |
|
47
|
WARNING: 1 unmanaged files were overwritten |
|
48
|
WARNING: 2 merge conflicts |
|
49
|
DELETE f1 |
|
50
|
MERGE f2 |
|
51
|
ADDED f3 (overwrites an unmanaged file), original copy backed up locally |
|
52
|
WARNING: local edits lost for f1 |
|
53
|
} |
|
54
|
test merge_warn-2 { |
|
55
|
[string first "ignoring --integrate: mrg is not a leaf" $RESULT]>=0 |
|
56
|
} |
|
57
|
|
|
58
|
############################################################################### |
|
59
|
|
|
60
|
test_cleanup |
|
61
|
|