53 node = revs.last() |
53 node = revs.last() |
54 if bookmarks.isactivewdirparent(repo): |
54 if bookmarks.isactivewdirparent(repo): |
55 movemark = repo['.'].node() |
55 movemark = repo['.'].node() |
56 return node, movemark, None |
56 return node, movemark, None |
57 |
57 |
|
58 def desthistedit(orig, ui, repo): |
|
59 if not (ui.config('histedit', 'defaultrev', None) is None |
|
60 and repo.currenttopic): |
|
61 return orig(ui, repo) |
|
62 revs = repo.revs('::. and stack()') |
|
63 if revs: |
|
64 return revs.min() |
|
65 return None |
|
66 |
58 def setupdest(): |
67 def setupdest(): |
59 if util.safehasattr(destutil, '_destmergebranch'): |
68 if util.safehasattr(destutil, '_destmergebranch'): |
60 extensions.wrapfunction(destutil, '_destmergebranch', _destmergebranch) |
69 extensions.wrapfunction(destutil, '_destmergebranch', _destmergebranch) |
61 rebase = extensions.find('rebase') |
70 rebase = extensions.find('rebase') |
62 if (util.safehasattr(rebase, '_destrebase') |
71 if (util.safehasattr(rebase, '_destrebase') |
65 extensions.wrapfunction(rebase, '_destrebase', _destmergebranch) |
74 extensions.wrapfunction(rebase, '_destrebase', _destmergebranch) |
66 if util.safehasattr(destutil, 'destupdatesteps'): |
75 if util.safehasattr(destutil, 'destupdatesteps'): |
67 bridx = destutil.destupdatesteps.index('branch') |
76 bridx = destutil.destupdatesteps.index('branch') |
68 destutil.destupdatesteps.insert(bridx, 'topic') |
77 destutil.destupdatesteps.insert(bridx, 'topic') |
69 destutil.destupdatestepmap['topic'] = _destupdatetopic |
78 destutil.destupdatestepmap['topic'] = _destupdatetopic |
|
79 if util.safehasattr(destutil, 'desthistedit'): |
|
80 extensions.wrapfunction(destutil, 'desthistedit', desthistedit) |
70 |
81 |
71 def ngtip(repo, branch, all=False): |
82 def ngtip(repo, branch, all=False): |
72 """tip new generation""" |
83 """tip new generation""" |
73 ## search for untopiced heads of branch |
84 ## search for untopiced heads of branch |
74 # could be heads((::branch(x) - topic())) |
85 # could be heads((::branch(x) - topic())) |