comparison mercurial/commands.py @ 30983:7beb3ec34443

update: move check for dirty wdir into hg.updatetotally() The function has a "check" parameter that's currently unused, and it makes sense to me to have it honor it. That way other callers than commands.update() could set it if they needed.
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 13 Feb 2017 11:58:02 -0800
parents bd5694ce8beb
children afaf3c2b129c
comparison
equal deleted inserted replaced
30982:11c253997b0e 30983:7beb3ec34443
5361 5361
5362 # if we defined a bookmark, we have to remember the original name 5362 # if we defined a bookmark, we have to remember the original name
5363 brev = rev 5363 brev = rev
5364 rev = scmutil.revsingle(repo, rev, rev).rev() 5364 rev = scmutil.revsingle(repo, rev, rev).rev()
5365 5365
5366 if check:
5367 cmdutil.bailifchanged(repo, merge=False)
5368
5369 repo.ui.setconfig('ui', 'forcemerge', tool, 'update') 5366 repo.ui.setconfig('ui', 'forcemerge', tool, 'update')
5370 5367
5371 return hg.updatetotally(ui, repo, rev, brev, clean=clean, check=check) 5368 return hg.updatetotally(ui, repo, rev, brev, clean=clean, check=check)
5372 5369
5373 @command('verify', []) 5370 @command('verify', [])