Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 6747:f6c00b17387c
use repo[changeid] to get a changectx
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 26 Jun 2008 14:35:46 -0500 |
parents | 1dca460e7d1e |
children | f67d1468ac50 |
comparison
equal
deleted
inserted
replaced
6746:1dca460e7d1e | 6747:f6c00b17387c |
---|---|
407 partial = a function to filter file lists (dirstate not updated) | 407 partial = a function to filter file lists (dirstate not updated) |
408 """ | 408 """ |
409 | 409 |
410 wlock = repo.wlock() | 410 wlock = repo.wlock() |
411 try: | 411 try: |
412 wc = repo.changectx(None) | 412 wc = repo[None] |
413 if node is None: | 413 if node is None: |
414 # tip of current branch | 414 # tip of current branch |
415 try: | 415 try: |
416 node = repo.branchtags()[wc.branch()] | 416 node = repo.branchtags()[wc.branch()] |
417 except KeyError: | 417 except KeyError: |
419 node = repo.lookup("tip") # update to tip | 419 node = repo.lookup("tip") # update to tip |
420 else: | 420 else: |
421 raise util.Abort(_("branch %s not found") % wc.branch()) | 421 raise util.Abort(_("branch %s not found") % wc.branch()) |
422 overwrite = force and not branchmerge | 422 overwrite = force and not branchmerge |
423 pl = wc.parents() | 423 pl = wc.parents() |
424 p1, p2 = pl[0], repo.changectx(node) | 424 p1, p2 = pl[0], repo[node] |
425 pa = p1.ancestor(p2) | 425 pa = p1.ancestor(p2) |
426 fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2) | 426 fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2) |
427 fastforward = False | 427 fastforward = False |
428 | 428 |
429 ### check phase | 429 ### check phase |