Show More
@@ -40,20 +40,12 b' def _destupdatevalidate(repo, rev, clean' | |||
|
40 | 40 | hint = _("merge or update --check to force update") |
|
41 | 41 | raise error.UpdateAbort(msg, hint=hint) |
|
42 | 42 | |
|
43 |
def destupdate(repo, clean |
|
|
44 | """destination for bare update operation | |
|
45 | ||
|
46 | return (rev, movemark, activemark) | |
|
47 | ||
|
48 | - rev: the revision to update to, | |
|
49 | - movemark: node to move the active bookmark from | |
|
50 | (cf bookmark.calculate update), | |
|
51 | - activemark: a bookmark to activate at the end of the update. | |
|
52 | """ | |
|
43 | def _destupdateobs(repo, clean, check): | |
|
44 | """decide of an update destination from obsolescence markers""" | |
|
53 | 45 | node = None |
|
54 | 46 | wc = repo[None] |
|
55 | 47 | p1 = wc.p1() |
|
56 |
movemark = |
|
|
48 | movemark = None | |
|
57 | 49 | |
|
58 | 50 | if p1.obsolete() and not p1.children(): |
|
59 | 51 | # allow updating to successors |
@@ -82,6 +74,23 b' def destupdate(repo, clean=False, check=' | |||
|
82 | 74 | node = repo.revs('max(%ln)', successors).first() |
|
83 | 75 | if bookmarks.isactivewdirparent(repo): |
|
84 | 76 | movemark = repo['.'].node() |
|
77 | return node, movemark, None | |
|
78 | ||
|
79 | def destupdate(repo, clean=False, check=False): | |
|
80 | """destination for bare update operation | |
|
81 | ||
|
82 | return (rev, movemark, activemark) | |
|
83 | ||
|
84 | - rev: the revision to update to, | |
|
85 | - movemark: node to move the active bookmark from | |
|
86 | (cf bookmark.calculate update), | |
|
87 | - activemark: a bookmark to activate at the end of the update. | |
|
88 | """ | |
|
89 | node = None | |
|
90 | wc = repo[None] | |
|
91 | movemark = activemark = None | |
|
92 | ||
|
93 | node, movemark, activemark = _destupdateobs(repo, clean, check) | |
|
85 | 94 | |
|
86 | 95 | if node is None: |
|
87 | 96 | # we also move the active bookmark, if any |
General Comments 0
You need to be logged in to leave comments.
Login now