Mercurial > hg
annotate tests/test-import.t @ 43617:697c2e32c490
packaging: ship all help .txt files on WiX
These are technically not needed. But it is easier to ship
all files than to cherry-pick. A `make install` will copy
these files, so the new behavior is consistent with that.
This also makes WiX consistent with Inno, which is my main
reason for doing this.
If we don't want to ship the files (which is a valid argument),
I think we can do that in a follow up.
Differential Revision: https://phab.mercurial-scm.org/D7166
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 11 Nov 2019 18:51:55 -0800 |
parents | 27c4f93d07a9 |
children | 71dbd6f6fcb8 |
rev | line source |
---|---|
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1 $ hg init a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
2 $ mkdir a/d1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
3 $ mkdir a/d1/d2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
4 $ echo line 1 > a/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
5 $ echo line 1 > a/d1/d2/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
6 $ hg --cwd a ci -Ama |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
7 adding a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
8 adding d1/d2/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
9 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
10 $ echo line 2 >> a/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
11 $ hg --cwd a ci -u someone -d '1 0' -m'second change' |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
12 |
15327
67e92d29ecb5
import: abort usefully if no patch name given
Kevin Bullock <kbullock@ringworld.org>
parents:
15198
diff
changeset
|
13 import with no args: |
67e92d29ecb5
import: abort usefully if no patch name given
Kevin Bullock <kbullock@ringworld.org>
parents:
15198
diff
changeset
|
14 |
67e92d29ecb5
import: abort usefully if no patch name given
Kevin Bullock <kbullock@ringworld.org>
parents:
15198
diff
changeset
|
15 $ hg --cwd a import |
67e92d29ecb5
import: abort usefully if no patch name given
Kevin Bullock <kbullock@ringworld.org>
parents:
15198
diff
changeset
|
16 abort: need at least one patch to import |
67e92d29ecb5
import: abort usefully if no patch name given
Kevin Bullock <kbullock@ringworld.org>
parents:
15198
diff
changeset
|
17 [255] |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
18 |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
19 generate patches for the test |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
20 |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
21 $ hg --cwd a export tip > exported-tip.patch |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
22 $ hg --cwd a diff -r0:1 > diffed-tip.patch |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
23 |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
24 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
25 import exported patch |
21417
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
26 (this also tests that editor is not invoked, if the patch contains the |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
27 commit message and '--edit' is not specified) |
2513
f22e3e8fd457
import: added tests, fixed bugs found by tests and asak.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
28 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
29 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
30 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
31 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
32 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
33 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
34 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
35 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
36 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
43066
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
37 $ HGEDITOR=cat hg --cwd b import --debug ../exported-tip.patch |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
38 applying ../exported-tip.patch |
43066
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
39 Subject: |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
40 |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
41 Content-Type: text/plain |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
42 found patch at byte 202 |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
43 patch generated by hg export |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
44 From: someone |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
45 Date: 1 0 |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
46 Node ID: 1d4bd90af0e43687763d158dfa83ff2a4b6c0c32 |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
47 message: |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
48 second change |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
49 patching file a |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
50 committing files: |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
51 a |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
52 committing manifest |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
53 committing changelog |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
54 created 1d4bd90af0e4 |
db33e4f25729
import: add debug messages when parsing data from patch header
Denis Laxalde <denis@laxalde.org>
parents:
40872
diff
changeset
|
55 updating the branch cache |
2513
f22e3e8fd457
import: added tests, fixed bugs found by tests and asak.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
56 |
18648
76b69cccb07a
export: show 'Date' header in a format that also is readable for humans
Mads Kiilerich <mads@kiilerich.com>
parents:
17712
diff
changeset
|
57 message and committer and date should be same |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
58 |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
59 $ hg --cwd b tip |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
60 changeset: 1:1d4bd90af0e4 |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
61 tag: tip |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
62 user: someone |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
63 date: Thu Jan 01 00:00:01 1970 +0000 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
64 summary: second change |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
65 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
66 $ rm -r b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
67 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
68 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
69 import exported patch with external patcher |
21417
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
70 (this also tests that editor is invoked, if the '--edit' is specified, |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
71 regardless of the commit message in the patch) |
2513
f22e3e8fd457
import: added tests, fixed bugs found by tests and asak.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
72 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
73 $ cat > dummypatch.py <<EOF |
29485
6a98f9408a50
py3: make files use absolute_import and print_function
Pulkit Goyal <7895pulkit@gmail.com>
parents:
27054
diff
changeset
|
74 > from __future__ import print_function |
6a98f9408a50
py3: make files use absolute_import and print_function
Pulkit Goyal <7895pulkit@gmail.com>
parents:
27054
diff
changeset
|
75 > print('patching file a') |
36024
2a81ed6c3bb9
py3: replace file() with open() in test-import.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35393
diff
changeset
|
76 > open('a', 'wb').write(b'line2\n') |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
77 > EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
78 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
79 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
80 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
81 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
82 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
83 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
84 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
85 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
40872
07e181ed82ef
py3: quote several instances of $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
40369
diff
changeset
|
86 $ HGEDITOR=cat hg --config ui.patch="\"$PYTHON\" ../dummypatch.py" --cwd b import --edit ../exported-tip.patch |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
87 applying ../exported-tip.patch |
21417
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
88 second change |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
89 |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
90 |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
91 HG: Enter commit message. Lines beginning with 'HG:' are removed. |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
92 HG: Leave message empty to abort commit. |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
93 HG: -- |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
94 HG: user: someone |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
95 HG: branch 'default' |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
96 HG: changed a |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
97 $ cat b/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
98 line2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
99 $ rm -r b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
100 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
101 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
102 import of plain diff should fail without message |
21417
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
103 (this also tests that editor is invoked, if the patch doesn't contain |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
104 the commit message, regardless of '--edit') |
2513
f22e3e8fd457
import: added tests, fixed bugs found by tests and asak.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
105 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
106 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
107 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
108 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
109 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
110 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
111 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
112 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
113 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
22250
f3200bf460a8
import: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21553
diff
changeset
|
114 $ cat > $TESTTMP/editor.sh <<EOF |
f3200bf460a8
import: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21553
diff
changeset
|
115 > env | grep HGEDITFORM |
f3200bf460a8
import: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21553
diff
changeset
|
116 > cat \$1 |
f3200bf460a8
import: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21553
diff
changeset
|
117 > EOF |
f3200bf460a8
import: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21553
diff
changeset
|
118 $ HGEDITOR="sh $TESTTMP/editor.sh" hg --cwd b import ../diffed-tip.patch |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
119 applying ../diffed-tip.patch |
22250
f3200bf460a8
import: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21553
diff
changeset
|
120 HGEDITFORM=import.normal.normal |
21417
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
121 |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
122 |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
123 HG: Enter commit message. Lines beginning with 'HG:' are removed. |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
124 HG: Leave message empty to abort commit. |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
125 HG: -- |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
126 HG: user: test |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
127 HG: branch 'default' |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
128 HG: changed a |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
129 abort: empty commit message |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11807
diff
changeset
|
130 [255] |
22278
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
131 |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
132 Test avoiding editor invocation at applying the patch with --exact, |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
133 even if commit message is empty |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
134 |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
135 $ echo a >> b/a |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
136 $ hg --cwd b commit -m ' ' |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
137 $ hg --cwd b tip -T "{node}\n" |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
138 d8804f3f5396d800812f579c8452796a5993bdb2 |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
139 $ hg --cwd b export -o ../empty-log.diff . |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
140 $ hg --cwd b update -q -C ".^1" |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
141 $ hg --cwd b --config extensions.strip= strip -q tip |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
142 $ HGEDITOR=cat hg --cwd b import --exact ../empty-log.diff |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
143 applying ../empty-log.diff |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
144 $ hg --cwd b tip -T "{node}\n" |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
145 d8804f3f5396d800812f579c8452796a5993bdb2 |
ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22250
diff
changeset
|
146 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
147 $ rm -r b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
148 |
7247
c4461ea8b4c8
patch: fix patched files records in externalpatcher()
Patrick Mezard <pmezard@gmail.com>
parents:
6758
diff
changeset
|
149 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
150 import of plain diff should be ok with message |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
151 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
152 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
153 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
154 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
155 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
156 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
157 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
158 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
159 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
160 $ hg --cwd b import -mpatch ../diffed-tip.patch |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
161 applying ../diffed-tip.patch |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
162 $ rm -r b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
163 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
164 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
165 import of plain diff with specific date and user |
21417
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
166 (this also tests that editor is not invoked, if |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
167 '--message'/'--logfile' is specified and '--edit' is not) |
2513
f22e3e8fd457
import: added tests, fixed bugs found by tests and asak.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
168 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
169 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
170 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
171 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
172 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
173 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
174 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
175 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
176 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
177 $ hg --cwd b import -mpatch -d '1 0' -u 'user@nowhere.net' ../diffed-tip.patch |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
178 applying ../diffed-tip.patch |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
179 $ hg -R b tip -pv |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
180 changeset: 1:ca68f19f3a40 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
181 tag: tip |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
182 user: user@nowhere.net |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
183 date: Thu Jan 01 00:00:01 1970 +0000 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
184 files: a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
185 description: |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
186 patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
187 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
188 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
189 diff -r 80971e65b431 -r ca68f19f3a40 a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
190 --- a/a Thu Jan 01 00:00:00 1970 +0000 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
191 +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
192 @@ -1,1 +1,2 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
193 line 1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
194 +line 2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
195 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
196 $ rm -r b |
2513
f22e3e8fd457
import: added tests, fixed bugs found by tests and asak.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
197 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
198 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
199 import of plain diff should be ok with --no-commit |
21417
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
200 (this also tests that editor is not invoked, if '--no-commit' is |
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
201 specified, regardless of '--edit') |
5953
e7f1be4bf40a
Permitting the import command to accept a --user option.
Jesse Glick <jesse.glick@sun.com>
parents:
5937
diff
changeset
|
202 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
203 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
204 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
205 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
206 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
207 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
208 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
209 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
210 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
21417
308aaeb956e2
import: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
19513
diff
changeset
|
211 $ HGEDITOR=cat hg --cwd b import --no-commit --edit ../diffed-tip.patch |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
212 applying ../diffed-tip.patch |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
213 $ hg --cwd b diff --nodates |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
214 diff -r 80971e65b431 a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
215 --- a/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
216 +++ b/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
217 @@ -1,1 +1,2 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
218 line 1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
219 +line 2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
220 $ rm -r b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
221 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
222 |
12675
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
223 import of malformed plain diff should fail |
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
224 |
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
225 $ hg clone -r0 a b |
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
226 adding changesets |
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
227 adding manifests |
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
228 adding file changes |
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
229 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
230 new changesets 80971e65b431 |
12675
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
231 updating to branch default |
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
232 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
233 $ sed 's/1,1/foo/' < diffed-tip.patch > broken.patch |
12675
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
234 $ hg --cwd b import -mpatch ../broken.patch |
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
235 applying ../broken.patch |
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
236 abort: bad hunk #1 |
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
237 [255] |
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
238 $ rm -r b |
c6cdc123f6e4
patch: fails immediately upon malformed hunk
Patrick Mezard <pmezard@gmail.com>
parents:
12399
diff
changeset
|
239 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
240 hg -R repo import |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
241 put the clone in a subdir - having a directory named "a" |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
242 used to hide a bug. |
5937
d8878742a924
Test case for hg import --no-commit
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5853
diff
changeset
|
243 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
244 $ mkdir dir |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
245 $ hg clone -r0 a dir/b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
246 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
247 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
248 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
249 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
250 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
251 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
252 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
253 $ cd dir |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
254 $ hg -R b import ../exported-tip.patch |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
255 applying ../exported-tip.patch |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
256 $ cd .. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
257 $ rm -r dir |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
258 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
259 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
260 import from stdin |
4230
c93562fb12cc
Fix handling of paths when run outside the repo.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
261 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
262 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
263 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
264 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
265 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
266 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
267 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
268 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
269 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
270 $ hg --cwd b import - < exported-tip.patch |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
271 applying patch from stdin |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
272 $ rm -r b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
273 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
274 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
275 import two patches in one stream |
2513
f22e3e8fd457
import: added tests, fixed bugs found by tests and asak.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
276 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
277 $ hg init b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
278 $ hg --cwd a export 0:tip | hg --cwd b import - |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
279 applying patch from stdin |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
280 $ hg --cwd a id |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
281 1d4bd90af0e4 tip |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
282 $ hg --cwd b id |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
283 1d4bd90af0e4 tip |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
284 $ rm -r b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
285 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
286 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
287 override commit message |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
288 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
289 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
290 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
291 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
292 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
293 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
294 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
295 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
296 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
297 $ hg --cwd b import -m 'override' - < exported-tip.patch |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
298 applying patch from stdin |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
299 $ hg --cwd b tip | grep override |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
300 summary: override |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
301 $ rm -r b |
10384
832f35386067
import: import each patch in a file or stream as a separate change
Brendan Cully <brendan@kublai.com>
parents:
9594
diff
changeset
|
302 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
303 $ cat > mkmsg.py <<EOF |
40369
ef6cab7930b3
py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents:
39707
diff
changeset
|
304 > import email.message |
ef6cab7930b3
py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents:
39707
diff
changeset
|
305 > import sys |
37466
abd9f5ec1d82
py3: use lower-cased module 'email.message' in test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
37457
diff
changeset
|
306 > msg = email.message.Message() |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
307 > patch = open(sys.argv[1], 'rb').read() |
37467
9bf65d1b43a6
py3: fix string issues of email message in test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
37466
diff
changeset
|
308 > msg.set_payload(b'email commit message\n' + patch) |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
309 > msg['Subject'] = 'email patch' |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
310 > msg['From'] = 'email patcher' |
37467
9bf65d1b43a6
py3: fix string issues of email message in test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
37466
diff
changeset
|
311 > open(sys.argv[2], 'wb').write(bytes(msg)) |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
312 > EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
313 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
314 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
315 plain diff in email, subject, message body |
2513
f22e3e8fd457
import: added tests, fixed bugs found by tests and asak.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
316 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
317 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
318 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
319 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
320 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
321 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
322 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
323 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
324 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
325 $ "$PYTHON" mkmsg.py diffed-tip.patch msg.patch |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
326 $ hg --cwd b import ../msg.patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
327 applying ../msg.patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
328 $ hg --cwd b tip | grep email |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
329 user: email patcher |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
330 summary: email patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
331 $ rm -r b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
332 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
333 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
334 plain diff in email, no subject, message body |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
335 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
336 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
337 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
338 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
339 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
340 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
341 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
342 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
343 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
344 $ grep -v '^Subject:' msg.patch | hg --cwd b import - |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
345 applying patch from stdin |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
346 $ rm -r b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
347 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
348 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
349 plain diff in email, subject, no message body |
2513
f22e3e8fd457
import: added tests, fixed bugs found by tests and asak.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
350 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
351 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
352 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
353 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
354 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
355 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
356 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
357 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
358 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
359 $ grep -v '^email ' msg.patch | hg --cwd b import - |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
360 applying patch from stdin |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
361 $ rm -r b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
362 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
363 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
364 plain diff in email, no subject, no message body, should fail |
2513
f22e3e8fd457
import: added tests, fixed bugs found by tests and asak.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
365 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
366 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
367 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
368 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
369 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
370 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
371 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
372 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
373 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
374 $ egrep -v '^(Subject|email)' msg.patch | hg --cwd b import - |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
375 applying patch from stdin |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
376 abort: empty commit message |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11807
diff
changeset
|
377 [255] |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
378 $ rm -r b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
379 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
380 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
381 hg export in email, should use patch header |
2513
f22e3e8fd457
import: added tests, fixed bugs found by tests and asak.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
382 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
383 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
384 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
385 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
386 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
387 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
388 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
389 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
390 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
391 $ "$PYTHON" mkmsg.py exported-tip.patch msg.patch |
15522
cf0f3cb8a332
tests: don't use stdout redirection for test data
Mads Kiilerich <mads@kiilerich.com>
parents:
15462
diff
changeset
|
392 $ cat msg.patch | hg --cwd b import - |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
393 applying patch from stdin |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
394 $ hg --cwd b tip | grep second |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
395 summary: second change |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
396 $ rm -r b |
2513
f22e3e8fd457
import: added tests, fixed bugs found by tests and asak.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
397 |
43097
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
398 hg email --plain, should read X-Mercurial-Node header |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
399 |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
400 $ cat >> a/.hg/hgrc << EOF |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
401 > [extensions] |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
402 > patchbomb = |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
403 > [email] |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
404 > from = foo |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
405 > cc = foo |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
406 > to = bar |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
407 > EOF |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
408 $ hg --cwd a email -m ../tip-plain.mbox --plain --date '1970-1-1 0:1' tip |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
409 this patch series consists of 1 patches. |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
410 |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
411 |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
412 sending [PATCH] second change ... |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
413 |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
414 $ hg clone -r0 a b -q |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
415 $ hg --cwd b import --debug ../tip-plain.mbox |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
416 applying ../tip-plain.mbox |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
417 Node ID: 1d4bd90af0e43687763d158dfa83ff2a4b6c0c32 |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
418 Subject: second change |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
419 From: foo |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
420 Content-Type: text/plain |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
421 found patch at byte 0 |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
422 message: |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
423 second change |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
424 patching file a |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
425 committing files: |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
426 a |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
427 committing manifest |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
428 committing changelog |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
429 created de620f6fe949 |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
430 updating the branch cache |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
431 $ hg --cwd b tip |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
432 changeset: 1:de620f6fe949 |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
433 tag: tip |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
434 user: foo |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
435 date: Thu Jan 01 00:00:00 1970 +0000 |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
436 summary: second change |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
437 |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
438 $ rm -r b |
27c4f93d07a9
import: read X-Mercurial-Node email header to determine nodeid
Denis Laxalde <denis@laxalde.org>
parents:
43066
diff
changeset
|
439 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
440 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
441 subject: duplicate detection, removal of [PATCH] |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
442 The '---' tests the gitsendmail handling without proper mail headers |
2513
f22e3e8fd457
import: added tests, fixed bugs found by tests and asak.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
443 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
444 $ cat > mkmsg2.py <<EOF |
40369
ef6cab7930b3
py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents:
39707
diff
changeset
|
445 > import email.message |
ef6cab7930b3
py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents:
39707
diff
changeset
|
446 > import sys |
37466
abd9f5ec1d82
py3: use lower-cased module 'email.message' in test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
37457
diff
changeset
|
447 > msg = email.message.Message() |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
448 > patch = open(sys.argv[1], 'rb').read() |
37467
9bf65d1b43a6
py3: fix string issues of email message in test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
37466
diff
changeset
|
449 > msg.set_payload(b'email patch\n\nnext line\n---\n' + patch) |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
450 > msg['Subject'] = '[PATCH] email patch' |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
451 > msg['From'] = 'email patcher' |
37467
9bf65d1b43a6
py3: fix string issues of email message in test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
37466
diff
changeset
|
452 > open(sys.argv[2], 'wb').write(bytes(msg)) |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
453 > EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
454 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
455 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
456 plain diff in email, [PATCH] subject, message body with subject |
2513
f22e3e8fd457
import: added tests, fixed bugs found by tests and asak.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
457 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
458 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
459 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
460 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
461 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
462 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
463 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
464 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
465 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
466 $ "$PYTHON" mkmsg2.py diffed-tip.patch msg.patch |
15522
cf0f3cb8a332
tests: don't use stdout redirection for test data
Mads Kiilerich <mads@kiilerich.com>
parents:
15462
diff
changeset
|
467 $ cat msg.patch | hg --cwd b import - |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
468 applying patch from stdin |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
469 $ hg --cwd b tip --template '{desc}\n' |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
470 email patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
471 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
472 next line |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
473 $ rm -r b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
474 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
475 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12366
diff
changeset
|
476 Issue963: Parent of working dir incorrect after import of multiple |
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12366
diff
changeset
|
477 patches and rollback |
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12366
diff
changeset
|
478 |
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12366
diff
changeset
|
479 We weren't backing up the correct dirstate file when importing many |
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12366
diff
changeset
|
480 patches: import patch1 patch2; rollback |
4779
a7915f79d4cc
Added import test for [PATCH] subject and message body with subject
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4230
diff
changeset
|
481 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
482 $ echo line 3 >> a/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
483 $ hg --cwd a ci -m'third change' |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
484 $ hg --cwd a export -o '../patch%R' 1 2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
485 $ hg clone -qr0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
486 $ hg --cwd b parents --template 'parent: {rev}\n' |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
487 parent: 0 |
15194
0705f2ac79d6
import: simplify status reporting logic (and make it more I18N-friendly)
Greg Ward <greg@gerg.ca>
parents:
14452
diff
changeset
|
488 $ hg --cwd b import -v ../patch1 ../patch2 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
489 applying ../patch1 |
15194
0705f2ac79d6
import: simplify status reporting logic (and make it more I18N-friendly)
Greg Ward <greg@gerg.ca>
parents:
14452
diff
changeset
|
490 patching file a |
23749
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
491 committing files: |
15194
0705f2ac79d6
import: simplify status reporting logic (and make it more I18N-friendly)
Greg Ward <greg@gerg.ca>
parents:
14452
diff
changeset
|
492 a |
23749
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
493 committing manifest |
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
494 committing changelog |
15194
0705f2ac79d6
import: simplify status reporting logic (and make it more I18N-friendly)
Greg Ward <greg@gerg.ca>
parents:
14452
diff
changeset
|
495 created 1d4bd90af0e4 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
496 applying ../patch2 |
15194
0705f2ac79d6
import: simplify status reporting logic (and make it more I18N-friendly)
Greg Ward <greg@gerg.ca>
parents:
14452
diff
changeset
|
497 patching file a |
23749
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
498 committing files: |
15194
0705f2ac79d6
import: simplify status reporting logic (and make it more I18N-friendly)
Greg Ward <greg@gerg.ca>
parents:
14452
diff
changeset
|
499 a |
23749
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
500 committing manifest |
a387b0390082
localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents:
22947
diff
changeset
|
501 committing changelog |
15194
0705f2ac79d6
import: simplify status reporting logic (and make it more I18N-friendly)
Greg Ward <greg@gerg.ca>
parents:
14452
diff
changeset
|
502 created 6d019af21222 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
503 $ hg --cwd b rollback |
15198
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
504 repository tip rolled back to revision 0 (undo import) |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
505 working directory now based on revision 0 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
506 $ hg --cwd b parents --template 'parent: {rev}\n' |
15198
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
507 parent: 0 |
26631
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
508 |
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
509 Test that "hg rollback" doesn't restore dirstate to one at the |
30332
318a24b52eeb
spelling: fixes of non-dictionary words
Mads Kiilerich <madski@unity3d.com>
parents:
30078
diff
changeset
|
510 beginning of the rolled back transaction in not-"parent-gone" case. |
26631
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
511 |
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
512 invoking pretxncommit hook will cause marking '.hg/dirstate' as a file |
30332
318a24b52eeb
spelling: fixes of non-dictionary words
Mads Kiilerich <madski@unity3d.com>
parents:
30078
diff
changeset
|
513 to be restored when rolling back, after DirstateTransactionPlan (see wiki |
26631
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
514 page for detail). |
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
515 |
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
516 $ hg --cwd b branch -q foobar |
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
517 $ hg --cwd b commit -m foobar |
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
518 $ hg --cwd b update 0 -q |
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
519 $ hg --cwd b import ../patch1 ../patch2 --config hooks.pretxncommit=true |
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
520 applying ../patch1 |
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
521 applying ../patch2 |
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
522 $ hg --cwd b update -q 1 |
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
523 $ hg --cwd b rollback -q |
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
524 $ hg --cwd b parents --template 'parent: {rev}\n' |
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
525 parent: 1 |
e077ce385609
localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26562
diff
changeset
|
526 |
26750
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
527 $ hg --cwd b update -q -C 0 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
528 $ hg --cwd b --config extensions.strip= strip -q 1 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
529 |
30332
318a24b52eeb
spelling: fixes of non-dictionary words
Mads Kiilerich <madski@unity3d.com>
parents:
30078
diff
changeset
|
530 Test visibility of in-memory dirstate changes inside transaction to |
26750
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
531 external process |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
532 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
533 $ echo foo > a/foo |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
534 $ hg --cwd a commit -A -m 'adding foo' foo |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
535 $ hg --cwd a export -o '../patch%R' 3 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
536 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
537 $ cat > $TESTTMP/checkvisibility.sh <<EOF |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
538 > echo "====" |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
539 > hg parents --template "VISIBLE {rev}:{node|short}\n" |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
540 > hg status -amr |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
541 > # test that pending changes are hidden |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
542 > unset HG_PENDING |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
543 > hg parents --template "ACTUAL {rev}:{node|short}\n" |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
544 > hg status -amr |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
545 > echo "====" |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
546 > EOF |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
547 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
548 == test visibility to external editor |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
549 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
550 $ (cd b && sh "$TESTTMP/checkvisibility.sh") |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
551 ==== |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
552 VISIBLE 0:80971e65b431 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
553 ACTUAL 0:80971e65b431 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
554 ==== |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
555 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
556 $ HGEDITOR="sh $TESTTMP/checkvisibility.sh" hg --cwd b import -v --edit ../patch1 ../patch2 ../patch3 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
557 applying ../patch1 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
558 patching file a |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
559 ==== |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
560 VISIBLE 0:80971e65b431 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
561 M a |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
562 ACTUAL 0:80971e65b431 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
563 M a |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
564 ==== |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
565 committing files: |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
566 a |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
567 committing manifest |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
568 committing changelog |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
569 created 1d4bd90af0e4 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
570 applying ../patch2 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
571 patching file a |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
572 ==== |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
573 VISIBLE 1:1d4bd90af0e4 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
574 M a |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
575 ACTUAL 0:80971e65b431 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
576 M a |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
577 ==== |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
578 committing files: |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
579 a |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
580 committing manifest |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
581 committing changelog |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
582 created 6d019af21222 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
583 applying ../patch3 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
584 patching file foo |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
585 adding foo |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
586 ==== |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
587 VISIBLE 2:6d019af21222 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
588 A foo |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
589 ACTUAL 0:80971e65b431 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
590 M a |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
591 ==== |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
592 committing files: |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
593 foo |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
594 committing manifest |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
595 committing changelog |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
596 created 55e3f75b2378 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
597 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
598 $ hg --cwd b rollback -q |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
599 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
600 (content of file "a" is already changed and it should be recognized as |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
601 "M", even though dirstate is restored to one before "hg import") |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
602 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
603 $ (cd b && sh "$TESTTMP/checkvisibility.sh") |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
604 ==== |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
605 VISIBLE 0:80971e65b431 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
606 M a |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
607 ACTUAL 0:80971e65b431 |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
608 M a |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
609 ==== |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
610 $ hg --cwd b revert --no-backup a |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
611 $ rm -f b/foo |
9f9ec4abe700
cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26631
diff
changeset
|
612 |
26751
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
613 == test visibility to precommit external hook |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
614 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
615 $ cat >> b/.hg/hgrc <<EOF |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
616 > [hooks] |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
617 > precommit.visibility = sh $TESTTMP/checkvisibility.sh |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
618 > EOF |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
619 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
620 $ (cd b && sh "$TESTTMP/checkvisibility.sh") |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
621 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
622 VISIBLE 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
623 ACTUAL 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
624 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
625 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
626 $ hg --cwd b import ../patch1 ../patch2 ../patch3 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
627 applying ../patch1 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
628 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
629 VISIBLE 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
630 M a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
631 ACTUAL 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
632 M a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
633 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
634 applying ../patch2 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
635 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
636 VISIBLE 1:1d4bd90af0e4 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
637 M a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
638 ACTUAL 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
639 M a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
640 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
641 applying ../patch3 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
642 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
643 VISIBLE 2:6d019af21222 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
644 A foo |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
645 ACTUAL 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
646 M a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
647 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
648 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
649 $ hg --cwd b rollback -q |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
650 $ (cd b && sh "$TESTTMP/checkvisibility.sh") |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
651 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
652 VISIBLE 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
653 M a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
654 ACTUAL 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
655 M a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
656 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
657 $ hg --cwd b revert --no-backup a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
658 $ rm -f b/foo |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
659 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
660 $ cat >> b/.hg/hgrc <<EOF |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
661 > [hooks] |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
662 > precommit.visibility = |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
663 > EOF |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
664 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
665 == test visibility to pretxncommit external hook |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
666 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
667 $ cat >> b/.hg/hgrc <<EOF |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
668 > [hooks] |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
669 > pretxncommit.visibility = sh $TESTTMP/checkvisibility.sh |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
670 > EOF |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
671 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
672 $ (cd b && sh "$TESTTMP/checkvisibility.sh") |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
673 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
674 VISIBLE 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
675 ACTUAL 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
676 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
677 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
678 $ hg --cwd b import ../patch1 ../patch2 ../patch3 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
679 applying ../patch1 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
680 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
681 VISIBLE 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
682 M a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
683 ACTUAL 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
684 M a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
685 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
686 applying ../patch2 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
687 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
688 VISIBLE 1:1d4bd90af0e4 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
689 M a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
690 ACTUAL 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
691 M a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
692 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
693 applying ../patch3 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
694 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
695 VISIBLE 2:6d019af21222 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
696 A foo |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
697 ACTUAL 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
698 M a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
699 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
700 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
701 $ hg --cwd b rollback -q |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
702 $ (cd b && sh "$TESTTMP/checkvisibility.sh") |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
703 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
704 VISIBLE 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
705 M a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
706 ACTUAL 0:80971e65b431 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
707 M a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
708 ==== |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
709 $ hg --cwd b revert --no-backup a |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
710 $ rm -f b/foo |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
711 |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
712 $ cat >> b/.hg/hgrc <<EOF |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
713 > [hooks] |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
714 > pretxncommit.visibility = |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
715 > EOF |
520defbc0335
hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
26750
diff
changeset
|
716 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
717 $ rm -r b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
718 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
719 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
720 importing a patch in a subdirectory failed at the commit stage |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
721 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
722 $ echo line 2 >> a/d1/d2/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
723 $ hg --cwd a ci -u someoneelse -d '1 0' -m'subdir change' |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
724 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
725 hg import in a subdirectory |
4779
a7915f79d4cc
Added import test for [PATCH] subject and message body with subject
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4230
diff
changeset
|
726 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
727 $ hg clone -r0 a b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
728 adding changesets |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
729 adding manifests |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
730 adding file changes |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
731 added 1 changesets with 2 changes to 2 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32976
diff
changeset
|
732 new changesets 80971e65b431 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
733 updating to branch default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
734 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
12366
c01dc9087d9a
tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents:
12316
diff
changeset
|
735 $ hg --cwd a export tip > tmp |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
736 $ sed -e 's/d1\/d2\///' < tmp > subdir-tip.patch |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
737 $ dir=`pwd` |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
738 $ cd b/d1/d2 2>&1 > /dev/null |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
739 $ hg import ../../../subdir-tip.patch |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
740 applying ../../../subdir-tip.patch |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
741 $ cd "$dir" |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
742 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
743 message should be 'subdir change' |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
744 committer should be 'someoneelse' |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
745 |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
746 $ hg --cwd b tip |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
747 changeset: 1:3577f5aea227 |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
748 tag: tip |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
749 user: someoneelse |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
750 date: Thu Jan 01 00:00:01 1970 +0000 |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
751 summary: subdir change |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
752 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
753 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
754 should be empty |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
755 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
756 $ hg --cwd b status |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
757 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
758 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
759 Test fuzziness (ambiguous patch location, fuzz=2) |
4779
a7915f79d4cc
Added import test for [PATCH] subject and message body with subject
Thomas Arendsen Hein <thomas@intevation.de>
parents:
4230
diff
changeset
|
760 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
761 $ hg init fuzzy |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
762 $ cd fuzzy |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
763 $ echo line1 > a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
764 $ echo line0 >> a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
765 $ echo line3 >> a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
766 $ hg ci -Am adda |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
767 adding a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
768 $ echo line1 > a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
769 $ echo line2 >> a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
770 $ echo line0 >> a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
771 $ echo line3 >> a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
772 $ hg ci -m change a |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
773 $ hg export tip > fuzzy-tip.patch |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
774 $ hg up -C 0 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
775 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
776 $ echo line1 > a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
777 $ echo line0 >> a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
778 $ echo line1 >> a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
779 $ echo line0 >> a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
780 $ hg ci -m brancha |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
781 created new head |
25631
2748bf78a5bf
patch: add fuzz config flag (issue4697)
Matt Mackall <mpm@selenic.com>
parents:
25397
diff
changeset
|
782 $ hg import --config patch.fuzz=0 -v fuzzy-tip.patch |
2748bf78a5bf
patch: add fuzz config flag (issue4697)
Matt Mackall <mpm@selenic.com>
parents:
25397
diff
changeset
|
783 applying fuzzy-tip.patch |
2748bf78a5bf
patch: add fuzz config flag (issue4697)
Matt Mackall <mpm@selenic.com>
parents:
25397
diff
changeset
|
784 patching file a |
2748bf78a5bf
patch: add fuzz config flag (issue4697)
Matt Mackall <mpm@selenic.com>
parents:
25397
diff
changeset
|
785 Hunk #1 FAILED at 0 |
2748bf78a5bf
patch: add fuzz config flag (issue4697)
Matt Mackall <mpm@selenic.com>
parents:
25397
diff
changeset
|
786 1 out of 1 hunks FAILED -- saving rejects to file a.rej |
2748bf78a5bf
patch: add fuzz config flag (issue4697)
Matt Mackall <mpm@selenic.com>
parents:
25397
diff
changeset
|
787 abort: patch failed to apply |
2748bf78a5bf
patch: add fuzz config flag (issue4697)
Matt Mackall <mpm@selenic.com>
parents:
25397
diff
changeset
|
788 [255] |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
789 $ hg import --no-commit -v fuzzy-tip.patch |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
790 applying fuzzy-tip.patch |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
791 patching file a |
16124
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
792 Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines). |
15194
0705f2ac79d6
import: simplify status reporting logic (and make it more I18N-friendly)
Greg Ward <greg@gerg.ca>
parents:
14452
diff
changeset
|
793 applied to working directory |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
794 $ hg revert -a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
795 reverting a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
796 |
37815
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
797 Test --exact failure |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
798 |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
799 $ sed 's/^# Parent .*/# Parent '"`hg log -r. -T '{node}'`"'/' \ |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
800 > < fuzzy-tip.patch > fuzzy-reparent.patch |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
801 $ hg import --config patch.fuzz=0 --exact fuzzy-reparent.patch |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
802 applying fuzzy-reparent.patch |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
803 patching file a |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
804 Hunk #1 FAILED at 0 |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
805 1 out of 1 hunks FAILED -- saving rejects to file a.rej |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
806 abort: patch failed to apply |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
807 [255] |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
808 $ hg up -qC |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
809 $ hg import --config patch.fuzz=2 --exact fuzzy-reparent.patch |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
810 applying fuzzy-reparent.patch |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
811 patching file a |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
812 Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines). |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
813 transaction abort! |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
814 rollback completed |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
815 abort: patch is damaged or loses information |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
816 [255] |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
817 $ hg up -qC |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
818 |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
819 $ grep '^#' fuzzy-tip.patch > empty.patch |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
820 $ cat <<'EOF' >> empty.patch |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
821 > change |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
822 > |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
823 > diff -r bb90ef1daa38 -r 0e9b883378d4 a |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
824 > --- a/a Thu Jan 01 00:00:00 1970 +0000 |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
825 > --- b/a Thu Jan 01 00:00:00 1970 +0000 |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
826 > EOF |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
827 $ hg import --exact empty.patch |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
828 applying empty.patch |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
829 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
830 abort: patch is damaged or loses information |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
831 [255] |
32a75a8a5b0f
import: fix crash on --exact check of empty commit (issue5702)
Yuya Nishihara <yuya@tcha.org>
parents:
37573
diff
changeset
|
832 $ hg up -qC |
12913
0e0a52bd58f9
import: --no-commit should update .hg/last-message.txt
Steve Borho <steve@borho.org>
parents:
12847
diff
changeset
|
833 |
0e0a52bd58f9
import: --no-commit should update .hg/last-message.txt
Steve Borho <steve@borho.org>
parents:
12847
diff
changeset
|
834 import with --no-commit should have written .hg/last-message.txt |
0e0a52bd58f9
import: --no-commit should update .hg/last-message.txt
Steve Borho <steve@borho.org>
parents:
12847
diff
changeset
|
835 |
12945
99f7dc8def34
test-import: workaround for missing newline is no longer needed
Mads Kiilerich <mads@kiilerich.com>
parents:
12914
diff
changeset
|
836 $ cat .hg/last-message.txt |
99f7dc8def34
test-import: workaround for missing newline is no longer needed
Mads Kiilerich <mads@kiilerich.com>
parents:
12914
diff
changeset
|
837 change (no-eol) |
12913
0e0a52bd58f9
import: --no-commit should update .hg/last-message.txt
Steve Borho <steve@borho.org>
parents:
12847
diff
changeset
|
838 |
0e0a52bd58f9
import: --no-commit should update .hg/last-message.txt
Steve Borho <steve@borho.org>
parents:
12847
diff
changeset
|
839 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
840 test fuzziness with eol=auto |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
841 |
14125
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
842 $ hg --config patch.eol=auto import --no-commit -v fuzzy-tip.patch |
2852843947da
tests: do not export several times the same patch/diff in test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
13446
diff
changeset
|
843 applying fuzzy-tip.patch |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
844 patching file a |
16124
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
845 Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines). |
15194
0705f2ac79d6
import: simplify status reporting logic (and make it more I18N-friendly)
Greg Ward <greg@gerg.ca>
parents:
14452
diff
changeset
|
846 applied to working directory |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
847 $ cd .. |
5548
1fb38ef1f113
test-import: test fuzziness, ambiguous patch locations
Patrick Mezard <pmezard@gmail.com>
parents:
5418
diff
changeset
|
848 |
1fb38ef1f113
test-import: test fuzziness, ambiguous patch locations
Patrick Mezard <pmezard@gmail.com>
parents:
5418
diff
changeset
|
849 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
850 Test hunk touching empty files (issue906) |
5852
03ce5a919ae3
patch: handle empty vs no file in git patches (issue906)
Patrick Mezard <pmezard@gmail.com>
parents:
5548
diff
changeset
|
851 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
852 $ hg init empty |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
853 $ cd empty |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
854 $ touch a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
855 $ touch b1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
856 $ touch c1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
857 $ echo d > d |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
858 $ hg ci -Am init |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
859 adding a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
860 adding b1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
861 adding c1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
862 adding d |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
863 $ echo a > a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
864 $ echo b > b1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
865 $ hg mv b1 b2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
866 $ echo c > c1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
867 $ hg copy c1 c2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
868 $ rm d |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
869 $ touch d |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
870 $ hg diff --git |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
871 diff --git a/a b/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
872 --- a/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
873 +++ b/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
874 @@ -0,0 +1,1 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
875 +a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
876 diff --git a/b1 b/b2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
877 rename from b1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
878 rename to b2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
879 --- a/b1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
880 +++ b/b2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
881 @@ -0,0 +1,1 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
882 +b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
883 diff --git a/c1 b/c1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
884 --- a/c1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
885 +++ b/c1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
886 @@ -0,0 +1,1 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
887 +c |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
888 diff --git a/c1 b/c2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
889 copy from c1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
890 copy to c2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
891 --- a/c1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
892 +++ b/c2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
893 @@ -0,0 +1,1 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
894 +c |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
895 diff --git a/d b/d |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
896 --- a/d |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
897 +++ b/d |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
898 @@ -1,1 +0,0 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
899 -d |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
900 $ hg ci -m empty |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
901 $ hg export --git tip > empty.diff |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
902 $ hg up -C 0 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
903 4 files updated, 0 files merged, 2 files removed, 0 files unresolved |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
904 $ hg import empty.diff |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
905 applying empty.diff |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
906 $ for name in a b1 b2 c1 c2 d; do |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
907 > echo % $name file |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
908 > test -f $name && cat $name |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
909 > done |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
910 % a file |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
911 a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
912 % b1 file |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
913 % b2 file |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
914 b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
915 % c1 file |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
916 c |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
917 % c2 file |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
918 c |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
919 % d file |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
920 $ cd .. |
5852
03ce5a919ae3
patch: handle empty vs no file in git patches (issue906)
Patrick Mezard <pmezard@gmail.com>
parents:
5548
diff
changeset
|
921 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
922 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
923 Test importing a patch ending with a binary file removal |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
924 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
925 $ hg init binaryremoval |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
926 $ cd binaryremoval |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
927 $ echo a > a |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39405
diff
changeset
|
928 $ "$PYTHON" -c "open('b', 'wb').write(b'a\x00b')" |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
929 $ hg ci -Am addall |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
930 adding a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
931 adding b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
932 $ hg rm a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
933 $ hg rm b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
934 $ hg st |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
935 R a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
936 R b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
937 $ hg ci -m remove |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
938 $ hg export --git . > remove.diff |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
939 $ cat remove.diff | grep git |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
940 diff --git a/a b/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
941 diff --git a/b b/b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
942 $ hg up -C 0 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
943 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
944 $ hg import remove.diff |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
945 applying remove.diff |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
946 $ hg manifest |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
947 $ cd .. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
948 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
949 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12366
diff
changeset
|
950 Issue927: test update+rename with common name |
6179
36ab165abbe2
patch: fix iterhunks() with trailing binary file removal
Patrick Mezard <pmezard@gmail.com>
parents:
6001
diff
changeset
|
951 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
952 $ hg init t |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
953 $ cd t |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
954 $ touch a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
955 $ hg ci -Am t |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
956 adding a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
957 $ echo a > a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
958 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
959 Here, bfile.startswith(afile) |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
960 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
961 $ hg copy a a2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
962 $ hg ci -m copya |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
963 $ hg export --git tip > copy.diff |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
964 $ hg up -C 0 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
965 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
966 $ hg import copy.diff |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
967 applying copy.diff |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
968 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
969 a should contain an 'a' |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
970 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
971 $ cat a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
972 a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
973 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
974 and a2 should have duplicated it |
6520
ba0b2dacc623
fix import with -p0
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
6295
diff
changeset
|
975 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
976 $ cat a2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
977 a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
978 $ cd .. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
979 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
980 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
981 test -p0 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
982 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
983 $ hg init p0 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
984 $ cd p0 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
985 $ echo a > a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
986 $ hg ci -Am t |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
987 adding a |
17712
c4717f44c1f1
fancyopts: don't show a traceback on invalid integer values
Idan Kamara <idankk86@gmail.com>
parents:
16912
diff
changeset
|
988 $ hg import -p foo |
c4717f44c1f1
fancyopts: don't show a traceback on invalid integer values
Idan Kamara <idankk86@gmail.com>
parents:
16912
diff
changeset
|
989 abort: invalid value 'foo' for option -p, expected int |
c4717f44c1f1
fancyopts: don't show a traceback on invalid integer values
Idan Kamara <idankk86@gmail.com>
parents:
16912
diff
changeset
|
990 [255] |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
991 $ hg import -p0 - << EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
992 > foobar |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
993 > --- a Sat Apr 12 22:43:58 2008 -0400 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
994 > +++ a Sat Apr 12 22:44:05 2008 -0400 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
995 > @@ -1,1 +1,1 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
996 > -a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
997 > +bb |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
998 > EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
999 applying patch from stdin |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1000 $ hg status |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1001 $ cat a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1002 bb |
24259
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1003 |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1004 test --prefix |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1005 |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1006 $ mkdir -p dir/dir2 |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1007 $ echo b > dir/dir2/b |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1008 $ hg ci -Am b |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1009 adding dir/dir2/b |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1010 $ hg import -p2 --prefix dir - << EOF |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1011 > foobar |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1012 > --- drop1/drop2/dir2/b |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1013 > +++ drop1/drop2/dir2/b |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1014 > @@ -1,1 +1,1 @@ |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1015 > -b |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1016 > +cc |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1017 > EOF |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1018 applying patch from stdin |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1019 $ hg status |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1020 $ cat dir/dir2/b |
5ac8ce04baa2
cmdutil.tryimportone: allow importing relative patches into the working dir
Siddharth Agarwal <sid0@fb.com>
parents:
23749
diff
changeset
|
1021 cc |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1022 $ cd .. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1023 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1024 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1025 test paths outside repo root |
6758
87c704ac92d4
Check that git patches only touch files under root
Brendan Cully <brendan@kublai.com>
parents:
6520
diff
changeset
|
1026 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1027 $ mkdir outside |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1028 $ touch outside/foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1029 $ hg init inside |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1030 $ cd inside |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1031 $ hg import - <<EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1032 > diff --git a/a b/b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1033 > rename from ../outside/foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1034 > rename to bar |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1035 > EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1036 applying patch from stdin |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35186
diff
changeset
|
1037 abort: path contains illegal component: ../outside/foo |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11807
diff
changeset
|
1038 [255] |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1039 $ cd .. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1040 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1041 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1042 test import with similarity and git and strip (issue295 et al.) |
7402
bffdab64dfbb
import: add similarity option (issue295)
Brendan Cully <brendan@kublai.com>
parents:
7247
diff
changeset
|
1043 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1044 $ hg init sim |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1045 $ cd sim |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1046 $ echo 'this is a test' > a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1047 $ hg ci -Ama |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1048 adding a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1049 $ cat > ../rename.diff <<EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1050 > diff --git a/foo/a b/foo/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1051 > deleted file mode 100644 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1052 > --- a/foo/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1053 > +++ /dev/null |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1054 > @@ -1,1 +0,0 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1055 > -this is a test |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1056 > diff --git a/foo/b b/foo/b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1057 > new file mode 100644 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1058 > --- /dev/null |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1059 > +++ b/foo/b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1060 > @@ -0,0 +1,2 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1061 > +this is a test |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1062 > +foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1063 > EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1064 $ hg import --no-commit -v -s 1 ../rename.diff -p2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1065 applying ../rename.diff |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1066 patching file a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1067 patching file b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1068 adding b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1069 recording removal of a as rename to b (88% similar) |
15194
0705f2ac79d6
import: simplify status reporting logic (and make it more I18N-friendly)
Greg Ward <greg@gerg.ca>
parents:
14452
diff
changeset
|
1070 applied to working directory |
35167
9fb2b0b41bec
test-largefiles: demonstrate problems with renaming and reverting a directory
Matt Harbison <matt_harbison@yahoo.com>
parents:
34661
diff
changeset
|
1071 $ echo 'mod b' > b |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1072 $ hg st -C |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1073 A b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1074 a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1075 R a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1076 $ hg revert -a |
39405
cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
37815
diff
changeset
|
1077 forgetting b |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1078 undeleting a |
35167
9fb2b0b41bec
test-largefiles: demonstrate problems with renaming and reverting a directory
Matt Harbison <matt_harbison@yahoo.com>
parents:
34661
diff
changeset
|
1079 $ cat b |
9fb2b0b41bec
test-largefiles: demonstrate problems with renaming and reverting a directory
Matt Harbison <matt_harbison@yahoo.com>
parents:
34661
diff
changeset
|
1080 mod b |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1081 $ rm b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1082 $ hg import --no-commit -v -s 100 ../rename.diff -p2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1083 applying ../rename.diff |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1084 patching file a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1085 patching file b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1086 adding b |
15194
0705f2ac79d6
import: simplify status reporting logic (and make it more I18N-friendly)
Greg Ward <greg@gerg.ca>
parents:
14452
diff
changeset
|
1087 applied to working directory |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1088 $ hg st -C |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1089 A b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1090 R a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1091 $ cd .. |
7971
6ea0318daf75
Fix issue1495, corner case of adding empty files via patching
Vsevolod Solovyov <vsevolod.solovyov@gmail.com>
parents:
7402
diff
changeset
|
1092 |
6ea0318daf75
Fix issue1495, corner case of adding empty files via patching
Vsevolod Solovyov <vsevolod.solovyov@gmail.com>
parents:
7402
diff
changeset
|
1093 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12366
diff
changeset
|
1094 Issue1495: add empty file from the end of patch |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1095 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1096 $ hg init addemptyend |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1097 $ cd addemptyend |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1098 $ touch a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1099 $ hg addremove |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1100 adding a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1101 $ hg ci -m "commit" |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1102 $ cat > a.patch <<EOF |
15198
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1103 > add a, b |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1104 > diff --git a/a b/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1105 > --- a/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1106 > +++ b/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1107 > @@ -0,0 +1,1 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1108 > +a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1109 > diff --git a/b b/b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1110 > new file mode 100644 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1111 > EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1112 $ hg import --no-commit a.patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1113 applying a.patch |
15198
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1114 |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1115 apply a good patch followed by an empty patch (mainly to ensure |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1116 that dirstate is *not* updated when import crashes) |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1117 $ hg update -q -C . |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1118 $ rm b |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1119 $ touch empty.patch |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1120 $ hg import a.patch empty.patch |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1121 applying a.patch |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1122 applying empty.patch |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1123 transaction abort! |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1124 rollback completed |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1125 abort: empty.patch: no diffs found |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1126 [255] |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1127 $ hg tip --template '{rev} {desc|firstline}\n' |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1128 0 commit |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1129 $ hg -q status |
62dc0e7ab092
import: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents:
15194
diff
changeset
|
1130 M a |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1131 $ cd .. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1132 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1133 create file when source is not /dev/null |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1134 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1135 $ cat > create.patch <<EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1136 > diff -Naur proj-orig/foo proj-new/foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1137 > --- proj-orig/foo 1969-12-31 16:00:00.000000000 -0800 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1138 > +++ proj-new/foo 2009-07-17 16:50:45.801368000 -0700 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1139 > @@ -0,0 +1,1 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1140 > +a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1141 > EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1142 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1143 some people have patches like the following too |
9573
b8352a3617f3
patch: do not swallow header-like patch first line (issue1859)
Patrick Mezard <pmezard@gmail.com>
parents:
8523
diff
changeset
|
1144 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1145 $ cat > create2.patch <<EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1146 > diff -Naur proj-orig/foo proj-new/foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1147 > --- proj-orig/foo.orig 1969-12-31 16:00:00.000000000 -0800 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1148 > +++ proj-new/foo 2009-07-17 16:50:45.801368000 -0700 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1149 > @@ -0,0 +1,1 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1150 > +a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1151 > EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1152 $ hg init oddcreate |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1153 $ cd oddcreate |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1154 $ hg import --no-commit ../create.patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1155 applying ../create.patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1156 $ cat foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1157 a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1158 $ rm foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1159 $ hg revert foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1160 $ hg import --no-commit ../create2.patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1161 applying ../create2.patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1162 $ cat foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1163 a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1164 |
16912
6ef3107c661e
tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents:
16889
diff
changeset
|
1165 $ cd .. |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1166 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12366
diff
changeset
|
1167 Issue1859: first line mistaken for email headers |
9576 | 1168 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1169 $ hg init emailconfusion |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1170 $ cd emailconfusion |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1171 $ cat > a.patch <<EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1172 > module: summary |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1173 > |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1174 > description |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1175 > |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1176 > |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1177 > diff -r 000000000000 -r 9b4c1e343b55 test.txt |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1178 > --- /dev/null |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1179 > +++ b/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1180 > @@ -0,0 +1,1 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1181 > +a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1182 > EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1183 $ hg import -d '0 0' a.patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1184 applying a.patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1185 $ hg parents -v |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1186 changeset: 0:5a681217c0ad |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1187 tag: tip |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1188 user: test |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1189 date: Thu Jan 01 00:00:00 1970 +0000 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1190 files: a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1191 description: |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1192 module: summary |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1193 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1194 description |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1195 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1196 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1197 $ cd .. |
9573
b8352a3617f3
patch: do not swallow header-like patch first line (issue1859)
Patrick Mezard <pmezard@gmail.com>
parents:
8523
diff
changeset
|
1198 |
b8352a3617f3
patch: do not swallow header-like patch first line (issue1859)
Patrick Mezard <pmezard@gmail.com>
parents:
8523
diff
changeset
|
1199 |
16912
6ef3107c661e
tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents:
16889
diff
changeset
|
1200 in commit message |
10729
7a5931c5f2dc
patch: enhance diff detection regexp, allow '--- ' in patch message
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10524
diff
changeset
|
1201 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1202 $ hg init commitconfusion |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1203 $ cd commitconfusion |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1204 $ cat > a.patch <<EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1205 > module: summary |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1206 > |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1207 > --- description |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1208 > |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1209 > diff --git a/a b/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1210 > new file mode 100644 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1211 > --- /dev/null |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1212 > +++ b/a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1213 > @@ -0,0 +1,1 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1214 > +a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1215 > EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1216 > hg import -d '0 0' a.patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1217 > hg parents -v |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1218 > cd .. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1219 > |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1220 > echo '% tricky header splitting' |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1221 > cat > trickyheaders.patch <<EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1222 > From: User A <user@a> |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1223 > Subject: [PATCH] from: tricky! |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1224 > |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1225 > # HG changeset patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1226 > # User User B |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1227 > # Date 1266264441 18000 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1228 > # Branch stable |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1229 > # Node ID f2be6a1170ac83bf31cb4ae0bad00d7678115bc0 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1230 > # Parent 0000000000000000000000000000000000000000 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1231 > from: tricky! |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1232 > |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1233 > That is not a header. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1234 > |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1235 > diff -r 000000000000 -r f2be6a1170ac foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1236 > --- /dev/null |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1237 > +++ b/foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1238 > @@ -0,0 +1,1 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1239 > +foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1240 > EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1241 applying a.patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1242 changeset: 0:f34d9187897d |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1243 tag: tip |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1244 user: test |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1245 date: Thu Jan 01 00:00:00 1970 +0000 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1246 files: a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1247 description: |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1248 module: summary |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1249 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1250 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1251 % tricky header splitting |
10501
a27af7229850
import: if in doubt, consume stream until start of diff
Brendan Cully <brendan@kublai.com>
parents:
10384
diff
changeset
|
1252 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1253 $ hg init trickyheaders |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1254 $ cd trickyheaders |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1255 $ hg import -d '0 0' ../trickyheaders.patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1256 applying ../trickyheaders.patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1257 $ hg export --git tip |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1258 # HG changeset patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1259 # User User B |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1260 # Date 0 0 |
18648
76b69cccb07a
export: show 'Date' header in a format that also is readable for humans
Mads Kiilerich <mads@kiilerich.com>
parents:
17712
diff
changeset
|
1261 # Thu Jan 01 00:00:00 1970 +0000 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1262 # Node ID eb56ab91903632294ac504838508cb370c0901d2 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1263 # Parent 0000000000000000000000000000000000000000 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1264 from: tricky! |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1265 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1266 That is not a header. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1267 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1268 diff --git a/foo b/foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1269 new file mode 100644 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1270 --- /dev/null |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1271 +++ b/foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1272 @@ -0,0 +1,1 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1273 +foo |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1274 $ cd .. |
10501
a27af7229850
import: if in doubt, consume stream until start of diff
Brendan Cully <brendan@kublai.com>
parents:
10384
diff
changeset
|
1275 |
a27af7229850
import: if in doubt, consume stream until start of diff
Brendan Cully <brendan@kublai.com>
parents:
10384
diff
changeset
|
1276 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12366
diff
changeset
|
1277 Issue2102: hg export and hg import speak different languages |
10748
fb06e357e698
patch: more precise NoHunk, raised for every file (issue2102)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10745
diff
changeset
|
1278 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1279 $ hg init issue2102 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1280 $ cd issue2102 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1281 $ mkdir -p src/cmd/gc |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1282 $ touch src/cmd/gc/mksys.bash |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1283 $ hg ci -Am init |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1284 adding src/cmd/gc/mksys.bash |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1285 $ hg import - <<EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1286 > # HG changeset patch |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1287 > # User Rob Pike |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1288 > # Date 1216685449 25200 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1289 > # Node ID 03aa2b206f499ad6eb50e6e207b9e710d6409c98 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1290 > # Parent 93d10138ad8df586827ca90b4ddb5033e21a3a84 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1291 > help management of empty pkg and lib directories in perforce |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1292 > |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1293 > R=gri |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1294 > DELTA=4 (4 added, 0 deleted, 0 changed) |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1295 > OCL=13328 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1296 > CL=13328 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1297 > |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1298 > diff --git a/lib/place-holder b/lib/place-holder |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1299 > new file mode 100644 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1300 > --- /dev/null |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1301 > +++ b/lib/place-holder |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1302 > @@ -0,0 +1,2 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1303 > +perforce does not maintain empty directories. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1304 > +this file helps. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1305 > diff --git a/pkg/place-holder b/pkg/place-holder |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1306 > new file mode 100644 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1307 > --- /dev/null |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1308 > +++ b/pkg/place-holder |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1309 > @@ -0,0 +1,2 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1310 > +perforce does not maintain empty directories. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1311 > +this file helps. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1312 > diff --git a/src/cmd/gc/mksys.bash b/src/cmd/gc/mksys.bash |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1313 > old mode 100644 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1314 > new mode 100755 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1315 > EOF |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1316 applying patch from stdin |
16889
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1317 |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1318 #if execbit |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1319 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1320 $ hg sum |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1321 parent: 1:d59915696727 tip |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1322 help management of empty pkg and lib directories in perforce |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1323 branch: default |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1324 commit: (clean) |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1325 update: (current) |
25382
6084926366b9
summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents:
25154
diff
changeset
|
1326 phases: 2 draft |
16889
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1327 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1328 $ hg diff --git -c tip |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1329 diff --git a/lib/place-holder b/lib/place-holder |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1330 new file mode 100644 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1331 --- /dev/null |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1332 +++ b/lib/place-holder |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1333 @@ -0,0 +1,2 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1334 +perforce does not maintain empty directories. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1335 +this file helps. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1336 diff --git a/pkg/place-holder b/pkg/place-holder |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1337 new file mode 100644 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1338 --- /dev/null |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1339 +++ b/pkg/place-holder |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1340 @@ -0,0 +1,2 @@ |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1341 +perforce does not maintain empty directories. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1342 +this file helps. |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1343 diff --git a/src/cmd/gc/mksys.bash b/src/cmd/gc/mksys.bash |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1344 old mode 100644 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1345 new mode 100755 |
16889
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1346 |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1347 #else |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1348 |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1349 $ hg sum |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1350 parent: 1:28f089cc9ccc tip |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1351 help management of empty pkg and lib directories in perforce |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1352 branch: default |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1353 commit: (clean) |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1354 update: (current) |
25397
0b6dee81ebb7
test-import: sync with 6084926366b9 for platforms without execbit
Matt Harbison <matt_harbison@yahoo.com>
parents:
25382
diff
changeset
|
1355 phases: 2 draft |
16889
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1356 |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1357 $ hg diff --git -c tip |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1358 diff --git a/lib/place-holder b/lib/place-holder |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1359 new file mode 100644 |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1360 --- /dev/null |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1361 +++ b/lib/place-holder |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1362 @@ -0,0 +1,2 @@ |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1363 +perforce does not maintain empty directories. |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1364 +this file helps. |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1365 diff --git a/pkg/place-holder b/pkg/place-holder |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1366 new file mode 100644 |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1367 --- /dev/null |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1368 +++ b/pkg/place-holder |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1369 @@ -0,0 +1,2 @@ |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1370 +perforce does not maintain empty directories. |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1371 +this file helps. |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1372 |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1373 /* The mode change for mksys.bash is missing here, because on platforms */ |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1374 /* that don't support execbits, mode changes in patches are ignored when */ |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1375 /* they are imported. This is obviously also the reason for why the hash */ |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1376 /* in the created changeset is different to the one you see above the */ |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1377 /* #else clause */ |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1378 |
0074c2babb13
test-import: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
16888
diff
changeset
|
1379 #endif |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1380 $ cd .. |
10748
fb06e357e698
patch: more precise NoHunk, raised for every file (issue2102)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
10745
diff
changeset
|
1381 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1382 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1383 diff lines looking like headers |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1384 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1385 $ hg init difflineslikeheaders |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1386 $ cd difflineslikeheaders |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1387 $ echo a >a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1388 $ echo b >b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1389 $ echo c >c |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1390 $ hg ci -Am1 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1391 adding a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1392 adding b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1393 adding c |
10883
196908117c27
patch: don't look for headers in diff lines
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
10775
diff
changeset
|
1394 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1395 $ echo "key: value" >>a |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1396 $ echo "key: value" >>b |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1397 $ echo "foo" >>c |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1398 $ hg ci -m2 |
10883
196908117c27
patch: don't look for headers in diff lines
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
10775
diff
changeset
|
1399 |
11807
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1400 $ hg up -C 0 |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1401 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1402 $ hg diff --git -c1 >want |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1403 $ hg diff -c1 | hg import --no-commit - |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1404 applying patch from stdin |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1405 $ hg diff --git >have |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1406 $ diff want have |
887e9f487b7a
tests: unify test-import
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11407
diff
changeset
|
1407 $ cd .. |
10883
196908117c27
patch: don't look for headers in diff lines
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
10775
diff
changeset
|
1408 |
15462
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1409 import a unified diff with no lines of context (diff -U0) |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1410 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1411 $ hg init diffzero |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1412 $ cd diffzero |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1413 $ cat > f << EOF |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1414 > c2 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1415 > c4 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1416 > c5 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1417 > EOF |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1418 $ hg commit -Am0 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1419 adding f |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1420 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1421 $ hg import --no-commit - << EOF |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1422 > # HG changeset patch |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1423 > # User test |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1424 > # Date 0 0 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1425 > # Node ID f4974ab632f3dee767567b0576c0ec9a4508575c |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1426 > # Parent 8679a12a975b819fae5f7ad3853a2886d143d794 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1427 > 1 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1428 > diff -r 8679a12a975b -r f4974ab632f3 f |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1429 > --- a/f Thu Jan 01 00:00:00 1970 +0000 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1430 > +++ b/f Thu Jan 01 00:00:00 1970 +0000 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1431 > @@ -0,0 +1,1 @@ |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1432 > +c1 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1433 > @@ -1,0 +3,1 @@ |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1434 > +c3 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1435 > @@ -3,1 +4,0 @@ |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1436 > -c5 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1437 > EOF |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1438 applying patch from stdin |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1439 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1440 $ cat f |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1441 c1 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1442 c2 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1443 c3 |
2b1ec74c961f
mdiff/patch: fix bad hunk handling for unified diffs with zero context
Nicolas Venegas <nvenegas@atlassian.com>
parents:
15327
diff
changeset
|
1444 c4 |
16123
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1445 |
16912
6ef3107c661e
tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents:
16889
diff
changeset
|
1446 $ cd .. |
6ef3107c661e
tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents:
16889
diff
changeset
|
1447 |
34964
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1448 commit message that looks like a diff header (issue1879) |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1449 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1450 $ hg init headerlikemsg |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1451 $ cd headerlikemsg |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1452 $ touch empty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1453 $ echo nonempty >> nonempty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1454 $ hg ci -qAl - <<EOF |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1455 > blah blah |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1456 > diff blah |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1457 > blah blah |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1458 > EOF |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1459 $ hg --config diff.git=1 log -pv |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1460 changeset: 0:c6ef204ef767 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1461 tag: tip |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1462 user: test |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1463 date: Thu Jan 01 00:00:00 1970 +0000 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1464 files: empty nonempty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1465 description: |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1466 blah blah |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1467 diff blah |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1468 blah blah |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1469 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1470 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1471 diff --git a/empty b/empty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1472 new file mode 100644 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1473 diff --git a/nonempty b/nonempty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1474 new file mode 100644 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1475 --- /dev/null |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1476 +++ b/nonempty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1477 @@ -0,0 +1,1 @@ |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1478 +nonempty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1479 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1480 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1481 (without --git, empty file is lost, but commit message should be preserved) |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1482 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1483 $ hg init plain |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1484 $ hg export 0 | hg -R plain import - |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1485 applying patch from stdin |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1486 $ hg --config diff.git=1 -R plain log -pv |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1487 changeset: 0:60a2d231e71f |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1488 tag: tip |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1489 user: test |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1490 date: Thu Jan 01 00:00:00 1970 +0000 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1491 files: nonempty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1492 description: |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1493 blah blah |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1494 diff blah |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1495 blah blah |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1496 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1497 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1498 diff --git a/nonempty b/nonempty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1499 new file mode 100644 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1500 --- /dev/null |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1501 +++ b/nonempty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1502 @@ -0,0 +1,1 @@ |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1503 +nonempty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1504 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1505 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1506 (with --git, patch contents should be fully preserved) |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1507 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1508 $ hg init git |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1509 $ hg --config diff.git=1 export 0 | hg -R git import - |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1510 applying patch from stdin |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1511 $ hg --config diff.git=1 -R git log -pv |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1512 changeset: 0:c6ef204ef767 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1513 tag: tip |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1514 user: test |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1515 date: Thu Jan 01 00:00:00 1970 +0000 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1516 files: empty nonempty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1517 description: |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1518 blah blah |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1519 diff blah |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1520 blah blah |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1521 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1522 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1523 diff --git a/empty b/empty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1524 new file mode 100644 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1525 diff --git a/nonempty b/nonempty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1526 new file mode 100644 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1527 --- /dev/null |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1528 +++ b/nonempty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1529 @@ -0,0 +1,1 @@ |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1530 +nonempty |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1531 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1532 |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1533 $ cd .. |
7ebf850d3166
patch: improve heuristics to not take the word "diff" as header (issue1879)
Yuya Nishihara <yuya@tcha.org>
parents:
34661
diff
changeset
|
1534 |
16650
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1535 no segfault while importing a unified diff which start line is zero but chunk |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1536 size is non-zero |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1537 |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1538 $ hg init startlinezero |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1539 $ cd startlinezero |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1540 $ echo foo > foo |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1541 $ hg commit -Amfoo |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1542 adding foo |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1543 |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1544 $ hg import --no-commit - << EOF |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1545 > diff a/foo b/foo |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1546 > --- a/foo |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1547 > +++ b/foo |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1548 > @@ -0,1 +0,1 @@ |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1549 > foo |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1550 > EOF |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1551 applying patch from stdin |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1552 |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1553 $ cd .. |
fcb97d9a26cd
patch: fix segfault against unified diffs which start line is zero
Yuya Nishihara <yuya@tcha.org>
parents:
16124
diff
changeset
|
1554 |
16123
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1555 Test corner case involving fuzz and skew |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1556 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1557 $ hg init morecornercases |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1558 $ cd morecornercases |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1559 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1560 $ cat > 01-no-context-beginning-of-file.diff <<EOF |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1561 > diff --git a/a b/a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1562 > --- a/a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1563 > +++ b/a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1564 > @@ -1,0 +1,1 @@ |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1565 > +line |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1566 > EOF |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1567 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1568 $ cat > 02-no-context-middle-of-file.diff <<EOF |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1569 > diff --git a/a b/a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1570 > --- a/a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1571 > +++ b/a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1572 > @@ -1,1 +1,1 @@ |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1573 > -2 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1574 > +add some skew |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1575 > @@ -2,0 +2,1 @@ |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1576 > +line |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1577 > EOF |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1578 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1579 $ cat > 03-no-context-end-of-file.diff <<EOF |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1580 > diff --git a/a b/a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1581 > --- a/a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1582 > +++ b/a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1583 > @@ -10,0 +10,1 @@ |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1584 > +line |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1585 > EOF |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1586 |
16124
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1587 $ cat > 04-middle-of-file-completely-fuzzed.diff <<EOF |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1588 > diff --git a/a b/a |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1589 > --- a/a |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1590 > +++ b/a |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1591 > @@ -1,1 +1,1 @@ |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1592 > -2 |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1593 > +add some skew |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1594 > @@ -2,2 +2,3 @@ |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1595 > not matching, should fuzz |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1596 > ... a bit |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1597 > +line |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1598 > EOF |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1599 |
16123
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1600 $ cat > a <<EOF |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1601 > 1 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1602 > 2 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1603 > 3 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1604 > 4 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1605 > EOF |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1606 $ hg ci -Am adda a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1607 $ for p in *.diff; do |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1608 > hg import -v --no-commit $p |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1609 > cat a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1610 > hg revert -aqC a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1611 > # patch -p1 < $p |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1612 > # cat a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1613 > # hg revert -aC a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1614 > done |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1615 applying 01-no-context-beginning-of-file.diff |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1616 patching file a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1617 applied to working directory |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1618 1 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1619 line |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1620 2 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1621 3 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1622 4 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1623 applying 02-no-context-middle-of-file.diff |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1624 patching file a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1625 Hunk #1 succeeded at 2 (offset 1 lines). |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1626 Hunk #2 succeeded at 4 (offset 1 lines). |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1627 applied to working directory |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1628 1 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1629 add some skew |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1630 3 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1631 line |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1632 4 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1633 applying 03-no-context-end-of-file.diff |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1634 patching file a |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1635 Hunk #1 succeeded at 5 (offset -6 lines). |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1636 applied to working directory |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1637 1 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1638 2 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1639 3 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1640 4 |
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1641 line |
16124
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1642 applying 04-middle-of-file-completely-fuzzed.diff |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1643 patching file a |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1644 Hunk #1 succeeded at 2 (offset 1 lines). |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1645 Hunk #2 succeeded at 5 with fuzz 2 (offset 1 lines). |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1646 applied to working directory |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1647 1 |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1648 add some skew |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1649 3 |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1650 4 |
0e0060bf2f44
patch: fuzz more aggressively to match patch(1) behaviour
Patrick Mezard <patrick@mezard.eu>
parents:
16123
diff
changeset
|
1651 line |
21553
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1652 $ cd .. |
16123
b0c7525f826d
patch: fix fuzzing of hunks without previous lines (issue3264)
Patrick Mezard <patrick@mezard.eu>
parents:
16112
diff
changeset
|
1653 |
21553
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1654 Test partial application |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1655 ------------------------ |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1656 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1657 prepare a stack of patches depending on each other |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1658 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1659 $ hg init partial |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1660 $ cd partial |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1661 $ cat << EOF > a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1662 > one |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1663 > two |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1664 > three |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1665 > four |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1666 > five |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1667 > six |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1668 > seven |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1669 > EOF |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1670 $ hg add a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1671 $ echo 'b' > b |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1672 $ hg add b |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1673 $ hg commit -m 'initial' -u Babar |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1674 $ cat << EOF > a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1675 > one |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1676 > two |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1677 > 3 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1678 > four |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1679 > five |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1680 > six |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1681 > seven |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1682 > EOF |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1683 $ hg commit -m 'three' -u Celeste |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1684 $ cat << EOF > a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1685 > one |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1686 > two |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1687 > 3 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1688 > 4 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1689 > five |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1690 > six |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1691 > seven |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1692 > EOF |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1693 $ hg commit -m 'four' -u Rataxes |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1694 $ cat << EOF > a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1695 > one |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1696 > two |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1697 > 3 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1698 > 4 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1699 > 5 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1700 > six |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1701 > seven |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1702 > EOF |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1703 $ echo bb >> b |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1704 $ hg commit -m 'five' -u Arthur |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1705 $ echo 'Babar' > jungle |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1706 $ hg add jungle |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1707 $ hg ci -m 'jungle' -u Zephir |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1708 $ echo 'Celeste' >> jungle |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1709 $ hg ci -m 'extended jungle' -u Cornelius |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1710 $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1711 @ extended jungle [Cornelius] 1: +1/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1712 | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1713 o jungle [Zephir] 1: +1/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1714 | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1715 o five [Arthur] 2: +2/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1716 | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1717 o four [Rataxes] 1: +1/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1718 | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1719 o three [Celeste] 1: +1/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1720 | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1721 o initial [Babar] 2: +8/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1722 |
30811
cf1e15f91c90
templatekw: force noprefix=False to insure diffstat consistency (issue4755)
Matthieu Laneuville <mlaneuville@protonmail.com>
parents:
30332
diff
changeset
|
1723 Adding those config options should not change the output of diffstat. Bugfix #4755. |
cf1e15f91c90
templatekw: force noprefix=False to insure diffstat consistency (issue4755)
Matthieu Laneuville <mlaneuville@protonmail.com>
parents:
30332
diff
changeset
|
1724 |
cf1e15f91c90
templatekw: force noprefix=False to insure diffstat consistency (issue4755)
Matthieu Laneuville <mlaneuville@protonmail.com>
parents:
30332
diff
changeset
|
1725 $ hg log -r . --template '{diffstat}\n' |
cf1e15f91c90
templatekw: force noprefix=False to insure diffstat consistency (issue4755)
Matthieu Laneuville <mlaneuville@protonmail.com>
parents:
30332
diff
changeset
|
1726 1: +1/-0 |
cf1e15f91c90
templatekw: force noprefix=False to insure diffstat consistency (issue4755)
Matthieu Laneuville <mlaneuville@protonmail.com>
parents:
30332
diff
changeset
|
1727 $ hg log -r . --template '{diffstat}\n' --config diff.git=1 \ |
cf1e15f91c90
templatekw: force noprefix=False to insure diffstat consistency (issue4755)
Matthieu Laneuville <mlaneuville@protonmail.com>
parents:
30332
diff
changeset
|
1728 > --config diff.noprefix=1 |
cf1e15f91c90
templatekw: force noprefix=False to insure diffstat consistency (issue4755)
Matthieu Laneuville <mlaneuville@protonmail.com>
parents:
30332
diff
changeset
|
1729 1: +1/-0 |
21553
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1730 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1731 Importing with some success and some errors: |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1732 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1733 $ hg update --rev 'desc(initial)' |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1734 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1735 $ hg export --rev 'desc(five)' | hg import --partial - |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1736 applying patch from stdin |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1737 patching file a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1738 Hunk #1 FAILED at 1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1739 1 out of 1 hunks FAILED -- saving rejects to file a.rej |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1740 patch applied partially |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1741 (fix the .rej files and run `hg commit --amend`) |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1742 [1] |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1743 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1744 $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1745 @ five [Arthur] 1: +1/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1746 | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1747 | o extended jungle [Cornelius] 1: +1/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1748 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1749 | o jungle [Zephir] 1: +1/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1750 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1751 | o five [Arthur] 2: +2/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1752 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1753 | o four [Rataxes] 1: +1/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1754 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1755 | o three [Celeste] 1: +1/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1756 |/ |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1757 o initial [Babar] 2: +8/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1758 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1759 $ hg export |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1760 # HG changeset patch |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1761 # User Arthur |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1762 # Date 0 0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1763 # Thu Jan 01 00:00:00 1970 +0000 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1764 # Node ID 26e6446bb2526e2be1037935f5fca2b2706f1509 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1765 # Parent 8e4f0351909eae6b9cf68c2c076cb54c42b54b2e |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1766 five |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1767 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1768 diff -r 8e4f0351909e -r 26e6446bb252 b |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1769 --- a/b Thu Jan 01 00:00:00 1970 +0000 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1770 +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1771 @@ -1,1 +1,2 @@ |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1772 b |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1773 +bb |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1774 $ hg status -c . |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1775 C a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1776 C b |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1777 $ ls |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1778 a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1779 a.rej |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1780 b |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1781 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1782 Importing with zero success: |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1783 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1784 $ hg update --rev 'desc(initial)' |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1785 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1786 $ hg export --rev 'desc(four)' | hg import --partial - |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1787 applying patch from stdin |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1788 patching file a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1789 Hunk #1 FAILED at 0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1790 1 out of 1 hunks FAILED -- saving rejects to file a.rej |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1791 patch applied partially |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1792 (fix the .rej files and run `hg commit --amend`) |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1793 [1] |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1794 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1795 $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1796 @ four [Rataxes] 0: +0/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1797 | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1798 | o five [Arthur] 1: +1/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1799 |/ |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1800 | o extended jungle [Cornelius] 1: +1/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1801 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1802 | o jungle [Zephir] 1: +1/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1803 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1804 | o five [Arthur] 2: +2/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1805 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1806 | o four [Rataxes] 1: +1/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1807 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1808 | o three [Celeste] 1: +1/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1809 |/ |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1810 o initial [Babar] 2: +8/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1811 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1812 $ hg export |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1813 # HG changeset patch |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1814 # User Rataxes |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1815 # Date 0 0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1816 # Thu Jan 01 00:00:00 1970 +0000 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1817 # Node ID cb9b1847a74d9ad52e93becaf14b98dbcc274e1e |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1818 # Parent 8e4f0351909eae6b9cf68c2c076cb54c42b54b2e |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1819 four |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1820 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1821 $ hg status -c . |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1822 C a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1823 C b |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1824 $ ls |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1825 a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1826 a.rej |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1827 b |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1828 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1829 Importing with unknown file: |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1830 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1831 $ hg update --rev 'desc(initial)' |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1832 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1833 $ hg export --rev 'desc("extended jungle")' | hg import --partial - |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1834 applying patch from stdin |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1835 unable to find 'jungle' for patching |
29900
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1836 (use '--prefix' to apply patch relative to the current directory) |
21553
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1837 1 out of 1 hunks FAILED -- saving rejects to file jungle.rej |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1838 patch applied partially |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1839 (fix the .rej files and run `hg commit --amend`) |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1840 [1] |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1841 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1842 $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1843 @ extended jungle [Cornelius] 0: +0/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1844 | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1845 | o four [Rataxes] 0: +0/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1846 |/ |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1847 | o five [Arthur] 1: +1/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1848 |/ |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1849 | o extended jungle [Cornelius] 1: +1/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1850 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1851 | o jungle [Zephir] 1: +1/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1852 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1853 | o five [Arthur] 2: +2/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1854 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1855 | o four [Rataxes] 1: +1/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1856 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1857 | o three [Celeste] 1: +1/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1858 |/ |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1859 o initial [Babar] 2: +8/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1860 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1861 $ hg export |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1862 # HG changeset patch |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1863 # User Cornelius |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1864 # Date 0 0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1865 # Thu Jan 01 00:00:00 1970 +0000 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1866 # Node ID 1fb1f86bef43c5a75918178f8d23c29fb0a7398d |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1867 # Parent 8e4f0351909eae6b9cf68c2c076cb54c42b54b2e |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1868 extended jungle |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1869 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1870 $ hg status -c . |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1871 C a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1872 C b |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1873 $ ls |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1874 a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1875 a.rej |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1876 b |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1877 jungle.rej |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1878 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1879 Importing multiple failing patches: |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1880 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1881 $ hg update --rev 'desc(initial)' |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1882 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1883 $ echo 'B' > b # just to make another commit |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1884 $ hg commit -m "a new base" |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1885 created new head |
22858
d7cedb32a8ab
test-import.t: use proper revset order
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
22278
diff
changeset
|
1886 $ hg export --rev 'desc("four") + desc("extended jungle")' | hg import --partial - |
21553
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1887 applying patch from stdin |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1888 patching file a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1889 Hunk #1 FAILED at 0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1890 1 out of 1 hunks FAILED -- saving rejects to file a.rej |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1891 patch applied partially |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1892 (fix the .rej files and run `hg commit --amend`) |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1893 [1] |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1894 $ hg log -G --template '{desc|firstline} [{author}] {diffstat}\n' |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1895 @ four [Rataxes] 0: +0/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1896 | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1897 o a new base [test] 1: +1/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1898 | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1899 | o extended jungle [Cornelius] 0: +0/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1900 |/ |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1901 | o four [Rataxes] 0: +0/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1902 |/ |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1903 | o five [Arthur] 1: +1/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1904 |/ |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1905 | o extended jungle [Cornelius] 1: +1/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1906 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1907 | o jungle [Zephir] 1: +1/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1908 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1909 | o five [Arthur] 2: +2/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1910 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1911 | o four [Rataxes] 1: +1/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1912 | | |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1913 | o three [Celeste] 1: +1/-1 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1914 |/ |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1915 o initial [Babar] 2: +8/-0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1916 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1917 $ hg export |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1918 # HG changeset patch |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1919 # User Rataxes |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1920 # Date 0 0 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1921 # Thu Jan 01 00:00:00 1970 +0000 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1922 # Node ID a9d7b6d0ffbb4eb12b7d5939250fcd42e8930a1d |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1923 # Parent f59f8d2e95a8ca5b1b4ca64320140da85f3b44fd |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1924 four |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1925 |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1926 $ hg status -c . |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1927 C a |
bee0e1cffdd3
import: add --partial flag to create a changeset despite failed hunks
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
21417
diff
changeset
|
1928 C b |
26561
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1929 |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1930 Importing some extra header |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1931 =========================== |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1932 |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1933 $ cat > $TESTTMP/parseextra.py <<EOF |
40369
ef6cab7930b3
py3: fix module imports in tests, as flagged by test-check-module-imports.t
Matt Harbison <matt_harbison@yahoo.com>
parents:
39707
diff
changeset
|
1934 > import mercurial.cmdutil |
26561
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1935 > import mercurial.patch |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1936 > |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1937 > def processfoo(repo, data, extra, opts): |
37457
d83191e9749b
py3: byte-stringify test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
36024
diff
changeset
|
1938 > if b'foo' in data: |
d83191e9749b
py3: byte-stringify test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
36024
diff
changeset
|
1939 > extra[b'foo'] = data[b'foo'] |
26562
dd2f5e014806
import: allow processing of extra part header after import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26561
diff
changeset
|
1940 > def postimport(ctx): |
37457
d83191e9749b
py3: byte-stringify test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
36024
diff
changeset
|
1941 > if b'foo' in ctx.extra(): |
d83191e9749b
py3: byte-stringify test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
36024
diff
changeset
|
1942 > ctx.repo().ui.write(b'imported-foo: %s\n' % ctx.extra()[b'foo']) |
26561
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1943 > |
37457
d83191e9749b
py3: byte-stringify test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
36024
diff
changeset
|
1944 > mercurial.patch.patchheadermap.append((b'Foo', b'foo')) |
d83191e9749b
py3: byte-stringify test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
36024
diff
changeset
|
1945 > mercurial.cmdutil.extrapreimport.append(b'foo') |
d83191e9749b
py3: byte-stringify test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
36024
diff
changeset
|
1946 > mercurial.cmdutil.extrapreimportmap[b'foo'] = processfoo |
d83191e9749b
py3: byte-stringify test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
36024
diff
changeset
|
1947 > mercurial.cmdutil.extrapostimport.append(b'foo') |
d83191e9749b
py3: byte-stringify test-import.t
Yuya Nishihara <yuya@tcha.org>
parents:
36024
diff
changeset
|
1948 > mercurial.cmdutil.extrapostimportmap[b'foo'] = postimport |
26561
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1949 > EOF |
27054
fe458d078ed7
test-import: don't use printf to append an extension to $HGRCPATH
Matt Harbison <matt_harbison@yahoo.com>
parents:
26751
diff
changeset
|
1950 $ cat >> $HGRCPATH <<EOF |
fe458d078ed7
test-import: don't use printf to append an extension to $HGRCPATH
Matt Harbison <matt_harbison@yahoo.com>
parents:
26751
diff
changeset
|
1951 > [extensions] |
fe458d078ed7
test-import: don't use printf to append an extension to $HGRCPATH
Matt Harbison <matt_harbison@yahoo.com>
parents:
26751
diff
changeset
|
1952 > parseextra=$TESTTMP/parseextra.py |
fe458d078ed7
test-import: don't use printf to append an extension to $HGRCPATH
Matt Harbison <matt_harbison@yahoo.com>
parents:
26751
diff
changeset
|
1953 > EOF |
26561
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1954 $ hg up -C tip |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1955 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1956 $ cat > $TESTTMP/foo.patch <<EOF |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1957 > # HG changeset patch |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1958 > # User Rataxes |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1959 > # Date 0 0 |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1960 > # Thu Jan 01 00:00:00 1970 +0000 |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1961 > # Foo bar |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1962 > height |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1963 > |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1964 > --- a/a Thu Jan 01 00:00:00 1970 +0000 |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1965 > +++ b/a Wed Oct 07 09:17:44 2015 +0000 |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1966 > @@ -5,3 +5,4 @@ |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1967 > five |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1968 > six |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1969 > seven |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1970 > +heigt |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1971 > EOF |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1972 $ hg import $TESTTMP/foo.patch |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1973 applying $TESTTMP/foo.patch |
26562
dd2f5e014806
import: allow processing of extra part header after import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
26561
diff
changeset
|
1974 imported-foo: bar |
26561
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1975 $ hg log --debug -r . | grep extra |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1976 extra: branch=default |
1f14920a892c
import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
25631
diff
changeset
|
1977 extra: foo=bar |
29900
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1978 |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1979 Warn the user that paths are relative to the root of |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1980 repository when file not found for patching |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1981 |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1982 $ mkdir filedir |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1983 $ echo "file1" >> filedir/file1 |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1984 $ hg add filedir/file1 |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1985 $ hg commit -m "file1" |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1986 $ cd filedir |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1987 $ hg import -p 2 - <<EOF |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1988 > # HG changeset patch |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1989 > # User test |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1990 > # Date 0 0 |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1991 > file2 |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1992 > |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1993 > diff --git a/filedir/file1 b/filedir/file1 |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1994 > --- a/filedir/file1 |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1995 > +++ b/filedir/file1 |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1996 > @@ -1,1 +1,2 @@ |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1997 > file1 |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1998 > +file2 |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
1999 > EOF |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
2000 applying patch from stdin |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
2001 unable to find 'file1' for patching |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
2002 (use '--prefix' to apply patch relative to the current directory) |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
2003 1 out of 1 hunks FAILED -- saving rejects to file file1.rej |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
2004 abort: patch failed to apply |
50f2966f86ca
import: report directory-relative paths in error messages (issue5224)
liscju <piotr.listkiewicz@gmail.com>
parents:
29485
diff
changeset
|
2005 [255] |
30078
173bdb502503
import: abort instead of crashing when copy source does not exist (issue5375)
Ryan McElroy <rmcelroy@fb.com>
parents:
29900
diff
changeset
|
2006 |
173bdb502503
import: abort instead of crashing when copy source does not exist (issue5375)
Ryan McElroy <rmcelroy@fb.com>
parents:
29900
diff
changeset
|
2007 test import crash (issue5375) |
173bdb502503
import: abort instead of crashing when copy source does not exist (issue5375)
Ryan McElroy <rmcelroy@fb.com>
parents:
29900
diff
changeset
|
2008 $ cd .. |
173bdb502503
import: abort instead of crashing when copy source does not exist (issue5375)
Ryan McElroy <rmcelroy@fb.com>
parents:
29900
diff
changeset
|
2009 $ hg init repo |
173bdb502503
import: abort instead of crashing when copy source does not exist (issue5375)
Ryan McElroy <rmcelroy@fb.com>
parents:
29900
diff
changeset
|
2010 $ cd repo |
173bdb502503
import: abort instead of crashing when copy source does not exist (issue5375)
Ryan McElroy <rmcelroy@fb.com>
parents:
29900
diff
changeset
|
2011 $ printf "diff --git a/a b/b\nrename from a\nrename to b" | hg import - |
173bdb502503
import: abort instead of crashing when copy source does not exist (issue5375)
Ryan McElroy <rmcelroy@fb.com>
parents:
29900
diff
changeset
|
2012 applying patch from stdin |
173bdb502503
import: abort instead of crashing when copy source does not exist (issue5375)
Ryan McElroy <rmcelroy@fb.com>
parents:
29900
diff
changeset
|
2013 a not tracked! |
173bdb502503
import: abort instead of crashing when copy source does not exist (issue5375)
Ryan McElroy <rmcelroy@fb.com>
parents:
29900
diff
changeset
|
2014 abort: source file 'a' does not exist |
173bdb502503
import: abort instead of crashing when copy source does not exist (issue5375)
Ryan McElroy <rmcelroy@fb.com>
parents:
29900
diff
changeset
|
2015 [255] |
37573
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2016 |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2017 test immature end of hunk |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2018 |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2019 $ hg import - <<'EOF' |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2020 > diff --git a/foo b/foo |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2021 > --- a/foo |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2022 > --- b/foo |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2023 > @@ -0,0 +1,1 @@ |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2024 > EOF |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2025 applying patch from stdin |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2026 abort: bad hunk #1: incomplete hunk |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2027 [255] |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2028 |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2029 $ hg import - <<'EOF' |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2030 > diff --git a/foo b/foo |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2031 > --- a/foo |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2032 > --- b/foo |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2033 > @@ -0,0 +1,1 @@ |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2034 > \ No newline at end of file |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2035 > EOF |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2036 applying patch from stdin |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2037 abort: bad hunk #1: incomplete hunk |
49b82cdb5983
patch: error out if reached to EOF while reading hunk
Yuya Nishihara <yuya@tcha.org>
parents:
37467
diff
changeset
|
2038 [255] |