Augie Fackler committed 553dd70

Update for newer dulwich and hg versions.

  • Participants
  • Parent commits 35e2813

Comments (0)

Files changed (10)


         kwname = 'onlyheads'
     def findoutgoing(orig, local, remote, *args, **kwargs):
         if isinstance(remote, gitrepo.gitrepo):
-            hgver = hg.util.version()
-            if hgver >= '1.8.9' or (hgver > '1.8' and '+' in hgver):
-                raise hgutil.Abort(
-                    'hg-git outgoing support is broken on hg 1.9.x')
-            # clean up this cruft when we're 1.7-only, remoteheads and
-            # the return value change happened between 1.6 and 1.7.
-            kw = {}
-            kw.update(kwargs)
-            for val, k in zip(args, ('base', kwname, 'force')):
-                kw[k] = val
-            git = GitHandler(local, local.ui)
-            base, heads = git.get_refs(remote.path)
-            newkw = {'base': base, kwname: heads}
-            newkw.update(kw)
-            kw = newkw
-            if kwname == 'heads':
-                r = orig(local, remote, **kw)
-                return [x[0] for x in r]
-            if kwname == 'onlyheads':
-                del kw['base']
-            return orig(local, remote, **kw)
+            raise hgutil.Abort(
+                'hg-git outgoing support is broken')
         return orig(local, remote, *args, **kwargs)
     if getattr(discovery, 'findoutgoing', None):
         extensions.wrapfunction(discovery, 'findoutgoing', findoutgoing)


             return {}
-            client.send_pack(path, changed, None)
+            client.send_pack(path, changed, lambda have, want: [])
             changed_refs = [ref for ref, sha in new_refs.iteritems()
                             if sha != old_refs.get(ref)]


 echo C > afile
 hg ci -m "A->C"
-hg merge -r1 | sed 's/-C ./-C/' | grep -v 'merging afile'
+hg merge -r1 2>&1 | sed 's/-C ./-C/' | egrep -v '^merging afile$' | sed 's/incomplete.*/failed!/'
 # resolve using first parent
 echo C > afile
 hg resolve -m afile


 echo C > afile
 hg ci -m "A->C"
-hg merge -r1 | sed 's/-C ./-C/' | grep -v 'merging afile'
+hg merge -r1 2>&1 | sed 's/-C ./-C/' | egrep -v '^merging afile$' | sed 's/incomplete.*/failed!/'
 # resolve using second parent
 echo B > afile
 hg resolve -m afile


 hg clone git://localhost/gitrepo hgrepo | grep -v '^updating'
 cd hgrepo
-HGENCODING=utf-8 hg log --graph --debug | grep -v ': *master'
+HGENCODING=utf-8 hg log --graph --debug | grep -v ': *master' | grep -v phase:
 hg gclear
 hg push git://localhost/gitrepo2


 echo alpha > alpha
 hg add alpha
 hgcommit -m "add alpha"
-hg log --graph --debug
+hg log --graph --debug | grep -v phase:
 cd ..
 echo % get things back to hg
 hg gimport
-hg log --graph --debug | grep -v ': *master'
+hg log --graph --debug | grep -v ': *master' | grep -v phase:
 echo % gimport should have updated the bookmarks as well
 hg bookmarks


 hgcommit -m 'rename alpha to beta'
 hg push
-hg branch gamma
+hg branch gamma | grep -v 'permanent and global'
 hgcommit -m 'started branch gamma'
 hg push
 commit -m 'add gamma'
 # clean merge
-git merge beta | sed 's/^Merge.*recursive.*$/Merge successful/'
+git merge beta | sed "s/the '//;s/' strategy//" | sed 's/^Merge.*recursive.*$/Merge successful/'
 cd ..
 mkdir gitrepo2


 git add delta
 commit -m 'add delta'
-git merge branch1 branch2 | sed 's/^Merge.*octopus.*$/Merge successful/'
+git merge branch1 branch2 | sed "s/the '//;s/' strategy//" | sed 's/^Merge.*octopus.*$/Merge successful/'
 cd ..
 mkdir gitrepo2


+# This feature is currently completely broken due to changes in
+# dulwich, but since it was already broken on hg 1.9 and later, it's
+# not a blocker.
+exit 80
 # Fails for some reason, need to investigate
 # "$TESTDIR/hghave" git || exit 80
 python -c 'from mercurial import util ; assert util.version() < "1.8"' || exit 80