Mercurial > hg
comparison mercurial/merge.py @ 18780:0705ad73e878
applyupdates: assign variable before we try to use it (issue3855)
The variable 'fd' was getting used with a value left over from a prior
iteration, causing a KeyError: '.hgsubstate'.
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Mon, 18 Mar 2013 16:37:20 -0500 |
parents | 1ef89df2c248 |
children | a0bff3d4f67b |
comparison
equal
deleted
inserted
replaced
18779:9e39a717a23e | 18780:0705ad73e878 |
---|---|
469 | 469 |
470 for i, a in enumerate(actions): | 470 for i, a in enumerate(actions): |
471 f, m, args, msg = a | 471 f, m, args, msg = a |
472 progress(_updating, z + i + 1, item=f, total=numupdates, unit=_files) | 472 progress(_updating, z + i + 1, item=f, total=numupdates, unit=_files) |
473 if m == "m": # merge | 473 if m == "m": # merge |
474 f2, fd, move = args | |
474 if fd == '.hgsubstate': # subrepo states need updating | 475 if fd == '.hgsubstate': # subrepo states need updating |
475 subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), | 476 subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), |
476 overwrite) | 477 overwrite) |
477 continue | 478 continue |
478 f2, fd, move = args | |
479 audit(fd) | 479 audit(fd) |
480 r = ms.resolve(fd, wctx, mctx) | 480 r = ms.resolve(fd, wctx, mctx) |
481 if r is not None and r > 0: | 481 if r is not None and r > 0: |
482 unresolved += 1 | 482 unresolved += 1 |
483 else: | 483 else: |