Details
Details
- Reviewers
yuja - Group Reviewers
hg-reviewers - Commits
- rHGa56bf5591918: py3: handle keyword arguments in hgext/fetch.py
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
yuja |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
short, | short, | ||||
) | ) | ||||
from mercurial import ( | from mercurial import ( | ||||
cmdutil, | cmdutil, | ||||
error, | error, | ||||
exchange, | exchange, | ||||
hg, | hg, | ||||
lock, | lock, | ||||
pycompat, | |||||
registrar, | registrar, | ||||
util, | util, | ||||
) | ) | ||||
release = lock.release | release = lock.release | ||||
cmdtable = {} | cmdtable = {} | ||||
command = registrar.command(cmdtable) | command = registrar.command(cmdtable) | ||||
# Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | ||||
the newly pulled changes. Local changes are then merged into the | the newly pulled changes. Local changes are then merged into the | ||||
pulled changes. To switch the merge order, use --switch-parent. | pulled changes. To switch the merge order, use --switch-parent. | ||||
See :hg:`help dates` for a list of formats valid for -d/--date. | See :hg:`help dates` for a list of formats valid for -d/--date. | ||||
Returns 0 on success. | Returns 0 on success. | ||||
''' | ''' | ||||
opts = pycompat.byteskwargs(opts) | |||||
date = opts.get('date') | date = opts.get('date') | ||||
if date: | if date: | ||||
opts['date'] = util.parsedate(date) | opts['date'] = util.parsedate(date) | ||||
parent, _p2 = repo.dirstate.parents() | parent, _p2 = repo.dirstate.parents() | ||||
branch = repo.dirstate.branch() | branch = repo.dirstate.branch() | ||||
try: | try: | ||||
branchnode = repo.branchtip(branch) | branchnode = repo.branchtip(branch) |