##// END OF EJS Templates
update: check command line before modifying repo...
Martin von Zweigbergk -
r28032:8157c6b8 default
parent child Browse files
Show More
@@ -6959,24 +6959,24 b' def update(ui, repo, node=None, rev=None'
6959 6959 if rev is None or rev == '':
6960 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 6968 warndest = False
6963 6969
6964 6970 with repo.wlock():
6965 6971 cmdutil.clearunfinished(repo)
6966 6972
6967 6973 if date:
6968 if rev is not None:
6969 raise error.Abort(_("you can't specify a revision and a date"))
6970 6974 rev = cmdutil.finddate(ui, repo, date)
6971 6975
6972 6976 # if we defined a bookmark, we have to remember the original name
6973 6977 brev = rev
6974 6978 rev = scmutil.revsingle(repo, rev, rev).rev()
6975 6979
6976 if check and clean:
6977 raise error.Abort(_("cannot specify both -c/--check and -C/--clean")
6978 )
6979
6980 6980 if check:
6981 6981 cmdutil.bailifchanged(repo, merge=False)
6982 6982 if rev is None:
General Comments 0
You need to be logged in to leave comments. Login now