Merge test fixes for dulwich changes and output changes.

This commit is contained in:
Augie Fackler 2011-09-09 15:44:25 -05:00
commit 9b926199fe
4 changed files with 20 additions and 27 deletions

View File

@ -42,15 +42,15 @@ class overlaymanifest(object):
self._flagmap = {}
def addtree(tree, dirname):
for entry in tree.entries():
if entry[0] & 040000:
for entry in tree.iteritems():
if entry.mode & 040000:
# expand directory
subtree = self.repo.handler.git.get_object(entry[2])
addtree(subtree, dirname + entry[1] + '/')
subtree = self.repo.handler.git.get_object(entry.sha)
addtree(subtree, dirname + entry.path + '/')
else:
path = dirname + entry[1]
self._map[path] = bin(entry[2])
self._flagmap[path] = entry[0]
path = dirname + entry.path
self._map[path] = bin(entry.sha)
self._flagmap[path] = entry.mode
addtree(self.tree, '')

View File

@ -59,7 +59,7 @@ git daemon --base-path="$(pwd)"\
hg clone git://localhost/gitrepo hgrepo | grep -v '^updating'
cd hgrepo
hg incoming
hg incoming | grep -v 'no changes found' | grep -v 'bookmark:'
cd ../gitrepo
echo beta > beta
@ -67,7 +67,7 @@ git add beta
commit -m 'add beta'
cd ../hgrepo
hg incoming
hg incoming | grep -v 'no changes found' | grep -v 'bookmark:'
cd ../gitrepo
git checkout -b b1 HEAD^
@ -82,15 +82,15 @@ git add d/gamma
commit -m'add d/gamma line 2'
cd ../hgrepo
hg incoming -p
hg incoming -p | grep -v 'no changes found' | grep -v 'bookmark:'
echo % incoming -r
hg incoming -r master
hg incoming -r b1
hg incoming -r t1
hg incoming -r master | grep -v 'no changes found' | grep -v 'bookmark:'
hg incoming -r b1 | grep -v 'no changes found' | grep -v 'bookmark:'
hg incoming -r t1 | grep -v 'no changes found' | grep -v 'bookmark:'
echo % nothing incoming after pull
hg pull
hg incoming
hg incoming | grep -v 'no changes found' | grep -v 'bookmark:'
echo 'done'

View File

@ -5,13 +5,11 @@ Total 3 (delta 0), reused 0 (delta 0)
importing git objects into hg
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
comparing with git://localhost/gitrepo
no changes found
comparing with git://localhost/gitrepo
Counting objects: 3, done.
Compressing objects: 50% (1/2) Compressing objects: 100% (2/2) Compressing objects: 100% (2/2), done.
Total 3 (delta 0), reused 0 (delta 0)
changeset: 1:9497a4ee62e1
bookmark: master
user: test <test@example.org>
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
@ -22,7 +20,6 @@ Counting objects: 8, done.
Compressing objects: 25% (1/4) Compressing objects: 50% (2/4) Compressing objects: 75% (3/4) Compressing objects: 100% (4/4) Compressing objects: 100% (4/4), done.
Total 8 (delta 0), reused 0 (delta 0)
changeset: 1:9497a4ee62e1
bookmark: master
user: test <test@example.org>
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
@ -47,7 +44,6 @@ diff -r 3442585be8a6 -r 9865e289be73 d/gamma
+gamma
changeset: 3:5202f48c20c9
bookmark: b1
user: test <test@example.org>
date: Mon Jan 01 00:00:13 2007 +0000
summary: add d/gamma line 2
@ -62,7 +58,6 @@ diff -r 9865e289be73 -r 5202f48c20c9 d/gamma
% incoming -r
comparing with git://localhost/gitrepo
changeset: 1:9497a4ee62e1
bookmark: master
user: test <test@example.org>
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
@ -75,7 +70,6 @@ date: Mon Jan 01 00:00:12 2007 +0000
summary: add d/gamma
changeset: 2:5202f48c20c9
bookmark: b1
user: test <test@example.org>
date: Mon Jan 01 00:00:13 2007 +0000
summary: add d/gamma line 2
@ -92,5 +86,4 @@ pulling from git://localhost/gitrepo
importing git objects into hg
(run 'hg heads' to see heads, 'hg merge' to merge)
comparing with git://localhost/gitrepo
no changes found
done

View File

@ -67,9 +67,9 @@ hgcommit -m 'add gamma'
hg book -r 1 beta
hg outgoing
hg outgoing -r beta
hg outgoing -r master
hg outgoing | sed 's/bookmark: /tag: /' | grep -v 'searching for changes'
hg outgoing -r beta | sed 's/bookmark: /tag: /' | grep -v 'searching for changes'
hg outgoing -r master | sed 's/bookmark: /tag: /' | grep -v 'searching for changes'
cd ..
@ -88,9 +88,9 @@ echo % this will fail # maybe we should try to make it work
hg outgoing
echo % let\'s pull and try again
hg pull
hg outgoing
hg outgoing -r beta
hg outgoing -r master
hg outgoing | sed 's/bookmark: /tag: /' | grep -v 'searching for changes'
hg outgoing -r beta | sed 's/bookmark: /tag: /' | grep -v 'searching for changes'
hg outgoing -r master | sed 's/bookmark: /tag: /' | grep -v 'searching for changes'
cd ..