hgext/fetch.py
changeset 45942 89a2afe31e82
parent 44434 2f290136b7d6
child 46907 ffd3e823a7e5
equal deleted inserted replaced
45941:346af7687c6f 45942:89a2afe31e82
    52     + cmdutil.remoteopts,
    52     + cmdutil.remoteopts,
    53     _(b'hg fetch [SOURCE]'),
    53     _(b'hg fetch [SOURCE]'),
    54     helpcategory=command.CATEGORY_REMOTE_REPO_MANAGEMENT,
    54     helpcategory=command.CATEGORY_REMOTE_REPO_MANAGEMENT,
    55 )
    55 )
    56 def fetch(ui, repo, source=b'default', **opts):
    56 def fetch(ui, repo, source=b'default', **opts):
    57     '''pull changes from a remote repository, merge new changes if needed.
    57     """pull changes from a remote repository, merge new changes if needed.
    58 
    58 
    59     This finds all changes from the repository at the specified path
    59     This finds all changes from the repository at the specified path
    60     or URL and adds them to the local repository.
    60     or URL and adds them to the local repository.
    61 
    61 
    62     If the pulled changes add a new branch head, the head is
    62     If the pulled changes add a new branch head, the head is
    69     pulled changes. To switch the merge order, use --switch-parent.
    69     pulled changes. To switch the merge order, use --switch-parent.
    70 
    70 
    71     See :hg:`help dates` for a list of formats valid for -d/--date.
    71     See :hg:`help dates` for a list of formats valid for -d/--date.
    72 
    72 
    73     Returns 0 on success.
    73     Returns 0 on success.
    74     '''
    74     """
    75 
    75 
    76     opts = pycompat.byteskwargs(opts)
    76     opts = pycompat.byteskwargs(opts)
    77     date = opts.get(b'date')
    77     date = opts.get(b'date')
    78     if date:
    78     if date:
    79         opts[b'date'] = dateutil.parsedate(date)
    79         opts[b'date'] = dateutil.parsedate(date)