##// END OF EJS Templates
bookmark: do not crash when active bookmark is forward and --date is used...
Pierre-Yves David -
r26286:4b685712 default
parent child Browse files
Show More
@@ -6480,6 +6480,11 b' def update(ui, repo, node=None, rev=None'
6480 try:
6480 try:
6481 cmdutil.clearunfinished(repo)
6481 cmdutil.clearunfinished(repo)
6482
6482
6483 if date:
6484 if rev is not None:
6485 raise util.Abort(_("you can't specify a revision and a date"))
6486 rev = cmdutil.finddate(ui, repo, date)
6487
6483 # with no argument, we also move the active bookmark, if any
6488 # with no argument, we also move the active bookmark, if any
6484 rev, movemarkfrom = bookmarks.calculateupdate(ui, repo, rev)
6489 rev, movemarkfrom = bookmarks.calculateupdate(ui, repo, rev)
6485
6490
@@ -6490,11 +6495,6 b' def update(ui, repo, node=None, rev=None'
6490 if check and clean:
6495 if check and clean:
6491 raise util.Abort(_("cannot specify both -c/--check and -C/--clean"))
6496 raise util.Abort(_("cannot specify both -c/--check and -C/--clean"))
6492
6497
6493 if date:
6494 if rev is not None:
6495 raise util.Abort(_("you can't specify a revision and a date"))
6496 rev = cmdutil.finddate(ui, repo, date)
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:
@@ -586,6 +586,12 b' pull --update works the same as pull && '
586 updating bookmark Y
586 updating bookmark Y
587 updating bookmark Z
587 updating bookmark Z
588 (run 'hg heads' to see heads, 'hg merge' to merge)
588 (run 'hg heads' to see heads, 'hg merge' to merge)
589
590 (# tests strange but with --date crashing when bookmark have to move)
591
592 $ hg -R ../cloned-bookmarks-manual-update update -d 1986
593 abort: revision matching date not found
594 [255]
589 $ hg -R ../cloned-bookmarks-manual-update update
595 $ hg -R ../cloned-bookmarks-manual-update update
590 updating to active bookmark Y
596 updating to active bookmark Y
591 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
597 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
General Comments 0
You need to be logged in to leave comments. Login now