##// END OF EJS Templates
revset: drop magic of fullreposet membership test (issue4682)...
Yuya Nishihara -
r25265:e1645683 stable
parent child Browse files
Show More
@@ -330,7 +330,8 b' def _getrevsource(repo, r):'
330 330
331 331 def stringset(repo, subset, x):
332 332 x = repo[x].rev()
333 if x in subset:
333 if (x in subset
334 or x == node.nullrev and isinstance(subset, fullreposet)):
334 335 return baseset([x])
335 336 return baseset()
336 337
@@ -1905,7 +1906,7 b' def user(repo, subset, x):'
1905 1906 def wdir(repo, subset, x):
1906 1907 # i18n: "wdir" is a keyword
1907 1908 getargs(x, 0, 0, _("wdir takes no arguments"))
1908 if None in subset:
1909 if None in subset or isinstance(subset, fullreposet):
1909 1910 return baseset([None])
1910 1911 return baseset()
1911 1912
@@ -3408,11 +3409,6 b' class fullreposet(spanset):'
3408 3409 def __init__(self, repo):
3409 3410 super(fullreposet, self).__init__(repo)
3410 3411
3411 def __contains__(self, rev):
3412 # assumes the given rev is valid
3413 hidden = self._hiddenrevs
3414 return not (hidden and rev in hidden)
3415
3416 3412 def __and__(self, other):
3417 3413 """As self contains the whole repo, all of the other set should also be
3418 3414 in self. Therefore `self & other = other`.
@@ -2375,4 +2375,12 b' should not draw line down to null due to'
2375 2375 summary: add a
2376 2376
2377 2377
2378 $ hg log -G -r 'branch(default)' | tail -6
2379 |
2380 o changeset: 0:f8035bb17114
2381 user: test
2382 date: Thu Jan 01 00:00:00 1970 +0000
2383 summary: add a
2384
2385
2378 2386 $ cd ..
@@ -619,10 +619,10 b' Test null revision'
619 619 $ log 'reverse(null:)' | tail -2
620 620 0
621 621 -1
622 BROKEN: should be '-1'
622 623 $ log 'first(null:)'
623 -1
624 BROKEN: should be '-1'
624 625 $ log 'min(null:)'
625 -1
626 626 $ log 'tip:null and all()' | tail -2
627 627 1
628 628 0
@@ -630,9 +630,9 b' Test null revision'
630 630 Test working-directory revision
631 631 $ hg debugrevspec 'wdir()'
632 632 None
633 BROKEN: should include 'None'
633 634 $ hg debugrevspec 'tip or wdir()'
634 635 9
635 None
636 636 $ hg debugrevspec '0:tip and wdir()'
637 637
638 638 $ log 'outgoing()'
@@ -1580,6 +1580,38 b' tests for concatenation of strings/symbo'
1580 1580
1581 1581 $ cd ..
1582 1582
1583 prepare repository that has "default" branches of multiple roots
1584
1585 $ hg init namedbranch
1586 $ cd namedbranch
1587
1588 $ echo default0 >> a
1589 $ hg ci -Aqm0
1590 $ echo default1 >> a
1591 $ hg ci -m1
1592
1593 $ hg branch -q stable
1594 $ echo stable2 >> a
1595 $ hg ci -m2
1596 $ echo stable3 >> a
1597 $ hg ci -m3
1598
1599 $ hg update -q null
1600 $ echo default4 >> a
1601 $ hg ci -Aqm4
1602 $ echo default5 >> a
1603 $ hg ci -m5
1604
1605 "null" revision belongs to "default" branch, but it shouldn't appear in set
1606 unless explicitly specified (issue4682)
1607
1608 $ log 'children(branch(default))'
1609 1
1610 2
1611 5
1612
1613 $ cd ..
1614
1583 1615 test author/desc/keyword in problematic encoding
1584 1616 # unicode: cp932:
1585 1617 # u30A2 0x83 0x41(= 'A')
General Comments 0
You need to be logged in to leave comments. Login now