##// END OF EJS Templates
patchbomb: fix bug introduced in 4ddfad7ebd98 and add test...
Sune Foldager -
r10022:585f51f8 stable
parent child Browse files
Show More
@@ -231,6 +231,7 b' def patchbomb(ui, repo, *revs, **opts):'
231 '''Return the revisions present locally but not in dest'''
231 '''Return the revisions present locally but not in dest'''
232 dest = ui.expandpath(dest or 'default-push', dest or 'default')
232 dest = ui.expandpath(dest or 'default-push', dest or 'default')
233 dest, revs, checkout = hg.parseurl(dest, revs)
233 dest, revs, checkout = hg.parseurl(dest, revs)
234 if revs:
234 revs = [repo.lookup(rev) for rev in revs]
235 revs = [repo.lookup(rev) for rev in revs]
235 other = hg.repository(cmdutil.remoteui(repo, opts), dest)
236 other = hg.repository(cmdutil.remoteui(repo, opts), dest)
236 ui.status(_('comparing with %s\n') % dest)
237 ui.status(_('comparing with %s\n') % dest)
@@ -238,7 +239,7 b' def patchbomb(ui, repo, *revs, **opts):'
238 if not o:
239 if not o:
239 ui.status(_("no changes found\n"))
240 ui.status(_("no changes found\n"))
240 return []
241 return []
241 o = repo.changelog.nodesbetween(o, revs or None)[0]
242 o = repo.changelog.nodesbetween(o, revs)[0]
242 return [str(repo.changelog.rev(r)) for r in o]
243 return [str(repo.changelog.rev(r)) for r in o]
243
244
244 def getpatches(revs):
245 def getpatches(revs):
@@ -177,10 +177,13 b" hg email --date '1980-1-1 0:1' -m tmp.mb"
177 -s test -r 0
177 -s test -r 0
178 cat tmp.mbox | fixheaders
178 cat tmp.mbox | fixheaders
179
179
180 echo "% test outgoing and dest#branch URIs"
180 echo "% test outgoing"
181 hg up 1
181 hg up 1
182 hg branch test
182 hg branch test
183 echo d > d
183 echo d > d
184 hg add d
184 hg add d
185 hg ci -md -d '4 0'
185 hg ci -md -d '4 0'
186 hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t | fixheaders
187
188 echo "% dest#branch URIs"
186 hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test | fixheaders
189 hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test | fixheaders
@@ -1500,12 +1500,282 b' diff -r 000000000000 -r 8580ff50825a a'
1500 +a
1500 +a
1501
1501
1502
1502
1503 % test outgoing and dest#branch URIs
1503 % test outgoing
1504 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
1504 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
1505 marked working directory as branch test
1505 marked working directory as branch test
1506 created new head
1506 created new head
1507 comparing with ../t
1507 comparing with ../t
1508 searching for changes
1508 searching for changes
1509 This patch series consists of 8 patches.
1510
1511
1512 Write the introductory message for the patch series.
1513
1514
1515 Displaying [PATCH 0 of 8] test ...
1516 Content-Type: text/plain; charset="us-ascii"
1517 MIME-Version: 1.0
1518 Content-Transfer-Encoding: 7bit
1519 Subject: [PATCH 0 of 8] test
1520 Message-Id: <patchbomb.315532860@
1521 User-Agent: Mercurial-patchbomb
1522 Date: Tue, 01 Jan 1980 00:01:00 +0000
1523 From: test
1524 To: foo
1525
1526
1527 Displaying [PATCH 1 of 8] c ...
1528 Content-Type: text/plain; charset="us-ascii"
1529 MIME-Version: 1.0
1530 Content-Transfer-Encoding: 7bit
1531 Subject: [PATCH 1 of 8] c
1532 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1533 Message-Id: <ff2c9fa2018b15fa74b3.315532861@
1534 In-Reply-To: <patchbomb.315532860@
1535 References: <patchbomb.315532860@
1536 User-Agent: Mercurial-patchbomb
1537 Date: Tue, 01 Jan 1980 00:01:01 +0000
1538 From: test
1539 To: foo
1540
1541 # HG changeset patch
1542 # User test
1543 # Date 3 0
1544 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1545 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1546 c
1547
1548 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1549 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1550 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1551 @@ -0,0 +1,1 @@
1552 +c
1553
1554 Displaying [PATCH 2 of 8] charset=utf-8; content-transfer-encoding: base64 ...
1555 Content-Type: text/plain; charset="us-ascii"
1556 MIME-Version: 1.0
1557 Content-Transfer-Encoding: 8bit
1558 Subject: [PATCH 2 of 8] charset=utf-8; content-transfer-encoding: base64
1559 X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1560 Message-Id: <c3c9e37db9f4fe4882cd.315532862@
1561 In-Reply-To: <patchbomb.315532860@
1562 References: <patchbomb.315532860@
1563 User-Agent: Mercurial-patchbomb
1564 Date: Tue, 01 Jan 1980 00:01:02 +0000
1565 From: test
1566 To: foo
1567
1568 # HG changeset patch
1569 # User test
1570 # Date 4 0
1571 # Node ID c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1572 # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f
1573 charset=utf-8; content-transfer-encoding: base64
1574
1575 diff -r ff2c9fa2018b -r c3c9e37db9f4 description
1576 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1577 +++ b/description Thu Jan 01 00:00:04 1970 +0000
1578 @@ -0,0 +1,3 @@
1579 +a multiline
1580 +
1581 +description
1582 diff -r ff2c9fa2018b -r c3c9e37db9f4 utf
1583 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1584 +++ b/utf Thu Jan 01 00:00:04 1970 +0000
1585 @@ -0,0 +1,1 @@
1586 +hΓΆmma!
1587
1588 Displaying [PATCH 3 of 8] charset=utf-8; content-transfer-encoding: quoted-printable ...
1589 Content-Type: text/plain; charset="us-ascii"
1590 MIME-Version: 1.0
1591 Content-Transfer-Encoding: quoted-printable
1592 Subject: [PATCH 3 of 8] charset=utf-8;
1593 content-transfer-encoding: quoted-printable
1594 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
1595 Message-Id: <c655633f8c87700bb38c.315532863@
1596 In-Reply-To: <patchbomb.315532860@
1597 References: <patchbomb.315532860@
1598 User-Agent: Mercurial-patchbomb
1599 Date: Tue, 01 Jan 1980 00:01:03 +0000
1600 From: test
1601 To: foo
1602
1603 # HG changeset patch
1604 # User test
1605 # Date 4 0
1606 # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
1607 # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
1608 charset=3Dutf-8; content-transfer-encoding: quoted-printable
1609
1610 diff -r c3c9e37db9f4 -r c655633f8c87 qp
1611 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1612 +++ b/qp Thu Jan 01 00:00:04 1970 +0000
1613 @@ -0,0 +1,4 @@
1614 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1615 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1616 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1617 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1618 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1619 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1620 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1621 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1622 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1623 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1624 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1625 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1626 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1627 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1628 +foo
1629 +
1630 +bar
1631
1632 Displaying [PATCH 4 of 8] charset=us-ascii; content-transfer-encoding: 8bit ...
1633 Content-Type: text/plain; charset="us-ascii"
1634 MIME-Version: 1.0
1635 Content-Transfer-Encoding: 8bit
1636 Subject: [PATCH 4 of 8] charset=us-ascii; content-transfer-encoding: 8bit
1637 X-Mercurial-Node: 22d0f96be12f5945fd67d101af58f7bc8263c835
1638 Message-Id: <22d0f96be12f5945fd67.315532864@
1639 In-Reply-To: <patchbomb.315532860@
1640 References: <patchbomb.315532860@
1641 User-Agent: Mercurial-patchbomb
1642 Date: Tue, 01 Jan 1980 00:01:04 +0000
1643 From: test
1644 To: foo
1645
1646 # HG changeset patch
1647 # User test
1648 # Date 5 0
1649 # Node ID 22d0f96be12f5945fd67d101af58f7bc8263c835
1650 # Parent c655633f8c87700bb38cc6a59a2753bdc5a6c376
1651 charset=us-ascii; content-transfer-encoding: 8bit
1652
1653 diff -r c655633f8c87 -r 22d0f96be12f isolatin
1654 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1655 +++ b/isolatin Thu Jan 01 00:00:05 1970 +0000
1656 @@ -0,0 +1,1 @@
1657 +hοΏ½mma!
1658
1659 Displaying [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a ...
1660 Content-Type: text/plain; charset="us-ascii"
1661 MIME-Version: 1.0
1662 Content-Transfer-Encoding: 7bit
1663 Subject: [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a
1664 X-Mercurial-Node: dd9c2b4b8a8a0934d5523c15f2c119b362360903
1665 Message-Id: <dd9c2b4b8a8a0934d552.315532865@
1666 In-Reply-To: <patchbomb.315532860@
1667 References: <patchbomb.315532860@
1668 User-Agent: Mercurial-patchbomb
1669 Date: Tue, 01 Jan 1980 00:01:05 +0000
1670 From: test
1671 To: foo
1672
1673 # HG changeset patch
1674 # User test
1675 # Date 0 0
1676 # Node ID dd9c2b4b8a8a0934d5523c15f2c119b362360903
1677 # Parent 22d0f96be12f5945fd67d101af58f7bc8263c835
1678 Added tag zero, zero.foo for changeset 8580ff50825a
1679
1680 diff -r 22d0f96be12f -r dd9c2b4b8a8a .hgtags
1681 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1682 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
1683 @@ -0,0 +1,2 @@
1684 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero
1685 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
1686
1687 Displaying [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7 ...
1688 Content-Type: text/plain; charset="us-ascii"
1689 MIME-Version: 1.0
1690 Content-Transfer-Encoding: 7bit
1691 Subject: [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7
1692 X-Mercurial-Node: eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
1693 Message-Id: <eae5fcf795eee29d0e45.315532866@
1694 In-Reply-To: <patchbomb.315532860@
1695 References: <patchbomb.315532860@
1696 User-Agent: Mercurial-patchbomb
1697 Date: Tue, 01 Jan 1980 00:01:06 +0000
1698 From: test
1699 To: foo
1700
1701 # HG changeset patch
1702 # User test
1703 # Date 0 0
1704 # Node ID eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
1705 # Parent dd9c2b4b8a8a0934d5523c15f2c119b362360903
1706 Added tag one, one.patch for changeset 97d72e5f12c7
1707
1708 diff -r dd9c2b4b8a8a -r eae5fcf795ee .hgtags
1709 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
1710 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
1711 @@ -1,2 +1,4 @@
1712 8580ff50825a50c8f716709acdf8de0deddcd6ab zero
1713 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
1714 +97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
1715 +97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
1716
1717 Displaying [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b ...
1718 Content-Type: text/plain; charset="us-ascii"
1719 MIME-Version: 1.0
1720 Content-Transfer-Encoding: 7bit
1721 Subject: [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b
1722 X-Mercurial-Node: e317db6a6f288748d1f6cb064f3810fcba66b1b6
1723 Message-Id: <e317db6a6f288748d1f6.315532867@
1724 In-Reply-To: <patchbomb.315532860@
1725 References: <patchbomb.315532860@
1726 User-Agent: Mercurial-patchbomb
1727 Date: Tue, 01 Jan 1980 00:01:07 +0000
1728 From: test
1729 To: foo
1730
1731 # HG changeset patch
1732 # User test
1733 # Date 0 0
1734 # Node ID e317db6a6f288748d1f6cb064f3810fcba66b1b6
1735 # Parent eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
1736 Added tag two, two.diff for changeset ff2c9fa2018b
1737
1738 diff -r eae5fcf795ee -r e317db6a6f28 .hgtags
1739 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
1740 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
1741 @@ -2,3 +2,5 @@
1742 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
1743 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
1744 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
1745 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
1746 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
1747
1748 Displaying [PATCH 8 of 8] d ...
1749 Content-Type: text/plain; charset="us-ascii"
1750 MIME-Version: 1.0
1751 Content-Transfer-Encoding: 7bit
1752 Subject: [PATCH 8 of 8] d
1753 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
1754 Message-Id: <2f9fa9b998c5fe3ac2bd.315532868@
1755 In-Reply-To: <patchbomb.315532860@
1756 References: <patchbomb.315532860@
1757 User-Agent: Mercurial-patchbomb
1758 Date: Tue, 01 Jan 1980 00:01:08 +0000
1759 From: test
1760 To: foo
1761
1762 # HG changeset patch
1763 # User test
1764 # Date 4 0
1765 # Branch test
1766 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
1767 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1768 d
1769
1770 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
1771 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1772 +++ b/d Thu Jan 01 00:00:04 1970 +0000
1773 @@ -0,0 +1,1 @@
1774 +d
1775
1776 % dest#branch URIs
1777 comparing with ../t
1778 searching for changes
1509 This patch series consists of 1 patches.
1779 This patch series consists of 1 patches.
1510
1780
1511
1781
General Comments 0
You need to be logged in to leave comments. Login now