annotate tests/test-rebase-issue-noparam-single-rev.t @ 30435:b86a448a2965

zstd: vendor python-zstandard 0.5.0 As the commit message for the previous changeset says, we wish for zstd to be a 1st class citizen in Mercurial. To make that happen, we need to enable Python to talk to the zstd C API. And that requires bindings. This commit vendors a copy of existing Python bindings. Why do we need to vendor? As the commit message of the previous commit says, relying on systems in the wild to have the bindings or zstd present is a losing proposition. By distributing the zstd and bindings with Mercurial, we significantly increase our chances that zstd will work. Since zstd will deliver a better end-user experience by achieving better performance, this benefits our users. Another reason is that the Python bindings still aren't stable and the API is somewhat fluid. While Mercurial could be coded to target multiple versions of the Python bindings, it is safer to bundle an explicit, known working version. The added Python bindings are mostly a fully-featured interface to the zstd C API. They allow one-shot operations, streaming, reading and writing from objects implements the file object protocol, dictionary compression, control over low-level compression parameters, and more. The Python bindings work on Python 2.6, 2.7, and 3.3+ and have been tested on Linux and Windows. There are CFFI bindings, but they are lacking compared to the C extension. Upstream work will be needed before we can support zstd with PyPy. But it will be possible. The files added in this commit come from Git commit e637c1b214d5f869cf8116c550dcae23ec13b677 from https://github.com/indygreg/python-zstandard and are added without modifications. Some files from the upstream repository have been omitted, namely files related to continuous integration. In the spirit of full disclosure, I'm the maintainer of the "python-zstandard" project and have authored 100% of the code added in this commit. Unfortunately, the Python bindings have not been formally code reviewed by anyone. While I've tested much of the code thoroughly (I even have tests that fuzz APIs), there's a good chance there are bugs, memory leaks, not well thought out APIs, etc. If someone wants to review the code and send feedback to the GitHub project, it would be greatly appreciated. Despite my involvement with both projects, my opinions of code style differ from Mercurial's. The code in this commit introduces numerous code style violations in Mercurial's linters. So, the code is excluded from most lints. However, some violations I agree with. These have been added to the known violations ignore list for now.
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 10 Nov 2016 22:15:58 -0800
parents aa4a1672583e
children 3b7cb3d17137
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
1 $ cat >> $HGRCPATH <<EOF
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
2 > [extensions]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
3 > rebase=
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
4 >
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 12640
diff changeset
5 > [phases]
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 12640
diff changeset
6 > publish=False
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 12640
diff changeset
7 >
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
8 > [alias]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
9 > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
10 > EOF
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
11
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
12
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
13 $ hg init a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
14 $ cd a
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 8168
diff changeset
15
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
16 $ echo c1 > c1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
17 $ hg ci -Am c1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
18 adding c1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
19
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
20 $ echo c2 > c2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
21 $ hg ci -Am c2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
22 adding c2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
23
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
24 $ echo l1 > l1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
25 $ hg ci -Am l1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
26 adding l1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
27
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
28 $ hg up -q -C 1
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
29
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
30 $ echo r1 > r1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
31 $ hg ci -Am r1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
32 adding r1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
33 created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
34
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
35 $ echo r2 > r2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
36 $ hg ci -Am r2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
37 adding r2
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
38
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
39 $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
40 @ 4: 'r2'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
41 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
42 o 3: 'r1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
43 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
44 | o 2: 'l1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
45 |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
46 o 1: 'c2'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
47 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
48 o 0: 'c1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
49
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
50 Rebase with no arguments - single revision in source branch:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
51
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
52 $ hg up -q -C 2
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
53
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
54 $ hg rebase
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
55 rebasing 2:87c180a611f2 "l1"
23835
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 23517
diff changeset
56 saved backup bundle to $TESTTMP/a/.hg/strip-backup/87c180a611f2-a5be192d-backup.hg (glob)
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
57
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
58 $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
59 @ 4: 'l1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
60 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
61 o 3: 'r2'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
62 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
63 o 2: 'r1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
64 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
65 o 1: 'c2'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
66 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
67 o 0: 'c1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
68
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
69 $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
70
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
71
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
72 $ hg init b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
73 $ cd b
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
74
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
75 $ echo c1 > c1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
76 $ hg ci -Am c1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
77 adding c1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
78
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
79 $ echo c2 > c2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
80 $ hg ci -Am c2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
81 adding c2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
82
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
83 $ echo l1 > l1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
84 $ hg ci -Am l1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
85 adding l1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
86
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
87 $ echo l2 > l2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
88 $ hg ci -Am l2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
89 adding l2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
90
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
91 $ hg up -q -C 1
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
92
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
93 $ echo r1 > r1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
94 $ hg ci -Am r1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
95 adding r1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
96 created new head
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
97
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
98 $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
99 @ 4: 'r1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
100 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
101 | o 3: 'l2'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
102 | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
103 | o 2: 'l1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
104 |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
105 o 1: 'c2'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
106 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
107 o 0: 'c1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
108
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
109 Rebase with no arguments - single revision in target branch:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
110
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
111 $ hg up -q -C 3
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
112
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
113 $ hg rebase
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
114 rebasing 2:87c180a611f2 "l1"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
115 rebasing 3:1ac923b736ef "l2"
23835
aa4a1672583e bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents: 23517
diff changeset
116 saved backup bundle to $TESTTMP/b/.hg/strip-backup/87c180a611f2-b980535c-backup.hg (glob)
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
117
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
118 $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
119 @ 4: 'l2'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
120 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
121 o 3: 'l1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
122 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
123 o 2: 'r1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
124 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
125 o 1: 'c2'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
126 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
127 o 0: 'c1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
128
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15742
diff changeset
129
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15742
diff changeset
130 $ cd ..