mercurial/commands.py
changeset 28032 8157c6b82f40
parent 28030 ca2a0a654f54
child 28054 8515b813976b
equal deleted inserted replaced
28031:6f248ba85309 28032:8157c6b82f40
  6957         raise error.Abort(_("please specify just one revision"))
  6957         raise error.Abort(_("please specify just one revision"))
  6958 
  6958 
  6959     if rev is None or rev == '':
  6959     if rev is None or rev == '':
  6960         rev = node
  6960         rev = node
  6961 
  6961 
       
  6962     if date and rev is not None:
       
  6963         raise error.Abort(_("you can't specify a revision and a date"))
       
  6964 
       
  6965     if check and clean:
       
  6966         raise error.Abort(_("cannot specify both -c/--check and -C/--clean"))
       
  6967 
  6962     warndest = False
  6968     warndest = False
  6963 
  6969 
  6964     with repo.wlock():
  6970     with repo.wlock():
  6965         cmdutil.clearunfinished(repo)
  6971         cmdutil.clearunfinished(repo)
  6966 
  6972 
  6967         if date:
  6973         if date:
  6968             if rev is not None:
       
  6969                 raise error.Abort(_("you can't specify a revision and a date"))
       
  6970             rev = cmdutil.finddate(ui, repo, date)
  6974             rev = cmdutil.finddate(ui, repo, date)
  6971 
  6975 
  6972         # if we defined a bookmark, we have to remember the original name
  6976         # if we defined a bookmark, we have to remember the original name
  6973         brev = rev
  6977         brev = rev
  6974         rev = scmutil.revsingle(repo, rev, rev).rev()
  6978         rev = scmutil.revsingle(repo, rev, rev).rev()
  6975 
       
  6976         if check and clean:
       
  6977             raise error.Abort(_("cannot specify both -c/--check and -C/--clean")
       
  6978                              )
       
  6979 
  6979 
  6980         if check:
  6980         if check:
  6981             cmdutil.bailifchanged(repo, merge=False)
  6981             cmdutil.bailifchanged(repo, merge=False)
  6982         if rev is None:
  6982         if rev is None:
  6983             updata = destutil.destupdate(repo, clean=clean, check=check)
  6983             updata = destutil.destupdate(repo, clean=clean, check=check)