comparison mercurial/hg.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 11c253997b0e
children 16d7db8f752c
comparison
equal deleted inserted replaced
30982:11c253997b0e 30983:7beb3ec34443
737 warndest = True 737 warndest = True
738 738
739 if clean: 739 if clean:
740 ret = _clean(repo, checkout) 740 ret = _clean(repo, checkout)
741 else: 741 else:
742 if check:
743 cmdutil.bailifchanged(repo, merge=False)
742 ret = _update(repo, checkout) 744 ret = _update(repo, checkout)
743 745
744 if not ret and movemarkfrom: 746 if not ret and movemarkfrom:
745 if movemarkfrom == repo['.'].node(): 747 if movemarkfrom == repo['.'].node():
746 pass # no-op update 748 pass # no-op update