comparison mercurial/commands.py @ 4445:af8db3b42a4a

Make hg import --exact work when a new branch is created by an import.
author Eric Hopper <hopper@omnifarious.org>
date Thu, 17 May 2007 20:09:52 -0700
parents eff2eefdb65a
children 8fa54b9c6c5a
comparison
equal deleted inserted replaced
4444:32ea809e5bd1 4445:af8db3b42a4a
1545 p2 = repo.lookup(p2 or hex(nullid)) 1545 p2 = repo.lookup(p2 or hex(nullid))
1546 1546
1547 if p1 != wp[0].node(): 1547 if p1 != wp[0].node():
1548 hg.clean(repo, p1, wlock=wlock) 1548 hg.clean(repo, p1, wlock=wlock)
1549 repo.dirstate.setparents(p1, p2) 1549 repo.dirstate.setparents(p1, p2)
1550 repo.dirstate.setbranch(branch or 'default')
1550 elif p2: 1551 elif p2:
1551 try: 1552 try:
1552 p1 = repo.lookup(p1) 1553 p1 = repo.lookup(p1)
1553 p2 = repo.lookup(p2) 1554 p2 = repo.lookup(p2)
1554 if p1 == wp[0].node(): 1555 if p1 == wp[0].node():