Show More
@@ -1,62 +1,116 | |||||
1 | test merging things outside of the sparse checkout |
|
1 | test merging things outside of the sparse checkout | |
2 |
|
2 | |||
3 | $ hg init myrepo |
|
3 | $ hg init myrepo | |
4 | $ cd myrepo |
|
4 | $ cd myrepo | |
5 | $ cat > .hg/hgrc <<EOF |
|
5 | $ cat > .hg/hgrc <<EOF | |
6 | > [extensions] |
|
6 | > [extensions] | |
7 | > sparse= |
|
7 | > sparse= | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 | $ echo foo > foo |
|
10 | $ echo foo > foo | |
11 | $ echo bar > bar |
|
11 | $ echo bar > bar | |
12 | $ hg add foo bar |
|
12 | $ hg add foo bar | |
13 | $ hg commit -m initial |
|
13 | $ hg commit -m initial | |
14 |
|
14 | |||
15 | $ hg branch feature |
|
15 | $ hg branch feature | |
16 | marked working directory as branch feature |
|
16 | marked working directory as branch feature | |
17 | (branches are permanent and global, did you want a bookmark?) |
|
17 | (branches are permanent and global, did you want a bookmark?) | |
18 | $ echo bar2 >> bar |
|
18 | $ echo bar2 >> bar | |
19 | $ hg commit -m 'feature - bar2' |
|
19 | $ hg commit -m 'feature - bar2' | |
20 |
|
20 | |||
21 | $ hg update -q default |
|
21 | $ hg update -q default | |
22 | $ hg debugsparse --exclude 'bar**' |
|
22 | $ hg debugsparse --exclude 'bar**' | |
23 |
|
23 | |||
24 | $ hg merge feature |
|
24 | $ hg merge feature | |
25 | temporarily included 1 file(s) in the sparse checkout for merging |
|
25 | temporarily included 1 file(s) in the sparse checkout for merging | |
26 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
26 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
27 | (branch merge, don't forget to commit) |
|
27 | (branch merge, don't forget to commit) | |
28 |
|
28 | |||
29 | Verify bar was merged temporarily |
|
29 | Verify bar was merged temporarily | |
30 |
|
30 | |||
31 | $ ls |
|
31 | $ ls | |
32 | bar |
|
32 | bar | |
33 | foo |
|
33 | foo | |
34 | $ hg status |
|
34 | $ hg status | |
35 | M bar |
|
35 | M bar | |
36 |
|
36 | |||
37 | Verify bar disappears automatically when the working copy becomes clean |
|
37 | Verify bar disappears automatically when the working copy becomes clean | |
38 |
|
38 | |||
39 | $ hg commit -m "merged" |
|
39 | $ hg commit -m "merged" | |
40 | cleaned up 1 temporarily added file(s) from the sparse checkout |
|
40 | cleaned up 1 temporarily added file(s) from the sparse checkout | |
41 | $ hg status |
|
41 | $ hg status | |
42 | $ ls |
|
42 | $ ls | |
43 | foo |
|
43 | foo | |
44 |
|
44 | |||
45 | $ hg cat -r . bar |
|
45 | $ hg cat -r . bar | |
46 | bar |
|
46 | bar | |
47 | bar2 |
|
47 | bar2 | |
48 |
|
48 | |||
49 | Test merging things outside of the sparse checkout that are not in the working |
|
49 | Test merging things outside of the sparse checkout that are not in the working | |
50 | copy |
|
50 | copy | |
51 |
|
51 | |||
52 | $ hg strip -q -r . --config extensions.strip= |
|
52 | $ hg strip -q -r . --config extensions.strip= | |
53 | $ hg up -q feature |
|
53 | $ hg up -q feature | |
54 | $ touch branchonly |
|
54 | $ touch branchonly | |
55 | $ hg ci -Aqm 'add branchonly' |
|
55 | $ hg ci -Aqm 'add branchonly' | |
56 |
|
56 | |||
57 | $ hg up -q default |
|
57 | $ hg up -q default | |
58 | $ hg debugsparse -X branchonly |
|
58 | $ hg debugsparse -X branchonly | |
59 | $ hg merge feature |
|
59 | $ hg merge feature | |
60 | temporarily included 2 file(s) in the sparse checkout for merging |
|
60 | temporarily included 2 file(s) in the sparse checkout for merging | |
61 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
61 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
62 | (branch merge, don't forget to commit) |
|
62 | (branch merge, don't forget to commit) | |
|
63 | ||||
|
64 | $ cd .. | |||
|
65 | ||||
|
66 | Tests merging a file which is modified in one branch and deleted in another and | |||
|
67 | file is excluded from sparse checkout | |||
|
68 | ||||
|
69 | $ hg init ytest | |||
|
70 | $ cd ytest | |||
|
71 | $ echo "syntax: glob" >> .hgignore | |||
|
72 | $ echo "*.orig" >> .hgignore | |||
|
73 | $ hg ci -Aqm "added .hgignore" | |||
|
74 | $ for ch in a d; do echo foo > $ch; hg ci -Aqm "added "$ch; done; | |||
|
75 | $ cat >> .hg/hgrc <<EOF | |||
|
76 | > [alias] | |||
|
77 | > glog = log -GT "{rev}:{node|short} {desc}" | |||
|
78 | > [extensions] | |||
|
79 | > sparse = | |||
|
80 | > EOF | |||
|
81 | ||||
|
82 | $ hg glog | |||
|
83 | @ 2:f29feff37cfc added d | |||
|
84 | | | |||
|
85 | o 1:617125d27d6b added a | |||
|
86 | | | |||
|
87 | o 0:53f3774ed939 added .hgignore | |||
|
88 | ||||
|
89 | $ hg rm d | |||
|
90 | $ hg ci -m "removed d" | |||
|
91 | ||||
|
92 | $ hg up '.^' | |||
|
93 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
94 | $ hg debugsparse --reset | |||
|
95 | $ echo bar >> d | |||
|
96 | $ hg ci -Am "added bar to d" | |||
|
97 | created new head | |||
|
98 | ||||
|
99 | $ hg glog | |||
|
100 | @ 4:6527874a90e4 added bar to d | |||
|
101 | | | |||
|
102 | | o 3:372c8558de45 removed d | |||
|
103 | |/ | |||
|
104 | o 2:f29feff37cfc added d | |||
|
105 | | | |||
|
106 | o 1:617125d27d6b added a | |||
|
107 | | | |||
|
108 | o 0:53f3774ed939 added .hgignore | |||
|
109 | ||||
|
110 | $ hg debugsparse --exclude "d" | |||
|
111 | $ ls | |||
|
112 | a | |||
|
113 | ||||
|
114 | $ hg merge | |||
|
115 | abort: $ENOENT$: '$TESTTMP/ytest/d' | |||
|
116 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now