comparison mercurial/commands.py @ 16491:bfe89d65d651 stable

update: make --check abort with dirty subrepos Aka "we could use dirty() but... yeah let's use it"
author Patrick Mezard <patrick@mezard.eu>
date Mon, 23 Apr 2012 12:12:04 +0200
parents c8ee34917045
children db85c24dcdea
comparison
equal deleted inserted replaced
16490:c8ee34917045 16491:bfe89d65d651
5658 if rev is not None: 5658 if rev is not None:
5659 raise util.Abort(_("you can't specify a revision and a date")) 5659 raise util.Abort(_("you can't specify a revision and a date"))
5660 rev = cmdutil.finddate(ui, repo, date) 5660 rev = cmdutil.finddate(ui, repo, date)
5661 5661
5662 if check: 5662 if check:
5663 # we could use dirty() but we can ignore merge and branch trivia
5664 c = repo[None] 5663 c = repo[None]
5665 if c.modified() or c.added() or c.removed(): 5664 if c.dirty(merge=False, branch=False):
5666 raise util.Abort(_("uncommitted local changes")) 5665 raise util.Abort(_("uncommitted local changes"))
5667 if rev is None: 5666 if rev is None:
5668 rev = repo[repo[None].branch()].rev() 5667 rev = repo[repo[None].branch()].rev()
5669 mergemod._checkunknown(repo, repo[None], repo[rev]) 5668 mergemod._checkunknown(repo, repo[None], repo[rev])
5670 5669