Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 26629:ae5f7be2b4ab
destupdate: include the 'check' logic
After moving logic from 'merge.update' into 'destutil.destupdate', we are now
moving logic from 'command.update' in 'destutil.destupdate'. This will make the
function actually useful in predicting (and altering) the update behavior.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 29 Sep 2015 00:18:49 -0700 |
parents | 45b86dbabbda |
children | 92d67e5729b9 |
comparison
equal
deleted
inserted
replaced
26628:45b86dbabbda | 26629:ae5f7be2b4ab |
---|---|
6593 raise error.Abort(_("cannot specify both -c/--check and -C/--clean") | 6593 raise error.Abort(_("cannot specify both -c/--check and -C/--clean") |
6594 ) | 6594 ) |
6595 | 6595 |
6596 if check: | 6596 if check: |
6597 cmdutil.bailifchanged(repo, merge=False) | 6597 cmdutil.bailifchanged(repo, merge=False) |
6598 if rev is None: | 6598 if rev is None: |
6599 rev = repo[repo[None].branch()].rev() | 6599 rev = destutil.destupdate(repo, clean=clean, check=check) |
6600 elif rev is None: | |
6601 rev = destutil.destupdate(repo, clean=clean) | |
6602 | 6600 |
6603 repo.ui.setconfig('ui', 'forcemerge', tool, 'update') | 6601 repo.ui.setconfig('ui', 'forcemerge', tool, 'update') |
6604 | 6602 |
6605 if clean: | 6603 if clean: |
6606 ret = hg.clean(repo, rev) | 6604 ret = hg.clean(repo, rev) |