changeset 18493:fe67107094fd stable

discovery: outgoing pass unfiltered repo to findcommonincoming (issue3776) We noa pass an unfiltered repo in the same way `localrepo.push` does. This does not alter outgoing behavior and prevents possible crash with computing common/missing. The `findcommonincoming` code could be simplified to make this unnecessary, but this is too much change for the freeze.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Mon, 28 Jan 2013 13:56:11 +0100
parents 45445187d286
children e945bcb87973
files mercurial/hg.py tests/test-obsolete.t
diffstat 2 files changed, 40 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Mon Jan 28 13:44:44 2013 +0100
+++ b/mercurial/hg.py	Mon Jan 28 13:56:11 2013 +0100
@@ -558,7 +558,7 @@
         revs = [repo.lookup(rev) for rev in scmutil.revrange(repo, revs)]
 
     other = peer(repo, opts, dest)
-    outgoing = discovery.findcommonoutgoing(repo, other, revs,
+    outgoing = discovery.findcommonoutgoing(repo.unfiltered(), other, revs,
                                             force=opts.get('force'))
     o = outgoing.missing
     if not o:
--- a/tests/test-obsolete.t	Mon Jan 28 13:44:44 2013 +0100
+++ b/tests/test-obsolete.t	Mon Jan 28 13:56:11 2013 +0100
@@ -318,11 +318,38 @@
 Destination repo does not have any data
 ---------------------------------------
 
+Simple incoming test
+
+  $ hg init tmpc
+  $ cd tmpc
+  $ hg incoming ../tmpb
+  comparing with ../tmpb
+  changeset:   0:1f0dee641bb7
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     add a
+  
+  changeset:   1:7c3bad9141dc
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     add b
+  
+  changeset:   2:245bde4270cd
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     add original_c
+  
+  changeset:   6:6f9641995072
+  tag:         tip
+  parent:      1:7c3bad9141dc
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     add n3w_3_c
+  
+
 Try to pull markers
 (extinct changeset are excluded but marker are pushed)
 
-  $ hg init tmpc
-  $ cd tmpc
   $ hg pull ../tmpb
   pulling from ../tmpb
   requesting all changes
@@ -663,6 +690,16 @@
   $ mkcommit obsolete_e
   created new head
   $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'`
+  $ hg outgoing ../tmpf # parasite hg outgoing testin
+  comparing with ../tmpf
+  searching for changes
+  changeset:   6:3de5eca88c00
+  tag:         tip
+  parent:      3:6f9641995072
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     add obsolete_e
+  
   $ hg push ../tmpf
   pushing to ../tmpf
   searching for changes