Show More
@@ -2672,7 +2672,13 b' def outgoing(ui, repo, dest=None, **opts' | |||||
2672 |
|
2672 | |||
2673 | Returns 0 if there are outgoing changes, 1 otherwise. |
|
2673 | Returns 0 if there are outgoing changes, 1 otherwise. | |
2674 | """ |
|
2674 | """ | |
2675 |
ret |
|
2675 | ret = hg.outgoing(ui, repo, dest, opts) | |
|
2676 | if opts.get('subrepos'): | |||
|
2677 | ctx = repo[None] | |||
|
2678 | for subpath in sorted(ctx.substate): | |||
|
2679 | sub = ctx.sub(subpath) | |||
|
2680 | ret = min(ret, sub.outgoing(ui, dest, opts)) | |||
|
2681 | return ret | |||
2676 |
|
2682 | |||
2677 | def parents(ui, repo, file_=None, **opts): |
|
2683 | def parents(ui, repo, file_=None, **opts): | |
2678 | """show the parents of the working directory or revision |
|
2684 | """show the parents of the working directory or revision | |
@@ -4311,7 +4317,7 b' table = {' | |||||
4311 | ('n', 'newest-first', None, _('show newest record first')), |
|
4317 | ('n', 'newest-first', None, _('show newest record first')), | |
4312 | ('b', 'branch', [], |
|
4318 | ('b', 'branch', [], | |
4313 | _('a specific branch you would like to push'), _('BRANCH')), |
|
4319 | _('a specific branch you would like to push'), _('BRANCH')), | |
4314 | ] + logopts + remoteopts, |
|
4320 | ] + logopts + remoteopts + subrepoopts, | |
4315 | _('[-M] [-p] [-n] [-f] [-r REV]... [DEST]')), |
|
4321 | _('[-M] [-p] [-n] [-f] [-r REV]... [DEST]')), | |
4316 | "parents": |
|
4322 | "parents": | |
4317 | (parents, |
|
4323 | (parents, |
@@ -264,6 +264,9 b' class abstractsubrepo(object):' | |||||
264 | def diff(self, diffopts, node2, match, prefix, **opts): |
|
264 | def diff(self, diffopts, node2, match, prefix, **opts): | |
265 | pass |
|
265 | pass | |
266 |
|
266 | |||
|
267 | def outgoing(self, ui, dest, opts): | |||
|
268 | return 1 | |||
|
269 | ||||
267 | class hgsubrepo(abstractsubrepo): |
|
270 | class hgsubrepo(abstractsubrepo): | |
268 | def __init__(self, ctx, path, state): |
|
271 | def __init__(self, ctx, path, state): | |
269 | self._path = path |
|
272 | self._path = path | |
@@ -394,6 +397,9 b' class hgsubrepo(abstractsubrepo):' | |||||
394 | other = hg.repository(self._repo.ui, dsturl) |
|
397 | other = hg.repository(self._repo.ui, dsturl) | |
395 | return self._repo.push(other, force) |
|
398 | return self._repo.push(other, force) | |
396 |
|
399 | |||
|
400 | def outgoing(self, ui, dest, opts): | |||
|
401 | return hg.outgoing(ui, self._repo, _abssource(self._repo, True), opts) | |||
|
402 | ||||
397 | class svnsubrepo(abstractsubrepo): |
|
403 | class svnsubrepo(abstractsubrepo): | |
398 | def __init__(self, ctx, path, state): |
|
404 | def __init__(self, ctx, path, state): | |
399 | self._path = path |
|
405 | self._path = path |
@@ -230,7 +230,7 b' Show all commands + options' | |||||
230 | incoming: force, newest-first, bundle, rev, branch, patch, git, limit, no-merges, stat, style, template, ssh, remotecmd |
|
230 | incoming: force, newest-first, bundle, rev, branch, patch, git, limit, no-merges, stat, style, template, ssh, remotecmd | |
231 | locate: rev, print0, fullpath, include, exclude |
|
231 | locate: rev, print0, fullpath, include, exclude | |
232 | manifest: rev |
|
232 | manifest: rev | |
233 | outgoing: force, rev, newest-first, branch, patch, git, limit, no-merges, stat, style, template, ssh, remotecmd |
|
233 | outgoing: force, rev, newest-first, branch, patch, git, limit, no-merges, stat, style, template, ssh, remotecmd, subrepos | |
234 | parents: rev, style, template |
|
234 | parents: rev, style, template | |
235 | paths: |
|
235 | paths: | |
236 | recover: |
|
236 | recover: |
@@ -6,7 +6,8 b' Make status look into subrepositories by' | |||||
6 |
|
6 | |||
7 | Create test repository: |
|
7 | Create test repository: | |
8 |
|
8 | |||
9 | $ hg init |
|
9 | $ hg init repo | |
|
10 | $ cd repo | |||
10 | $ echo x1 > x.txt |
|
11 | $ echo x1 > x.txt | |
11 |
|
12 | |||
12 | $ hg init foo |
|
13 | $ hg init foo | |
@@ -225,3 +226,64 b' Status between revisions:' | |||||
225 | @@ -1,1 +1,2 @@ |
|
226 | @@ -1,1 +1,2 @@ | |
226 | z1 |
|
227 | z1 | |
227 | +z2 |
|
228 | +z2 | |
|
229 | ||||
|
230 | Clone and test outgoing: | |||
|
231 | ||||
|
232 | $ cd .. | |||
|
233 | $ hg clone repo repo2 | |||
|
234 | updating to branch default | |||
|
235 | pulling subrepo foo from .*/test-subrepo-recursion.t/repo/foo | |||
|
236 | requesting all changes | |||
|
237 | adding changesets | |||
|
238 | adding manifests | |||
|
239 | adding file changes | |||
|
240 | added 4 changesets with 7 changes to 3 files | |||
|
241 | pulling subrepo foo/bar from .*/test-subrepo-recursion.t/repo/foo/bar | |||
|
242 | requesting all changes | |||
|
243 | adding changesets | |||
|
244 | adding manifests | |||
|
245 | adding file changes | |||
|
246 | added 3 changesets with 3 changes to 1 files | |||
|
247 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
248 | $ cd repo2 | |||
|
249 | $ hg outgoing -S | |||
|
250 | comparing with .*/test-subrepo-recursion.t/repo | |||
|
251 | searching for changes | |||
|
252 | no changes found | |||
|
253 | comparing with .*/test-subrepo-recursion.t/repo/foo | |||
|
254 | searching for changes | |||
|
255 | no changes found | |||
|
256 | $ echo $? | |||
|
257 | 0 | |||
|
258 | ||||
|
259 | Make nested change: | |||
|
260 | ||||
|
261 | $ echo y4 >> foo/y.txt | |||
|
262 | $ hg diff | |||
|
263 | diff -r 65903cebad86 foo/y.txt | |||
|
264 | --- a/foo/y.txt | |||
|
265 | +++ b/foo/y.txt | |||
|
266 | @@ -1,3 +1,4 @@ | |||
|
267 | y1 | |||
|
268 | y2 | |||
|
269 | y3 | |||
|
270 | +y4 | |||
|
271 | $ hg commit -m 3-4-2 | |||
|
272 | committing subrepository foo | |||
|
273 | $ hg outgoing -S | |||
|
274 | comparing with .*/test-subrepo-recursion.t/repo | |||
|
275 | searching for changes | |||
|
276 | changeset: 3:2655b8ecc4ee | |||
|
277 | tag: tip | |||
|
278 | user: test | |||
|
279 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
280 | summary: 3-4-2 | |||
|
281 | ||||
|
282 | comparing with .*/test-subrepo-recursion.t/repo/foo | |||
|
283 | searching for changes | |||
|
284 | changeset: 4:e96193d6cb36 | |||
|
285 | tag: tip | |||
|
286 | user: test | |||
|
287 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
288 | summary: 3-4-2 | |||
|
289 |
General Comments 0
You need to be logged in to leave comments.
Login now