Mercurial > hg
annotate tests/test-uncommit.t @ 46582:b0a3ca02d17a
copies-rust: implement PartialEqual manually
Now that we know that each (dest, rev) pair has at most a unique CopySource, we
can simplify comparison a lot.
This "simple" step buy a good share of the previous slowdown back in some case:
Repo Case Source-Rev Dest-Rev # of revisions old time new time Difference Factor time per rev
---------------------------------------------------------------------------------------------------------------------------------------------------------------
mozilla-try x00000_revs_x00000_added_x000_copies 9b2a99adc05e 8e29777b48e6 : 382065 revs, 43.304637 s, 34.443661 s, -8.860976 s, × 0.7954, 90 µs/rev
Full benchmark:
Repo Case Source-Rev Dest-Rev # of revisions old time new time Difference Factor time per rev
---------------------------------------------------------------------------------------------------------------------------------------------------------------
mercurial x_revs_x_added_0_copies ad6b123de1c7 39cfcef4f463 : 1 revs, 0.000043 s, 0.000043 s, +0.000000 s, × 1.0000, 43 µs/rev
mercurial x_revs_x_added_x_copies 2b1c78674230 0c1d10351869 : 6 revs, 0.000114 s, 0.000117 s, +0.000003 s, × 1.0263, 19 µs/rev
mercurial x000_revs_x000_added_x_copies 81f8ff2a9bf2 dd3267698d84 : 1032 revs, 0.004937 s, 0.004892 s, -0.000045 s, × 0.9909, 4 µs/rev
pypy x_revs_x_added_0_copies aed021ee8ae8 099ed31b181b : 9 revs, 0.000339 s, 0.000196 s, -0.000143 s, × 0.5782, 21 µs/rev
pypy x_revs_x000_added_0_copies 4aa4e1f8e19a 359343b9ac0e : 1 revs, 0.000049 s, 0.000050 s, +0.000001 s, × 1.0204, 50 µs/rev
pypy x_revs_x_added_x_copies ac52eb7bbbb0 72e022663155 : 7 revs, 0.000202 s, 0.000117 s, -0.000085 s, × 0.5792, 16 µs/rev
pypy x_revs_x00_added_x_copies c3b14617fbd7 ace7255d9a26 : 1 revs, 0.000409 s, 0.6f1f4a s, -0.000087 s, × 0.7873, 322 µs/rev
pypy x_revs_x000_added_x000_copies df6f7a526b60 a83dc6a2d56f : 6 revs, 0.011984 s, 0.011949 s, -0.000035 s, × 0.9971, 1991 µs/rev
pypy x000_revs_xx00_added_0_copies 89a76aede314 2f22446ff07e : 4785 revs, 0.050820 s, 0.050802 s, -0.000018 s, × 0.9996, 10 µs/rev
pypy x000_revs_x000_added_x_copies 8a3b5bfd266e 2c68e87c3efe : 6780 revs, 0.087953 s, 0.088090 s, +0.000137 s, × 1.0016, 12 µs/rev
pypy x000_revs_x000_added_x000_copies 89a76aede314 7b3dda341c84 : 5441 revs, 0.062902 s, 0.062079 s, -0.000823 s, × 0.9869, 11 µs/rev
pypy x0000_revs_x_added_0_copies d1defd0dc478 c9cb1334cc78 : 43645 revs, 0.679234 s, 0.635337 s, -0.043897 s, × 0.9354, 14 µs/rev
pypy x0000_revs_xx000_added_0_copies bf2c629d0071 4ffed77c095c : 2 revs, 0.013095 s, 0.013262 s, +0.000167 s, × 1.0128, 6631 µs/rev
pypy x0000_revs_xx000_added_x000_copies 08ea3258278e d9fa043f30c0 : 11316 revs, 0.120910 s, 0.120085 s, -0.000825 s, × 0.9932, 10 µs/rev
netbeans x_revs_x_added_0_copies fb0955ffcbcd a01e9239f9e7 : 2 revs, 0.000087 s, 0.000085 s, -0.000002 s, × 0.9770, 42 µs/rev
netbeans x_revs_x000_added_0_copies 6f360122949f 20eb231cc7d0 : 2 revs, 0.000107 s, 0.000110 s, +0.000003 s, × 1.0280, 55 µs/rev
netbeans x_revs_x_added_x_copies 1ada3faf6fb6 5a39d12eecf4 : 3 revs, 0.000186 s, 0.000177 s, -0.000009 s, × 0.9516, 59 µs/rev
netbeans x_revs_x00_added_x_copies 35be93ba1e2c 9eec5e90c05f : 9 revs, 0.000754 s, 0.000743 s, -0.000011 s, × 0.9854, 82 µs/rev
netbeans x000_revs_xx00_added_0_copies eac3045b4fdd 51d4ae7f1290 : 1421 revs, 0.010443 s, 0.010168 s, -0.000275 s, × 0.9737, 7 µs/rev
netbeans x000_revs_x000_added_x_copies e2063d266acd 6081d72689dc : 1533 revs, 0.015697 s, 0.015946 s, +0.000249 s, × 1.0159, 10 µs/rev
netbeans x000_revs_x000_added_x000_copies ff453e9fee32 411350406ec2 : 5750 revs, 0.063528 s, 0.062712 s, -0.000816 s, × 0.9872, 10 µs/rev
netbeans x0000_revs_xx000_added_x000_copies 588c2d1ced70 1aad62e59ddd : 66949 revs, 0.545515 s, 0.523832 s, -0.021683 s, × 0.9603, 7 µs/rev
mozilla-central x_revs_x_added_0_copies 3697f962bb7b 7015fcdd43a2 : 2 revs, 0.000089 s, 0.000090 s, +0.000001 s, × 1.0112, 45 µs/rev
mozilla-central x_revs_x000_added_0_copies dd390860c6c9 40d0c5bed75d : 8 revs, 0.000265 s, 0.000264 s, -0.000001 s, × 0.9962, 33 µs/rev
mozilla-central x_revs_x_added_x_copies 8d198483ae3b 14207ffc2b2f : 9 revs, 0.000381 s, 0.000187 s, -0.000194 s, × 0.4908, 20 µs/rev
mozilla-central x_revs_x00_added_x_copies 98cbc58cc6bc 446a150332c3 : 7 revs, 0.000672 s, 0.000665 s, -0.000007 s, × 0.9896, 95 µs/rev
mozilla-central x_revs_x000_added_x000_copies 3c684b4b8f68 0a5e72d1b479 : 3 revs, 0.003497 s, 0.003556 s, +0.000059 s, × 1.0169, 1185 µs/rev
mozilla-central x_revs_x0000_added_x0000_copies effb563bb7e5 c07a39dc4e80 : 6 revs, 0.073204 s, 0.071345 s, -0.001859 s, × 0.9746, 11890 µs/rev
mozilla-central x000_revs_xx00_added_0_copies 6100d773079a 04a55431795e : 1593 revs, 0.006482 s, 0.006551 s, +0.000069 s, × 1.0106, 4 µs/rev
mozilla-central x000_revs_x000_added_x_copies 9f17a6fc04f9 2d37b966abed : 41 revs, 0.005066 s, 0.005078 s, +0.000012 s, × 1.0024, 123 µs/rev
mozilla-central x000_revs_x000_added_x000_copies 7c97034feb78 4407bd0c6330 : 7839 revs, 0.065707 s, 0.065823 s, +0.000116 s, × 1.0018, 8 µs/rev
mozilla-central x0000_revs_xx000_added_0_copies 9eec5917337d 67118cc6dcad : 615 revs, 0.026800 s, 0.027050 s, +0.000250 s, × 1.0093, 43 µs/rev
mozilla-central x0000_revs_xx000_added_x000_copies f78c615a656c 96a38b690156 : 30263 revs, 0.203856 s, 0.202443 s, -0.001413 s, × 0.9931, 6 µs/rev
mozilla-central x00000_revs_x0000_added_x0000_copies 6832ae71433c 4c222a1d9a00 : 153721 revs, 1.293394 s, 1.261583 s, -0.031811 s, × 0.9754, 8 µs/rev
mozilla-central x00000_revs_x00000_added_x000_copies 76caed42cf7c 1daa622bbe42 : 204976 revs, 1.698239 s, 1.643869 s, -0.054370 s, × 0.9680, 8 µs/rev
mozilla-try x_revs_x_added_0_copies aaf6dde0deb8 9790f499805a : 2 revs, 0.000875 s, 0.000868 s, -0.000007 s, × 0.9920, 434 µs/rev
mozilla-try x_revs_x000_added_0_copies d8d0222927b4 5bb8ce8c7450 : 2 revs, 0.000891 s, 0.000887 s, -0.000004 s, × 0.9955, 443 µs/rev
mozilla-try x_revs_x_added_x_copies 092fcca11bdb 936255a0384a : 4 revs, 0.000292 s, 0.000168 s, -0.000124 s, × 0.5753, 42 µs/rev
mozilla-try x_revs_x00_added_x_copies b53d2fadbdb5 017afae788ec : 2 revs, 0.003939 s, 0.001160 s, -0.002779 s, × 0.2945, 580 µs/rev
mozilla-try x_revs_x000_added_x000_copies 20408ad61ce5 6f0ee96e21ad : 1 revs, 0.033027 s, 0.033016 s, -0.000011 s, × 0.9997, 33016 µs/rev
mozilla-try x_revs_x0000_added_x0000_copies effb563bb7e5 c07a39dc4e80 : 6 revs, 0.073703 s, 0.073312 s, -0.39ae31 s, × 0.9947, 12218 µs/rev
mozilla-try x000_revs_xx00_added_0_copies 6100d773079a 04a55431795e : 1593 revs, 0.006469 s, 0.006485 s, +0.000016 s, × 1.0025, 4 µs/rev
mozilla-try x000_revs_x000_added_x_copies 9f17a6fc04f9 2d37b966abed : 41 revs, 0.005278 s, 0.005494 s, +0.000216 s, × 1.0409, 134 µs/rev
mozilla-try x000_revs_x000_added_x000_copies 1346fd0130e4 4c65cbdabc1f : 6657 revs, 0.064995 s, 0.064879 s, -0.000116 s, × 0.9982, 9 µs/rev
mozilla-try x0000_revs_x_added_0_copies 63519bfd42ee a36a2a865d92 : 40314 revs, 0.301041 s, 0.301469 s, +0.000428 s, × 1.0014, 7 µs/rev
mozilla-try x0000_revs_x_added_x_copies 9fe69ff0762d bcabf2a78927 : 38690 revs, 0.285575 s, 0.297113 s, +0.011538 s, × 1.0404, 7 µs/rev
mozilla-try x0000_revs_xx000_added_x_copies 156f6e2674f2 4d0f2c178e66 : 8598 revs, 0.085597 s, 0.085890 s, +0.000293 s, × 1.0034, 9 µs/rev
mozilla-try x0000_revs_xx000_added_0_copies 9eec5917337d 67118cc6dcad : 615 revs, 0.027118 s, 0.027718 s, +0.000600 s, × 1.0221, 45 µs/rev
mozilla-try x0000_revs_xx000_added_x000_copies 89294cd501d9 7ccb2fc7ccb5 : 97052 revs, 2.119204 s, 2.048949 s, -0.070255 s, × 0.9668, 21 µs/rev
mozilla-try x0000_revs_x0000_added_x0000_copies e928c65095ed e951f4ad123a : 52031 revs, 0.701479 s, 0.685924 s, -0.015555 s, × 0.9778, 13 µs/rev
mozilla-try x00000_revs_x_added_0_copies 6a320851d377 1ebb79acd503 : 363753 revs, 4.482399 s, 4.482891 s, +0.000492 s, × 1.0001, 12 µs/rev
mozilla-try x00000_revs_x00000_added_0_copies dc8a3ca7010e d16fde900c9c : 34414 revs, 0.574082 s, 0.577633 s, +0.003551 s, × 1.0062, 16 µs/rev
mozilla-try x00000_revs_x_added_x_copies 5173c4b6f97c 95d83ee7242d : 362229 revs, 4.480366 s, 4.397816 s, -0.082550 s, × 0.9816, 12 µs/rev
mozilla-try x00000_revs_x000_added_x_copies 9126823d0e9c ca82787bb23c : 359344 revs, 4.369070 s, 4.370538 s, +0.001468 s, × 1.0003, 12 µs/rev
mozilla-try x00000_revs_x0000_added_x0000_copies 8d3fafa80d4b eb884023b810 : 192665 revs, 1.592506 s, 1.570439 s, -0.022067 s, × 0.9861, 8 µs/rev
mozilla-try x00000_revs_x00000_added_x0000_copies 1b661134e2ca 1ae03d022d6d : 228985 revs, 87.824489 s, 88.388512 s, +0.564023 s, × 1.0064, 386 µs/rev
mozilla-try x00000_revs_x00000_added_x000_copies 9b2a99adc05e 8e29777b48e6 : 382065 revs, 43.304637 s, 34.443661 s, -8.860976 s, × 0.7954, 90 µs/rev
private : 459513 revs, 33.853687 s, 27.370148 s, -6.483539 s, × 0.8085, 59 µs/rev
Differential Revision: https://phab.mercurial-scm.org/D9653
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 16 Dec 2020 11:11:05 +0100 |
parents | 0e2becd1fe0c |
children | 7001f92e0ee9 |
rev | line source |
---|---|
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
1 Test uncommit - set up the config |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
2 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
3 $ cat >> $HGRCPATH <<EOF |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
4 > [experimental] |
34866
1644623ab096
config: use 'experimental.evolution.create-markers'
Boris Feld <boris.feld@octobus.net>
parents:
34304
diff
changeset
|
5 > evolution.createmarkers=True |
34867
7f183c643eb6
config: use 'experimental.evolution.allowunstable'
Boris Feld <boris.feld@octobus.net>
parents:
34866
diff
changeset
|
6 > evolution.allowunstable=True |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
7 > [extensions] |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
8 > uncommit = |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
9 > drawdag=$TESTDIR/drawdag.py |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
10 > EOF |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
11 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
12 Build up a repo |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
13 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
14 $ hg init repo |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
15 $ cd repo |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
16 $ hg bookmark foo |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
17 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
18 Help for uncommit |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
19 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
20 $ hg help uncommit |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
21 hg uncommit [OPTION]... [FILE]... |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
22 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
23 uncommit part or all of a local changeset |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
24 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
25 This command undoes the effect of a local commit, returning the affected |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
26 files to their uncommitted state. This means that files modified or |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
27 deleted in the changeset will be left unchanged, and so will remain |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
28 modified in the working directory. |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
29 |
36973
d63c5c651183
uncommit: document when the commit will be pruned
Martin von Zweigbergk <martinvonz@google.com>
parents:
36972
diff
changeset
|
30 If no files are specified, the commit will be pruned, unless --keep is |
d63c5c651183
uncommit: document when the commit will be pruned
Martin von Zweigbergk <martinvonz@google.com>
parents:
36972
diff
changeset
|
31 given. |
d63c5c651183
uncommit: document when the commit will be pruned
Martin von Zweigbergk <martinvonz@google.com>
parents:
36972
diff
changeset
|
32 |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
33 (use 'hg help -e uncommit' to show help for the uncommit extension) |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
34 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
35 options ([+] can be repeated): |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
36 |
42974
576fd1c8b20b
uncommit: fix typo in help text
Matt Harbison <matt_harbison@yahoo.com>
parents:
42936
diff
changeset
|
37 --keep allow an empty commit after uncommitting |
41860
aa284d9a33ca
uncommit: add flag --allow-dirty-working-copy
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41859
diff
changeset
|
38 --allow-dirty-working-copy allow uncommit with outstanding changes |
42936
2da754532dd3
uncommit: enable support for adding a note
Matt Harbison <matt_harbison@yahoo.com>
parents:
42921
diff
changeset
|
39 -n --note TEXT store a note on uncommit |
41860
aa284d9a33ca
uncommit: add flag --allow-dirty-working-copy
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41859
diff
changeset
|
40 -I --include PATTERN [+] include names matching the given patterns |
aa284d9a33ca
uncommit: add flag --allow-dirty-working-copy
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41859
diff
changeset
|
41 -X --exclude PATTERN [+] exclude names matching the given patterns |
42902
ff1ff2aae132
uncommit: add support to modify the commit message and date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42051
diff
changeset
|
42 -m --message TEXT use text as commit message |
ff1ff2aae132
uncommit: add support to modify the commit message and date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42051
diff
changeset
|
43 -l --logfile FILE read commit message from file |
ff1ff2aae132
uncommit: add support to modify the commit message and date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42051
diff
changeset
|
44 -d --date DATE record the specified date as commit date |
ff1ff2aae132
uncommit: add support to modify the commit message and date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42051
diff
changeset
|
45 -u --user USER record the specified user as committer |
42920
a50661567f83
uncommit: drop the hyphen from --current-user and --current-date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42903
diff
changeset
|
46 -D --currentdate record the current date as commit date |
a50661567f83
uncommit: drop the hyphen from --current-user and --current-date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42903
diff
changeset
|
47 -U --currentuser record the current user as committer |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
48 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
49 (some details hidden, use --verbose to show complete help) |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
50 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
51 Uncommit with no commits should fail |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
52 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
53 $ hg uncommit |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
54 abort: cannot uncommit null changeset |
35244
98f97eb20597
rewriteutil: use precheck() in uncommit and amend commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34867
diff
changeset
|
55 (no changeset checked out) |
45853
b4694ef45db5
errors: raise more specific errors from rewriteutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
56 [10] |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
57 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
58 Create some commits |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
59 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
60 $ touch files |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
61 $ hg add files |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
62 $ for i in a ab abc abcd abcde; do echo $i > files; echo $i > file-$i; hg add file-$i; hg commit -m "added file-$i"; done |
44724
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44213
diff
changeset
|
63 $ ls -A |
5c2a4f37eace
tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents:
44213
diff
changeset
|
64 .hg |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
65 file-a |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
66 file-ab |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
67 file-abc |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
68 file-abcd |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
69 file-abcde |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
70 files |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
71 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
72 $ hg log -G -T '{rev}:{node} {desc}' --hidden |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
73 @ 4:6c4fd43ed714e7fcd8adbaa7b16c953c2e985b60 added file-abcde |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
74 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
75 o 3:6db330d65db434145c0b59d291853e9a84719b24 added file-abcd |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
76 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
77 o 2:abf2df566fc193b3ac34d946e63c1583e4d4732b added file-abc |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
78 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
79 o 1:69a232e754b08d568c4899475faf2eb44b857802 added file-ab |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
80 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
81 o 0:3004d2d9b50883c1538fc754a3aeb55f1b4084f6 added file-a |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
82 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
83 Simple uncommit off the top, also moves bookmark |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
84 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
85 $ hg bookmark |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
86 * foo 4:6c4fd43ed714 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
87 $ hg uncommit |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
88 $ hg status |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
89 M files |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
90 A file-abcde |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
91 $ hg bookmark |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
92 * foo 3:6db330d65db4 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
93 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
94 $ hg log -G -T '{rev}:{node} {desc}' --hidden |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
95 x 4:6c4fd43ed714e7fcd8adbaa7b16c953c2e985b60 added file-abcde |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
96 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
97 @ 3:6db330d65db434145c0b59d291853e9a84719b24 added file-abcd |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
98 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
99 o 2:abf2df566fc193b3ac34d946e63c1583e4d4732b added file-abc |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
100 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
101 o 1:69a232e754b08d568c4899475faf2eb44b857802 added file-ab |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
102 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
103 o 0:3004d2d9b50883c1538fc754a3aeb55f1b4084f6 added file-a |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
104 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
105 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
106 Recommit |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
107 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
108 $ hg commit -m 'new change abcde' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
109 $ hg status |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
110 $ hg heads -T '{rev}:{node} {desc}' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
111 5:0c07a3ccda771b25f1cb1edbd02e683723344ef1 new change abcde (no-eol) |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
112 |
42051
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
113 Uncommit of non-existent and unchanged files aborts |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
114 $ hg uncommit nothinghere |
42051
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
115 abort: cannot uncommit "nothinghere" |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
116 (file does not exist) |
46465
0e2becd1fe0c
errors: use InputError in uncommit extension
Martin von Zweigbergk <martinvonz@google.com>
parents:
45853
diff
changeset
|
117 [10] |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
118 $ hg status |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
119 $ hg uncommit file-abc |
42051
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
120 abort: cannot uncommit "file-abc" |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
121 (file was not changed in working directory parent) |
46465
0e2becd1fe0c
errors: use InputError in uncommit extension
Martin von Zweigbergk <martinvonz@google.com>
parents:
45853
diff
changeset
|
122 [10] |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
123 $ hg status |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
124 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
125 Try partial uncommit, also moves bookmark |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
126 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
127 $ hg bookmark |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
128 * foo 5:0c07a3ccda77 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
129 $ hg uncommit files |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
130 $ hg status |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
131 M files |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
132 $ hg bookmark |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
133 * foo 6:3727deee06f7 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
134 $ hg heads -T '{rev}:{node} {desc}' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
135 6:3727deee06f72f5ffa8db792ee299cf39e3e190b new change abcde (no-eol) |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
136 $ hg log -r . -p -T '{rev}:{node} {desc}' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
137 6:3727deee06f72f5ffa8db792ee299cf39e3e190b new change abcdediff -r 6db330d65db4 -r 3727deee06f7 file-abcde |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
138 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
139 +++ b/file-abcde Thu Jan 01 00:00:00 1970 +0000 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
140 @@ -0,0 +1,1 @@ |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
141 +abcde |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
142 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
143 $ hg log -G -T '{rev}:{node} {desc}' --hidden |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
144 @ 6:3727deee06f72f5ffa8db792ee299cf39e3e190b new change abcde |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
145 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
146 | x 5:0c07a3ccda771b25f1cb1edbd02e683723344ef1 new change abcde |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
147 |/ |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
148 | x 4:6c4fd43ed714e7fcd8adbaa7b16c953c2e985b60 added file-abcde |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
149 |/ |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
150 o 3:6db330d65db434145c0b59d291853e9a84719b24 added file-abcd |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
151 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
152 o 2:abf2df566fc193b3ac34d946e63c1583e4d4732b added file-abc |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
153 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
154 o 1:69a232e754b08d568c4899475faf2eb44b857802 added file-ab |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
155 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
156 o 0:3004d2d9b50883c1538fc754a3aeb55f1b4084f6 added file-a |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
157 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
158 $ hg commit -m 'update files for abcde' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
159 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
160 Uncommit with dirty state |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
161 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
162 $ echo "foo" >> files |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
163 $ cat files |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
164 abcde |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
165 foo |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
166 $ hg status |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
167 M files |
34284
624c53e4121d
uncommit: don't allow bare uncommit on dirty working directory
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34283
diff
changeset
|
168 $ hg uncommit |
624c53e4121d
uncommit: don't allow bare uncommit on dirty working directory
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34283
diff
changeset
|
169 abort: uncommitted changes |
41860
aa284d9a33ca
uncommit: add flag --allow-dirty-working-copy
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41859
diff
changeset
|
170 (requires --allow-dirty-working-copy to uncommit) |
45840
527ce85c2e60
errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
45827
diff
changeset
|
171 [20] |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
172 $ hg uncommit files |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
173 abort: uncommitted changes |
41860
aa284d9a33ca
uncommit: add flag --allow-dirty-working-copy
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41859
diff
changeset
|
174 (requires --allow-dirty-working-copy to uncommit) |
45840
527ce85c2e60
errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
45827
diff
changeset
|
175 [20] |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
176 $ cat files |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
177 abcde |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
178 foo |
36972
28ba7d111337
uncommit: leave empty commit if all files are uncommitted
Martin von Zweigbergk <martinvonz@google.com>
parents:
35709
diff
changeset
|
179 $ hg commit --amend -m "files abcde + foo" |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
180 |
34285
7b1e524ad73f
uncommit: add an experimental.uncommitondirtywdir config
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34284
diff
changeset
|
181 Testing the 'experimental.uncommitondirtywdir' config |
7b1e524ad73f
uncommit: add an experimental.uncommitondirtywdir config
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34284
diff
changeset
|
182 |
7b1e524ad73f
uncommit: add an experimental.uncommitondirtywdir config
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34284
diff
changeset
|
183 $ echo "bar" >> files |
7b1e524ad73f
uncommit: add an experimental.uncommitondirtywdir config
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34284
diff
changeset
|
184 $ hg uncommit |
7b1e524ad73f
uncommit: add an experimental.uncommitondirtywdir config
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34284
diff
changeset
|
185 abort: uncommitted changes |
41860
aa284d9a33ca
uncommit: add flag --allow-dirty-working-copy
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41859
diff
changeset
|
186 (requires --allow-dirty-working-copy to uncommit) |
45840
527ce85c2e60
errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
45827
diff
changeset
|
187 [20] |
34285
7b1e524ad73f
uncommit: add an experimental.uncommitondirtywdir config
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34284
diff
changeset
|
188 $ hg uncommit --config experimental.uncommitondirtywdir=True |
7b1e524ad73f
uncommit: add an experimental.uncommitondirtywdir config
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34284
diff
changeset
|
189 $ hg commit -m "files abcde + foo" |
7b1e524ad73f
uncommit: add an experimental.uncommitondirtywdir config
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34284
diff
changeset
|
190 |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
191 Uncommit in the middle of a stack, does not move bookmark |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
192 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
193 $ hg checkout '.^^^' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
194 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
195 (leaving bookmark foo) |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
196 $ hg log -r . -p -T '{rev}:{node} {desc}' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
197 2:abf2df566fc193b3ac34d946e63c1583e4d4732b added file-abcdiff -r 69a232e754b0 -r abf2df566fc1 file-abc |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
198 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
199 +++ b/file-abc Thu Jan 01 00:00:00 1970 +0000 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
200 @@ -0,0 +1,1 @@ |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
201 +abc |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
202 diff -r 69a232e754b0 -r abf2df566fc1 files |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
203 --- a/files Thu Jan 01 00:00:00 1970 +0000 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
204 +++ b/files Thu Jan 01 00:00:00 1970 +0000 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
205 @@ -1,1 +1,1 @@ |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
206 -ab |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
207 +abc |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
208 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
209 $ hg bookmark |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
210 foo 9:48e5bd7cd583 |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
211 $ hg uncommit |
35709
1a09dad8b85a
evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents:
35508
diff
changeset
|
212 3 new orphan changesets |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
213 $ hg status |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
214 M files |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
215 A file-abc |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
216 $ hg heads -T '{rev}:{node} {desc}' |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
217 9:48e5bd7cd583eb24164ef8b89185819c84c96ed7 files abcde + foo (no-eol) |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
218 $ hg bookmark |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
219 foo 9:48e5bd7cd583 |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
220 $ hg commit -m 'new abc' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
221 created new head |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
222 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
223 Partial uncommit in the middle, does not move bookmark |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
224 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
225 $ hg checkout '.^' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
226 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
227 $ hg log -r . -p -T '{rev}:{node} {desc}' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
228 1:69a232e754b08d568c4899475faf2eb44b857802 added file-abdiff -r 3004d2d9b508 -r 69a232e754b0 file-ab |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
229 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
230 +++ b/file-ab Thu Jan 01 00:00:00 1970 +0000 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
231 @@ -0,0 +1,1 @@ |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
232 +ab |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
233 diff -r 3004d2d9b508 -r 69a232e754b0 files |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
234 --- a/files Thu Jan 01 00:00:00 1970 +0000 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
235 +++ b/files Thu Jan 01 00:00:00 1970 +0000 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
236 @@ -1,1 +1,1 @@ |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
237 -a |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
238 +ab |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
239 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
240 $ hg bookmark |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
241 foo 9:48e5bd7cd583 |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
242 $ hg uncommit file-ab |
35709
1a09dad8b85a
evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents:
35508
diff
changeset
|
243 1 new orphan changesets |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
244 $ hg status |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
245 A file-ab |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
246 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
247 $ hg heads -T '{rev}:{node} {desc}\n' |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
248 11:8eb87968f2edb7f27f27fe676316e179de65fff6 added file-ab |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
249 10:5dc89ca4486f8a88716c5797fa9f498d13d7c2e1 new abc |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
250 9:48e5bd7cd583eb24164ef8b89185819c84c96ed7 files abcde + foo |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
251 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
252 $ hg bookmark |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
253 foo 9:48e5bd7cd583 |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
254 $ hg commit -m 'update ab' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
255 $ hg status |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
256 $ hg heads -T '{rev}:{node} {desc}\n' |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
257 12:f21039c59242b085491bb58f591afc4ed1c04c09 update ab |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
258 10:5dc89ca4486f8a88716c5797fa9f498d13d7c2e1 new abc |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
259 9:48e5bd7cd583eb24164ef8b89185819c84c96ed7 files abcde + foo |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
260 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
261 $ hg log -G -T '{rev}:{node} {desc}' --hidden |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
262 @ 12:f21039c59242b085491bb58f591afc4ed1c04c09 update ab |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
263 | |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
264 o 11:8eb87968f2edb7f27f27fe676316e179de65fff6 added file-ab |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
265 | |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
266 | * 10:5dc89ca4486f8a88716c5797fa9f498d13d7c2e1 new abc |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
267 | | |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
268 | | * 9:48e5bd7cd583eb24164ef8b89185819c84c96ed7 files abcde + foo |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
269 | | | |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
270 | | | x 8:84beeba0ac30e19521c036e4d2dd3a5fa02586ff files abcde + foo |
34285
7b1e524ad73f
uncommit: add an experimental.uncommitondirtywdir config
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34284
diff
changeset
|
271 | | |/ |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
272 | | | x 7:0977fa602c2fd7d8427ed4e7ee15ea13b84c9173 update files for abcde |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
273 | | |/ |
35508
9b3f95d9783d
graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents:
35244
diff
changeset
|
274 | | * 6:3727deee06f72f5ffa8db792ee299cf39e3e190b new change abcde |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
275 | | | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
276 | | | x 5:0c07a3ccda771b25f1cb1edbd02e683723344ef1 new change abcde |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
277 | | |/ |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
278 | | | x 4:6c4fd43ed714e7fcd8adbaa7b16c953c2e985b60 added file-abcde |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
279 | | |/ |
35508
9b3f95d9783d
graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents:
35244
diff
changeset
|
280 | | * 3:6db330d65db434145c0b59d291853e9a84719b24 added file-abcd |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
281 | | | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
282 | | x 2:abf2df566fc193b3ac34d946e63c1583e4d4732b added file-abc |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
283 | |/ |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
284 | x 1:69a232e754b08d568c4899475faf2eb44b857802 added file-ab |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
285 |/ |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
286 o 0:3004d2d9b50883c1538fc754a3aeb55f1b4084f6 added file-a |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
287 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
288 Uncommit with draft parent |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
289 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
290 $ hg uncommit |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
291 $ hg phase -r . |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
292 11: draft |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
293 $ hg commit -m 'update ab again' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
294 |
38422
a6addfd64507
tests: add test of uncommit with default phase as secret
Martin von Zweigbergk <martinvonz@google.com>
parents:
36973
diff
changeset
|
295 Phase is preserved |
a6addfd64507
tests: add test of uncommit with default phase as secret
Martin von Zweigbergk <martinvonz@google.com>
parents:
36973
diff
changeset
|
296 |
a6addfd64507
tests: add test of uncommit with default phase as secret
Martin von Zweigbergk <martinvonz@google.com>
parents:
36973
diff
changeset
|
297 $ hg uncommit --keep --config phases.new-commit=secret |
41745
83d294c71f1e
uncommit: inform user if the commit is empty after uncommit
Martin von Zweigbergk <martinvonz@google.com>
parents:
41338
diff
changeset
|
298 note: keeping empty commit |
38422
a6addfd64507
tests: add test of uncommit with default phase as secret
Martin von Zweigbergk <martinvonz@google.com>
parents:
36973
diff
changeset
|
299 $ hg phase -r . |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
300 14: draft |
38422
a6addfd64507
tests: add test of uncommit with default phase as secret
Martin von Zweigbergk <martinvonz@google.com>
parents:
36973
diff
changeset
|
301 $ hg commit --amend -m 'update ab again' |
a6addfd64507
tests: add test of uncommit with default phase as secret
Martin von Zweigbergk <martinvonz@google.com>
parents:
36973
diff
changeset
|
302 |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
303 Uncommit with public parent |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
304 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
305 $ hg phase -p "::.^" |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
306 $ hg uncommit |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
307 $ hg phase -r . |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
308 11: public |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
309 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
310 Partial uncommit with public parent |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
311 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
312 $ echo xyz > xyz |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
313 $ hg add xyz |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
314 $ hg commit -m "update ab and add xyz" |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
315 $ hg uncommit xyz |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
316 $ hg status |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
317 A xyz |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
318 $ hg phase -r . |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
319 17: draft |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
320 $ hg phase -r ".^" |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
321 11: public |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
322 |
41750
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
323 Uncommit with --keep or experimental.uncommit.keep leaves an empty changeset |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
324 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
325 $ cd $TESTTMP |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
326 $ hg init repo1 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
327 $ cd repo1 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
328 $ hg debugdrawdag <<'EOS' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
329 > Q |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
330 > | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
331 > P |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
332 > EOS |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
333 $ hg up Q -q |
34283
f94442d46984
uncommit: rename the flag 'empty' to 'keep' which retains empty changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34192
diff
changeset
|
334 $ hg uncommit --keep |
41745
83d294c71f1e
uncommit: inform user if the commit is empty after uncommit
Martin von Zweigbergk <martinvonz@google.com>
parents:
41338
diff
changeset
|
335 note: keeping empty commit |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
336 $ hg log -G -T '{desc} FILES: {files}' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
337 @ Q FILES: |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
338 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
339 | x Q FILES: Q |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
340 |/ |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
341 o P FILES: P |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
342 |
41750
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
343 $ cat >> .hg/hgrc <<EOF |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
344 > [experimental] |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
345 > uncommit.keep=True |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
346 > EOF |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
347 $ hg ci --amend |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
348 $ hg uncommit |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
349 note: keeping empty commit |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
350 $ hg log -G -T '{desc} FILES: {files}' |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
351 @ Q FILES: |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
352 | |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
353 | x Q FILES: Q |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
354 |/ |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
355 o P FILES: P |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
356 |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
357 $ hg status |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
358 A Q |
41750
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
359 $ hg ci --amend |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
360 $ hg uncommit --no-keep |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
361 $ hg log -G -T '{desc} FILES: {files}' |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
362 x Q FILES: Q |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
363 | |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
364 @ P FILES: P |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
365 |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
366 $ hg status |
1040d54eb7eb
uncommit: add config option to keep commit by default
Martin von Zweigbergk <martinvonz@google.com>
parents:
41745
diff
changeset
|
367 A Q |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
368 $ cd .. |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
369 $ rm -rf repo1 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
370 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
371 Testing uncommit while merge |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
372 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
373 $ hg init repo2 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
374 $ cd repo2 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
375 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
376 Create some history |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
377 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
378 $ touch a |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
379 $ hg add a |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
380 $ for i in 1 2 3; do echo $i > a; hg commit -m "a $i"; done |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
381 $ hg checkout 0 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
382 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
383 $ touch b |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
384 $ hg add b |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
385 $ for i in 1 2 3; do echo $i > b; hg commit -m "b $i"; done |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
386 created new head |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
387 $ hg log -G -T '{rev}:{node} {desc}' --hidden |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
388 @ 5:2cd56cdde163ded2fbb16ba2f918c96046ab0bf2 b 3 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
389 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
390 o 4:c3a0d5bb3b15834ffd2ef9ef603e93ec65cf2037 b 2 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
391 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
392 o 3:49bb009ca26078726b8870f1edb29fae8f7618f5 b 1 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
393 | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
394 | o 2:990982b7384266e691f1bc08ca36177adcd1c8a9 a 3 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
395 | | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
396 | o 1:24d38e3cf160c7b6f5ffe82179332229886a6d34 a 2 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
397 |/ |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
398 o 0:ea4e33293d4d274a2ba73150733c2612231f398c a 1 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
399 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
400 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
401 Add and expect uncommit to fail on both merge working dir and merge changeset |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
402 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
403 $ hg merge 2 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
404 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
405 (branch merge, don't forget to commit) |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
406 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
407 $ hg uncommit |
34284
624c53e4121d
uncommit: don't allow bare uncommit on dirty working directory
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34283
diff
changeset
|
408 abort: outstanding uncommitted merge |
41860
aa284d9a33ca
uncommit: add flag --allow-dirty-working-copy
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41859
diff
changeset
|
409 (requires --allow-dirty-working-copy to uncommit) |
45840
527ce85c2e60
errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
45827
diff
changeset
|
410 [20] |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
411 |
34304
ae510d9691ef
uncommit: add a test for uncommit with uncommitondirtywdir config in merge
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34285
diff
changeset
|
412 $ hg uncommit --config experimental.uncommitondirtywdir=True |
ae510d9691ef
uncommit: add a test for uncommit with uncommitondirtywdir config in merge
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34285
diff
changeset
|
413 abort: cannot uncommit while merging |
45853
b4694ef45db5
errors: raise more specific errors from rewriteutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
45840
diff
changeset
|
414 [20] |
34304
ae510d9691ef
uncommit: add a test for uncommit with uncommitondirtywdir config in merge
Pulkit Goyal <7895pulkit@gmail.com>
parents:
34285
diff
changeset
|
415 |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
416 $ hg status |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
417 M a |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
418 $ hg commit -m 'merge a and b' |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
419 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
420 $ hg uncommit |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
421 abort: cannot uncommit merge changeset |
46465
0e2becd1fe0c
errors: use InputError in uncommit extension
Martin von Zweigbergk <martinvonz@google.com>
parents:
45853
diff
changeset
|
422 [10] |
34192
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
423 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
424 $ hg status |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
425 $ hg log -G -T '{rev}:{node} {desc}' --hidden |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
426 @ 6:c03b9c37bc67bf504d4912061cfb527b47a63c6e merge a and b |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
427 |\ |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
428 | o 5:2cd56cdde163ded2fbb16ba2f918c96046ab0bf2 b 3 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
429 | | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
430 | o 4:c3a0d5bb3b15834ffd2ef9ef603e93ec65cf2037 b 2 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
431 | | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
432 | o 3:49bb009ca26078726b8870f1edb29fae8f7618f5 b 1 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
433 | | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
434 o | 2:990982b7384266e691f1bc08ca36177adcd1c8a9 a 3 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
435 | | |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
436 o | 1:24d38e3cf160c7b6f5ffe82179332229886a6d34 a 2 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
437 |/ |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
438 o 0:ea4e33293d4d274a2ba73150733c2612231f398c a 1 |
da2f5f19312c
uncommit: move fb-extension to core which uncommits a changeset
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
439 |
41338
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
440 |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
441 Rename a->b, then remove b in working copy. Result should remove a. |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
442 |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
443 $ hg co -q 0 |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
444 $ hg mv a b |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
445 $ hg ci -qm 'move a to b' |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
446 $ hg rm b |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
447 $ hg uncommit --config experimental.uncommitondirtywdir=True |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
448 $ hg st --copies |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
449 R a |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
450 $ hg revert a |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
451 |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
452 Rename a->b, then rename b->c in working copy. Result should rename a->c. |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
453 |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
454 $ hg co -q 0 |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
455 $ hg mv a b |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
456 $ hg ci -qm 'move a to b' |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
457 $ hg mv b c |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
458 $ hg uncommit --config experimental.uncommitondirtywdir=True |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
459 $ hg st --copies |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
460 A c |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
461 a |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
462 R a |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
463 $ hg revert a |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
464 $ hg forget c |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
465 $ rm c |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
466 |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
467 Copy a->b1 and a->b2, then rename b1->c in working copy. Result should copy a->b2 and a->c. |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
468 |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
469 $ hg co -q 0 |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
470 $ hg cp a b1 |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
471 $ hg cp a b2 |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
472 $ hg ci -qm 'move a to b1 and b2' |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
473 $ hg mv b1 c |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
474 $ hg uncommit --config experimental.uncommitondirtywdir=True |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
475 $ hg st --copies |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
476 A b2 |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
477 a |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
478 A c |
c7d425f7f5c9
tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents:
41010
diff
changeset
|
479 a |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
480 $ cd .. |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
481 |
41887
8c6ba2909155
tests: fix a stale reference to experimental.uncommitondirtywdir
Martin von Zweigbergk <martinvonz@google.com>
parents:
41860
diff
changeset
|
482 --allow-dirty-working-copy should also work on a dirty PATH |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
483 |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
484 $ hg init issue5977 |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
485 $ cd issue5977 |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
486 $ echo 'super critical info!' > a |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
487 $ hg ci -Am 'add a' |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
488 adding a |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
489 $ echo 'foo' > b |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
490 $ hg add b |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
491 $ hg status |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
492 A b |
44213
5323cdb8ae33
tests: use full `uncommit` command name in tests
Martin von Zweigbergk <martinvonz@google.com>
parents:
43893
diff
changeset
|
493 $ hg uncommit a |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
494 note: keeping empty commit |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
495 $ cat a |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
496 super critical info! |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
497 $ hg log |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
498 changeset: 1:656ba143d384 |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
499 tag: tip |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
500 parent: -1:000000000000 |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
501 user: test |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
502 date: Thu Jan 01 00:00:00 1970 +0000 |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
503 summary: add a |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
504 |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
505 $ hg ci -Am 'add b' |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
506 $ echo 'foo bar' > b |
44213
5323cdb8ae33
tests: use full `uncommit` command name in tests
Martin von Zweigbergk <martinvonz@google.com>
parents:
43893
diff
changeset
|
507 $ hg uncommit b |
41888
6a944bf4c43a
tests: clarify test setup test in test-uncommit.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
41887
diff
changeset
|
508 abort: uncommitted changes |
6a944bf4c43a
tests: clarify test setup test in test-uncommit.t
Martin von Zweigbergk <martinvonz@google.com>
parents:
41887
diff
changeset
|
509 (requires --allow-dirty-working-copy to uncommit) |
45840
527ce85c2e60
errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
45827
diff
changeset
|
510 [20] |
44213
5323cdb8ae33
tests: use full `uncommit` command name in tests
Martin von Zweigbergk <martinvonz@google.com>
parents:
43893
diff
changeset
|
511 $ hg uncommit --allow-dirty-working-copy b |
41859
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
512 $ hg log |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
513 changeset: 3:30fa958635b2 |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
514 tag: tip |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
515 parent: 1:656ba143d384 |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
516 user: test |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
517 date: Thu Jan 01 00:00:00 1970 +0000 |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
518 summary: add b |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
519 |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
520 changeset: 1:656ba143d384 |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
521 parent: -1:000000000000 |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
522 user: test |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
523 date: Thu Jan 01 00:00:00 1970 +0000 |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
524 summary: add a |
bf22e370ae9a
uncommit: don't allow dirty working copy with PATH (issue5977)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents:
41750
diff
changeset
|
525 |
42051
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
526 Removes can be uncommitted |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
527 |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
528 $ hg ci -m 'modified b' |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
529 $ hg rm b |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
530 $ hg ci -m 'remove b' |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
531 $ hg uncommit b |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
532 note: keeping empty commit |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
533 $ hg status |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
534 R b |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
535 |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
536 Uncommitting a directory won't run afoul of the checks that an explicit file |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
537 can be uncommitted. |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
538 |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
539 $ mkdir dir |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
540 $ echo 1 > dir/file.txt |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
541 $ hg ci -Aqm 'add file in directory' |
42902
ff1ff2aae132
uncommit: add support to modify the commit message and date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42051
diff
changeset
|
542 $ hg uncommit dir -m 'uncommit with message' -u 'different user' \ |
ff1ff2aae132
uncommit: add support to modify the commit message and date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42051
diff
changeset
|
543 > -d 'Jun 30 12:12:12 1980 +0000' |
42051
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
544 $ hg status |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
545 A dir/file.txt |
42902
ff1ff2aae132
uncommit: add support to modify the commit message and date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42051
diff
changeset
|
546 $ hg log -r . |
ff1ff2aae132
uncommit: add support to modify the commit message and date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42051
diff
changeset
|
547 changeset: 8:b4dd26dc42e0 |
ff1ff2aae132
uncommit: add support to modify the commit message and date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42051
diff
changeset
|
548 tag: tip |
ff1ff2aae132
uncommit: add support to modify the commit message and date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42051
diff
changeset
|
549 parent: 6:2278a4c24330 |
ff1ff2aae132
uncommit: add support to modify the commit message and date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42051
diff
changeset
|
550 user: different user |
ff1ff2aae132
uncommit: add support to modify the commit message and date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42051
diff
changeset
|
551 date: Mon Jun 30 12:12:12 1980 +0000 |
ff1ff2aae132
uncommit: add support to modify the commit message and date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42051
diff
changeset
|
552 summary: uncommit with message |
ff1ff2aae132
uncommit: add support to modify the commit message and date
Matt Harbison <matt_harbison@yahoo.com>
parents:
42051
diff
changeset
|
553 |
42921
4690902850df
uncommit: make -D/--date and -U/--user mutually exclusive
Matt Harbison <matt_harbison@yahoo.com>
parents:
42920
diff
changeset
|
554 Bad option combinations |
4690902850df
uncommit: make -D/--date and -U/--user mutually exclusive
Matt Harbison <matt_harbison@yahoo.com>
parents:
42920
diff
changeset
|
555 |
4690902850df
uncommit: make -D/--date and -U/--user mutually exclusive
Matt Harbison <matt_harbison@yahoo.com>
parents:
42920
diff
changeset
|
556 $ hg rollback -q --config ui.rollback=True |
4690902850df
uncommit: make -D/--date and -U/--user mutually exclusive
Matt Harbison <matt_harbison@yahoo.com>
parents:
42920
diff
changeset
|
557 $ hg uncommit -U --user 'user' |
43893
2e672ccc2220
commit: use cmdutil.check_at_most_one_arg()
Martin von Zweigbergk <martinvonz@google.com>
parents:
42974
diff
changeset
|
558 abort: cannot specify both --user and --currentuser |
45827
8d72e29ad1e0
errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
44724
diff
changeset
|
559 [10] |
42921
4690902850df
uncommit: make -D/--date and -U/--user mutually exclusive
Matt Harbison <matt_harbison@yahoo.com>
parents:
42920
diff
changeset
|
560 $ hg uncommit -D --date today |
43893
2e672ccc2220
commit: use cmdutil.check_at_most_one_arg()
Martin von Zweigbergk <martinvonz@google.com>
parents:
42974
diff
changeset
|
561 abort: cannot specify both --date and --currentdate |
45827
8d72e29ad1e0
errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
44724
diff
changeset
|
562 [10] |
42051
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
563 |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
564 `uncommit <dir>` and `cd <dir> && uncommit .` behave the same... |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
565 |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
566 $ echo 2 > dir/file2.txt |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
567 $ hg ci -Aqm 'add file2 in directory' |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
568 $ hg uncommit dir |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
569 note: keeping empty commit |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
570 $ hg status |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
571 A dir/file2.txt |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
572 |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
573 $ hg rollback -q --config ui.rollback=True |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
574 $ cd dir |
42936
2da754532dd3
uncommit: enable support for adding a note
Matt Harbison <matt_harbison@yahoo.com>
parents:
42921
diff
changeset
|
575 $ hg uncommit . -n 'this is a note' |
42051
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
576 note: keeping empty commit |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
577 $ hg status |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
578 A dir/file2.txt |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
579 $ cd .. |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
580 |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
581 ... and errors out the same way when nothing can be uncommitted |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
582 |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
583 $ hg rollback -q --config ui.rollback=True |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
584 $ mkdir emptydir |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
585 $ hg uncommit emptydir |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
586 abort: cannot uncommit "emptydir" |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
587 (file was untracked in working directory parent) |
46465
0e2becd1fe0c
errors: use InputError in uncommit extension
Martin von Zweigbergk <martinvonz@google.com>
parents:
45853
diff
changeset
|
588 [10] |
42051
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
589 |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
590 $ cd emptydir |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
591 $ hg uncommit . |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
592 abort: cannot uncommit "emptydir" |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
593 (file was untracked in working directory parent) |
46465
0e2becd1fe0c
errors: use InputError in uncommit extension
Martin von Zweigbergk <martinvonz@google.com>
parents:
45853
diff
changeset
|
594 [10] |
42051
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
595 $ hg status |
f4147ca63d39
uncommit: abort if an explicitly given file cannot be uncommitted (BC)
Matt Harbison <matt_harbison@yahoo.com>
parents:
41888
diff
changeset
|
596 $ cd .. |