Mercurial > hg
comparison hgext/rebase.py @ 13880:255009c77741
rebase: drop unused p2 arg from rebasenode
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 04 Apr 2011 16:58:24 -0500 |
parents | a8d13ee0ce68 |
children | 086c9f203a53 |
comparison
equal
deleted
inserted
replaced
13879:5b0a3f6cbead | 13880:255009c77741 |
---|---|
169 if len(repo.parents()) == 2: | 169 if len(repo.parents()) == 2: |
170 repo.ui.debug('resuming interrupted rebase\n') | 170 repo.ui.debug('resuming interrupted rebase\n') |
171 else: | 171 else: |
172 try: | 172 try: |
173 ui.setconfig('ui', 'forcemerge', opts.get('tool', '')) | 173 ui.setconfig('ui', 'forcemerge', opts.get('tool', '')) |
174 stats = rebasenode(repo, rev, p1, p2, state) | 174 stats = rebasenode(repo, rev, p1, state) |
175 if stats and stats[3] > 0: | 175 if stats and stats[3] > 0: |
176 raise util.Abort(_('unresolved conflicts (see hg ' | 176 raise util.Abort(_('unresolved conflicts (see hg ' |
177 'resolve, then hg rebase --continue)')) | 177 'resolve, then hg rebase --continue)')) |
178 finally: | 178 finally: |
179 ui.setconfig('ui', 'forcemerge', '') | 179 ui.setconfig('ui', 'forcemerge', '') |
285 except util.Abort: | 285 except util.Abort: |
286 # Invalidate the previous setparents | 286 # Invalidate the previous setparents |
287 repo.dirstate.invalidate() | 287 repo.dirstate.invalidate() |
288 raise | 288 raise |
289 | 289 |
290 def rebasenode(repo, rev, p1, p2, state): | 290 def rebasenode(repo, rev, p1, state): |
291 'Rebase a single revision' | 291 'Rebase a single revision' |
292 # Merge phase | 292 # Merge phase |
293 # Update to target and merge it with local | 293 # Update to target and merge it with local |
294 if repo['.'].rev() != repo[p1].rev(): | 294 if repo['.'].rev() != repo[p1].rev(): |
295 repo.ui.debug(" update to %d:%s\n" % (repo[p1].rev(), repo[p1])) | 295 repo.ui.debug(" update to %d:%s\n" % (repo[p1].rev(), repo[p1])) |