Kevin Bullock  committed 8a7bd2d

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'.

  • Participants
  • Parent commits 930d54b
  • Branches stable
  • Tags 2.5.4

Comments (0)

Files changed (1)

File mercurial/

                              (f, inst.strerror))
             removed += 1
         elif m == "m": # merge
+            f2, fd, move = a[2:]
             if fd == '.hgsubstate': # subrepo states need updating
                 subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx),
-            f2, fd, move = a[2:]
             r = ms.resolve(fd, wctx, mctx)
             if r is not None and r > 0: