test-histedit-bookmark-motion.t
178 lines
| 4.7 KiB
| text/troff
|
Tads3Lexer
/ tests / test-histedit-bookmark-motion.t
|
r17064 | $ . "$TESTDIR/histedit-helpers.sh" | ||
|
r17065 | $ cat >> $HGRCPATH <<EOF | ||
|
r17064 | > [extensions] | ||
> histedit= | ||||
> EOF | ||||
$ hg init r | ||||
$ cd r | ||||
|
r17065 | |||
|
r17064 | $ for x in a b c d e f ; do | ||
> echo $x > $x | ||||
> hg add $x | ||||
> hg ci -m $x | ||||
> done | ||||
$ hg book -r 1 will-move-backwards | ||||
$ hg book -r 2 two | ||||
$ hg book -r 2 also-two | ||||
$ hg book -r 3 three | ||||
$ hg book -r 4 four | ||||
$ hg book -r tip five | ||||
$ hg log --graph | ||||
@ changeset: 5:652413bf663e | ||||
| bookmark: five | ||||
| tag: tip | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: f | ||||
| | ||||
o changeset: 4:e860deea161a | ||||
| bookmark: four | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: e | ||||
| | ||||
o changeset: 3:055a42cdd887 | ||||
| bookmark: three | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: d | ||||
| | ||||
o changeset: 2:177f92b77385 | ||||
| bookmark: also-two | ||||
| bookmark: two | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: c | ||||
| | ||||
o changeset: 1:d2ae7f538514 | ||||
| bookmark: will-move-backwards | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: b | ||||
| | ||||
o changeset: 0:cb9a9f314b8b | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: a | ||||
$ HGEDITOR=cat hg histedit 1 | ||||
pick d2ae7f538514 1 b | ||||
pick 177f92b77385 2 c | ||||
pick 055a42cdd887 3 d | ||||
pick e860deea161a 4 e | ||||
pick 652413bf663e 5 f | ||||
# Edit history between d2ae7f538514 and 652413bf663e | ||||
# | ||||
|
r20503 | # Commits are listed from least to most recent | ||
# | ||||
|
r28396 | # You can reorder changesets by reordering the lines | ||
# | ||||
|
r17064 | # Commands: | ||
|
r27674 | # | ||
# e, edit = use commit, but stop for amending | ||||
# m, mess = edit commit message without changing commit content | ||||
|
r17064 | # p, pick = use commit | ||
|
r34490 | # b, base = checkout changeset and apply further changesets from there | ||
|
r27674 | # d, drop = remove commit from history | ||
|
r20511 | # f, fold = use commit, but combine it with the one above | ||
|
r31056 | # r, roll = like fold, but discard this commit's description and date | ||
|
r17064 | # | ||
|
r19019 | $ hg histedit 1 --commands - --verbose << EOF | grep histedit | ||
|
r17064 | > pick 177f92b77385 2 c | ||
> drop d2ae7f538514 1 b | ||||
> pick 055a42cdd887 3 d | ||||
> fold e860deea161a 4 e | ||||
> pick 652413bf663e 5 f | ||||
> EOF | ||||
|
r35394 | saved backup bundle to $TESTTMP/r/.hg/strip-backup/96e494a2d553-45c027ab-histedit.hg | ||
|
r17064 | $ hg log --graph | ||
|
r18437 | @ changeset: 3:cacdfd884a93 | ||
|
r17064 | | bookmark: five | ||
| tag: tip | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: f | ||||
| | ||||
|
r18437 | o changeset: 2:59d9f330561f | ||
|
r17064 | | bookmark: four | ||
| bookmark: three | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: d | ||||
| | ||||
|
r18437 | o changeset: 1:b346ab9a313d | ||
|
r17064 | | bookmark: also-two | ||
| bookmark: two | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: c | ||||
| | ||||
o changeset: 0:cb9a9f314b8b | ||||
bookmark: will-move-backwards | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: a | ||||
$ HGEDITOR=cat hg histedit 1 | ||||
|
r18437 | pick b346ab9a313d 1 c | ||
pick 59d9f330561f 2 d | ||||
pick cacdfd884a93 3 f | ||||
|
r17064 | |||
|
r18437 | # Edit history between b346ab9a313d and cacdfd884a93 | ||
|
r17064 | # | ||
|
r20503 | # Commits are listed from least to most recent | ||
# | ||||
|
r28396 | # You can reorder changesets by reordering the lines | ||
# | ||||
|
r17064 | # Commands: | ||
|
r27674 | # | ||
# e, edit = use commit, but stop for amending | ||||
# m, mess = edit commit message without changing commit content | ||||
|
r17064 | # p, pick = use commit | ||
|
r34490 | # b, base = checkout changeset and apply further changesets from there | ||
|
r27674 | # d, drop = remove commit from history | ||
|
r20511 | # f, fold = use commit, but combine it with the one above | ||
|
r31056 | # r, roll = like fold, but discard this commit's description and date | ||
|
r17064 | # | ||
|
r19019 | $ hg histedit 1 --commands - --verbose << EOF | grep histedit | ||
|
r18437 | > pick b346ab9a313d 1 c | ||
> pick cacdfd884a93 3 f | ||||
> pick 59d9f330561f 2 d | ||||
|
r17064 | > EOF | ||
|
r35394 | saved backup bundle to $TESTTMP/r/.hg/strip-backup/59d9f330561f-073008af-histedit.hg | ||
|
r17064 | |||
We expect 'five' to stay at tip, since the tipmost bookmark is most | ||||
likely the useful signal. | ||||
$ hg log --graph | ||||
|
r18437 | @ changeset: 3:c04e50810e4b | ||
|
r17064 | | bookmark: five | ||
| bookmark: four | ||||
| bookmark: three | ||||
| tag: tip | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: d | ||||
| | ||||
|
r18437 | o changeset: 2:c13eb81022ca | ||
|
r17064 | | user: test | ||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: f | ||||
| | ||||
|
r18437 | o changeset: 1:b346ab9a313d | ||
|
r17064 | | bookmark: also-two | ||
| bookmark: two | ||||
| user: test | ||||
| date: Thu Jan 01 00:00:00 1970 +0000 | ||||
| summary: c | ||||
| | ||||
o changeset: 0:cb9a9f314b8b | ||||
bookmark: will-move-backwards | ||||
user: test | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | ||||
summary: a | ||||