equal
deleted
inserted
replaced
7 error, |
7 error, |
8 extensions, |
8 extensions, |
9 util, |
9 util, |
10 ) |
10 ) |
11 |
11 |
12 def _destmergebranch(orig, repo, action='merge', sourceset=None, onheadcheck=True): |
12 def _destmergebranch(orig, repo, action='merge', sourceset=None, |
|
13 onheadcheck=True, destspace=None): |
13 p1 = repo['.'] |
14 p1 = repo['.'] |
14 top = p1.topic() |
15 top = p1.topic() |
15 if top: |
16 if top: |
16 heads = repo.revs('heads(topic(.)::topic(.))') |
17 heads = repo.revs('heads(topic(.)::topic(.))') |
17 if p1.rev() not in heads: |
18 if p1.rev() not in heads: |
40 raise error.Abort(_("topic '%s' has %d heads - " |
41 raise error.Abort(_("topic '%s' has %d heads - " |
41 "please merge with an explicit rev") |
42 "please merge with an explicit rev") |
42 % (top, len(heads))) |
43 % (top, len(heads))) |
43 else: |
44 else: |
44 assert False # that's impossible |
45 assert False # that's impossible |
45 if getattr(orig, 'func_default', ()): # version above hg-3.7 |
46 if len(getattr(orig, 'func_defaults', ())) == 3: # version hg-3.7 |
46 return orig(repo, action, sourceset, onheadcheck) |
47 return orig(repo, action, sourceset, onheadcheck) |
|
48 if 3 < len(getattr(orig, 'func_defaults', ())): # version hg-3.8 and above |
|
49 return orig(repo, action, sourceset, onheadcheck, destspace=destspace) |
47 else: |
50 else: |
48 return orig(repo) |
51 return orig(repo) |
49 |
52 |
50 def _destupdatetopic(repo, clean, check): |
53 def _destupdatetopic(repo, clean, check): |
51 """decide on an update destination from current topic""" |
54 """decide on an update destination from current topic""" |