Mercurial > hg
annotate tests/test-absorb.t @ 42054:399ed3e86a49
py2exe: add workaround to allow bundling of hgext3rd.* extensions
py2exe doesn't know how to handle namespace packages *at all*, so it treats
them like normal packages. As a result, if we try and bundle hgext3rd.evolve
in a py2exe build, it won't work if we install evolve into the virtualenv. In
order to work around this, tortoisehg installs hgext3rd.evolve etc into its
staged hg directory, since it doesn't use a virtualenv. As a workaround for us,
we'll just allow any extra packages users want bundled are part of hg during
the pseudo-install phase that py2exe uses. I'm not happy about this, but it
*works*.
As a sample of how you'd make an MSI with evolve bundled:
import os
import shutil
import subprocess
import tempfile
def stage_evolve(version):
"""Stage evolve for inclusion in py2exe binary."""
with tempfile.TemporaryDirectory() as temp:
evolve = os.path.join(temp, "evolve")
subprocess.check_call([
"hg.exe",
"clone",
"https://www.mercurial-scm.org/repo/evolve/",
"--update",
version,
evolve,
])
dest = os.path.join('..', 'hgext3rd', 'evolve')
if os.path.exists(dest):
shutil.rmtree(dest)
shutil.copytree(os.path.join(evolve, "hgext3rd", "evolve"), dest)
def main():
stage_evolve('tip')
print("\0")
print("hgext3rd")
print("hgext3rd.evolve")
print("hgext3rd.evolve.hack")
print("hgext3rd.evolve.thirdparty")
if __name__ == "__main__":
main()
is a script you can pass to the wix/build.py as --extra-packages-script,
and the resulting .msi will have an hg binary with evolve baked in. users
will still need to enable evolve in their hgrc, so you'd probably also
want to bundle configs in your msi for an enterprise environment, but that's
already easy to do with the support for extra features and wxs files in the
wix build process.
Differential Revision: https://phab.mercurial-scm.org/D6189
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 03 Apr 2019 11:46:29 -0400 |
parents | e993a86cfcb8 |
children | b3fc78c028ef |
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 |
40951
e993a86cfcb8
absorb: don't prompt to apply changes when there are none to apply
Danny Hooper <hooper@google.com>
parents:
40190
diff
changeset
|
132 The prompt is not given if there are no changes to be applied, even if there |
e993a86cfcb8
absorb: don't prompt to apply changes when there are none to apply
Danny Hooper <hooper@google.com>
parents:
40190
diff
changeset
|
133 are some changes that won't be applied: |
e993a86cfcb8
absorb: don't prompt to apply changes when there are none to apply
Danny Hooper <hooper@google.com>
parents:
40190
diff
changeset
|
134 |
e993a86cfcb8
absorb: don't prompt to apply changes when there are none to apply
Danny Hooper <hooper@google.com>
parents:
40190
diff
changeset
|
135 $ hg absorb |
e993a86cfcb8
absorb: don't prompt to apply changes when there are none to apply
Danny Hooper <hooper@google.com>
parents:
40190
diff
changeset
|
136 showing changes for a |
e993a86cfcb8
absorb: don't prompt to apply changes when there are none to apply
Danny Hooper <hooper@google.com>
parents:
40190
diff
changeset
|
137 @@ -0,2 +0,1 @@ |
e993a86cfcb8
absorb: don't prompt to apply changes when there are none to apply
Danny Hooper <hooper@google.com>
parents:
40190
diff
changeset
|
138 -2b |
e993a86cfcb8
absorb: don't prompt to apply changes when there are none to apply
Danny Hooper <hooper@google.com>
parents:
40190
diff
changeset
|
139 -4d |
e993a86cfcb8
absorb: don't prompt to apply changes when there are none to apply
Danny Hooper <hooper@google.com>
parents:
40190
diff
changeset
|
140 +1 |
e993a86cfcb8
absorb: don't prompt to apply changes when there are none to apply
Danny Hooper <hooper@google.com>
parents:
40190
diff
changeset
|
141 |
e993a86cfcb8
absorb: don't prompt to apply changes when there are none to apply
Danny Hooper <hooper@google.com>
parents:
40190
diff
changeset
|
142 0 changesets affected |
e993a86cfcb8
absorb: don't prompt to apply changes when there are none to apply
Danny Hooper <hooper@google.com>
parents:
40190
diff
changeset
|
143 nothing applied |
e993a86cfcb8
absorb: don't prompt to apply changes when there are none to apply
Danny Hooper <hooper@google.com>
parents:
40190
diff
changeset
|
144 [1] |
e993a86cfcb8
absorb: don't prompt to apply changes when there are none to apply
Danny Hooper <hooper@google.com>
parents:
40190
diff
changeset
|
145 |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
146 Insertaions: |
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 $ cat > a << EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
149 > insert before 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
150 > 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
151 > 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
152 > insert aftert 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
153 > EOF |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
154 $ hg absorb -q --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
155 $ hg status |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
156 $ hg annotate a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
157 1: insert before 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
158 1: 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
159 2: 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
160 2: insert aftert 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
161 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
162 Bookmarks are moved: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
163 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
164 $ hg bookmark -r 1 b1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
165 $ hg bookmark -r 2 b2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
166 $ hg bookmark ba |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
167 $ hg bookmarks |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
168 b1 1:b35060a57a50 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
169 b2 2:946e4bc87915 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
170 * ba 2:946e4bc87915 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
171 $ 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
|
172 $ hg absorb -q --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
173 $ hg status |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
174 $ hg bookmarks |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
175 b1 1:a4183e9b3d31 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
176 b2 2:c9b20c925790 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
177 * ba 2:c9b20c925790 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
178 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
179 Non-mofified files are ignored: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
180 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
181 $ touch b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
182 $ hg commit -A b -m b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
183 $ touch c |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
184 $ hg add c |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
185 $ hg rm b |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
186 $ hg absorb --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
187 nothing applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
188 [1] |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
189 $ 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
|
190 $ hg absorb --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
191 saved backup bundle to * (glob) |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
192 2 of 2 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
193 $ hg status |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
194 A c |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
195 R b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
196 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
197 Public commits will not be changed: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
198 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
199 $ hg phase -p 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
200 $ sedi 's/Insert/insert/' a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
201 $ hg absorb -pn |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
202 showing changes for a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
203 @@ -0,1 +0,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
204 -Insert before 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
205 +insert before 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
206 @@ -3,1 +3,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
207 85b4e0e -Insert aftert 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
208 85b4e0e +insert aftert 4d |
40188
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
209 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
210 1 changesets affected |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
211 85b4e0e commit 4 |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
212 $ hg absorb --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
213 saved backup bundle to * (glob) |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
214 1 of 2 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
215 $ hg diff -U 0 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
216 diff -r 1c8eadede62a a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
217 --- 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
|
218 +++ b/a * (glob) |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
219 @@ -1,1 +1,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
220 -Insert before 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
221 +insert before 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
222 $ hg annotate a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
223 1: Insert before 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
224 1: 2b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
225 2: 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
226 2: insert aftert 4d |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
227 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
228 Make working copy clean: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
229 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
230 $ hg revert -q -C a b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
231 $ hg forget c |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
232 $ rm c |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
233 $ hg status |
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 Merge commit will not be changed: |
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 $ echo 1 > m1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
238 $ hg commit -A m1 -m m1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
239 $ hg bookmark -q -i m1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
240 $ hg update -q '.^' |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
241 $ echo 2 > m2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
242 $ hg commit -q -A m2 -m m2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
243 $ hg merge -q m1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
244 $ hg commit -m merge |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
245 $ hg bookmark -d m1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
246 $ 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
|
247 @ 6 merge draft |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
248 |\ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
249 | o 5 m2 draft |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
250 | | |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
251 o | 4 m1 draft |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
252 |/ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
253 o 3 b draft |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
254 | |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
255 o 2 commit 4 draft |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
256 | |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
257 o 1 commit 2 public |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
258 | |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
259 o 0 commit 1 public |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
260 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
261 $ echo 2 >> m1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
262 $ echo 2 >> m2 |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
263 $ 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
|
264 abort: no mutable changeset to change |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
265 [255] |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
266 $ hg revert -q -C m1 m2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
267 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
268 Use a new repo: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
269 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
270 $ cd .. |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
271 $ hg init repo2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
272 $ cd repo2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
273 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
274 Make some commits to multiple files: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
275 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
276 $ for f in a b; do |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
277 > for i in 1 2; do |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
278 > echo $f line $i >> $f |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
279 > 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
|
280 > done |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
281 > done |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
282 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
283 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
|
284 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
285 $ sedi 's/line/Line/' a b |
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 M a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
288 M b |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
289 $ hg absorb --apply-changes a |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
290 saved backup bundle to * (glob) |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
291 1 of 1 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
292 $ hg status |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
293 M b |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
294 $ hg absorb --apply-changes --exclude b |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
295 nothing applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
296 [1] |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
297 $ hg absorb --apply-changes b |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
298 saved backup bundle to * (glob) |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
299 1 of 1 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
300 $ hg status |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
301 $ cat a b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
302 a Line 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
303 a Line 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
304 b Line 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
305 b Line 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
306 |
38961
19344143b3e1
absorb: following UI conventions
David Demelier <markand@malikania.fr>
parents:
38932
diff
changeset
|
307 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
|
308 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
309 $ sedi 's/Line/line/' a b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
310 $ hg log -T '{rev}:{node} {desc}\n' |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
311 3:712d16a8f445834e36145408eabc1d29df05ec09 commit b 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
312 2:74cfa6294160149d60adbf7582b99ce37a4597ec commit b 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
313 1:28f10dcf96158f84985358a2e5d5b3505ca69c22 commit a 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
314 0:f9a81da8dc53380ed91902e5b82c1b36255a4bd0 commit a 1 |
38961
19344143b3e1
absorb: following UI conventions
David Demelier <markand@malikania.fr>
parents:
38932
diff
changeset
|
315 $ 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
|
316 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
|
317 showing changes for a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
318 @@ -0,2 +0,2 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
319 -a Line 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
320 -a Line 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
321 +a line 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
322 +a line 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
323 showing changes for b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
324 @@ -0,2 +0,2 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
325 -b Line 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
326 712d16a -b Line 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
327 +b line 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
328 712d16a +b line 2 |
40188
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
329 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
330 1 changesets affected |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
331 712d16a commit b 2 |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
332 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
333 Test obsolete markers creation: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
334 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
335 $ cat >> $HGRCPATH << EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
336 > [experimental] |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
337 > evolution=createmarkers |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
338 > [absorb] |
38961
19344143b3e1
absorb: following UI conventions
David Demelier <markand@malikania.fr>
parents:
38932
diff
changeset
|
339 > add-noise=1 |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
340 > EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
341 |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
342 $ 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
|
343 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
|
344 2 of 2 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
345 $ 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
|
346 6:3dfde4199b46 commit b 2 712d16a8f445834e36145408eabc1d29df05ec09 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
347 5:99cfab7da5ff commit b 1 74cfa6294160149d60adbf7582b99ce37a4597ec |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
348 4:fec2b3bd9e08 commit a 2 28f10dcf96158f84985358a2e5d5b3505ca69c22 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
349 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
|
350 $ hg absorb --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
351 1 of 1 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
352 $ 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
|
353 10:e1c8c1e030a4 commit b 2 3dfde4199b4610ea6e3c6fa9f5bdad8939d69524 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
354 9:816c30955758 commit b 1 99cfab7da5ffdaf3b9fc6643b14333e194d87f46 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
355 8:5867d584106b commit a 2 fec2b3bd9e0834b7cb6a564348a0058171aed811 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
356 7:8c76602baf10 commit a 1 f9a81da8dc53380ed91902e5b82c1b36255a4bd0 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
357 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
358 Executable files: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
359 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
360 $ cat >> $HGRCPATH << EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
361 > [diff] |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
362 > git=True |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
363 > EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
364 $ cd .. |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
365 $ hg init repo3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
366 $ cd repo3 |
39188
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
367 |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
368 #if execbit |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
369 $ echo > foo.py |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
370 $ chmod +x foo.py |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
371 $ hg add foo.py |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
372 $ hg commit -mfoo |
39188
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
373 #else |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
374 $ hg import -q --bypass - <<EOF |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
375 > # HG changeset patch |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
376 > foo |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
377 > |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
378 > 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
|
379 > new file mode 100755 |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
380 > --- /dev/null |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
381 > +++ b/foo.py |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
382 > @@ -0,0 +1,1 @@ |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
383 > + |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
384 > EOF |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
385 $ hg up -q |
3fa9058f4f79
test-absorb: stabilize for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents:
38961
diff
changeset
|
386 #endif |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
387 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
388 $ echo bla > foo.py |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
389 $ hg absorb --dry-run --print-changes |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
390 showing changes for foo.py |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
391 @@ -0,1 +0,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
392 99b4ae7 - |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
393 99b4ae7 +bla |
40188
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
394 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
395 1 changesets affected |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
396 99b4ae7 foo |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
397 $ hg absorb --apply-changes |
38917
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
398 1 of 1 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
399 $ hg diff -c . |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
400 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
|
401 new file mode 100755 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
402 --- /dev/null |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
403 +++ b/foo.py |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
404 @@ -0,0 +1,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
405 +bla |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
406 $ hg diff |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
407 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
408 Remove lines may delete changesets: |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
409 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
410 $ cd .. |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
411 $ hg init repo4 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
412 $ cd repo4 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
413 $ cat > a <<EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
414 > 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
415 > 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
416 > EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
417 $ hg commit -m a12 -A a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
418 $ cat > b <<EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
419 > 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
420 > 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
421 > EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
422 $ hg commit -m b12 -A b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
423 $ echo 3 >> b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
424 $ hg commit -m b3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
425 $ echo 4 >> b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
426 $ hg commit -m b4 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
427 $ echo 1 > b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
428 $ echo 3 >> a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
429 $ hg absorb -pn |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
430 showing changes for a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
431 @@ -2,0 +2,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
432 bfafb49 +3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
433 showing changes for b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
434 @@ -1,3 +1,0 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
435 1154859 -2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
436 30970db -3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
437 a393a58 -4 |
40188
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
438 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
439 4 changesets affected |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
440 a393a58 b4 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
441 30970db b3 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
442 1154859 b12 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
443 bfafb49 a12 |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
444 $ 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
|
445 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
|
446 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
|
447 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
|
448 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
|
449 $ hg log -T '{rev} {desc}\n' -Gp |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
450 @ 5 b12 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
451 | diff --git a/b b/b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
452 | new file mode 100644 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
453 | --- /dev/null |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
454 | +++ b/b |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
455 | @@ -0,0 +1,1 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
456 | +1 |
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 o 4 a12 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
459 diff --git a/a b/a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
460 new file mode 100644 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
461 --- /dev/null |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
462 +++ b/a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
463 @@ -0,0 +1,3 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
464 +1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
465 +2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
466 +3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
467 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
468 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
469 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
|
470 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
|
471 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
472 $ cd .. |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
473 $ hg init repo5 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
474 $ cd repo5 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
475 $ cat > a <<EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
476 > 1 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
477 > 2 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
478 > EOF |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
479 $ hg commit -m a12 -A a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
480 $ hg id |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
481 bfafb49242db tip |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
482 $ echo 3 >> a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
483 $ hg commit -m a123 a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
484 $ echo 4 >> a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
485 $ hg commit -m a1234 a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
486 $ hg id |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
487 82dbe7fd19f0 tip |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
488 $ hg revert -r 0 a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
489 $ hg absorb -pn |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
490 showing changes for a |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
491 @@ -2,2 +2,0 @@ |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
492 f1c23dd -3 |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
493 82dbe7f -4 |
40188
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
494 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
495 2 changesets affected |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
496 82dbe7f a1234 |
2c5316796f45
absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com>
parents:
40150
diff
changeset
|
497 f1c23dd a123 |
40190
31dfa7dac4c9
absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com>
parents:
40188
diff
changeset
|
498 $ 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
|
499 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
|
500 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
|
501 a: 1 of 1 chunk(s) applied |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
502 $ hg id |
5111d11b8719
absorb: import extension from Facebook's hg-experimental
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
503 bfafb49242db tip |