2017-07-27 13:39:01 +03:00
|
|
|
$ cat >> $HGRCPATH << EOF
|
|
|
|
> [extensions]
|
2018-10-11 16:55:19 +03:00
|
|
|
> amend=
|
2018-04-11 17:05:55 +03:00
|
|
|
> undo =
|
2017-07-27 13:39:01 +03:00
|
|
|
> [experimental]
|
|
|
|
> evolution = createmarkers, allowunstable
|
|
|
|
> EOF
|
|
|
|
|
|
|
|
Create repo
|
|
|
|
$ hg init
|
|
|
|
$ hg debugdrawdag <<'EOS'
|
|
|
|
> E
|
|
|
|
> |
|
|
|
|
> C D
|
|
|
|
> |/
|
|
|
|
> B
|
|
|
|
> |
|
|
|
|
> A
|
|
|
|
> EOS
|
|
|
|
$ rm .hg/localtags
|
|
|
|
|
|
|
|
$ hg book -r 2 cat
|
|
|
|
$ hg book -r 1 dog
|
|
|
|
$ hg update 0
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
|
|
|
|
$ hg log -G -T '{rev} {desc} {bookmarks}\n'
|
|
|
|
o 4 E
|
|
|
|
|
|
|
|
|
| o 3 D
|
|
|
|
| |
|
|
|
|
o | 2 C cat
|
|
|
|
|/
|
|
|
|
o 1 B dog
|
|
|
|
|
|
|
|
|
@ 0 A
|
|
|
|
|
|
|
|
|
|
|
|
Hide a single commit
|
|
|
|
$ hg hide 3
|
2018-04-12 17:22:57 +03:00
|
|
|
hiding commit be0ef73c17ad "D"
|
2017-07-27 13:39:01 +03:00
|
|
|
1 changesets hidden
|
2018-04-11 17:05:55 +03:00
|
|
|
hint[undo]: you can undo this using the `hg undo` command
|
|
|
|
hint[hint-ack]: use 'hg hint --ack undo' to silence these hints
|
2017-07-27 13:39:01 +03:00
|
|
|
$ hg log -G -T '{rev} {desc} {bookmarks}\n'
|
|
|
|
o 4 E
|
|
|
|
|
|
|
|
|
o 2 C cat
|
|
|
|
|
|
|
|
|
o 1 B dog
|
|
|
|
|
|
|
|
|
@ 0 A
|
|
|
|
|
|
|
|
|
|
|
|
Hide multiple commits with bookmarks on them, hide wc parent
|
|
|
|
$ hg update 1
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ hg hide .
|
2018-04-12 17:22:57 +03:00
|
|
|
hiding commit 112478962961 "B"
|
|
|
|
hiding commit 26805aba1e60 "C"
|
|
|
|
hiding commit 78d2dca436b2 "E"
|
2017-07-27 13:39:01 +03:00
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
working directory now at 426bada5c675
|
|
|
|
3 changesets hidden
|
2018-04-12 17:22:59 +03:00
|
|
|
removing bookmark "cat (was at: 26805aba1e60)"
|
|
|
|
removing bookmark "dog (was at: 112478962961)"
|
2017-07-27 13:39:01 +03:00
|
|
|
2 bookmarks removed
|
2018-04-11 17:05:55 +03:00
|
|
|
hint[undo]: you can undo this using the `hg undo` command
|
|
|
|
hint[hint-ack]: use 'hg hint --ack undo' to silence these hints
|
2017-07-27 13:39:01 +03:00
|
|
|
$ hg log -G -T '{rev} {desc} {bookmarks}\n'
|
|
|
|
@ 0 A
|
|
|
|
|
2017-07-27 13:39:01 +03:00
|
|
|
|
|
|
|
Unhide stuff
|
|
|
|
$ hg unhide 2
|
|
|
|
$ hg log -G -T '{rev} {desc} {bookmarks}\n'
|
|
|
|
o 2 C
|
|
|
|
|
|
|
|
|
o 1 B
|
|
|
|
|
|
|
|
|
@ 0 A
|
|
|
|
|
|
|
|
$ hg unhide -r 4 -r 3
|
|
|
|
$ hg log -G -T '{rev} {desc} {bookmarks}\n'
|
|
|
|
o 4 E
|
|
|
|
|
|
|
|
|
| o 3 D
|
|
|
|
| |
|
|
|
|
o | 2 C
|
|
|
|
|/
|
|
|
|
o 1 B
|
|
|
|
|
|
|
|
|
@ 0 A
|
|
|
|
|
2018-04-11 17:05:54 +03:00
|
|
|
|
2018-04-11 17:05:57 +03:00
|
|
|
hg hide --cleanup tests
|
|
|
|
$ hg update 4
|
|
|
|
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ echo f > f
|
|
|
|
$ hg add f
|
|
|
|
$ hg commit -d "0 0" -m F
|
|
|
|
$ hg update 4
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ hg amend --no-rebase -m E2 -d "0 0"
|
|
|
|
hint[amend-restack]: descendants of 78d2dca436b2 are left behind - use 'hg restack' to rebase them
|
|
|
|
hint[hint-ack]: use 'hg hint --ack amend-restack' to silence these hints
|
|
|
|
$ hg log -G -T '{rev} {desc} {bookmarks}\n'
|
|
|
|
@ 6 E2
|
|
|
|
|
|
|
|
|
| o 5 F
|
|
|
|
| |
|
|
|
|
| x 4 E
|
|
|
|
|/
|
|
|
|
| o 3 D
|
|
|
|
| |
|
|
|
|
o | 2 C
|
|
|
|
|/
|
|
|
|
o 1 B
|
|
|
|
|
|
|
|
|
o 0 A
|
|
|
|
|
|
|
|
$ hg hide -c
|
|
|
|
abort: nothing to hide
|
|
|
|
[255]
|
|
|
|
$ hg hide -c -r .
|
|
|
|
abort: --rev and --cleanup are incompatible
|
|
|
|
[255]
|
|
|
|
$ hg --config extensions.rebase= rebase -s 5 -d 6
|
|
|
|
rebasing 5:1f7934a9b4de "F"
|
|
|
|
$ hg book -r 5 alive --hidden
|
|
|
|
$ hg log -G -T '{rev} {desc} {bookmarks}\n'
|
|
|
|
o 7 F
|
|
|
|
|
|
|
|
|
@ 6 E2
|
|
|
|
|
|
|
|
|
| x 5 F alive
|
|
|
|
| |
|
|
|
|
| x 4 E
|
|
|
|
|/
|
|
|
|
| o 3 D
|
|
|
|
| |
|
|
|
|
o | 2 C
|
|
|
|
|/
|
|
|
|
o 1 B
|
|
|
|
|
|
|
|
|
o 0 A
|
|
|
|
|
|
|
|
$ hg hide --cleanup
|
2018-04-12 17:22:57 +03:00
|
|
|
hiding commit 78d2dca436b2 "E"
|
|
|
|
hiding commit 1f7934a9b4de "F"
|
2018-04-11 17:05:57 +03:00
|
|
|
2 changesets hidden
|
2018-04-12 17:22:59 +03:00
|
|
|
removing bookmark "alive (was at: 1f7934a9b4de)"
|
2018-04-11 17:05:57 +03:00
|
|
|
1 bookmarks removed
|
|
|
|
hint[undo]: you can undo this using the `hg undo` command
|
|
|
|
hint[hint-ack]: use 'hg hint --ack undo' to silence these hints
|
|
|
|
$ hg log -G -T '{rev} {desc} {bookmarks}\n'
|
|
|
|
o 7 F
|
|
|
|
|
|
|
|
|
@ 6 E2
|
|
|
|
|
|
|
|
|
| o 3 D
|
|
|
|
| |
|
|
|
|
o | 2 C
|
|
|
|
|/
|
|
|
|
o 1 B
|
|
|
|
|
|
|
|
|
o 0 A
|
|
|
|
|