mercurial/destutil.py
changeset 26587 56b2bcea2529
parent 26569 2aeeef1dc9a5
child 26628 45b86dbabbda
equal deleted inserted replaced
26586:d51c658d3f04 26587:56b2bcea2529
     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