Mercurial > hg
annotate tests/test-share.t @ 14732:e9ed3506f066 stable
backout of d04ba50e104d: allow to qpop/push with a dirty working copy
The new behavior was breaking existing tools that relied on a sequence such as
this:
1) start with a dirty working copy
2) qimport some patch
3) try to qpush it
4) old behavior would fail at this point due to outstanding changes.
(new behavior would only fail if the outstanding changes and the patches
changes intersect)
5) innocent user qrefreshes, gets his local changes in the imported patch
It's worth considering if we can move this behavior to -f in the future.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Fri, 24 Jun 2011 23:25:42 +0300 |
parents | 6cc4b14fb76b |
children | 574dc5d74f9b |
rev | line source |
---|---|
9990 | 1 |
12487 | 2 $ echo "[extensions]" >> $HGRCPATH |
3 $ echo "share = " >> $HGRCPATH | |
4 | |
5 prepare repo1 | |
9990 | 6 |
12487 | 7 $ hg init repo1 |
8 $ cd repo1 | |
9 $ echo a > a | |
10 $ hg commit -A -m'init' | |
11 adding a | |
12 | |
13 share it | |
9990 | 14 |
12487 | 15 $ cd .. |
16 $ hg share repo1 repo2 | |
17 updating working directory | |
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
19 | |
20 share shouldn't have a store dir | |
21 | |
22 $ cd repo2 | |
23 $ test -d .hg/store | |
24 [1] | |
9990 | 25 |
12487 | 26 Some sed versions appends newline, some don't, and some just fails |
27 | |
28 $ cat .hg/sharedpath; echo | |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12487
diff
changeset
|
29 $TESTTMP/repo1/.hg |
12487 | 30 |
31 commit in shared clone | |
32 | |
33 $ echo a >> a | |
34 $ hg commit -m'change in shared clone' | |
35 | |
36 check original | |
9990 | 37 |
12487 | 38 $ cd ../repo1 |
39 $ hg log | |
40 changeset: 1:8af4dc49db9e | |
41 tag: tip | |
42 user: test | |
43 date: Thu Jan 01 00:00:00 1970 +0000 | |
44 summary: change in shared clone | |
45 | |
46 changeset: 0:d3873e73d99e | |
47 user: test | |
48 date: Thu Jan 01 00:00:00 1970 +0000 | |
49 summary: init | |
50 | |
51 $ hg update | |
52 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
53 $ cat a # should be two lines of "a" | |
54 a | |
55 a | |
9990 | 56 |
12487 | 57 commit in original |
58 | |
59 $ echo b > b | |
60 $ hg commit -A -m'another file' | |
61 adding b | |
62 | |
63 check in shared clone | |
9990 | 64 |
12487 | 65 $ cd ../repo2 |
66 $ hg log | |
67 changeset: 2:c2e0ac586386 | |
68 tag: tip | |
69 user: test | |
70 date: Thu Jan 01 00:00:00 1970 +0000 | |
71 summary: another file | |
72 | |
73 changeset: 1:8af4dc49db9e | |
74 user: test | |
75 date: Thu Jan 01 00:00:00 1970 +0000 | |
76 summary: change in shared clone | |
77 | |
78 changeset: 0:d3873e73d99e | |
79 user: test | |
80 date: Thu Jan 01 00:00:00 1970 +0000 | |
81 summary: init | |
82 | |
83 $ hg update | |
84 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
85 $ cat b # should exist with one "b" | |
86 b | |
9990 | 87 |
12487 | 88 hg serve shared clone |
9990 | 89 |
12487 | 90 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid |
91 $ cat hg.pid >> $DAEMON_PIDS | |
92 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-file/' | |
93 200 Script output follows | |
94 | |
95 | |
96 -rw-r--r-- 4 a | |
97 -rw-r--r-- 2 b | |
98 | |
99 |