Mercurial > hg
comparison hgext/rebase.py @ 7298:0e2e371c7406
kill some trailing spaces
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Sat, 01 Nov 2008 13:06:36 +0100 |
parents | ddab62b2fec4 |
children | 3e5db4228f8f |
comparison
equal
deleted
inserted
replaced
7297:bd6deb7525f4 | 7298:0e2e371c7406 |
---|---|
21 import os, errno | 21 import os, errno |
22 | 22 |
23 def rebasemerge(repo, rev, first=False): | 23 def rebasemerge(repo, rev, first=False): |
24 'return the correct ancestor' | 24 'return the correct ancestor' |
25 oldancestor = ancestor.ancestor | 25 oldancestor = ancestor.ancestor |
26 | 26 |
27 def newancestor(a, b, pfunc): | 27 def newancestor(a, b, pfunc): |
28 ancestor.ancestor = oldancestor | 28 ancestor.ancestor = oldancestor |
29 anc = ancestor.ancestor(a, b, pfunc) | 29 anc = ancestor.ancestor(a, b, pfunc) |
30 if b == rev: | 30 if b == rev: |
31 return repo[rev].parents()[0].rev() | 31 return repo[rev].parents()[0].rev() |
170 'Rebase a single revision' | 170 'Rebase a single revision' |
171 repo.ui.debug(_("rebasing %d:%s\n") % (rev, repo[rev])) | 171 repo.ui.debug(_("rebasing %d:%s\n") % (rev, repo[rev])) |
172 | 172 |
173 p1, p2 = defineparents(repo, rev, target, state, targetancestors) | 173 p1, p2 = defineparents(repo, rev, target, state, targetancestors) |
174 | 174 |
175 repo.ui.debug(_(" future parents are %d and %d\n") % (repo[p1].rev(), | 175 repo.ui.debug(_(" future parents are %d and %d\n") % (repo[p1].rev(), |
176 repo[p2].rev())) | 176 repo[p2].rev())) |
177 | 177 |
178 # Merge phase | 178 # Merge phase |
179 if len(repo.parents()) != 2: | 179 if len(repo.parents()) != 2: |
180 # Update to target and merge it with local | 180 # Update to target and merge it with local |
181 if repo['.'].rev() != repo[p1].rev(): | 181 if repo['.'].rev() != repo[p1].rev(): |
182 repo.ui.debug(_(" update to %d:%s\n") % (repo[p1].rev(), repo[p1])) | 182 repo.ui.debug(_(" update to %d:%s\n") % (repo[p1].rev(), repo[p1])) |