2019-12-10 02:24:31 +03:00
|
|
|
#chg-compatible
|
|
|
|
|
2015-04-10 03:17:03 +03:00
|
|
|
test merging things outside of the sparse checkout
|
2014-12-01 22:02:08 +03:00
|
|
|
|
|
|
|
$ hg init myrepo
|
|
|
|
$ cd myrepo
|
2020-01-20 13:42:49 +03:00
|
|
|
$ enable sparse
|
2014-12-01 22:02:08 +03:00
|
|
|
|
|
|
|
$ echo foo > foo
|
2019-02-09 00:27:48 +03:00
|
|
|
$ hg commit -m initial -A foo
|
|
|
|
$ hg bookmark -ir. initial
|
|
|
|
|
2014-12-01 22:02:08 +03:00
|
|
|
$ echo bar > bar
|
2019-02-09 00:27:48 +03:00
|
|
|
$ hg commit -m 'feature - bar1' -A bar
|
|
|
|
$ hg bookmark -ir. feature1
|
2014-12-01 22:02:08 +03:00
|
|
|
|
2019-02-09 00:27:48 +03:00
|
|
|
$ hg update --inactive -q initial
|
|
|
|
$ echo bar2 > bar
|
|
|
|
$ hg commit -m 'feature - bar2' -A bar
|
|
|
|
$ hg bookmark -ir. feature2
|
2014-12-01 22:02:08 +03:00
|
|
|
|
2019-02-09 00:27:48 +03:00
|
|
|
$ hg update --inactive -q feature1
|
2014-12-01 22:02:08 +03:00
|
|
|
$ hg sparse --exclude 'bar**'
|
|
|
|
|
2019-02-09 00:27:48 +03:00
|
|
|
$ hg merge feature2 --tool :merge-other
|
2015-04-10 03:17:03 +03:00
|
|
|
temporarily included 1 file(s) in the sparse checkout for merging
|
2019-02-09 00:27:48 +03:00
|
|
|
merging bar
|
2015-04-10 03:17:03 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
(branch merge, don't forget to commit)
|
|
|
|
|
|
|
|
Verify bar was merged temporarily
|
|
|
|
|
|
|
|
$ ls
|
|
|
|
bar
|
|
|
|
foo
|
|
|
|
$ hg status
|
|
|
|
M bar
|
|
|
|
|
|
|
|
Verify bar disappears automatically when the working copy becomes clean
|
|
|
|
|
|
|
|
$ hg commit -m "merged"
|
|
|
|
cleaned up 1 temporarily added file(s) from the sparse checkout
|
2019-02-09 00:27:48 +03:00
|
|
|
$ hg bookmark -ir. merged
|
2015-04-10 03:17:03 +03:00
|
|
|
$ hg status
|
|
|
|
$ ls
|
|
|
|
foo
|
|
|
|
|
|
|
|
$ hg cat -r . bar
|
|
|
|
bar2
|
2015-05-19 20:18:50 +03:00
|
|
|
|
|
|
|
Test merging things outside of the sparse checkout that are not in the working
|
|
|
|
copy
|
|
|
|
|
2019-02-25 14:50:46 +03:00
|
|
|
$ hg debugstrip -q -r .
|
2019-02-09 00:27:48 +03:00
|
|
|
$ hg up --inactive -q feature2
|
2015-05-19 20:18:50 +03:00
|
|
|
$ touch branchonly
|
|
|
|
$ hg ci -Aqm 'add branchonly'
|
|
|
|
|
2019-02-09 00:27:48 +03:00
|
|
|
$ hg up --inactive -q feature1
|
2015-05-19 20:18:50 +03:00
|
|
|
$ hg sparse -X branchonly
|
2019-02-09 00:27:48 +03:00
|
|
|
$ hg merge feature2 --tool :merge-other
|
|
|
|
temporarily included 1 file(s) in the sparse checkout for merging
|
|
|
|
merging bar
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2015-05-19 20:18:50 +03:00
|
|
|
(branch merge, don't forget to commit)
|