Show More
@@ -67,19 +67,21 b' def submerge(repo, wctx, mctx, actx):' | |||||
67 | repo.ui.debug(" subrepo %s: %s %s\n" % (s, msg, r)) |
|
67 | repo.ui.debug(" subrepo %s: %s %s\n" % (s, msg, r)) | |
68 |
|
68 | |||
69 | for s, l in s1.items(): |
|
69 | for s, l in s1.items(): | |
|
70 | ld = l # local state with possible dirty flag for compares | |||
70 | if wctx != actx and wctx.sub(s).dirty(): |
|
71 | if wctx != actx and wctx.sub(s).dirty(): | |
71 | l = (l[0], l[1] + "+") |
|
72 | ld = (l[0], l[1] + "+") | |
|
73 | ||||
72 | a = sa.get(s, nullstate) |
|
74 | a = sa.get(s, nullstate) | |
73 | if s in s2: |
|
75 | if s in s2: | |
74 | r = s2[s] |
|
76 | r = s2[s] | |
75 | if l == r or r == a: # no change or local is newer |
|
77 | if ld == r or r == a: # no change or local is newer | |
76 | sm[s] = l |
|
78 | sm[s] = l | |
77 | continue |
|
79 | continue | |
78 | elif l == a: # other side changed |
|
80 | elif ld == a: # other side changed | |
79 | debug(s, "other changed, get", r) |
|
81 | debug(s, "other changed, get", r) | |
80 | wctx.sub(s).get(r) |
|
82 | wctx.sub(s).get(r) | |
81 | sm[s] = r |
|
83 | sm[s] = r | |
82 | elif l[0] != r[0]: # sources differ |
|
84 | elif ld[0] != r[0]: # sources differ | |
83 | if repo.ui.promptchoice( |
|
85 | if repo.ui.promptchoice( | |
84 | _(' subrepository sources for %s differ\n' |
|
86 | _(' subrepository sources for %s differ\n' | |
85 | 'use (l)ocal source (%s) or (r)emote source (%s)?') |
|
87 | 'use (l)ocal source (%s) or (r)emote source (%s)?') | |
@@ -88,7 +90,7 b' def submerge(repo, wctx, mctx, actx):' | |||||
88 | debug(s, "prompt changed, get", r) |
|
90 | debug(s, "prompt changed, get", r) | |
89 | wctx.sub(s).get(r) |
|
91 | wctx.sub(s).get(r) | |
90 | sm[s] = r |
|
92 | sm[s] = r | |
91 | elif l[1] == a[1]: # local side is unchanged |
|
93 | elif ld[1] == a[1]: # local side is unchanged | |
92 | debug(s, "other side changed, get", r) |
|
94 | debug(s, "other side changed, get", r) | |
93 | wctx.sub(s).get(r) |
|
95 | wctx.sub(s).get(r) | |
94 | sm[s] = r |
|
96 | sm[s] = r | |
@@ -96,7 +98,7 b' def submerge(repo, wctx, mctx, actx):' | |||||
96 | debug(s, "both sides changed, merge with", r) |
|
98 | debug(s, "both sides changed, merge with", r) | |
97 | wctx.sub(s).merge(r) |
|
99 | wctx.sub(s).merge(r) | |
98 | sm[s] = l |
|
100 | sm[s] = l | |
99 | elif l == a: # remote removed, local unchanged |
|
101 | elif ld == a: # remote removed, local unchanged | |
100 | debug(s, "remote removed, remove") |
|
102 | debug(s, "remote removed, remove") | |
101 | wctx.sub(s).remove() |
|
103 | wctx.sub(s).remove() | |
102 | else: |
|
104 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now