Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 13878:a8d13ee0ce68
misc: replace .parents()[0] with p1()
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 04 Apr 2011 16:21:59 -0500 |
parents | 9d67277c9204 |
children | d1f4e7fd970a |
comparison
equal
deleted
inserted
replaced
13877:653121e6941f | 13878:a8d13ee0ce68 |
---|---|
266 describes how many files were affected by the update. | 266 describes how many files were affected by the update. |
267 """ | 267 """ |
268 | 268 |
269 updated, merged, removed, unresolved = 0, 0, 0, 0 | 269 updated, merged, removed, unresolved = 0, 0, 0, 0 |
270 ms = mergestate(repo) | 270 ms = mergestate(repo) |
271 ms.reset(wctx.parents()[0].node()) | 271 ms.reset(wctx.p1().node()) |
272 moves = [] | 272 moves = [] |
273 action.sort(key=actionkey) | 273 action.sort(key=actionkey) |
274 substate = wctx.substate # prime | 274 substate = wctx.substate # prime |
275 | 275 |
276 # prescan for merges | 276 # prescan for merges |
284 repo.ui.debug("preserving %s for resolve of %s\n" % (f, fd)) | 284 repo.ui.debug("preserving %s for resolve of %s\n" % (f, fd)) |
285 fcl = wctx[f] | 285 fcl = wctx[f] |
286 fco = mctx[f2] | 286 fco = mctx[f2] |
287 if mctx == actx: # backwards, use working dir parent as ancestor | 287 if mctx == actx: # backwards, use working dir parent as ancestor |
288 if fcl.parents(): | 288 if fcl.parents(): |
289 fca = fcl.parents()[0] | 289 fca = fcl.p1() |
290 else: | 290 else: |
291 fca = repo.filectx(f, fileid=nullrev) | 291 fca = repo.filectx(f, fileid=nullrev) |
292 else: | 292 else: |
293 fca = fcl.ancestor(fco, actx) | 293 fca = fcl.ancestor(fco, actx) |
294 if not fca: | 294 if not fca: |