equal
deleted
inserted
replaced
9 from . import ( |
9 from . import ( |
10 error, |
10 error, |
11 obsolete, |
11 obsolete, |
12 ) |
12 ) |
13 |
13 |
14 def destupdate(repo, clean=False): |
14 def destupdate(repo, clean=False, check=False): |
15 """destination for bare update operation |
15 """destination for bare update operation |
16 """ |
16 """ |
17 # Here is where we should consider bookmarks, divergent bookmarks, and tip |
17 # Here is where we should consider bookmarks, divergent bookmarks, and tip |
18 # of current branch; but currently we are only checking the branch tips. |
18 # of current branch; but currently we are only checking the branch tips. |
19 node = None |
19 node = None |
69 if dirty: |
69 if dirty: |
70 msg = _("uncommitted changes") |
70 msg = _("uncommitted changes") |
71 hint = _("commit and merge, or update --clean to" |
71 hint = _("commit and merge, or update --clean to" |
72 " discard changes") |
72 " discard changes") |
73 raise error.Abort(msg, hint=hint) |
73 raise error.Abort(msg, hint=hint) |
74 else: # destination is not a descendant. |
74 elif not check: # destination is not a descendant. |
75 msg = _("not a linear update") |
75 msg = _("not a linear update") |
76 hint = _("merge or update --check to force update") |
76 hint = _("merge or update --check to force update") |
77 raise error.Abort(msg, hint=hint) |
77 raise error.Abort(msg, hint=hint) |
78 |
78 |
79 return rev |
79 return rev |