equal
deleted
inserted
replaced
6 # GNU General Public License version 2 or any later version. |
6 # GNU General Public License version 2 or any later version. |
7 |
7 |
8 from .i18n import _ |
8 from .i18n import _ |
9 from . import ( |
9 from . import ( |
10 error, |
10 error, |
11 util, |
|
12 obsolete, |
11 obsolete, |
13 ) |
12 ) |
14 |
13 |
15 def destupdate(repo): |
14 def destupdate(repo): |
16 """destination for bare update operation |
15 """destination for bare update operation |
24 node = repo.branchtip(wc.branch()) |
23 node = repo.branchtip(wc.branch()) |
25 except error.RepoLookupError: |
24 except error.RepoLookupError: |
26 if wc.branch() == 'default': # no default branch! |
25 if wc.branch() == 'default': # no default branch! |
27 node = repo.lookup('tip') # update to tip |
26 node = repo.lookup('tip') # update to tip |
28 else: |
27 else: |
29 raise util.Abort(_("branch %s not found") % wc.branch()) |
28 raise error.Abort(_("branch %s not found") % wc.branch()) |
30 |
29 |
31 if p1.obsolete() and not p1.children(): |
30 if p1.obsolete() and not p1.children(): |
32 # allow updating to successors |
31 # allow updating to successors |
33 successors = obsolete.successorssets(repo, p1.node()) |
32 successors = obsolete.successorssets(repo, p1.node()) |
34 |
33 |