Mercurial > hg
diff tests/test-bookmarks.t @ 32482:579df5aaa425
bookmarks: fix check of hash-like name to not abort by ambiguous identifier
'mark in repo' may raise LookupError. I set it to not be warned since bookmark
names shorter than 4 chars aren't checked and short names are likely to be
ambiguous.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 25 May 2017 23:20:00 +0900 |
parents | bce5ebe72859 |
children | d7522f983f37 |
line wrap: on
line diff
--- a/tests/test-bookmarks.t Thu May 25 23:18:02 2017 +0900 +++ b/tests/test-bookmarks.t Thu May 25 23:20:00 2017 +0900 @@ -320,8 +320,36 @@ $ hg bookmark -d 925d80f479bb $ hg bookmark -d db815d6d32e6 + $ cd .. + +bookmark with a name that matches an ambiguous node id + + $ hg init ambiguous + $ cd ambiguous + $ echo 0 > a + $ hg ci -qAm 0 + $ for i in 1057 2857 4025; do + > hg up -q 0 + > echo $i > a + > hg ci -qm $i + > done + $ hg up -q null + $ hg log -r0: -T '{rev}:{node}\n' + 0:b4e73ffab476aa0ee32ed81ca51e07169844bc6a + 1:c56256a09cd28e5764f32e8e2810d0f01e2e357a + 2:c5623987d205cd6d9d8389bfc40fff9dbb670b48 + 3:c562ddd9c94164376c20b86b0b4991636a3bf84f + + $ hg bookmark -r0 c562 + $ hg bookmarks + c562 0:b4e73ffab476 + + $ cd .. + incompatible options + $ cd repo + $ hg bookmark -m Y -d Z abort: --delete and --rename are incompatible [255]