mercurial/commands.py
changeset 26286 4b685712fa45
parent 26238 69da16b366ad
child 26302 5ba3358ebc7f
equal deleted inserted replaced
26285:91cad8eb7951 26286:4b685712fa45
  6478 
  6478 
  6479     wlock = repo.wlock()
  6479     wlock = repo.wlock()
  6480     try:
  6480     try:
  6481         cmdutil.clearunfinished(repo)
  6481         cmdutil.clearunfinished(repo)
  6482 
  6482 
  6483         # with no argument, we also move the active bookmark, if any
       
  6484         rev, movemarkfrom = bookmarks.calculateupdate(ui, repo, rev)
       
  6485 
       
  6486         # if we defined a bookmark, we have to remember the original name
       
  6487         brev = rev
       
  6488         rev = scmutil.revsingle(repo, rev, rev).rev()
       
  6489 
       
  6490         if check and clean:
       
  6491             raise util.Abort(_("cannot specify both -c/--check and -C/--clean"))
       
  6492 
       
  6493         if date:
  6483         if date:
  6494             if rev is not None:
  6484             if rev is not None:
  6495                 raise util.Abort(_("you can't specify a revision and a date"))
  6485                 raise util.Abort(_("you can't specify a revision and a date"))
  6496             rev = cmdutil.finddate(ui, repo, date)
  6486             rev = cmdutil.finddate(ui, repo, date)
       
  6487 
       
  6488         # with no argument, we also move the active bookmark, if any
       
  6489         rev, movemarkfrom = bookmarks.calculateupdate(ui, repo, rev)
       
  6490 
       
  6491         # if we defined a bookmark, we have to remember the original name
       
  6492         brev = rev
       
  6493         rev = scmutil.revsingle(repo, rev, rev).rev()
       
  6494 
       
  6495         if check and clean:
       
  6496             raise util.Abort(_("cannot specify both -c/--check and -C/--clean"))
  6497 
  6497 
  6498         if check:
  6498         if check:
  6499             cmdutil.bailifchanged(repo, merge=False)
  6499             cmdutil.bailifchanged(repo, merge=False)
  6500             if rev is None:
  6500             if rev is None:
  6501                 rev = repo[repo[None].branch()].rev()
  6501                 rev = repo[repo[None].branch()].rev()