##// END OF EJS Templates
update: use normal update path with --check (issue2450)...
Matt Mackall -
r16092:914bc95e default
parent child Browse files
Show More
@@ -5711,18 +5711,20 b' def update(ui, repo, node=None, rev=None'
5711 if check and clean:
5711 if check and clean:
5712 raise util.Abort(_("cannot specify both -c/--check and -C/--clean"))
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 if check:
5719 if check:
5715 # we could use dirty() but we can ignore merge and branch trivia
5720 # we could use dirty() but we can ignore merge and branch trivia
5716 c = repo[None]
5721 c = repo[None]
5717 if c.modified() or c.added() or c.removed():
5722 if c.modified() or c.added() or c.removed():
5718 raise util.Abort(_("uncommitted local changes"))
5723 raise util.Abort(_("uncommitted local changes"))
5719
5724 if not rev:
5720 if date:
5725 rev = repo[repo[None].branch()].rev()
5721 if rev is not None:
5726
5722 raise util.Abort(_("you can't specify a revision and a date"))
5727 if clean:
5723 rev = cmdutil.finddate(ui, repo, date)
5724
5725 if clean or check:
5726 ret = hg.clean(repo, rev)
5728 ret = hg.clean(repo, rev)
5727 else:
5729 else:
5728 ret = hg.update(repo, rev)
5730 ret = hg.update(repo, rev)
@@ -558,7 +558,7 b' def update(repo, node, branchmerge, forc'
558 " --check to force update)"))
558 " --check to force update)"))
559 else:
559 else:
560 # Allow jumping branches if clean and specific rev given
560 # Allow jumping branches if clean and specific rev given
561 overwrite = True
561 pa = p1
562
562
563 ### calculate phase
563 ### calculate phase
564 action = []
564 action = []
General Comments 0
You need to be logged in to leave comments. Login now