equal
deleted
inserted
replaced
43 repo.wwrite('.hgsubstate', |
43 repo.wwrite('.hgsubstate', |
44 ''.join(['%s %s\n' % (state[s][1], s) |
44 ''.join(['%s %s\n' % (state[s][1], s) |
45 for s in sorted(state)]), '') |
45 for s in sorted(state)]), '') |
46 |
46 |
47 def submerge(repo, wctx, mctx, actx): |
47 def submerge(repo, wctx, mctx, actx): |
|
48 # working context, merging context, ancestor context |
48 if mctx == actx: # backwards? |
49 if mctx == actx: # backwards? |
49 actx = wctx.p1() |
50 actx = wctx.p1() |
50 s1 = wctx.substate |
51 s1 = wctx.substate |
51 s2 = mctx.substate |
52 s2 = mctx.substate |
52 sa = actx.substate |
53 sa = actx.substate |
103 for s, r in s2.items(): |
104 for s, r in s2.items(): |
104 if s in s1: |
105 if s in s1: |
105 continue |
106 continue |
106 elif s not in sa: |
107 elif s not in sa: |
107 debug(s, "remote added, get", r) |
108 debug(s, "remote added, get", r) |
108 wctx.sub(s).get(r) |
109 mctx.sub(s).get(r) |
109 sm[s] = r |
110 sm[s] = r |
110 elif r != sa[s]: |
111 elif r != sa[s]: |
111 if repo.ui.promptchoice( |
112 if repo.ui.promptchoice( |
112 _(' remote changed subrepository %s which local removed\n' |
113 _(' remote changed subrepository %s which local removed\n' |
113 'use (c)hanged version or (d)elete?') % s, |
114 'use (c)hanged version or (d)elete?') % s, |