##// END OF EJS Templates
summary: clear "commonincoming" also if branches are different...
FUJIWARA Katsunori -
r18997:4cf09a1b default
parent child Browse files
Show More
@@ -5464,6 +5464,7 b' def summary(ui, repo, **opts):'
5464 if opts.get('remote'):
5464 if opts.get('remote'):
5465 t = []
5465 t = []
5466 source, branches = hg.parseurl(ui.expandpath('default'))
5466 source, branches = hg.parseurl(ui.expandpath('default'))
5467 sbranch = branches[0]
5467 other = hg.peer(repo, {}, source)
5468 other = hg.peer(repo, {}, source)
5468 revs, checkout = hg.addbranchrevs(repo, other, branches,
5469 revs, checkout = hg.addbranchrevs(repo, other, branches,
5469 opts.get('rev'))
5470 opts.get('rev'))
@@ -5478,11 +5479,13 b' def summary(ui, repo, **opts):'
5478 t.append(_('1 or more incoming'))
5479 t.append(_('1 or more incoming'))
5479
5480
5480 dest, branches = hg.parseurl(ui.expandpath('default-push', 'default'))
5481 dest, branches = hg.parseurl(ui.expandpath('default-push', 'default'))
5482 dbranch = branches[0]
5481 revs, checkout = hg.addbranchrevs(repo, repo, branches, None)
5483 revs, checkout = hg.addbranchrevs(repo, repo, branches, None)
5482 if source != dest:
5484 if source != dest:
5483 other = hg.peer(repo, {}, dest)
5485 other = hg.peer(repo, {}, dest)
5486 ui.debug('comparing with %s\n' % util.hidepassword(dest))
5487 if (source != dest or (sbranch is not None and sbranch != dbranch)):
5484 commoninc = None
5488 commoninc = None
5485 ui.debug('comparing with %s\n' % util.hidepassword(dest))
5486 if revs:
5489 if revs:
5487 revs = [repo.lookup(rev) for rev in revs]
5490 revs = [repo.lookup(rev) for rev in revs]
5488 repo.ui.pushbuffer()
5491 repo.ui.pushbuffer()
@@ -245,3 +245,60 b' Test handling of invalid urls'
245 [255]
245 [255]
246
246
247 $ cd ..
247 $ cd ..
248
249 Test handling common incoming revisions between "default" and
250 "default-push"
251
252 $ hg -R clone rollback
253 repository tip rolled back to revision 1 (undo pull)
254 working directory now based on revision 0
255
256 $ cd repo
257
258 $ hg update -q -C default
259 $ echo modified >> bar
260 $ hg commit -m "new head to push current default head"
261 $ hg -q push -r ".^1" '../clone'
262
263 $ hg -q outgoing '../clone'
264 2:faba9097cad4
265 4:d515801a8f3d
266
267 $ hg summary --remote --config paths.default='../clone#default' --config paths.default-push='../clone#foo'
268 parent: 4:d515801a8f3d tip
269 new head to push current default head
270 branch: default
271 commit: (clean)
272 update: (current)
273 remote: 1 outgoing
274
275 $ hg summary --remote --config paths.default='../clone#foo' --config paths.default-push='../clone'
276 parent: 4:d515801a8f3d tip
277 new head to push current default head
278 branch: default
279 commit: (clean)
280 update: (current)
281 remote: 2 outgoing
282
283 $ hg summary --remote --config paths.default='../clone' --config paths.default-push='../clone#foo'
284 parent: 4:d515801a8f3d tip
285 new head to push current default head
286 branch: default
287 commit: (clean)
288 update: (current)
289 remote: 1 outgoing
290
291 $ hg clone -q -r 0 . ../another
292 $ hg -q outgoing '../another#default'
293 3:4cd725637392
294 4:d515801a8f3d
295
296 $ hg summary --remote --config paths.default='../another#default' --config paths.default-push='../clone#default'
297 parent: 4:d515801a8f3d tip
298 new head to push current default head
299 branch: default
300 commit: (clean)
301 update: (current)
302 remote: 1 outgoing
303
304 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now