##// END OF EJS Templates
debian: switch to using debhelper and dh_python2 to build debs...
debian: switch to using debhelper and dh_python2 to build debs This is a much larger commit than I'd like, but I honestly don't see a good way to break it up and leave things working. Summary: We now use debian/rules with debhelper to build our debs. This is much more standard, and means we use dh_python2 to do things like handle leaving .pyc files out of the built debs. The resulting package is split into mercurial and mercurial-common, with the former being the hg stub and all the native .sos, and the latter being basically everything else. builddeb and dockerdeb are updated to use the new system. The old way (using dpkg by hand) breaks with the above changes because debian/control no longer contains a version string (that's now guessed from the phony changelog.) Tests are updated to assert that the right files end up in the right debs.

File last commit:

r24767:477e7693 default
r26148:7f49efca default
Show More
test-histedit-fold-non-commute.t
349 lines | 9.1 KiB | text/troff | Tads3Lexer
/ tests / test-histedit-fold-non-commute.t
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 $ . "$TESTDIR/histedit-helpers.sh"
$ cat >> $HGRCPATH <<EOF
> [extensions]
> histedit=
> EOF
$ initrepo ()
> {
> hg init $1
> cd $1
> for x in a b c d e f ; do
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 > echo $x$x$x$x$x > $x
> hg add $x
> done
> hg ci -m 'Initial commit'
> for x in a b c d e f ; do
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 > echo $x > $x
> hg ci -m $x
> done
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 > echo 'I can haz no commute' > e
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 > hg ci -m 'does not commute with e'
> cd ..
> }
$ initrepo r
$ cd r
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 Initial generation of the command files
$ EDITED="$TESTTMP/editedhistory"
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 3 >> $EDITED
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 4 >> $EDITED
$ hg log --template 'fold {node|short} {rev} {desc}\n' -r 7 >> $EDITED
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 5 >> $EDITED
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 6 >> $EDITED
$ cat $EDITED
pick 65a9a84f33fd 3 c
pick 00f1c5383965 4 d
fold 39522b764e3d 7 does not commute with e
pick 7b4e2f4b7bcd 5 e
pick 500cac37a696 6 f
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
log before edit
$ hg log --graph
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 @ changeset: 7:39522b764e3d
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | tag: tip
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: does not commute with e
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 6:500cac37a696
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: f
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 5:7b4e2f4b7bcd
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: e
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 4:00f1c5383965
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: d
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 3:65a9a84f33fd
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: c
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 2:da6535b52e45
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: b
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 1:c1f09da44841
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: a
|
o changeset: 0:1715188a53c7
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 user: test
date: Thu Jan 01 00:00:00 1970 +0000
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 summary: Initial commit
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
edit the history
Pierre-Yves David
histedit-test: generalise --commands "-" usage...
r19019 $ hg histedit 3 --commands $EDITED 2>&1 | fixbundle
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
Pierre-Yves David
histedit: replaces patching logic by merges...
r17647 merging e
warning: conflicts during merge.
merging e incomplete! (edit conflicts, then use 'hg resolve --mark')
Augie Fackler
histedit: switch from util.Abort to util.InterventionRequired where appropriate (bc)
r18934 Fix up the change and run hg histedit --continue
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
fix up
Pierre-Yves David
histedit: replaces patching logic by merges...
r17647 $ echo 'I can haz no commute' > e
$ hg resolve --mark e
Pierre-Yves David
resolve: add parenthesis around "no more unresolved files" message...
r21947 (no more unresolved files)
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 $ cat > cat.py <<EOF
> import sys
> print open(sys.argv[1]).read()
> print
> print
> EOF
$ HGEDITOR="python cat.py" hg histedit --continue 2>&1 | fixbundle | grep -v '2 files removed'
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 d
***
does not commute with e
Patrick Mezard
histedit: end folding message with an LF...
r17241
Pierre-Yves David
histedit: fold in memory...
r17644 HG: Enter commit message. Lines beginning with 'HG:' are removed.
HG: Leave message empty to abort commit.
HG: --
HG: user: test
HG: branch 'default'
HG: changed d
HG: changed e
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
Pierre-Yves David
histedit: replaces patching logic by merges...
r17647 merging e
warning: conflicts during merge.
merging e incomplete! (edit conflicts, then use 'hg resolve --mark')
Augie Fackler
histedit: switch from util.Abort to util.InterventionRequired where appropriate (bc)
r18934 Fix up the change and run hg histedit --continue
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
just continue this time
Pierre-Yves David
histedit: replaces patching logic by merges...
r17647 $ hg revert -r 'p1()' e
$ hg resolve --mark e
Pierre-Yves David
resolve: add parenthesis around "no more unresolved files" message...
r21947 (no more unresolved files)
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 $ hg histedit --continue 2>&1 | fixbundle
Durham Goode
histedit: convert pick action into a class...
r24767 7b4e2f4b7bcd: empty changeset
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
log after edit
$ hg log --graph
Pierre-Yves David
histedit: record histedit source (issue3681)...
r18437 @ changeset: 5:d9cf42e54966
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | tag: tip
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: f
|
Pierre-Yves David
histedit: record histedit source (issue3681)...
r18437 o changeset: 4:10486af2e984
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: d
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 3:65a9a84f33fd
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: c
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 2:da6535b52e45
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 | user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: b
|
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 o changeset: 1:c1f09da44841
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: a
|
o changeset: 0:1715188a53c7
Mads Kiilerich
tests: convert histedit tests to .t...
r17085 user: test
date: Thu Jan 01 00:00:00 1970 +0000
Pierre-Yves David
histedit-test: ensure that non commute test will never commute...
r17646 summary: Initial commit
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
contents of e
$ hg cat e
Pierre-Yves David
histedit: replaces patching logic by merges...
r17647 I can haz no commute
Mads Kiilerich
tests: convert histedit tests to .t...
r17085
manifest
$ hg manifest
a
b
c
d
e
f
$ cd ..
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152
Repeat test using "roll", not "fold". "roll" folds in changes but drops message
$ initrepo r2
$ cd r2
Initial generation of the command files
$ EDITED="$TESTTMP/editedhistory.2"
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 3 >> $EDITED
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 4 >> $EDITED
$ hg log --template 'roll {node|short} {rev} {desc}\n' -r 7 >> $EDITED
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 5 >> $EDITED
$ hg log --template 'pick {node|short} {rev} {desc}\n' -r 6 >> $EDITED
$ cat $EDITED
pick 65a9a84f33fd 3 c
pick 00f1c5383965 4 d
roll 39522b764e3d 7 does not commute with e
pick 7b4e2f4b7bcd 5 e
pick 500cac37a696 6 f
log before edit
$ hg log --graph
@ changeset: 7:39522b764e3d
| tag: tip
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: does not commute with e
|
o changeset: 6:500cac37a696
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: f
|
o changeset: 5:7b4e2f4b7bcd
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: e
|
o changeset: 4:00f1c5383965
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: d
|
o changeset: 3:65a9a84f33fd
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: c
|
o changeset: 2:da6535b52e45
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: b
|
o changeset: 1:c1f09da44841
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: a
|
o changeset: 0:1715188a53c7
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: Initial commit
edit the history
$ hg histedit 3 --commands $EDITED 2>&1 | fixbundle
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
merging e
warning: conflicts during merge.
merging e incomplete! (edit conflicts, then use 'hg resolve --mark')
Fix up the change and run hg histedit --continue
fix up
$ echo 'I can haz no commute' > e
$ hg resolve --mark e
(no more unresolved files)
$ hg histedit --continue 2>&1 | fixbundle | grep -v '2 files removed'
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
merging e
warning: conflicts during merge.
merging e incomplete! (edit conflicts, then use 'hg resolve --mark')
Fix up the change and run hg histedit --continue
just continue this time
$ hg revert -r 'p1()' e
$ hg resolve --mark e
(no more unresolved files)
$ hg histedit --continue 2>&1 | fixbundle
Durham Goode
histedit: convert pick action into a class...
r24767 7b4e2f4b7bcd: empty changeset
Mike Edgar
histedit: add "roll" command to fold commit data and drop message (issue4256)...
r22152 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
log after edit
$ hg log --graph
@ changeset: 5:e7c4f5d4eb75
| tag: tip
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: f
|
o changeset: 4:803d1bb561fc
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: d
|
o changeset: 3:65a9a84f33fd
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: c
|
o changeset: 2:da6535b52e45
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: b
|
o changeset: 1:c1f09da44841
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: a
|
o changeset: 0:1715188a53c7
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: Initial commit
contents of e
$ hg cat e
I can haz no commute
manifest
$ hg manifest
a
b
c
d
e
f
description is taken from rollup target commit
$ hg log --debug --rev 4
changeset: 4:803d1bb561fceac3129ec778db9da249a3106fc3
phase: draft
parent: 3:65a9a84f33fdeb1ad5679b3941ec885d2b24027b
parent: -1:0000000000000000000000000000000000000000
manifest: 4:b068a323d969f22af1296ec6a5ea9384cef437ac
user: test
date: Thu Jan 01 00:00:00 1970 +0000
files: d e
extra: branch=default
extra: histedit_source=00f1c53839651fa5c76d423606811ea5455a79d0,39522b764e3d26103f08bd1fa2ccd3e3d7dbcf4e
description:
d
done with repo r2
$ cd ..