Show More
@@ -1839,8 +1839,9 b' def update(repo, node, branchmerge, forc' | |||||
1839 | if not force and (wc.files() or wc.deleted()): |
|
1839 | if not force and (wc.files() or wc.deleted()): | |
1840 | raise error.Abort(_("uncommitted changes"), |
|
1840 | raise error.Abort(_("uncommitted changes"), | |
1841 | hint=_("use 'hg status' to list changes")) |
|
1841 | hint=_("use 'hg status' to list changes")) | |
1842 | for s in sorted(wc.substate): |
|
1842 | if not wc.isinmemory(): | |
1843 | wc.sub(s).bailifchanged() |
|
1843 | for s in sorted(wc.substate): | |
|
1844 | wc.sub(s).bailifchanged() | |||
1844 |
|
1845 | |||
1845 | elif not overwrite: |
|
1846 | elif not overwrite: | |
1846 | if p1 == p2: # no-op update |
|
1847 | if p1 == p2: # no-op update | |
@@ -1955,7 +1956,7 b' def update(repo, node, branchmerge, forc' | |||||
1955 | ### apply phase |
|
1956 | ### apply phase | |
1956 | if not branchmerge: # just jump to the new rev |
|
1957 | if not branchmerge: # just jump to the new rev | |
1957 | fp1, fp2, xp1, xp2 = fp2, nullid, xp2, '' |
|
1958 | fp1, fp2, xp1, xp2 = fp2, nullid, xp2, '' | |
1958 | if not partial: |
|
1959 | if not partial and not wc.isinmemory(): | |
1959 | repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) |
|
1960 | repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) | |
1960 | # note that we're in the middle of an update |
|
1961 | # note that we're in the middle of an update | |
1961 | repo.vfs.write('updatestate', p2.hex()) |
|
1962 | repo.vfs.write('updatestate', p2.hex()) | |
@@ -1994,7 +1995,7 b' def update(repo, node, branchmerge, forc' | |||||
1994 |
|
1995 | |||
1995 | stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels) |
|
1996 | stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels) | |
1996 |
|
1997 | |||
1997 | if not partial: |
|
1998 | if not partial and not wc.isinmemory(): | |
1998 | with repo.dirstate.parentchange(): |
|
1999 | with repo.dirstate.parentchange(): | |
1999 | repo.setparents(fp1, fp2) |
|
2000 | repo.setparents(fp1, fp2) | |
2000 | recordupdates(repo, actions, branchmerge) |
|
2001 | recordupdates(repo, actions, branchmerge) |
General Comments 0
You need to be logged in to leave comments.
Login now