##// END OF EJS Templates
merge stable
Matt Mackall -
r16337:41b41adb merge default
parent child Browse files
Show More
@@ -1,52 +1,53 b''
1 1 35fb62a3a673d5322f6274a44ba6456e5e4b3b37 0 iD8DBQBEYmO2ywK+sNU5EO8RAnaYAKCO7x15xUn5mnhqWNXqk/ehlhRt2QCfRDfY0LrUq2q4oK/KypuJYPHgq1A=
2 2 2be3001847cb18a23c403439d9e7d0ace30804e9 0 iD8DBQBExUbjywK+sNU5EO8RAhzxAKCtyHAQUzcTSZTqlfJ0by6vhREwWQCghaQFHfkfN0l9/40EowNhuMOKnJk=
3 3 36a957364b1b89c150f2d0e60a99befe0ee08bd3 0 iD8DBQBFfL2QywK+sNU5EO8RAjYFAKCoGlaWRTeMsjdmxAjUYx6diZxOBwCfY6IpBYsKvPTwB3oktnPt5Rmrlys=
4 4 27230c29bfec36d5540fbe1c976810aefecfd1d2 0 iD8DBQBFheweywK+sNU5EO8RAt7VAKCrqJQWT2/uo2RWf0ZI4bLp6v82jACgjrMdsaTbxRsypcmEsdPhlG6/8F4=
5 5 fb4b6d5fe100b0886f8bc3d6731ec0e5ed5c4694 0 iD8DBQBGgHicywK+sNU5EO8RAgNxAJ0VG8ixAaeudx4sZbhngI1syu49HQCeNUJQfWBgA8bkJ2pvsFpNxwYaX3I=
6 6 23889160905a1b09fffe1c07378e9fc1827606eb 0 iD8DBQBHGTzoywK+sNU5EO8RAr/UAJ0Y8s4jQtzgS+G9vM8z6CWBThZ8fwCcCT5XDj2XwxKkz/0s6UELwjsO3LU=
7 7 bae2e9c838e90a393bae3973a7850280413e091a 0 iD8DBQBH6DO5ywK+sNU5EO8RAsfrAJ0e4r9c9GF/MJsM7Xjd3NesLRC3+ACffj6+6HXdZf8cswAoFPO+DY00oD0=
8 8 d5cbbe2c49cee22a9fbeb9ea41daa0ac4e26b846 0 iD8DBQBINdwsywK+sNU5EO8RAjIUAKCPmlFJSpsPAAUKF+iNHAwVnwmzeQCdEXrL27CWclXuUKdbQC8De7LICtE=
9 9 d2375bbee6d47e62ba8e415c86e83a465dc4dce9 0 iD8DBQBIo1wpywK+sNU5EO8RAmRNAJ94x3OFt6blbqu/yBoypm/AJ44fuACfUaldXcV5z9tht97hSp22DVTEPGc=
10 10 2a67430f92f15ea5159c26b09ec4839a0c549a26 0 iEYEABECAAYFAkk1hykACgkQywK+sNU5EO85QACeNJNUanjc2tl4wUoPHNuv+lSj0ZMAoIm93wSTc/feyYnO2YCaQ1iyd9Nu
11 11 3773e510d433969e277b1863c317b674cbee2065 0 iEYEABECAAYFAklNbbAACgkQywK+sNU5EO8o+gCfeb2/lfIJZMvyDA1m+G1CsBAxfFsAoIa6iAMG8SBY7hW1Q85Yf/LXEvaE
12 12 11a4eb81fb4f4742451591489e2797dc47903277 0 iEYEABECAAYFAklcAnsACgkQywK+sNU5EO+uXwCbBVHNNsLy1g7BlAyQJwadYVyHOXoAoKvtAVO71+bv7EbVoukwTzT+P4Sx
13 13 11efa41037e280d08cfb07c09ad485df30fb0ea8 0 iEYEABECAAYFAkmvJRQACgkQywK+sNU5EO9XZwCeLMgDgPSMWMm6vgjL4lDs2pEc5+0AnRxfiFbpbBfuEFTqKz9nbzeyoBlx
14 14 02981000012e3adf40c4849bd7b3d5618f9ce82d 0 iEYEABECAAYFAknEH3wACgkQywK+sNU5EO+uXwCeI+LbLMmhjU1lKSfU3UWJHjjUC7oAoIZLvYDGOL/tNZFUuatc3RnZ2eje
15 15 196d40e7c885fa6e95f89134809b3ec7bdbca34b 0 iEYEABECAAYFAkpL2X4ACgkQywK+sNU5EO9FOwCfXJycjyKJXsvQqKkHrglwOQhEKS4An36GfKzptfN8b1qNc3+ya/5c2WOM
16 16 3ef6c14a1e8e83a31226f5881b7fe6095bbfa6f6 0 iEYEABECAAYFAkpopLIACgkQywK+sNU5EO8QSgCfZ0ztsd071rOa2lhmp9Fyue/WoI0AoLTei80/xrhRlB8L/rZEf2KBl8dA
17 17 31ec469f9b556f11819937cf68ee53f2be927ebf 0 iEYEABECAAYFAksBuxAACgkQywK+sNU5EO+mBwCfagB+A0txzWZ6dRpug3LEoK7Z1QsAoKpbk8vsLjv6/oRDicSk/qBu33+m
18 18 439d7ea6fe3aa4ab9ec274a68846779153789de9 0 iEYEABECAAYFAksVw0kACgkQywK+sNU5EO/oZwCfdfBEkgp38xq6wN2F4nj+SzofrJIAnjmxt04vaJSeOOeHylHvk6lzuQsw
19 19 296a0b14a68621f6990c54fdba0083f6f20935bf 0 iEYEABECAAYFAks+jCoACgkQywK+sNU5EO9J8wCeMUGF9E/gS2UBsqIz56WS4HMPRPUAoI5J95mwEIK8Clrl7qFRidNI6APq
20 20 4aa619c4c2c09907034d9824ebb1dd0e878206eb 0 iEYEABECAAYFAktm9IsACgkQywK+sNU5EO9XGgCgk4HclRQhexEtooPE5GcUCdB6M8EAn2ptOhMVbIoO+JncA+tNACPFXh0O
21 21 ff2704a8ded37fbebd8b6eb5ec733731d725da8a 0 iEYEABECAAYFAkuRoSQACgkQywK+sNU5EO//3QCeJDc5r2uFyFCtAlpSA27DEE5rrxAAn2FSwTy9fhrB3QAdDQlwkEZcQzDh
22 22 2b01dab594167bc0dd33331dbaa6dca3dca1b3aa 0 iEYEABECAAYFAku1IwIACgkQywK+sNU5EO9MjgCdHLVwkTZlNHxhcznZKBL1rjN+J7cAoLLWi9LTL6f/TgBaPSKOy1ublbaW
23 23 39f725929f0c48c5fb3b90c071fc3066012456ca 0 iEYEABECAAYFAkvclvsACgkQywK+sNU5EO9FSwCeL9i5x8ALW/LE5+lCX6MFEAe4MhwAn1ev5o6SX6GrNdDfKweiemfO2VBk
24 24 fdcf80f26604f233dc4d8f0a5ef9d7470e317e8a 0 iEYEABECAAYFAkvsKTkACgkQywK+sNU5EO9qEACgiSiRGvTG2vXGJ65tUSOIYihTuFAAnRzRIqEVSw8M8/RGeUXRps0IzaCO
25 25 24fe2629c6fd0c74c90bd066e77387c2b02e8437 0 iEYEABECAAYFAkwFLRsACgkQywK+sNU5EO+pJACgp13tPI+pbwKZV+LeMjcQ4H6tCZYAoJebzhd6a8yYx6qiwpJxA9BXZNXy
26 26 f786fc4b8764cd2a5526d259cf2f94d8a66924d9 0 iEYEABECAAYFAkwsyxcACgkQywK+sNU5EO+crACfUpNAF57PmClkSri9nJcBjb2goN4AniPCNaKvnki7TnUsi1u2oxltpKKL
27 27 bf1774d95bde614af3956d92b20e2a0c68c5fec7 0 iEYEABECAAYFAkxVwccACgkQywK+sNU5EO+oFQCeJzwZ+we1fIIyBGCddHceOUAN++cAnjvT6A8ZWW0zV21NXIFF1qQmjxJd
28 28 c00f03a4982e467fb6b6bd45908767db6df4771d 0 iEYEABECAAYFAkxXDqsACgkQywK+sNU5EO/GJACfT9Rz4hZOxPQEs91JwtmfjevO84gAmwSmtfo5mmWSm8gtTUebCcdTv0Kf
29 29 ff5cec76b1c5b6be9c3bb923aae8c3c6d079d6b9 0 iD8DBQBMdo+qywK+sNU5EO8RAqQpAJ975BL2CCAiWMz9SXthNQ9xG181IwCgp4O+KViHPkufZVFn2aTKMNvcr1A=
30 30 93d8bff78c96fe7e33237b257558ee97290048a4 0 iD8DBQBMpfvdywK+sNU5EO8RAsxVAJ0UaL1XB51C76JUBhafc9GBefuMxwCdEWkTOzwvE0SarJBe9i008jhbqW4=
31 31 333421b9e0f96c7bc788e5667c146a58a9440a55 0 iD8DBQBMz0HOywK+sNU5EO8RAlsEAJ0USh6yOG7OrWkADGunVt9QimBQnwCbBqeMnKgSbwEw8jZwE3Iz1mdrYlo=
32 32 4438875ec01bd0fc32be92b0872eb6daeed4d44f 0 iD8DBQBM4WYUywK+sNU5EO8RAhCVAJ0dJswachwFAHALmk1x0RJehxzqPQCbBNskP9n/X689jB+btNTZTyKU/fw=
33 33 6aff4f144ad356311318b0011df0bb21f2c97429 0 iD8DBQBM9uxXywK+sNU5EO8RAv+4AKCDj4qKP16GdPaq1tP6BUwpM/M1OACfRyzLPp/qiiN8xJTWoWYSe/XjJug=
34 34 e3bf16703e2601de99e563cdb3a5d50b64e6d320 0 iD8DBQBNH8WqywK+sNU5EO8RAiQTAJ9sBO+TeiGro4si77VVaQaA6jcRUgCfSA28dBbjj0oFoQwvPoZjANiZBH8=
35 35 a6c855c32ea081da3c3b8ff628f1847ff271482f 0 iD8DBQBNSJJ+ywK+sNU5EO8RAoJaAKCweDEF70fu+r1Zn7pYDXdlk5RuSgCeO9gK/eit8Lin/1n3pO7aYguFLok=
36 36 2b2155623ee2559caf288fd333f30475966c4525 0 iD8DBQBNSJeBywK+sNU5EO8RAm1KAJ4hW9Cm9nHaaGJguchBaPLlAr+O3wCgqgmMok8bdAS06N6PL60PSTM//Gg=
37 37 2616325766e3504c8ae7c84bd15ee610901fe91d 0 iD8DBQBNbWy9ywK+sNU5EO8RAlWCAJ4mW8HbzjJj9GpK98muX7k+7EvEHwCfaTLbC/DH3QEsZBhEP+M8tzL6RU4=
38 38 aa1f3be38ab127280761889d2dca906ca465b5f4 0 iD8DBQBNeQq7ywK+sNU5EO8RAlEOAJ4tlEDdetE9lKfjGgjbkcR8PrC3egCfXCfF3qNVvU/2YYjpgvRwevjvDy0=
39 39 b032bec2c0a651ca0ddecb65714bfe6770f67d70 0 iD8DBQBNlg5kywK+sNU5EO8RAnGEAJ9gmEx6MfaR4XcG2m/93vwtfyzs3gCgltzx8/YdHPwqDwRX/WbpYgi33is=
40 40 3cb1e95676ad089596bd81d0937cad37d6e3b7fb 0 iD8DBQBNvTy4ywK+sNU5EO8RAmp8AJ9QnxK4jTJ7G722MyeBxf0UXEdGwACgtlM7BKtNQfbEH/fOW5y+45W88VI=
41 41 733af5d9f6b22387913e1d11350fb8cb7c1487dd 0 iD8DBQBN5q/8ywK+sNU5EO8RArRGAKCNGT94GKIYtSuwZ57z1sQbcw6uLACfffpbMV4NAPMl8womAwg+7ZPKnIU=
42 42 de9eb6b1da4fc522b1cab16d86ca166204c24f25 0 iD8DBQBODhfhywK+sNU5EO8RAr2+AJ4ugbAj8ae8/K0bYZzx3sascIAg1QCeK3b+zbbVVqd3b7CDpwFnaX8kTd4=
43 43 4a43e23b8c55b4566b8200bf69fe2158485a2634 0 iD8DBQBONzIMywK+sNU5EO8RAj5SAJ0aPS3+JHnyI6bHB2Fl0LImbDmagwCdGbDLp1S7TFobxXudOH49bX45Iik=
44 44 d629f1e89021103f1753addcef6b310e4435b184 0 iD8DBQBOWAsBywK+sNU5EO8RAht4AJwJl9oNFopuGkj5m8aKuf7bqPkoAQCeNrEm7UhFsZKYT5iUOjnMV7s2LaM=
45 45 351a9292e430e35766c552066ed3e87c557b803b 0 iD8DBQBOh3zUywK+sNU5EO8RApFMAKCD3Y/u3avDFndznwqfG5UeTHMlvACfUivPIVQZyDZnhZMq0UhC6zhCEQg=
46 46 384082750f2c51dc917d85a7145748330fa6ef4d 0 iD8DBQBOmd+OywK+sNU5EO8RAgDgAJ9V/X+G7VLwhTpHrZNiOHabzSyzYQCdE2kKfIevJUYB9QLAWCWP6DPwrwI=
47 47 41453d55b481ddfcc1dacb445179649e24ca861d 0 iD8DBQBOsFhpywK+sNU5EO8RAqM6AKCyfxUae3/zLuiLdQz+JR78690eMACfQ6JTBQib4AbE+rUDdkeFYg9K/+4=
48 48 195dbd1cef0c2f9f8bcf4ea303238105f716bda3 0 iD8DBQBO1/fWywK+sNU5EO8RAmoPAKCR5lpv1D6JLURHD8KVLSV4GRVEBgCgnd0Sy78ligNfqAMafmACRDvj7vo=
49 49 6344043924497cd06d781d9014c66802285072e4 0 iD8DBQBPALgmywK+sNU5EO8RAlfhAJ9nYOdWnhfVDHYtDTJAyJtXBAQS9wCgnefoSQt7QABkbGxM+Q85UYEBuD0=
50 50 db33555eafeaf9df1e18950e29439eaa706d399b 0 iD8DBQBPGdzxywK+sNU5EO8RAppkAJ9jOXhUVE/97CPgiMA0pMGiIYnesQCfengAszcBiSiKGugiI8Okc9ghU+Y=
51 51 2aa5b51f310fb3befd26bed99c02267f5c12c734 0 iD8DBQBPKZ9bywK+sNU5EO8RAt1TAJ45r1eJ0YqSkInzrrayg4TVCh0SnQCgm0GA/Ua74jnnDwVQ60lAwROuz1Q=
52 52 53e2cd303ecf8ca7c7eeebd785c34e5ed6b0f4a4 0 iD8DBQBPT/fvywK+sNU5EO8RAnfYAKCn7d0vwqIb100YfWm1F7nFD5B+FACeM02YHpQLSNsztrBCObtqcnfod7Q=
53 b9bd95e61b49c221c4cca24e6da7c946fc02f992 0 iD8DBQBPeLsIywK+sNU5EO8RAvpNAKCtKe2gitz8dYn52IRF0hFOPCR7AQCfRJL/RWCFweu2T1vH/mUOCf8SXXc=
@@ -1,64 +1,65 b''
1 1 d40cc5aacc31ed673d9b5b24f98bee78c283062c 0.4f
2 2 1c590d34bf61e2ea12c71738e5a746cd74586157 0.4e
3 3 7eca4cfa8aad5fce9a04f7d8acadcd0452e2f34e 0.4d
4 4 b4d0c3786ad3e47beacf8412157326a32b6d25a4 0.4c
5 5 f40273b0ad7b3a6d3012fd37736d0611f41ecf54 0.5
6 6 0a28dfe59f8fab54a5118c5be4f40da34a53cdb7 0.5b
7 7 12e0fdbc57a0be78f0e817fd1d170a3615cd35da 0.6
8 8 4ccf3de52989b14c3d84e1097f59e39a992e00bd 0.6b
9 9 eac9c8efcd9bd8244e72fb6821f769f450457a32 0.6c
10 10 979c049974485125e1f9357f6bbe9c1b548a64c3 0.7
11 11 3a56574f329a368d645853e0f9e09472aee62349 0.8
12 12 6a03cff2b0f5d30281e6addefe96b993582f2eac 0.8.1
13 13 35fb62a3a673d5322f6274a44ba6456e5e4b3b37 0.9
14 14 2be3001847cb18a23c403439d9e7d0ace30804e9 0.9.1
15 15 36a957364b1b89c150f2d0e60a99befe0ee08bd3 0.9.2
16 16 27230c29bfec36d5540fbe1c976810aefecfd1d2 0.9.3
17 17 fb4b6d5fe100b0886f8bc3d6731ec0e5ed5c4694 0.9.4
18 18 23889160905a1b09fffe1c07378e9fc1827606eb 0.9.5
19 19 bae2e9c838e90a393bae3973a7850280413e091a 1.0
20 20 d5cbbe2c49cee22a9fbeb9ea41daa0ac4e26b846 1.0.1
21 21 d2375bbee6d47e62ba8e415c86e83a465dc4dce9 1.0.2
22 22 2a67430f92f15ea5159c26b09ec4839a0c549a26 1.1
23 23 3773e510d433969e277b1863c317b674cbee2065 1.1.1
24 24 11a4eb81fb4f4742451591489e2797dc47903277 1.1.2
25 25 11efa41037e280d08cfb07c09ad485df30fb0ea8 1.2
26 26 02981000012e3adf40c4849bd7b3d5618f9ce82d 1.2.1
27 27 196d40e7c885fa6e95f89134809b3ec7bdbca34b 1.3
28 28 3ef6c14a1e8e83a31226f5881b7fe6095bbfa6f6 1.3.1
29 29 31ec469f9b556f11819937cf68ee53f2be927ebf 1.4
30 30 439d7ea6fe3aa4ab9ec274a68846779153789de9 1.4.1
31 31 296a0b14a68621f6990c54fdba0083f6f20935bf 1.4.2
32 32 4aa619c4c2c09907034d9824ebb1dd0e878206eb 1.4.3
33 33 ff2704a8ded37fbebd8b6eb5ec733731d725da8a 1.5
34 34 2b01dab594167bc0dd33331dbaa6dca3dca1b3aa 1.5.1
35 35 39f725929f0c48c5fb3b90c071fc3066012456ca 1.5.2
36 36 fdcf80f26604f233dc4d8f0a5ef9d7470e317e8a 1.5.3
37 37 24fe2629c6fd0c74c90bd066e77387c2b02e8437 1.5.4
38 38 f786fc4b8764cd2a5526d259cf2f94d8a66924d9 1.6
39 39 bf1774d95bde614af3956d92b20e2a0c68c5fec7 1.6.1
40 40 c00f03a4982e467fb6b6bd45908767db6df4771d 1.6.2
41 41 ff5cec76b1c5b6be9c3bb923aae8c3c6d079d6b9 1.6.3
42 42 93d8bff78c96fe7e33237b257558ee97290048a4 1.6.4
43 43 333421b9e0f96c7bc788e5667c146a58a9440a55 1.7
44 44 4438875ec01bd0fc32be92b0872eb6daeed4d44f 1.7.1
45 45 6aff4f144ad356311318b0011df0bb21f2c97429 1.7.2
46 46 e3bf16703e2601de99e563cdb3a5d50b64e6d320 1.7.3
47 47 a6c855c32ea081da3c3b8ff628f1847ff271482f 1.7.4
48 48 2b2155623ee2559caf288fd333f30475966c4525 1.7.5
49 49 2616325766e3504c8ae7c84bd15ee610901fe91d 1.8
50 50 aa1f3be38ab127280761889d2dca906ca465b5f4 1.8.1
51 51 b032bec2c0a651ca0ddecb65714bfe6770f67d70 1.8.2
52 52 3cb1e95676ad089596bd81d0937cad37d6e3b7fb 1.8.3
53 53 733af5d9f6b22387913e1d11350fb8cb7c1487dd 1.8.4
54 54 de9eb6b1da4fc522b1cab16d86ca166204c24f25 1.9
55 55 4a43e23b8c55b4566b8200bf69fe2158485a2634 1.9.1
56 56 d629f1e89021103f1753addcef6b310e4435b184 1.9.2
57 57 351a9292e430e35766c552066ed3e87c557b803b 1.9.3
58 58 384082750f2c51dc917d85a7145748330fa6ef4d 2.0-rc
59 59 41453d55b481ddfcc1dacb445179649e24ca861d 2.0
60 60 195dbd1cef0c2f9f8bcf4ea303238105f716bda3 2.0.1
61 61 6344043924497cd06d781d9014c66802285072e4 2.0.2
62 62 db33555eafeaf9df1e18950e29439eaa706d399b 2.1-rc
63 63 2aa5b51f310fb3befd26bed99c02267f5c12c734 2.1
64 64 53e2cd303ecf8ca7c7eeebd785c34e5ed6b0f4a4 2.1.1
65 b9bd95e61b49c221c4cca24e6da7c946fc02f992 2.1.2
@@ -1,24 +1,30 b''
1 1 $ "$TESTDIR/hghave" serve || exit 80
2 2
3 3 $ hg clone http://localhost:$HGPORT/ copy
4 4 abort: error: Connection refused
5 5 [255]
6 6
7 7 $ test -d copy
8 8 [1]
9 9
10 10 $ cat > dumb.py <<EOF
11 11 > import BaseHTTPServer, SimpleHTTPServer, os, signal
12 12 > def run(server_class=BaseHTTPServer.HTTPServer,
13 13 > handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
14 14 > server_address = ('localhost', int(os.environ['HGPORT']))
15 15 > httpd = server_class(server_address, handler_class)
16 > os.system("hg clone http://localhost:$HGPORT/foo copy2&")
16 > open("listening", "w")
17 17 > httpd.handle_request()
18 18 > run()
19 19 > EOF
20 20
21 $ python dumb.py
21 $ python dumb.py 2> log &
22 $ P=$!
23 $ while [ ! -f listening ]; do true; done
24 $ hg clone http://localhost:$HGPORT/foo copy2
25 abort: HTTP Error 404: * (glob)
26 [255]
27 $ wait $P
28 $ cat log
22 29 localhost - - [*] code 404, message File not found (glob)
23 30 localhost - - [*] "GET /foo?cmd=capabilities HTTP/1.1" 404 - (glob)
24 abort: HTTP Error 404: * (glob)
@@ -1,1510 +1,1515 b''
1 1 $ "$TESTDIR/hghave" execbit || exit 80
2 2
3 3 $ checkundo()
4 4 > {
5 5 > if [ -f .hg/store/undo ]; then
6 6 > echo ".hg/store/undo still exists after $1"
7 7 > fi
8 8 > }
9 9
10 10 $ echo "[extensions]" >> $HGRCPATH
11 11 $ echo "mq=" >> $HGRCPATH
12 12
13 13 $ echo "[mq]" >> $HGRCPATH
14 14 $ echo "plain=true" >> $HGRCPATH
15 15
16 16
17 17 help
18 18
19 19 $ hg help mq
20 20 mq extension - manage a stack of patches
21 21
22 22 This extension lets you work with a stack of patches in a Mercurial
23 23 repository. It manages two stacks of patches - all known patches, and applied
24 24 patches (subset of known patches).
25 25
26 26 Known patches are represented as patch files in the .hg/patches directory.
27 27 Applied patches are both patch files and changesets.
28 28
29 29 Common tasks (use "hg help command" for more details):
30 30
31 31 create new patch qnew
32 32 import existing patch qimport
33 33
34 34 print patch series qseries
35 35 print applied patches qapplied
36 36
37 37 add known patch to applied stack qpush
38 38 remove patch from applied stack qpop
39 39 refresh contents of top applied patch qrefresh
40 40
41 41 By default, mq will automatically use git patches when required to avoid
42 42 losing file mode changes, copy records, binary files or empty files creations
43 43 or deletions. This behaviour can be configured with:
44 44
45 45 [mq]
46 46 git = auto/keep/yes/no
47 47
48 48 If set to 'keep', mq will obey the [diff] section configuration while
49 49 preserving existing git patches upon qrefresh. If set to 'yes' or 'no', mq
50 50 will override the [diff] section and always generate git or regular patches,
51 51 possibly losing data in the second case.
52 52
53 53 It may be desirable for mq changesets to be kept in the secret phase (see "hg
54 54 help phases"), which can be enabled with the following setting:
55 55
56 56 [mq]
57 57 secret = True
58 58
59 59 You will by default be managing a patch queue named "patches". You can create
60 60 other, independent patch queues with the "hg qqueue" command.
61 61
62 62 list of commands:
63 63
64 64 qapplied print the patches already applied
65 65 qclone clone main and patch repository at same time
66 66 qdelete remove patches from queue
67 67 qdiff diff of the current patch and subsequent modifications
68 68 qfinish move applied patches into repository history
69 69 qfold fold the named patches into the current patch
70 70 qgoto push or pop patches until named patch is at top of stack
71 71 qguard set or print guards for a patch
72 72 qheader print the header of the topmost or specified patch
73 73 qimport import a patch or existing changeset
74 74 qnew create a new patch
75 75 qnext print the name of the next pushable patch
76 76 qpop pop the current patch off the stack
77 77 qprev print the name of the preceding applied patch
78 78 qpush push the next patch onto the stack
79 79 qqueue manage multiple patch queues
80 80 qrefresh update the current patch
81 81 qrename rename a patch
82 82 qselect set or print guarded patches to push
83 83 qseries print the entire series file
84 84 qtop print the name of the current patch
85 85 qunapplied print the patches not yet applied
86 86 strip strip changesets and all their descendants from the repository
87 87
88 88 use "hg -v help mq" to show builtin aliases and global options
89 89
90 90 $ hg init a
91 91 $ cd a
92 92 $ echo a > a
93 93 $ hg ci -Ama
94 94 adding a
95 95
96 96 $ hg clone . ../k
97 97 updating to branch default
98 98 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
99 99
100 100 $ mkdir b
101 101 $ echo z > b/z
102 102 $ hg ci -Ama
103 103 adding b/z
104 104
105 105
106 106 qinit
107 107
108 108 $ hg qinit
109 109
110 110 $ cd ..
111 111 $ hg init b
112 112
113 113
114 114 -R qinit
115 115
116 116 $ hg -R b qinit
117 117
118 118 $ hg init c
119 119
120 120
121 121 qinit -c
122 122
123 123 $ hg --cwd c qinit -c
124 124 $ hg -R c/.hg/patches st
125 125 A .hgignore
126 126 A series
127 127
128 128
129 129 qinit; qinit -c
130 130
131 131 $ hg init d
132 132 $ cd d
133 133 $ hg qinit
134 134 $ hg qinit -c
135 135
136 136 qinit -c should create both files if they don't exist
137 137
138 138 $ cat .hg/patches/.hgignore
139 139 ^\.hg
140 140 ^\.mq
141 141 syntax: glob
142 142 status
143 143 guards
144 144 $ cat .hg/patches/series
145 145 $ hg qinit -c
146 146 abort: repository $TESTTMP/d/.hg/patches already exists! (glob)
147 147 [255]
148 148 $ cd ..
149 149
150 150 $ echo '% qinit; <stuff>; qinit -c'
151 151 % qinit; <stuff>; qinit -c
152 152 $ hg init e
153 153 $ cd e
154 154 $ hg qnew A
155 155 $ checkundo qnew
156 156 $ echo foo > foo
157 157 $ hg phase -r qbase
158 158 0: draft
159 159 $ hg add foo
160 160 $ hg qrefresh
161 161 $ hg phase -r qbase
162 162 0: draft
163 163 $ hg qnew B
164 164 $ echo >> foo
165 165 $ hg qrefresh
166 166 $ echo status >> .hg/patches/.hgignore
167 167 $ echo bleh >> .hg/patches/.hgignore
168 168 $ hg qinit -c
169 169 adding .hg/patches/A (glob)
170 170 adding .hg/patches/B (glob)
171 171 $ hg -R .hg/patches status
172 172 A .hgignore
173 173 A A
174 174 A B
175 175 A series
176 176
177 177 qinit -c shouldn't touch these files if they already exist
178 178
179 179 $ cat .hg/patches/.hgignore
180 180 status
181 181 bleh
182 182 $ cat .hg/patches/series
183 183 A
184 184 B
185 185
186 186 add an untracked file
187 187
188 188 $ echo >> .hg/patches/flaf
189 189
190 190 status --mq with color (issue2096)
191 191
192 192 $ hg status --mq --config extensions.color= --config color.mode=ansi --color=always
193 193 \x1b[0;32;1mA .hgignore\x1b[0m (esc)
194 194 \x1b[0;32;1mA A\x1b[0m (esc)
195 195 \x1b[0;32;1mA B\x1b[0m (esc)
196 196 \x1b[0;32;1mA series\x1b[0m (esc)
197 197 \x1b[0;35;1;4m? flaf\x1b[0m (esc)
198 198
199 199 try the --mq option on a command provided by an extension
200 200
201 201 $ hg purge --mq --verbose --config extensions.purge=
202 202 Removing file flaf
203 203
204 204 $ cd ..
205 205
206 206 init --mq without repo
207 207
208 208 $ mkdir f
209 209 $ cd f
210 210 $ hg init --mq
211 211 abort: there is no Mercurial repository here (.hg not found)
212 212 [255]
213 213 $ cd ..
214 214
215 215 init --mq with repo path
216 216
217 217 $ hg init g
218 218 $ hg init --mq g
219 219 $ test -d g/.hg/patches/.hg
220 220
221 221 init --mq with nonexistent directory
222 222
223 223 $ hg init --mq nonexistentdir
224 224 abort: repository nonexistentdir not found!
225 225 [255]
226 226
227 227
228 228 init --mq with bundle (non "local")
229 229
230 230 $ hg -R a bundle --all a.bundle >/dev/null
231 231 $ hg init --mq a.bundle
232 232 abort: only a local queue repository may be initialized
233 233 [255]
234 234
235 235 $ cd a
236 236
237 237 $ hg qnew -m 'foo bar' test.patch
238 238
239 239 $ echo '# comment' > .hg/patches/series.tmp
240 240 $ echo >> .hg/patches/series.tmp # empty line
241 241 $ cat .hg/patches/series >> .hg/patches/series.tmp
242 242 $ mv .hg/patches/series.tmp .hg/patches/series
243 243
244 244
245 245 qrefresh
246 246
247 247 $ echo a >> a
248 248 $ hg qrefresh
249 249 $ cat .hg/patches/test.patch
250 250 foo bar
251 251
252 252 diff -r [a-f0-9]* a (re)
253 253 --- a/a\t(?P<date>.*) (re)
254 254 \+\+\+ b/a\t(?P<date2>.*) (re)
255 255 @@ -1,1 +1,2 @@
256 256 a
257 257 +a
258 258
259 259 empty qrefresh
260 260
261 261 $ hg qrefresh -X a
262 262
263 263 revision:
264 264
265 265 $ hg diff -r -2 -r -1
266 266
267 267 patch:
268 268
269 269 $ cat .hg/patches/test.patch
270 270 foo bar
271 271
272 272
273 273 working dir diff:
274 274
275 275 $ hg diff --nodates -q
276 276 --- a/a
277 277 +++ b/a
278 278 @@ -1,1 +1,2 @@
279 279 a
280 280 +a
281 281
282 282 restore things
283 283
284 284 $ hg qrefresh
285 285 $ checkundo qrefresh
286 286
287 287
288 288 qpop
289 289
290 290 $ hg qpop
291 291 popping test.patch
292 292 patch queue now empty
293 293 $ checkundo qpop
294 294
295 295
296 296 qpush with dump of tag cache
297 297 Dump the tag cache to ensure that it has exactly one head after qpush.
298 298
299 299 $ rm -f .hg/cache/tags
300 300 $ hg tags > /dev/null
301 301
302 302 .hg/cache/tags (pre qpush):
303 303
304 304 $ cat .hg/cache/tags
305 305 1 [\da-f]{40} (re)
306 306
307 307 $ hg qpush
308 308 applying test.patch
309 309 now at: test.patch
310 310 $ hg phase -r qbase
311 311 2: draft
312 312 $ hg tags > /dev/null
313 313
314 314 .hg/cache/tags (post qpush):
315 315
316 316 $ cat .hg/cache/tags
317 317 2 [\da-f]{40} (re)
318 318
319 319 $ checkundo qpush
320 320 $ cd ..
321 321
322 322
323 323 pop/push outside repo
324 324 $ hg -R a qpop
325 325 popping test.patch
326 326 patch queue now empty
327 327 $ hg -R a qpush
328 328 applying test.patch
329 329 now at: test.patch
330 330
331 331 $ cd a
332 332 $ hg qnew test2.patch
333 333
334 334 qrefresh in subdir
335 335
336 336 $ cd b
337 337 $ echo a > a
338 338 $ hg add a
339 339 $ hg qrefresh
340 340
341 341 pop/push -a in subdir
342 342
343 343 $ hg qpop -a
344 344 popping test2.patch
345 345 popping test.patch
346 346 patch queue now empty
347 347 $ hg --traceback qpush -a
348 348 applying test.patch
349 349 applying test2.patch
350 350 now at: test2.patch
351 351
352 352
353 353 setting columns & formatted tests truncating (issue1912)
354 354
355 355 $ COLUMNS=4 hg qseries --config ui.formatted=true
356 356 test.patch
357 357 test2.patch
358 358 $ COLUMNS=20 hg qseries --config ui.formatted=true -vs
359 359 0 A test.patch: f...
360 360 1 A test2.patch:
361 361 $ hg qpop
362 362 popping test2.patch
363 363 now at: test.patch
364 364 $ hg qseries -vs
365 365 0 A test.patch: foo bar
366 366 1 U test2.patch:
367 367 $ hg sum | grep mq
368 368 mq: 1 applied, 1 unapplied
369 369 $ hg qpush
370 370 applying test2.patch
371 371 now at: test2.patch
372 372 $ hg sum | grep mq
373 373 mq: 2 applied
374 374 $ hg qapplied
375 375 test.patch
376 376 test2.patch
377 377 $ hg qtop
378 378 test2.patch
379 379
380 380
381 381 prev
382 382
383 383 $ hg qapp -1
384 384 test.patch
385 385
386 386 next
387 387
388 388 $ hg qunapp -1
389 389 all patches applied
390 390 [1]
391 391
392 392 $ hg qpop
393 393 popping test2.patch
394 394 now at: test.patch
395 395
396 396 commit should fail
397 397
398 398 $ hg commit
399 399 abort: cannot commit over an applied mq patch
400 400 [255]
401 401
402 402 push should fail if draft
403 403
404 404 $ hg push ../../k
405 405 pushing to ../../k
406 406 abort: source has mq patches applied
407 407 [255]
408 408
409 409
410 410 import should fail
411 411
412 412 $ hg st .
413 413 $ echo foo >> ../a
414 414 $ hg diff > ../../import.diff
415 415 $ hg revert --no-backup ../a
416 416 $ hg import ../../import.diff
417 417 abort: cannot import over an applied patch
418 418 [255]
419 419 $ hg st
420 420
421 421 import --no-commit should succeed
422 422
423 423 $ hg import --no-commit ../../import.diff
424 424 applying ../../import.diff
425 425 $ hg st
426 426 M a
427 427 $ hg revert --no-backup ../a
428 428
429 429
430 430 qunapplied
431 431
432 432 $ hg qunapplied
433 433 test2.patch
434 434
435 435
436 436 qpush/qpop with index
437 437
438 438 $ hg qnew test1b.patch
439 439 $ echo 1b > 1b
440 440 $ hg add 1b
441 441 $ hg qrefresh
442 442 $ hg qpush 2
443 443 applying test2.patch
444 444 now at: test2.patch
445 445 $ hg qpop 0
446 446 popping test2.patch
447 447 popping test1b.patch
448 448 now at: test.patch
449 449 $ hg qpush test.patch+1
450 450 applying test1b.patch
451 451 now at: test1b.patch
452 452 $ hg qpush test.patch+2
453 453 applying test2.patch
454 454 now at: test2.patch
455 455 $ hg qpop test2.patch-1
456 456 popping test2.patch
457 457 now at: test1b.patch
458 458 $ hg qpop test2.patch-2
459 459 popping test1b.patch
460 460 now at: test.patch
461 461 $ hg qpush test1b.patch+1
462 462 applying test1b.patch
463 463 applying test2.patch
464 464 now at: test2.patch
465 465
466 466
467 467 qpush --move
468 468
469 469 $ hg qpop -a
470 470 popping test2.patch
471 471 popping test1b.patch
472 472 popping test.patch
473 473 patch queue now empty
474 474 $ hg qguard test1b.patch -- -negguard
475 475 $ hg qguard test2.patch -- +posguard
476 476 $ hg qpush --move test2.patch # can't move guarded patch
477 477 cannot push 'test2.patch' - guarded by '+posguard'
478 478 [1]
479 479 $ hg qselect posguard
480 480 number of unguarded, unapplied patches has changed from 2 to 3
481 481 $ hg qpush --move test2.patch # move to front
482 482 applying test2.patch
483 483 now at: test2.patch
484 484 $ hg qpush --move test1b.patch # negative guard unselected
485 485 applying test1b.patch
486 486 now at: test1b.patch
487 487 $ hg qpush --move test.patch # noop move
488 488 applying test.patch
489 489 now at: test.patch
490 490 $ hg qseries -v
491 491 0 A test2.patch
492 492 1 A test1b.patch
493 493 2 A test.patch
494 494 $ hg qpop -a
495 495 popping test.patch
496 496 popping test1b.patch
497 497 popping test2.patch
498 498 patch queue now empty
499 499
500 500 cleaning up
501 501
502 502 $ hg qselect --none
503 503 guards deactivated
504 504 number of unguarded, unapplied patches has changed from 3 to 2
505 505 $ hg qguard --none test1b.patch
506 506 $ hg qguard --none test2.patch
507 507 $ hg qpush --move test.patch
508 508 applying test.patch
509 509 now at: test.patch
510 510 $ hg qpush --move test1b.patch
511 511 applying test1b.patch
512 512 now at: test1b.patch
513 513 $ hg qpush --move bogus # nonexistent patch
514 514 abort: patch bogus not in series
515 515 [255]
516 516 $ hg qpush --move # no patch
517 517 abort: please specify the patch to move
518 518 [255]
519 519 $ hg qpush --move test.patch # already applied
520 520 abort: cannot push to a previous patch: test.patch
521 521 [255]
522 $ sed -i.bak '2i\# make qtip index different in series and fullseries' `hg root`/.hg/patches/series
522 $ sed '2i\
523 > # make qtip index different in series and fullseries
524 > ' `hg root`/.hg/patches/series > $TESTTMP/sedtmp
525 $ cp $TESTTMP/sedtmp `hg root`/.hg/patches/series
523 526 $ cat `hg root`/.hg/patches/series
524 527 # comment
525 528 # make qtip index different in series and fullseries
526 529
527 530 test.patch
528 531 test1b.patch
529 532 test2.patch
530 533 $ hg qpush --move test2.patch
531 534 applying test2.patch
532 535 now at: test2.patch
533 536
534 537
535 538 series after move
536 539
537 540 $ cat `hg root`/.hg/patches/series
538 541 # comment
539 542 # make qtip index different in series and fullseries
540 543
541 544 test.patch
542 545 test1b.patch
543 546 test2.patch
544 547
545 548
546 549 pop, qapplied, qunapplied
547 550
548 551 $ hg qseries -v
549 552 0 A test.patch
550 553 1 A test1b.patch
551 554 2 A test2.patch
552 555
553 556 qapplied -1 test.patch
554 557
555 558 $ hg qapplied -1 test.patch
556 559 only one patch applied
557 560 [1]
558 561
559 562 qapplied -1 test1b.patch
560 563
561 564 $ hg qapplied -1 test1b.patch
562 565 test.patch
563 566
564 567 qapplied -1 test2.patch
565 568
566 569 $ hg qapplied -1 test2.patch
567 570 test1b.patch
568 571
569 572 qapplied -1
570 573
571 574 $ hg qapplied -1
572 575 test1b.patch
573 576
574 577 qapplied
575 578
576 579 $ hg qapplied
577 580 test.patch
578 581 test1b.patch
579 582 test2.patch
580 583
581 584 qapplied test1b.patch
582 585
583 586 $ hg qapplied test1b.patch
584 587 test.patch
585 588 test1b.patch
586 589
587 590 qunapplied -1
588 591
589 592 $ hg qunapplied -1
590 593 all patches applied
591 594 [1]
592 595
593 596 qunapplied
594 597
595 598 $ hg qunapplied
596 599
597 600 popping
598 601
599 602 $ hg qpop
600 603 popping test2.patch
601 604 now at: test1b.patch
602 605
603 606 qunapplied -1
604 607
605 608 $ hg qunapplied -1
606 609 test2.patch
607 610
608 611 qunapplied
609 612
610 613 $ hg qunapplied
611 614 test2.patch
612 615
613 616 qunapplied test2.patch
614 617
615 618 $ hg qunapplied test2.patch
616 619
617 620 qunapplied -1 test2.patch
618 621
619 622 $ hg qunapplied -1 test2.patch
620 623 all patches applied
621 624 [1]
622 625
623 626 popping -a
624 627
625 628 $ hg qpop -a
626 629 popping test1b.patch
627 630 popping test.patch
628 631 patch queue now empty
629 632
630 633 qapplied
631 634
632 635 $ hg qapplied
633 636
634 637 qapplied -1
635 638
636 639 $ hg qapplied -1
637 640 no patches applied
638 641 [1]
639 642 $ hg qpush
640 643 applying test.patch
641 644 now at: test.patch
642 645
643 646
644 647 push should succeed
645 648
646 649 $ hg qpop -a
647 650 popping test.patch
648 651 patch queue now empty
649 652 $ hg push ../../k
650 653 pushing to ../../k
651 654 searching for changes
652 655 adding changesets
653 656 adding manifests
654 657 adding file changes
655 658 added 1 changesets with 1 changes to 1 files
656 659
657 660
658 661 we want to start with some patches applied
659 662
660 663 $ hg qpush -a
661 664 applying test.patch
662 665 applying test1b.patch
663 666 applying test2.patch
664 667 now at: test2.patch
665 668
666 669 % pops all patches and succeeds
667 670
668 671 $ hg qpop -a
669 672 popping test2.patch
670 673 popping test1b.patch
671 674 popping test.patch
672 675 patch queue now empty
673 676
674 677 % does nothing and succeeds
675 678
676 679 $ hg qpop -a
677 680 no patches applied
678 681
679 682 % fails - nothing else to pop
680 683
681 684 $ hg qpop
682 685 no patches applied
683 686 [1]
684 687
685 688 % pushes a patch and succeeds
686 689
687 690 $ hg qpush
688 691 applying test.patch
689 692 now at: test.patch
690 693
691 694 % pops a patch and succeeds
692 695
693 696 $ hg qpop
694 697 popping test.patch
695 698 patch queue now empty
696 699
697 700 % pushes up to test1b.patch and succeeds
698 701
699 702 $ hg qpush test1b.patch
700 703 applying test.patch
701 704 applying test1b.patch
702 705 now at: test1b.patch
703 706
704 707 % does nothing and succeeds
705 708
706 709 $ hg qpush test1b.patch
707 710 qpush: test1b.patch is already at the top
708 711
709 712 % does nothing and succeeds
710 713
711 714 $ hg qpop test1b.patch
712 715 qpop: test1b.patch is already at the top
713 716
714 717 % fails - can't push to this patch
715 718
716 719 $ hg qpush test.patch
717 720 abort: cannot push to a previous patch: test.patch
718 721 [255]
719 722
720 723 % fails - can't pop to this patch
721 724
722 725 $ hg qpop test2.patch
723 726 abort: patch test2.patch is not applied
724 727 [255]
725 728
726 729 % pops up to test.patch and succeeds
727 730
728 731 $ hg qpop test.patch
729 732 popping test1b.patch
730 733 now at: test.patch
731 734
732 735 % pushes all patches and succeeds
733 736
734 737 $ hg qpush -a
735 738 applying test1b.patch
736 739 applying test2.patch
737 740 now at: test2.patch
738 741
739 742 % does nothing and succeeds
740 743
741 744 $ hg qpush -a
742 745 all patches are currently applied
743 746
744 747 % fails - nothing else to push
745 748
746 749 $ hg qpush
747 750 patch series already fully applied
748 751 [1]
749 752
750 753 % does nothing and succeeds
751 754
752 755 $ hg qpush test2.patch
753 756 qpush: test2.patch is already at the top
754 757
755 758 strip
756 759
757 760 $ cd ../../b
758 761 $ echo x>x
759 762 $ hg ci -Ama
760 763 adding x
761 764 $ hg strip tip
762 765 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
763 766 saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
764 767 $ hg unbundle .hg/strip-backup/*
765 768 adding changesets
766 769 adding manifests
767 770 adding file changes
768 771 added 1 changesets with 1 changes to 1 files
769 772 (run 'hg update' to get a working copy)
770 773
771 774
772 775 strip with local changes, should complain
773 776
774 777 $ hg up
775 778 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
776 779 $ echo y>y
777 780 $ hg add y
778 781 $ hg strip tip
779 782 abort: local changes found
780 783 [255]
781 784
782 785 --force strip with local changes
783 786
784 787 $ hg strip -f tip
785 788 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
786 789 saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
787 790
788 791
789 792 cd b; hg qrefresh
790 793
791 794 $ hg init refresh
792 795 $ cd refresh
793 796 $ echo a > a
794 797 $ hg ci -Ama
795 798 adding a
796 799 $ hg qnew -mfoo foo
797 800 $ echo a >> a
798 801 $ hg qrefresh
799 802 $ mkdir b
800 803 $ cd b
801 804 $ echo f > f
802 805 $ hg add f
803 806 $ hg qrefresh
804 807 $ cat ../.hg/patches/foo
805 808 foo
806 809
807 810 diff -r cb9a9f314b8b a
808 811 --- a/a\t(?P<date>.*) (re)
809 812 \+\+\+ b/a\t(?P<date>.*) (re)
810 813 @@ -1,1 +1,2 @@
811 814 a
812 815 +a
813 816 diff -r cb9a9f314b8b b/f
814 817 --- /dev/null\t(?P<date>.*) (re)
815 818 \+\+\+ b/b/f\t(?P<date>.*) (re)
816 819 @@ -0,0 +1,1 @@
817 820 +f
818 821
819 822 hg qrefresh .
820 823
821 824 $ hg qrefresh .
822 825 $ cat ../.hg/patches/foo
823 826 foo
824 827
825 828 diff -r cb9a9f314b8b b/f
826 829 --- /dev/null\t(?P<date>.*) (re)
827 830 \+\+\+ b/b/f\t(?P<date>.*) (re)
828 831 @@ -0,0 +1,1 @@
829 832 +f
830 833 $ hg status
831 834 M a
832 835
833 836
834 837 qpush failure
835 838
836 839 $ cd ..
837 840 $ hg qrefresh
838 841 $ hg qnew -mbar bar
839 842 $ echo foo > foo
840 843 $ echo bar > bar
841 844 $ hg add foo bar
842 845 $ hg qrefresh
843 846 $ hg qpop -a
844 847 popping bar
845 848 popping foo
846 849 patch queue now empty
847 850 $ echo bar > foo
848 851 $ hg qpush -a
849 852 applying foo
850 853 applying bar
851 854 file foo already exists
852 855 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
853 856 patch failed, unable to continue (try -v)
854 857 patch failed, rejects left in working dir
855 858 errors during apply, please fix and refresh bar
856 859 [2]
857 860 $ hg st
858 861 ? foo
859 862 ? foo.rej
860 863
861 864
862 865 mq tags
863 866
864 867 $ hg log --template '{rev} {tags}\n' -r qparent:qtip
865 868 0 qparent
866 869 1 foo qbase
867 870 2 bar qtip tip
868 871
869 872 mq revset
870 873
871 874 $ hg log -r 'mq()' --template '{rev}\n'
872 875 1
873 876 2
874 877 $ hg help revsets | grep -i mq
875 878 "mq()"
876 879 Changesets managed by MQ.
877 880
878 881 bad node in status
879 882
880 883 $ hg qpop
881 884 popping bar
882 885 now at: foo
883 886 $ hg strip -qn tip
884 887 $ hg tip
885 888 changeset: 0:cb9a9f314b8b
886 889 tag: tip
887 890 user: test
888 891 date: Thu Jan 01 00:00:00 1970 +0000
889 892 summary: a
890 893
891 894 $ hg branches
892 895 default 0:cb9a9f314b8b
893 896 $ hg qpop
894 897 no patches applied
895 898 [1]
896 899
897 900 $ cat >>$HGRCPATH <<EOF
898 901 > [diff]
899 902 > git = True
900 903 > EOF
901 904 $ cd ..
902 905 $ hg init git
903 906 $ cd git
904 907 $ hg qinit
905 908
906 909 $ hg qnew -m'new file' new
907 910 $ echo foo > new
908 911 $ chmod +x new
909 912 $ hg add new
910 913 $ hg qrefresh
911 914 $ cat .hg/patches/new
912 915 new file
913 916
914 917 diff --git a/new b/new
915 918 new file mode 100755
916 919 --- /dev/null
917 920 +++ b/new
918 921 @@ -0,0 +1,1 @@
919 922 +foo
920 923
921 924 $ hg qnew -m'copy file' copy
922 925 $ hg cp new copy
923 926 $ hg qrefresh
924 927 $ cat .hg/patches/copy
925 928 copy file
926 929
927 930 diff --git a/new b/copy
928 931 copy from new
929 932 copy to copy
930 933
931 934 $ hg qpop
932 935 popping copy
933 936 now at: new
934 937 $ hg qpush
935 938 applying copy
936 939 now at: copy
937 940 $ hg qdiff
938 941 diff --git a/new b/copy
939 942 copy from new
940 943 copy to copy
941 944 $ cat >>$HGRCPATH <<EOF
942 945 > [diff]
943 946 > git = False
944 947 > EOF
945 948 $ hg qdiff --git
946 949 diff --git a/new b/copy
947 950 copy from new
948 951 copy to copy
949 952 $ cd ..
950 953
951 954 empty lines in status
952 955
953 956 $ hg init emptystatus
954 957 $ cd emptystatus
955 958 $ hg qinit
956 959 $ printf '\n\n' > .hg/patches/status
957 960 $ hg qser
958 961 $ cd ..
959 962
960 963 bad line in status (without ":")
961 964
962 965 $ hg init badstatus
963 966 $ cd badstatus
964 967 $ hg qinit
965 968 $ printf 'babar has no colon in this line\n' > .hg/patches/status
966 969 $ hg qser
967 970 malformated mq status line: ['babar has no colon in this line']
968 971 $ cd ..
969 972
970 973
971 974 test file addition in slow path
972 975
973 976 $ hg init slow
974 977 $ cd slow
975 978 $ hg qinit
976 979 $ echo foo > foo
977 980 $ hg add foo
978 981 $ hg ci -m 'add foo'
979 982 $ hg qnew bar
980 983 $ echo bar > bar
981 984 $ hg add bar
982 985 $ hg mv foo baz
983 986 $ hg qrefresh --git
984 987 $ hg up -C 0
985 988 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
986 989 $ echo >> foo
987 990 $ hg ci -m 'change foo'
988 991 created new head
989 992 $ hg up -C 1
990 993 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
991 994 $ hg qrefresh --git
992 995 $ cat .hg/patches/bar
993 996 diff --git a/bar b/bar
994 997 new file mode 100644
995 998 --- /dev/null
996 999 +++ b/bar
997 1000 @@ -0,0 +1,1 @@
998 1001 +bar
999 1002 diff --git a/foo b/baz
1000 1003 rename from foo
1001 1004 rename to baz
1002 1005 $ hg log -v --template '{rev} {file_copies}\n' -r .
1003 1006 2 baz (foo)
1004 1007 $ hg qrefresh --git
1005 1008 $ cat .hg/patches/bar
1006 1009 diff --git a/bar b/bar
1007 1010 new file mode 100644
1008 1011 --- /dev/null
1009 1012 +++ b/bar
1010 1013 @@ -0,0 +1,1 @@
1011 1014 +bar
1012 1015 diff --git a/foo b/baz
1013 1016 rename from foo
1014 1017 rename to baz
1015 1018 $ hg log -v --template '{rev} {file_copies}\n' -r .
1016 1019 2 baz (foo)
1017 1020 $ hg qrefresh
1018 1021 $ grep 'diff --git' .hg/patches/bar
1019 1022 diff --git a/bar b/bar
1020 1023 diff --git a/foo b/baz
1021 1024
1022 1025
1023 1026 test file move chains in the slow path
1024 1027
1025 1028 $ hg up -C 1
1026 1029 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
1027 1030 $ echo >> foo
1028 1031 $ hg ci -m 'change foo again'
1029 1032 $ hg up -C 2
1030 1033 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1031 1034 $ hg mv bar quux
1032 1035 $ hg mv baz bleh
1033 1036 $ hg qrefresh --git
1034 1037 $ cat .hg/patches/bar
1035 1038 diff --git a/foo b/bleh
1036 1039 rename from foo
1037 1040 rename to bleh
1038 1041 diff --git a/quux b/quux
1039 1042 new file mode 100644
1040 1043 --- /dev/null
1041 1044 +++ b/quux
1042 1045 @@ -0,0 +1,1 @@
1043 1046 +bar
1044 1047 $ hg log -v --template '{rev} {file_copies}\n' -r .
1045 1048 3 bleh (foo)
1046 1049 $ hg mv quux fred
1047 1050 $ hg mv bleh barney
1048 1051 $ hg qrefresh --git
1049 1052 $ cat .hg/patches/bar
1050 1053 diff --git a/foo b/barney
1051 1054 rename from foo
1052 1055 rename to barney
1053 1056 diff --git a/fred b/fred
1054 1057 new file mode 100644
1055 1058 --- /dev/null
1056 1059 +++ b/fred
1057 1060 @@ -0,0 +1,1 @@
1058 1061 +bar
1059 1062 $ hg log -v --template '{rev} {file_copies}\n' -r .
1060 1063 3 barney (foo)
1061 1064
1062 1065
1063 1066 refresh omitting an added file
1064 1067
1065 1068 $ hg qnew baz
1066 1069 $ echo newfile > newfile
1067 1070 $ hg add newfile
1068 1071 $ hg qrefresh
1069 1072 $ hg st -A newfile
1070 1073 C newfile
1071 1074 $ hg qrefresh -X newfile
1072 1075 $ hg st -A newfile
1073 1076 A newfile
1074 1077 $ hg revert newfile
1075 1078 $ rm newfile
1076 1079 $ hg qpop
1077 1080 popping baz
1078 1081 now at: bar
1079 1082 $ hg qdel baz
1080 1083
1081 1084
1082 1085 create a git patch
1083 1086
1084 1087 $ echo a > alexander
1085 1088 $ hg add alexander
1086 1089 $ hg qnew -f --git addalexander
1087 1090 $ grep diff .hg/patches/addalexander
1088 1091 diff --git a/alexander b/alexander
1089 1092
1090 1093
1091 1094 create a git binary patch
1092 1095
1093 1096 $ cat > writebin.py <<EOF
1094 1097 > import sys
1095 1098 > path = sys.argv[1]
1096 1099 > open(path, 'wb').write('BIN\x00ARY')
1097 1100 > EOF
1098 1101 $ python writebin.py bucephalus
1099 1102
1100 1103 $ python "$TESTDIR/md5sum.py" bucephalus
1101 1104 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
1102 1105 $ hg add bucephalus
1103 1106 $ hg qnew -f --git addbucephalus
1104 1107 $ grep diff .hg/patches/addbucephalus
1105 1108 diff --git a/bucephalus b/bucephalus
1106 1109
1107 1110
1108 1111 check binary patches can be popped and pushed
1109 1112
1110 1113 $ hg qpop
1111 1114 popping addbucephalus
1112 1115 now at: addalexander
1113 1116 $ test -f bucephalus && echo % bucephalus should not be there
1114 1117 [1]
1115 1118 $ hg qpush
1116 1119 applying addbucephalus
1117 1120 now at: addbucephalus
1118 1121 $ test -f bucephalus
1119 1122 $ python "$TESTDIR/md5sum.py" bucephalus
1120 1123 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
1121 1124
1122 1125
1123 1126
1124 1127 strip again
1125 1128
1126 1129 $ cd ..
1127 1130 $ hg init strip
1128 1131 $ cd strip
1129 1132 $ touch foo
1130 1133 $ hg add foo
1131 1134 $ hg ci -m 'add foo'
1132 1135 $ echo >> foo
1133 1136 $ hg ci -m 'change foo 1'
1134 1137 $ hg up -C 0
1135 1138 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1136 1139 $ echo 1 >> foo
1137 1140 $ hg ci -m 'change foo 2'
1138 1141 created new head
1139 1142 $ HGMERGE=true hg merge
1140 1143 merging foo
1141 1144 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
1142 1145 (branch merge, don't forget to commit)
1143 1146 $ hg ci -m merge
1144 1147 $ hg log
1145 1148 changeset: 3:99615015637b
1146 1149 tag: tip
1147 1150 parent: 2:20cbbe65cff7
1148 1151 parent: 1:d2871fc282d4
1149 1152 user: test
1150 1153 date: Thu Jan 01 00:00:00 1970 +0000
1151 1154 summary: merge
1152 1155
1153 1156 changeset: 2:20cbbe65cff7
1154 1157 parent: 0:53245c60e682
1155 1158 user: test
1156 1159 date: Thu Jan 01 00:00:00 1970 +0000
1157 1160 summary: change foo 2
1158 1161
1159 1162 changeset: 1:d2871fc282d4
1160 1163 user: test
1161 1164 date: Thu Jan 01 00:00:00 1970 +0000
1162 1165 summary: change foo 1
1163 1166
1164 1167 changeset: 0:53245c60e682
1165 1168 user: test
1166 1169 date: Thu Jan 01 00:00:00 1970 +0000
1167 1170 summary: add foo
1168 1171
1169 1172 $ hg strip 1
1170 1173 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1171 1174 saved backup bundle to $TESTTMP/b/strip/.hg/strip-backup/*-backup.hg (glob)
1172 1175 $ checkundo strip
1173 1176 $ hg log
1174 1177 changeset: 1:20cbbe65cff7
1175 1178 tag: tip
1176 1179 user: test
1177 1180 date: Thu Jan 01 00:00:00 1970 +0000
1178 1181 summary: change foo 2
1179 1182
1180 1183 changeset: 0:53245c60e682
1181 1184 user: test
1182 1185 date: Thu Jan 01 00:00:00 1970 +0000
1183 1186 summary: add foo
1184 1187
1185 1188 $ cd ..
1186 1189
1187 1190
1188 1191 qclone
1189 1192
1190 1193 $ qlog()
1191 1194 > {
1192 1195 > echo 'main repo:'
1193 1196 > hg log --template ' rev {rev}: {desc}\n'
1194 1197 > echo 'patch repo:'
1195 1198 > hg -R .hg/patches log --template ' rev {rev}: {desc}\n'
1196 1199 > }
1197 1200 $ hg init qclonesource
1198 1201 $ cd qclonesource
1199 1202 $ echo foo > foo
1200 1203 $ hg add foo
1201 1204 $ hg ci -m 'add foo'
1202 1205 $ hg qinit
1203 1206 $ hg qnew patch1
1204 1207 $ echo bar >> foo
1205 1208 $ hg qrefresh -m 'change foo'
1206 1209 $ cd ..
1207 1210
1208 1211
1209 1212 repo with unversioned patch dir
1210 1213
1211 1214 $ hg qclone qclonesource failure
1212 1215 abort: versioned patch repository not found (see init --mq)
1213 1216 [255]
1214 1217
1215 1218 $ cd qclonesource
1216 1219 $ hg qinit -c
1217 1220 adding .hg/patches/patch1 (glob)
1218 1221 $ hg qci -m checkpoint
1219 1222 $ qlog
1220 1223 main repo:
1221 1224 rev 1: change foo
1222 1225 rev 0: add foo
1223 1226 patch repo:
1224 1227 rev 0: checkpoint
1225 1228 $ cd ..
1226 1229
1227 1230
1228 1231 repo with patches applied
1229 1232
1230 1233 $ hg qclone qclonesource qclonedest
1231 1234 updating to branch default
1232 1235 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1233 1236 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1234 1237 $ cd qclonedest
1235 1238 $ qlog
1236 1239 main repo:
1237 1240 rev 0: add foo
1238 1241 patch repo:
1239 1242 rev 0: checkpoint
1240 1243 $ cd ..
1241 1244
1242 1245
1243 1246 repo with patches unapplied
1244 1247
1245 1248 $ cd qclonesource
1246 1249 $ hg qpop -a
1247 1250 popping patch1
1248 1251 patch queue now empty
1249 1252 $ qlog
1250 1253 main repo:
1251 1254 rev 0: add foo
1252 1255 patch repo:
1253 1256 rev 0: checkpoint
1254 1257 $ cd ..
1255 1258 $ hg qclone qclonesource qclonedest2
1256 1259 updating to branch default
1257 1260 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1258 1261 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1259 1262 $ cd qclonedest2
1260 1263 $ qlog
1261 1264 main repo:
1262 1265 rev 0: add foo
1263 1266 patch repo:
1264 1267 rev 0: checkpoint
1265 1268 $ cd ..
1266 1269
1267 1270
1268 1271 Issue1033: test applying on an empty file
1269 1272
1270 1273 $ hg init empty
1271 1274 $ cd empty
1272 1275 $ touch a
1273 1276 $ hg ci -Am addempty
1274 1277 adding a
1275 1278 $ echo a > a
1276 1279 $ hg qnew -f -e changea
1277 1280 $ hg qpop
1278 1281 popping changea
1279 1282 patch queue now empty
1280 1283 $ hg qpush
1281 1284 applying changea
1282 1285 now at: changea
1283 1286 $ cd ..
1284 1287
1285 1288 test qpush with --force, issue1087
1286 1289
1287 1290 $ hg init forcepush
1288 1291 $ cd forcepush
1289 1292 $ echo hello > hello.txt
1290 1293 $ echo bye > bye.txt
1291 1294 $ hg ci -Ama
1292 1295 adding bye.txt
1293 1296 adding hello.txt
1294 1297 $ hg qnew -d '0 0' empty
1295 1298 $ hg qpop
1296 1299 popping empty
1297 1300 patch queue now empty
1298 1301 $ echo world >> hello.txt
1299 1302
1300 1303
1301 1304 qpush should fail, local changes
1302 1305
1303 1306 $ hg qpush
1304 1307 abort: local changes found
1305 1308 [255]
1306 1309
1307 1310
1308 1311 apply force, should not discard changes with empty patch
1309 1312
1310 1313 $ hg qpush -f
1311 1314 applying empty
1312 1315 patch empty is empty
1313 1316 now at: empty
1314 1317 $ hg diff --config diff.nodates=True
1315 1318 diff -r d58265112590 hello.txt
1316 1319 --- a/hello.txt
1317 1320 +++ b/hello.txt
1318 1321 @@ -1,1 +1,2 @@
1319 1322 hello
1320 1323 +world
1321 1324 $ hg qdiff --config diff.nodates=True
1322 1325 diff -r 9ecee4f634e3 hello.txt
1323 1326 --- a/hello.txt
1324 1327 +++ b/hello.txt
1325 1328 @@ -1,1 +1,2 @@
1326 1329 hello
1327 1330 +world
1328 1331 $ hg log -l1 -p
1329 1332 changeset: 1:d58265112590
1330 1333 tag: empty
1331 1334 tag: qbase
1332 1335 tag: qtip
1333 1336 tag: tip
1334 1337 user: test
1335 1338 date: Thu Jan 01 00:00:00 1970 +0000
1336 1339 summary: imported patch empty
1337 1340
1338 1341
1339 1342 $ hg qref -d '0 0'
1340 1343 $ hg qpop
1341 1344 popping empty
1342 1345 patch queue now empty
1343 1346 $ echo universe >> hello.txt
1344 1347 $ echo universe >> bye.txt
1345 1348
1346 1349
1347 1350 qpush should fail, local changes
1348 1351
1349 1352 $ hg qpush
1350 1353 abort: local changes found
1351 1354 [255]
1352 1355
1353 1356
1354 1357 apply force, should discard changes in hello, but not bye
1355 1358
1356 1359 $ hg qpush -f
1357 1360 applying empty
1358 1361 now at: empty
1359 1362 $ hg st
1360 1363 M bye.txt
1361 1364 $ hg diff --config diff.nodates=True
1362 1365 diff -r ba252371dbc1 bye.txt
1363 1366 --- a/bye.txt
1364 1367 +++ b/bye.txt
1365 1368 @@ -1,1 +1,2 @@
1366 1369 bye
1367 1370 +universe
1368 1371 $ hg qdiff --config diff.nodates=True
1369 1372 diff -r 9ecee4f634e3 bye.txt
1370 1373 --- a/bye.txt
1371 1374 +++ b/bye.txt
1372 1375 @@ -1,1 +1,2 @@
1373 1376 bye
1374 1377 +universe
1375 1378 diff -r 9ecee4f634e3 hello.txt
1376 1379 --- a/hello.txt
1377 1380 +++ b/hello.txt
1378 1381 @@ -1,1 +1,3 @@
1379 1382 hello
1380 1383 +world
1381 1384 +universe
1382 1385
1383 1386
1384 1387 test popping revisions not in working dir ancestry
1385 1388
1386 1389 $ hg qseries -v
1387 1390 0 A empty
1388 1391 $ hg up qparent
1389 1392 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1390 1393 $ hg qpop
1391 1394 popping empty
1392 1395 patch queue now empty
1393 1396
1394 1397 $ cd ..
1395 1398 $ hg init deletion-order
1396 1399 $ cd deletion-order
1397 1400
1398 1401 $ touch a
1399 1402 $ hg ci -Aqm0
1400 1403
1401 1404 $ hg qnew rename-dir
1402 1405 $ hg rm a
1403 1406 $ hg qrefresh
1404 1407
1405 1408 $ mkdir a b
1406 1409 $ touch a/a b/b
1407 1410 $ hg add -q a b
1408 1411 $ hg qrefresh
1409 1412
1410 1413
1411 1414 test popping must remove files added in subdirectories first
1412 1415
1413 1416 $ hg qpop
1414 1417 popping rename-dir
1415 1418 patch queue now empty
1416 1419 $ cd ..
1417 1420
1418 1421
1419 1422 test case preservation through patch pushing especially on case
1420 1423 insensitive filesystem
1421 1424
1422 1425 $ hg init casepreserve
1423 1426 $ cd casepreserve
1424 1427
1425 1428 $ hg qnew add-file1
1426 1429 $ echo a > TeXtFiLe.TxT
1427 1430 $ hg add TeXtFiLe.TxT
1428 1431 $ hg qrefresh
1429 1432
1430 1433 $ hg qnew add-file2
1431 1434 $ echo b > AnOtHeRFiLe.TxT
1432 1435 $ hg add AnOtHeRFiLe.TxT
1433 1436 $ hg qrefresh
1434 1437
1435 1438 $ hg qnew modify-file
1436 1439 $ echo c >> AnOtHeRFiLe.TxT
1437 1440 $ hg qrefresh
1438 1441
1439 1442 $ hg qapplied
1440 1443 add-file1
1441 1444 add-file2
1442 1445 modify-file
1443 1446 $ hg qpop -a
1444 1447 popping modify-file
1445 1448 popping add-file2
1446 1449 popping add-file1
1447 1450 patch queue now empty
1448 1451
1449 1452 this qpush causes problems below, if case preservation on case
1450 1453 insensitive filesystem is not enough:
1451 1454 (1) unexpected "adding ..." messages are shown
1452 1455 (2) patching fails in modification of (1) files
1453 1456
1454 1457 $ hg qpush -a
1455 1458 applying add-file1
1456 1459 applying add-file2
1457 1460 applying modify-file
1458 1461 now at: modify-file
1459 1462
1460 1463 Proper phase default with mq:
1461 1464
1462 1465 1. mq.secret=false
1463 1466
1464 1467 $ rm .hg/store/phaseroots
1465 1468 $ hg phase 'qparent::'
1466 1469 0: draft
1467 1470 1: draft
1468 1471 2: draft
1469 1472 $ echo '[mq]' >> $HGRCPATH
1470 1473 $ echo 'secret=true' >> $HGRCPATH
1471 1474 $ rm -f .hg/store/phaseroots
1472 1475 $ hg phase 'qparent::'
1473 1476 0: secret
1474 1477 1: secret
1475 1478 2: secret
1476 1479
1477 1480 Test that qfinish change phase when mq.secret=true
1478 1481
1479 1482 $ hg qfinish qbase
1480 1483 patch add-file1 finalized without changeset message
1481 1484 $ hg phase 'all()'
1482 1485 0: draft
1483 1486 1: secret
1484 1487 2: secret
1485 1488
1486 1489 Test that qfinish respect phases.new-commit setting
1487 1490
1488 1491 $ echo '[phases]' >> $HGRCPATH
1489 1492 $ echo 'new-commit=secret' >> $HGRCPATH
1490 1493 $ hg qfinish qbase
1491 1494 patch add-file2 finalized without changeset message
1492 1495 $ hg phase 'all()'
1493 1496 0: draft
1494 1497 1: secret
1495 1498 2: secret
1496 1499
1497 1500 (restore env for next test)
1498 1501
1499 $ sed -i.bak -e 's/new-commit=secret//' $HGRCPATH
1502 $ sed -e 's/new-commit=secret//' $HGRCPATH > $TESTTMP/sedtmp
1503 $ cp $TESTTMP/sedtmp $HGRCPATH
1500 1504 $ hg qimport -r 1 --name add-file2
1501 1505
1502 1506 Test that qfinish preserve phase when mq.secret=false
1503 1507
1504 $ sed -i.bak -e 's/secret=true/secret=false/' $HGRCPATH
1508 $ sed -e 's/secret=true/secret=false/' $HGRCPATH > $TESTTMP/sedtmp
1509 $ cp $TESTTMP/sedtmp $HGRCPATH
1505 1510 $ hg qfinish qbase
1506 1511 patch add-file2 finalized without changeset message
1507 1512 $ hg phase 'all()'
1508 1513 0: draft
1509 1514 1: secret
1510 1515 2: secret
General Comments 0
You need to be logged in to leave comments. Login now