remote-hg: use remote 'default' not local one
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
c2f7a82032
commit
b688911a78
@ -580,11 +580,11 @@ def get_branch_tip(repo, branch):
|
||||
def list_head(repo, cur):
|
||||
global g_head, bmarks, fake_bmark
|
||||
|
||||
if 'default' not in repo:
|
||||
if 'default' not in branches:
|
||||
# empty repo
|
||||
return
|
||||
|
||||
node = repo['default']
|
||||
node = repo[branch_tip('default')]
|
||||
head = 'master' if not 'master' in bmarks else 'default'
|
||||
fake_bmark = head
|
||||
bmarks[head] = node
|
||||
@ -601,10 +601,6 @@ def do_list(parser):
|
||||
bmarks[bmark] = repo[node]
|
||||
|
||||
cur = repo.dirstate.branch()
|
||||
|
||||
list_head(repo, cur)
|
||||
|
||||
if track_branches:
|
||||
orig = peer if peer else repo
|
||||
|
||||
for branch, heads in orig.branchmap().iteritems():
|
||||
@ -613,6 +609,9 @@ def do_list(parser):
|
||||
if heads:
|
||||
branches[branch] = heads
|
||||
|
||||
list_head(repo, cur)
|
||||
|
||||
if track_branches:
|
||||
for branch in branches:
|
||||
print "? refs/heads/branches/%s" % gitref(branch)
|
||||
|
||||
|
@ -486,7 +486,7 @@ test_expect_success 'remote big push' '
|
||||
check_bookmark hgrepo new_bmark ''
|
||||
'
|
||||
|
||||
test_expect_failure 'remote double failed push' '
|
||||
test_expect_success 'remote double failed push' '
|
||||
test_when_finished "rm -rf hgrepo gitrepo*" &&
|
||||
|
||||
(
|
||||
|
Loading…
Reference in New Issue
Block a user