2019-12-10 02:24:31 +03:00
|
|
|
#chg-compatible
|
|
|
|
|
2020-06-11 03:33:43 +03:00
|
|
|
$ configure mutation-norecord
|
2018-02-27 22:05:33 +03:00
|
|
|
#require execbit
|
|
|
|
|
|
|
|
$ tellmeabout() {
|
|
|
|
> if [ -x $1 ]; then
|
|
|
|
> echo $1 is an executable file with content:
|
|
|
|
> cat $1
|
|
|
|
> else
|
|
|
|
> echo $1 is a plain file with content:
|
|
|
|
> cat $1
|
|
|
|
> fi
|
|
|
|
> }
|
|
|
|
|
|
|
|
$ cat >> $HGRCPATH << EOF
|
|
|
|
> [extensions]
|
|
|
|
> rebase=
|
|
|
|
> EOF
|
|
|
|
|
|
|
|
Test rebasing a single commit that changes flags:
|
|
|
|
$ hg init repo
|
|
|
|
$ cd repo
|
|
|
|
$ echo "A" > foo
|
|
|
|
$ hg add foo
|
|
|
|
$ chmod +x foo
|
|
|
|
$ tellmeabout foo
|
|
|
|
foo is an executable file with content:
|
|
|
|
A
|
|
|
|
$ hg com -m "base"
|
|
|
|
$ hg mv foo foo_newloc
|
|
|
|
$ hg com -m "move"
|
|
|
|
$ hg up .~1
|
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ echo "B" > foo
|
|
|
|
$ hg com -m "change"
|
|
|
|
$ hg log -G
|
2020-07-21 03:23:52 +03:00
|
|
|
@ commit: a7f7eece6b0c
|
2018-02-27 22:05:33 +03:00
|
|
|
| user: test
|
|
|
|
| date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
| summary: change
|
|
|
|
|
|
2020-07-21 03:23:52 +03:00
|
|
|
| o commit: 5f41048406b0
|
2018-02-27 22:05:33 +03:00
|
|
|
|/ user: test
|
|
|
|
| date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
| summary: move
|
|
|
|
|
|
2020-07-21 03:23:52 +03:00
|
|
|
o commit: c0233516197f
|
2018-02-27 22:05:33 +03:00
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: base
|
|
|
|
|
|
|
|
|
|
|
|
$ hg rebase -r 1 -d .
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 5f41048406b0 "move"
|
2018-02-27 22:05:33 +03:00
|
|
|
merging foo and foo_newloc to foo_newloc
|
|
|
|
$ hg up tip
|
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ tellmeabout foo_newloc
|
|
|
|
foo_newloc is an executable file with content:
|
|
|
|
B
|