Mercurial > hg
annotate tests/test-absorb.t @ 40312:5644f7c8982e
branchmap: remove redundant sort
There is absoluty no benefit in sorting a list that's being merged into a set
on the next line. The changelog.ancestors() call later on also doesn't benefit
from a sorted sequence of revs.
Differential Revision: https://phab.mercurial-scm.org/D5111
author | Martijn Pieters <mj@octobus.net> |
---|---|
date | Fri, 31 Aug 2018 19:58:41 +0100 |
parents | 31dfa7dac4c9 |
children | e993a86cfcb8 |
rev | line source |
---|---|
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
1 $ cat >> $HGRCPATH << EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
2 > [extensions] |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
3 > absorb= |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
4 > EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
5 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
6 $ sedi() { # workaround check-code |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
7 > pattern="$1" |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
8 > shift |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
9 > for i in "$@"; do |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
10 > sed "$pattern" "$i" > "$i".tmp |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
11 > mv "$i".tmp "$i" |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
12 > done |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
13 > } |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
14 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
15 $ hg init repo1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
16 $ cd repo1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
17 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
18 Do not crash with empty repo: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
19 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
20 $ hg absorb |
39453
ab452995eaff
absorb: clarify the reason for not finding changesets to modify
Matt Harbison <matt_harbison@yahoo.com>
parents:
39188
diff
changeset
|
21 abort: no mutable changeset to change |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
22 [255] |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
23 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
24 Make some commits: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
25 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
26 $ for i in 1 2 3 4 5; do |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
27 > echo $i >> a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
28 > hg commit -A a -m "commit $i" -q |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
29 > done |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
30 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
31 $ hg annotate a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
32 0: 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
33 1: 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
34 2: 3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
35 3: 4 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
36 4: 5 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
37 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
38 Change a few lines: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
39 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
40 $ cat > a <<EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
41 > 1a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
42 > 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
43 > 3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
44 > 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
45 > 5e |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
46 > EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
47 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
48 Preview absorb changes: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
49 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
50 $ hg absorb --print-changes --dry-run |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
51 showing changes for a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
52 @@ -0,2 +0,2 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
53 4ec16f8 -1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
54 5c5f952 -2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
55 4ec16f8 +1a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
56 5c5f952 +2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
57 @@ -3,2 +3,2 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
58 ad8b8b7 -4 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
59 4f55fa6 -5 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
60 ad8b8b7 +4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
61 4f55fa6 +5e |
40188
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
62 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
63 4 changesets affected |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
64 4f55fa6 commit 5 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
65 ad8b8b7 commit 4 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
66 5c5f952 commit 2 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
67 4ec16f8 commit 1 |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
68 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
69 Run absorb: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
70 |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
71 $ hg absorb --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
72 saved backup bundle to * (glob) |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
73 2 of 2 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
74 $ hg annotate a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
75 0: 1a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
76 1: 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
77 2: 3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
78 3: 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
79 4: 5e |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
80 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
81 Delete a few lines and related commits will be removed if they will be empty: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
82 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
83 $ cat > a <<EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
84 > 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
85 > 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
86 > EOF |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
87 $ echo y | hg absorb --config ui.interactive=1 |
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
88 showing changes for a |
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
89 @@ -0,1 +0,0 @@ |
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
90 f548282 -1a |
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
91 @@ -2,1 +1,0 @@ |
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
92 ff5d556 -3 |
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
93 @@ -4,1 +2,0 @@ |
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
94 84e5416 -5e |
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
95 |
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
96 3 changesets affected |
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
97 84e5416 commit 5 |
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
98 ff5d556 commit 3 |
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
99 f548282 commit 1 |
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
100 apply changes (yn)? y |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
101 saved backup bundle to * (glob) |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
102 3 of 3 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
103 $ hg annotate a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
104 1: 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
105 2: 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
106 $ hg log -T '{rev} {desc}\n' -Gp |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
107 @ 2 commit 4 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
108 | diff -r 1cae118c7ed8 -r 58a62bade1c6 a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
109 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
110 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
111 | @@ -1,1 +1,2 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
112 | 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
113 | +4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
114 | |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
115 o 1 commit 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
116 | diff -r 84add69aeac0 -r 1cae118c7ed8 a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
117 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
118 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
119 | @@ -0,0 +1,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
120 | +2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
121 | |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
122 o 0 commit 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
123 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
124 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
125 Non 1:1 map changes will be ignored: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
126 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
127 $ echo 1 > a |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
128 $ hg absorb --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
129 nothing applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
130 [1] |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
131 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
132 Insertaions: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
133 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
134 $ cat > a << EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
135 > insert before 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
136 > 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
137 > 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
138 > insert aftert 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
139 > EOF |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
140 $ hg absorb -q --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
141 $ hg status |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
142 $ hg annotate a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
143 1: insert before 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
144 1: 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
145 2: 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
146 2: insert aftert 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
147 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
148 Bookmarks are moved: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
149 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
150 $ hg bookmark -r 1 b1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
151 $ hg bookmark -r 2 b2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
152 $ hg bookmark ba |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
153 $ hg bookmarks |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
154 b1 1:b35060a57a50 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
155 b2 2:946e4bc87915 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
156 * ba 2:946e4bc87915 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
157 $ sedi 's/insert/INSERT/' a |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
158 $ hg absorb -q --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
159 $ hg status |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
160 $ hg bookmarks |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
161 b1 1:a4183e9b3d31 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
162 b2 2:c9b20c925790 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
163 * ba 2:c9b20c925790 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
164 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
165 Non-mofified files are ignored: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
166 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
167 $ touch b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
168 $ hg commit -A b -m b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
169 $ touch c |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
170 $ hg add c |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
171 $ hg rm b |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
172 $ hg absorb --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
173 nothing applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
174 [1] |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
175 $ sedi 's/INSERT/Insert/' a |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
176 $ hg absorb --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
177 saved backup bundle to * (glob) |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
178 2 of 2 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
179 $ hg status |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
180 A c |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
181 R b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
182 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
183 Public commits will not be changed: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
184 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
185 $ hg phase -p 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
186 $ sedi 's/Insert/insert/' a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
187 $ hg absorb -pn |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
188 showing changes for a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
189 @@ -0,1 +0,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
190 -Insert before 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
191 +insert before 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
192 @@ -3,1 +3,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
193 85b4e0e -Insert aftert 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
194 85b4e0e +insert aftert 4d |
40188
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
195 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
196 1 changesets affected |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
197 85b4e0e commit 4 |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
198 $ hg absorb --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
199 saved backup bundle to * (glob) |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
200 1 of 2 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
201 $ hg diff -U 0 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
202 diff -r 1c8eadede62a a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
203 --- a/a Thu Jan 01 00:00:00 1970 +0000 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
204 +++ b/a * (glob) |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
205 @@ -1,1 +1,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
206 -Insert before 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
207 +insert before 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
208 $ hg annotate a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
209 1: Insert before 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
210 1: 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
211 2: 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
212 2: insert aftert 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
213 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
214 Make working copy clean: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
215 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
216 $ hg revert -q -C a b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
217 $ hg forget c |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
218 $ rm c |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
219 $ hg status |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
220 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
221 Merge commit will not be changed: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
222 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
223 $ echo 1 > m1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
224 $ hg commit -A m1 -m m1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
225 $ hg bookmark -q -i m1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
226 $ hg update -q '.^' |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
227 $ echo 2 > m2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
228 $ hg commit -q -A m2 -m m2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
229 $ hg merge -q m1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
230 $ hg commit -m merge |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
231 $ hg bookmark -d m1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
232 $ hg log -G -T '{rev} {desc} {phase}\n' |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
233 @ 6 merge draft |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
234 |\ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
235 | o 5 m2 draft |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
236 | | |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
237 o | 4 m1 draft |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
238 |/ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
239 o 3 b draft |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
240 | |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
241 o 2 commit 4 draft |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
242 | |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
243 o 1 commit 2 public |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
244 | |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
245 o 0 commit 1 public |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
246 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
247 $ echo 2 >> m1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
248 $ echo 2 >> m2 |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
249 $ hg absorb --apply-changes |
39453
ab452995eaff
absorb: clarify the reason for not finding changesets to modify
Matt Harbison <matt_harbison@yahoo.com>
parents:
39188
diff
changeset
|
250 abort: no mutable changeset to change |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
251 [255] |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
252 $ hg revert -q -C m1 m2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
253 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
254 Use a new repo: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
255 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
256 $ cd .. |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
257 $ hg init repo2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
258 $ cd repo2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
259 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
260 Make some commits to multiple files: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
261 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
262 $ for f in a b; do |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
263 > for i in 1 2; do |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
264 > echo $f line $i >> $f |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
265 > hg commit -A $f -m "commit $f $i" -q |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
266 > done |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
267 > done |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
268 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
269 Use pattern to select files to be fixed up: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
270 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
271 $ sedi 's/line/Line/' a b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
272 $ hg status |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
273 M a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
274 M b |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
275 $ hg absorb --apply-changes a |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
276 saved backup bundle to * (glob) |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
277 1 of 1 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
278 $ hg status |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
279 M b |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
280 $ hg absorb --apply-changes --exclude b |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
281 nothing applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
282 [1] |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
283 $ hg absorb --apply-changes b |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
284 saved backup bundle to * (glob) |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
285 1 of 1 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
286 $ hg status |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
287 $ cat a b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
288 a Line 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
289 a Line 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
290 b Line 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
291 b Line 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
292 |
38961
19344143b3e1
absorb: following UI conventions
David Demelier <markand@malikania.fr>
parents:
38932
diff
changeset
|
293 Test config option absorb.max-stack-size: |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
294 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
295 $ sedi 's/Line/line/' a b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
296 $ hg log -T '{rev}:{node} {desc}\n' |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
297 3:712d16a8f445834e36145408eabc1d29df05ec09 commit b 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
298 2:74cfa6294160149d60adbf7582b99ce37a4597ec commit b 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
299 1:28f10dcf96158f84985358a2e5d5b3505ca69c22 commit a 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
300 0:f9a81da8dc53380ed91902e5b82c1b36255a4bd0 commit a 1 |
38961
19344143b3e1
absorb: following UI conventions
David Demelier <markand@malikania.fr>
parents:
38932
diff
changeset
|
301 $ hg --config absorb.max-stack-size=1 absorb -pn |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
302 absorb: only the recent 1 changesets will be analysed |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
303 showing changes for a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
304 @@ -0,2 +0,2 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
305 -a Line 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
306 -a Line 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
307 +a line 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
308 +a line 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
309 showing changes for b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
310 @@ -0,2 +0,2 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
311 -b Line 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
312 712d16a -b Line 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
313 +b line 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
314 712d16a +b line 2 |
40188
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
315 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
316 1 changesets affected |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
317 712d16a commit b 2 |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
318 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
319 Test obsolete markers creation: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
320 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
321 $ cat >> $HGRCPATH << EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
322 > [experimental] |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
323 > evolution=createmarkers |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
324 > [absorb] |
38961
19344143b3e1
absorb: following UI conventions
David Demelier <markand@malikania.fr>
parents:
38932
diff
changeset
|
325 > add-noise=1 |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
326 > EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
327 |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
328 $ hg --config absorb.max-stack-size=3 absorb -a |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
329 absorb: only the recent 3 changesets will be analysed |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
330 2 of 2 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
331 $ hg log -T '{rev}:{node|short} {desc} {get(extras, "absorb_source")}\n' |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
332 6:3dfde4199b46 commit b 2 712d16a8f445834e36145408eabc1d29df05ec09 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
333 5:99cfab7da5ff commit b 1 74cfa6294160149d60adbf7582b99ce37a4597ec |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
334 4:fec2b3bd9e08 commit a 2 28f10dcf96158f84985358a2e5d5b3505ca69c22 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
335 0:f9a81da8dc53 commit a 1 |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
336 $ hg absorb --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
337 1 of 1 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
338 $ hg log -T '{rev}:{node|short} {desc} {get(extras, "absorb_source")}\n' |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
339 10:e1c8c1e030a4 commit b 2 3dfde4199b4610ea6e3c6fa9f5bdad8939d69524 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
340 9:816c30955758 commit b 1 99cfab7da5ffdaf3b9fc6643b14333e194d87f46 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
341 8:5867d584106b commit a 2 fec2b3bd9e0834b7cb6a564348a0058171aed811 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
342 7:8c76602baf10 commit a 1 f9a81da8dc53380ed91902e5b82c1b36255a4bd0 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
343 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
344 Executable files: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
345 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
346 $ cat >> $HGRCPATH << EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
347 > [diff] |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
348 > git=True |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
349 > EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
350 $ cd .. |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
351 $ hg init repo3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
352 $ cd repo3 |
39188
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
353 |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
354 #if execbit |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
355 $ echo > foo.py |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
356 $ chmod +x foo.py |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
357 $ hg add foo.py |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
358 $ hg commit -mfoo |
39188
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
359 #else |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
360 $ hg import -q --bypass - <<EOF |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
361 > # HG changeset patch |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
362 > foo |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
363 > |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
364 > diff --git a/foo.py b/foo.py |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
365 > new file mode 100755 |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
366 > --- /dev/null |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
367 > +++ b/foo.py |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
368 > @@ -0,0 +1,1 @@ |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
369 > + |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
370 > EOF |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
371 $ hg up -q |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
372 #endif |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
373 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
374 $ echo bla > foo.py |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
375 $ hg absorb --dry-run --print-changes |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
376 showing changes for foo.py |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
377 @@ -0,1 +0,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
378 99b4ae7 - |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
379 99b4ae7 +bla |
40188
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
380 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
381 1 changesets affected |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
382 99b4ae7 foo |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
383 $ hg absorb --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
384 1 of 1 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
385 $ hg diff -c . |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
386 diff --git a/foo.py b/foo.py |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
387 new file mode 100755 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
388 --- /dev/null |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
389 +++ b/foo.py |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
390 @@ -0,0 +1,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
391 +bla |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
392 $ hg diff |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
393 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
394 Remove lines may delete changesets: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
395 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
396 $ cd .. |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
397 $ hg init repo4 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
398 $ cd repo4 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
399 $ cat > a <<EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
400 > 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
401 > 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
402 > EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
403 $ hg commit -m a12 -A a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
404 $ cat > b <<EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
405 > 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
406 > 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
407 > EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
408 $ hg commit -m b12 -A b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
409 $ echo 3 >> b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
410 $ hg commit -m b3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
411 $ echo 4 >> b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
412 $ hg commit -m b4 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
413 $ echo 1 > b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
414 $ echo 3 >> a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
415 $ hg absorb -pn |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
416 showing changes for a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
417 @@ -2,0 +2,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
418 bfafb49 +3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
419 showing changes for b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
420 @@ -1,3 +1,0 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
421 1154859 -2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
422 30970db -3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
423 a393a58 -4 |
40188
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
424 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
425 4 changesets affected |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
426 a393a58 b4 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
427 30970db b3 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
428 1154859 b12 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
429 bfafb49 a12 |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
430 $ hg absorb -av | grep became |
40150
1be1689d9ce9
absorb: print '{rev}:' as a prefix to the hash
Matt Harbison <matt_harbison@yahoo.com>
parents:
39453
diff
changeset
|
431 0:bfafb49242db: 1 file(s) changed, became 4:1a2de97fc652 |
1be1689d9ce9
absorb: print '{rev}:' as a prefix to the hash
Matt Harbison <matt_harbison@yahoo.com>
parents:
39453
diff
changeset
|
432 1:115485984805: 2 file(s) changed, became 5:0c930dfab74c |
1be1689d9ce9
absorb: print '{rev}:' as a prefix to the hash
Matt Harbison <matt_harbison@yahoo.com>
parents:
39453
diff
changeset
|
433 2:30970dbf7b40: became empty and was dropped |
1be1689d9ce9
absorb: print '{rev}:' as a prefix to the hash
Matt Harbison <matt_harbison@yahoo.com>
parents:
39453
diff
changeset
|
434 3:a393a58b9a85: became empty and was dropped |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
435 $ hg log -T '{rev} {desc}\n' -Gp |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
436 @ 5 b12 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
437 | diff --git a/b b/b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
438 | new file mode 100644 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
439 | --- /dev/null |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
440 | +++ b/b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
441 | @@ -0,0 +1,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
442 | +1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
443 | |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
444 o 4 a12 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
445 diff --git a/a b/a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
446 new file mode 100644 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
447 --- /dev/null |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
448 +++ b/a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
449 @@ -0,0 +1,3 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
450 +1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
451 +2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
452 +3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
453 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
454 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
455 Use revert to make the current change and its parent disappear. |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
456 This should move us to the non-obsolete ancestor. |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
457 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
458 $ cd .. |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
459 $ hg init repo5 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
460 $ cd repo5 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
461 $ cat > a <<EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
462 > 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
463 > 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
464 > EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
465 $ hg commit -m a12 -A a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
466 $ hg id |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
467 bfafb49242db tip |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
468 $ echo 3 >> a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
469 $ hg commit -m a123 a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
470 $ echo 4 >> a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
471 $ hg commit -m a1234 a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
472 $ hg id |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
473 82dbe7fd19f0 tip |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
474 $ hg revert -r 0 a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
475 $ hg absorb -pn |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
476 showing changes for a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
477 @@ -2,2 +2,0 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
478 f1c23dd -3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
479 82dbe7f -4 |
40188
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
480 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
481 2 changesets affected |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
482 82dbe7f a1234 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
483 f1c23dd a123 |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
484 $ hg absorb --apply-changes --verbose |
40150
1be1689d9ce9
absorb: print '{rev}:' as a prefix to the hash
Matt Harbison <matt_harbison@yahoo.com>
parents:
39453
diff
changeset
|
485 1:f1c23dd5d08d: became empty and was dropped |
1be1689d9ce9
absorb: print '{rev}:' as a prefix to the hash
Matt Harbison <matt_harbison@yahoo.com>
parents:
39453
diff
changeset
|
486 2:82dbe7fd19f0: became empty and was dropped |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
487 a: 1 of 1 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
488 $ hg id |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
489 bfafb49242db tip |