##// END OF EJS Templates
patchbomb: make --outgoing ignore secret changesets...
Patrick Mezard -
r17176:2ab165cf default
parent child Browse files
Show More
@@ -276,15 +276,17 b' def patchbomb(ui, repo, *revs, **opts):'
276 276 dest = ui.expandpath(dest or 'default-push', dest or 'default')
277 277 dest, branches = hg.parseurl(dest)
278 278 revs, checkout = hg.addbranchrevs(repo, repo, branches, revs)
279 if revs:
280 revs = [repo.lookup(rev) for rev in revs]
279 281 other = hg.peer(repo, opts, dest)
280 282 ui.status(_('comparing with %s\n') % util.hidepassword(dest))
281 common, _anyinc, _heads = discovery.findcommonincoming(repo, other)
282 nodes = revs and map(repo.lookup, revs) or revs
283 o = repo.changelog.findmissing(common, heads=nodes)
284 if not o:
283 repo.ui.pushbuffer()
284 outgoing = discovery.findcommonoutgoing(repo, other, onlyheads=revs)
285 repo.ui.popbuffer()
286 if not outgoing.missing:
285 287 ui.status(_("no changes found\n"))
286 288 return []
287 return [str(repo.changelog.rev(r)) for r in o]
289 return [str(repo.changelog.rev(r)) for r in outgoing.missing]
288 290
289 291 def getpatches(revs):
290 292 for r in scmutil.revrange(repo, revs):
@@ -2077,22 +2077,47 b' test outgoing:'
2077 2077 $ echo d > d
2078 2078 $ hg add d
2079 2079 $ hg ci -md -d '4 0'
2080 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t
2080 $ echo d >> d
2081 $ hg ci -mdd -d '5 0'
2082 $ hg --config extensions.graphlog= glog --template "{rev}:{node|short} {desc|firstline}\n"
2083 @ 10:3b6f1ec9dde9 dd
2084 |
2085 o 9:2f9fa9b998c5 d
2086 |
2087 | o 8:7aead2484924 Added tag two, two.diff for changeset ff2c9fa2018b
2088 | |
2089 | o 7:045ca29b1ea2 Added tag one, one.patch for changeset 97d72e5f12c7
2090 | |
2091 | o 6:5d5ef15dfe5e Added tag zero, zero.foo for changeset 8580ff50825a
2092 | |
2093 | o 5:240fb913fc1b isolatin 8-bit encoding
2094 | |
2095 | o 4:a2ea8fc83dd8 long line
2096 | |
2097 | o 3:909a00e13e9d utf-8 content
2098 | |
2099 | o 2:ff2c9fa2018b c
2100 |/
2101 o 1:97d72e5f12c7 b
2102 |
2103 o 0:8580ff50825a a
2104
2105 $ hg phase --force --secret -r 10
2106 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t -r 6 -r 10
2081 2107 comparing with ../t
2082 searching for changes
2083 2108 From [test]: test
2084 this patch series consists of 8 patches.
2109 this patch series consists of 6 patches.
2085 2110
2086 2111
2087 2112 Write the introductory message for the patch series.
2088 2113
2089 2114 Cc:
2090 2115
2091 displaying [PATCH 0 of 8] test ...
2116 displaying [PATCH 0 of 6] test ...
2092 2117 Content-Type: text/plain; charset="us-ascii"
2093 2118 MIME-Version: 1.0
2094 2119 Content-Transfer-Encoding: 7bit
2095 Subject: [PATCH 0 of 8] test
2120 Subject: [PATCH 0 of 6] test
2096 2121 Message-Id: <patchbomb.315532860@*> (glob)
2097 2122 User-Agent: Mercurial-patchbomb/* (glob)
2098 2123 Date: Tue, 01 Jan 1980 00:01:00 +0000
@@ -2100,11 +2125,11 b' test outgoing:'
2100 2125 To: foo
2101 2126
2102 2127
2103 displaying [PATCH 1 of 8] c ...
2128 displaying [PATCH 1 of 6] c ...
2104 2129 Content-Type: text/plain; charset="us-ascii"
2105 2130 MIME-Version: 1.0
2106 2131 Content-Transfer-Encoding: 7bit
2107 Subject: [PATCH 1 of 8] c
2132 Subject: [PATCH 1 of 6] c
2108 2133 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
2109 2134 Message-Id: <ff2c9fa2018b15fa74b3.315532861@*> (glob)
2110 2135 In-Reply-To: <patchbomb.315532860@*> (glob)
@@ -2127,11 +2152,11 b' test outgoing:'
2127 2152 @@ -0,0 +1,1 @@
2128 2153 +c
2129 2154
2130 displaying [PATCH 2 of 8] utf-8 content ...
2155 displaying [PATCH 2 of 6] utf-8 content ...
2131 2156 Content-Type: text/plain; charset="us-ascii"
2132 2157 MIME-Version: 1.0
2133 2158 Content-Transfer-Encoding: 8bit
2134 Subject: [PATCH 2 of 8] utf-8 content
2159 Subject: [PATCH 2 of 6] utf-8 content
2135 2160 X-Mercurial-Node: 909a00e13e9d78b575aeee23dddbada46d5a143f
2136 2161 Message-Id: <909a00e13e9d78b575ae.315532862@*> (glob)
2137 2162 In-Reply-To: <patchbomb.315532860@*> (glob)
@@ -2161,11 +2186,11 b' test outgoing:'
2161 2186 @@ -0,0 +1,1 @@
2162 2187 +h\xc3\xb6mma! (esc)
2163 2188
2164 displaying [PATCH 3 of 8] long line ...
2189 displaying [PATCH 3 of 6] long line ...
2165 2190 Content-Type: text/plain; charset="us-ascii"
2166 2191 MIME-Version: 1.0
2167 2192 Content-Transfer-Encoding: quoted-printable
2168 Subject: [PATCH 3 of 8] long line
2193 Subject: [PATCH 3 of 6] long line
2169 2194 X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
2170 2195 Message-Id: <a2ea8fc83dd8b93cfd86.315532863@*> (glob)
2171 2196 In-Reply-To: <patchbomb.315532860@*> (glob)
@@ -2204,11 +2229,11 b' test outgoing:'
2204 2229 +
2205 2230 +bar
2206 2231
2207 displaying [PATCH 4 of 8] isolatin 8-bit encoding ...
2232 displaying [PATCH 4 of 6] isolatin 8-bit encoding ...
2208 2233 Content-Type: text/plain; charset="us-ascii"
2209 2234 MIME-Version: 1.0
2210 2235 Content-Transfer-Encoding: 8bit
2211 Subject: [PATCH 4 of 8] isolatin 8-bit encoding
2236 Subject: [PATCH 4 of 6] isolatin 8-bit encoding
2212 2237 X-Mercurial-Node: 240fb913fc1b7ff15ddb9f33e73d82bf5277c720
2213 2238 Message-Id: <240fb913fc1b7ff15ddb.315532864@*> (glob)
2214 2239 In-Reply-To: <patchbomb.315532860@*> (glob)
@@ -2231,11 +2256,11 b' test outgoing:'
2231 2256 @@ -0,0 +1,1 @@
2232 2257 +h\xf6mma! (esc)
2233 2258
2234 displaying [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a ...
2259 displaying [PATCH 5 of 6] Added tag zero, zero.foo for changeset 8580ff50825a ...
2235 2260 Content-Type: text/plain; charset="us-ascii"
2236 2261 MIME-Version: 1.0
2237 2262 Content-Transfer-Encoding: 7bit
2238 Subject: [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a
2263 Subject: [PATCH 5 of 6] Added tag zero, zero.foo for changeset 8580ff50825a
2239 2264 X-Mercurial-Node: 5d5ef15dfe5e7bd3a4ee154b5fff76c7945ec433
2240 2265 Message-Id: <5d5ef15dfe5e7bd3a4ee.315532865@*> (glob)
2241 2266 In-Reply-To: <patchbomb.315532860@*> (glob)
@@ -2259,13 +2284,13 b' test outgoing:'
2259 2284 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero
2260 2285 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
2261 2286
2262 displaying [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7 ...
2287 displaying [PATCH 6 of 6] d ...
2263 2288 Content-Type: text/plain; charset="us-ascii"
2264 2289 MIME-Version: 1.0
2265 2290 Content-Transfer-Encoding: 7bit
2266 Subject: [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7
2267 X-Mercurial-Node: 045ca29b1ea20e4940411e695e20e521f2f0f98e
2268 Message-Id: <045ca29b1ea20e494041.315532866@*> (glob)
2291 Subject: [PATCH 6 of 6] d
2292 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2293 Message-Id: <2f9fa9b998c5fe3ac2bd.315532866@*> (glob)
2269 2294 In-Reply-To: <patchbomb.315532860@*> (glob)
2270 2295 References: <patchbomb.315532860@*> (glob)
2271 2296 User-Agent: Mercurial-patchbomb/* (glob)
@@ -2275,67 +2300,6 b' test outgoing:'
2275 2300
2276 2301 # HG changeset patch
2277 2302 # User test
2278 # Date 0 0
2279 # Node ID 045ca29b1ea20e4940411e695e20e521f2f0f98e
2280 # Parent 5d5ef15dfe5e7bd3a4ee154b5fff76c7945ec433
2281 Added tag one, one.patch for changeset 97d72e5f12c7
2282
2283 diff -r 5d5ef15dfe5e -r 045ca29b1ea2 .hgtags
2284 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
2285 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2286 @@ -1,2 +1,4 @@
2287 8580ff50825a50c8f716709acdf8de0deddcd6ab zero
2288 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
2289 +97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
2290 +97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
2291
2292 displaying [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b ...
2293 Content-Type: text/plain; charset="us-ascii"
2294 MIME-Version: 1.0
2295 Content-Transfer-Encoding: 7bit
2296 Subject: [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b
2297 X-Mercurial-Node: 7aead2484924c445ad8ce2613df91f52f9e502ed
2298 Message-Id: <7aead2484924c445ad8c.315532867@*> (glob)
2299 In-Reply-To: <patchbomb.315532860@*> (glob)
2300 References: <patchbomb.315532860@*> (glob)
2301 User-Agent: Mercurial-patchbomb/* (glob)
2302 Date: Tue, 01 Jan 1980 00:01:07 +0000
2303 From: test
2304 To: foo
2305
2306 # HG changeset patch
2307 # User test
2308 # Date 0 0
2309 # Node ID 7aead2484924c445ad8ce2613df91f52f9e502ed
2310 # Parent 045ca29b1ea20e4940411e695e20e521f2f0f98e
2311 Added tag two, two.diff for changeset ff2c9fa2018b
2312
2313 diff -r 045ca29b1ea2 -r 7aead2484924 .hgtags
2314 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
2315 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2316 @@ -2,3 +2,5 @@
2317 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
2318 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
2319 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
2320 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
2321 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
2322
2323 displaying [PATCH 8 of 8] d ...
2324 Content-Type: text/plain; charset="us-ascii"
2325 MIME-Version: 1.0
2326 Content-Transfer-Encoding: 7bit
2327 Subject: [PATCH 8 of 8] d
2328 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2329 Message-Id: <2f9fa9b998c5fe3ac2bd.315532868@*> (glob)
2330 In-Reply-To: <patchbomb.315532860@*> (glob)
2331 References: <patchbomb.315532860@*> (glob)
2332 User-Agent: Mercurial-patchbomb/* (glob)
2333 Date: Tue, 01 Jan 1980 00:01:08 +0000
2334 From: test
2335 To: foo
2336
2337 # HG changeset patch
2338 # User test
2339 2303 # Date 4 0
2340 2304 # Branch test
2341 2305 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
@@ -2352,7 +2316,6 b' test outgoing:'
2352 2316 dest#branch URIs:
2353 2317 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test
2354 2318 comparing with ../t
2355 searching for changes
2356 2319 From [test]: test
2357 2320 this patch series consists of 1 patches.
2358 2321
General Comments 0
You need to be logged in to leave comments. Login now