173 """Asks the user which of the local or the other version to keep as |
173 """Asks the user which of the local or the other version to keep as |
174 the merged version.""" |
174 the merged version.""" |
175 ui = repo.ui |
175 ui = repo.ui |
176 fd = fcd.path() |
176 fd = fcd.path() |
177 |
177 |
178 index = ui.promptchoice(_(" no tool found to merge %s\n" |
178 try: |
179 "keep (l)ocal or take (o)ther?" |
179 index = ui.promptchoice(_(" no tool found to merge %s\n" |
180 "$$ &Local $$ &Other") % fd, 0) |
180 "keep (l)ocal or take (o)ther?" |
181 choice = ['local', 'other'][index] |
181 "$$ &Local $$ &Other") % fd, 0) |
182 |
182 choice = ['local', 'other'][index] |
183 if choice == 'other': |
183 |
184 return _iother(repo, mynode, orig, fcd, fco, fca, toolconf) |
184 if choice == 'other': |
185 else: |
185 return _iother(repo, mynode, orig, fcd, fco, fca, toolconf) |
186 return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf) |
186 else: |
|
187 return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf) |
|
188 except error.ResponseExpected: |
|
189 ui.write("\n") |
|
190 return 1 |
187 |
191 |
188 @internaltool('local', nomerge) |
192 @internaltool('local', nomerge) |
189 def _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf): |
193 def _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf): |
190 """Uses the local version of files as the merged version.""" |
194 """Uses the local version of files as the merged version.""" |
191 return 0 |
195 return 0 |