Show More
@@ -5711,18 +5711,20 b' def update(ui, repo, node=None, rev=None' | |||
|
5711 | 5711 | if check and clean: |
|
5712 | 5712 | raise util.Abort(_("cannot specify both -c/--check and -C/--clean")) |
|
5713 | 5713 | |
|
5714 | if date: | |
|
5715 | if rev is not None: | |
|
5716 | raise util.Abort(_("you can't specify a revision and a date")) | |
|
5717 | rev = cmdutil.finddate(ui, repo, date) | |
|
5718 | ||
|
5714 | 5719 | if check: |
|
5715 | 5720 | # we could use dirty() but we can ignore merge and branch trivia |
|
5716 | 5721 | c = repo[None] |
|
5717 | 5722 | if c.modified() or c.added() or c.removed(): |
|
5718 | 5723 | raise util.Abort(_("uncommitted local changes")) |
|
5719 | ||
|
5720 | if date: | |
|
5721 | if rev is not None: | |
|
5722 | raise util.Abort(_("you can't specify a revision and a date")) | |
|
5723 | rev = cmdutil.finddate(ui, repo, date) | |
|
5724 | ||
|
5725 | if clean or check: | |
|
5724 | if not rev: | |
|
5725 | rev = repo[repo[None].branch()].rev() | |
|
5726 | ||
|
5727 | if clean: | |
|
5726 | 5728 | ret = hg.clean(repo, rev) |
|
5727 | 5729 | else: |
|
5728 | 5730 | ret = hg.update(repo, rev) |
General Comments 0
You need to be logged in to leave comments.
Login now