Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 24473:0142b59f5743
update: replace workingctx.dirty and raising Abort by cmdutil.bailifchanged
This patch makes wrapping "commands.update()" by largefiles extension
useless, because "cmdutil.bailifchanged()" can detect changes of
largefiles in the working directory.
This patch also changes test-update-branches.t, because
"cmdutil.bailifchanged()" shows more detailed information about
dirty-ness of the working directory than "workingctx.dirty()".
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 25 Mar 2015 13:55:35 +0900 |
parents | 7d87f672d069 |
children | 944749de6f3a |
comparison
equal
deleted
inserted
replaced
24472:1bf71faf042e | 24473:0142b59f5743 |
---|---|
6335 if rev is not None: | 6335 if rev is not None: |
6336 raise util.Abort(_("you can't specify a revision and a date")) | 6336 raise util.Abort(_("you can't specify a revision and a date")) |
6337 rev = cmdutil.finddate(ui, repo, date) | 6337 rev = cmdutil.finddate(ui, repo, date) |
6338 | 6338 |
6339 if check: | 6339 if check: |
6340 c = repo[None] | 6340 cmdutil.bailifchanged(repo, merge=False) |
6341 if c.dirty(merge=False, branch=False, missing=True): | |
6342 raise util.Abort(_("uncommitted changes")) | |
6343 if rev is None: | 6341 if rev is None: |
6344 rev = repo[repo[None].branch()].rev() | 6342 rev = repo[repo[None].branch()].rev() |
6345 | 6343 |
6346 repo.ui.setconfig('ui', 'forcemerge', tool, 'update') | 6344 repo.ui.setconfig('ui', 'forcemerge', tool, 'update') |
6347 | 6345 |