Mercurial > hg
comparison tests/test-largefiles.t @ 17835:08d11b82d9fc
largefiles: distinguish "no remote repo" from "no files to upload" (issue3651)
Before this patch, when no files to upload, "hg outgoing --large" and
"hg summary --large" show "no remote repo", even though valid remote
repository is specified.
It is because that "getoutgoinglfiles()" returns None, not only if no
valid remote repository is specified, but also if no files to upload.
This patch makes "getoutgoinglfiles()" return empty list when no files
to upload, and makes largefiles show "no files to upload" message at
that time.
This patch doesn't test "if toupload is None" route in
"overrideoutgoing()", because this route is not executed unless remote
repository becomes inaccessible just before largefiles specific
processing: successful execution of "orig()" means that at least one
of "default", "default-push" or dest is valid one, and that
"getoutgoinglfiles()" never returns None in such cases.
At "hg summary --large" invocation, this patch shows message below:
largefiles: (no files to upload)
This follows the message shown by "hg summary" with MQ:
mq: (empty queue)
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Mon, 08 Oct 2012 23:49:36 +0900 |
parents | 6047947afb6b |
children | 66a613b59221 |
comparison
equal
deleted
inserted
replaced
17834:743d04dd48ec | 17835:08d11b82d9fc |
---|---|
1625 .hglf | 1625 .hglf |
1626 .hglf/large.dat | 1626 .hglf/large.dat |
1627 .hglf/large2.dat | 1627 .hglf/large2.dat |
1628 | 1628 |
1629 $ cd .. | 1629 $ cd .. |
1630 | |
1631 issue3651: summary/outgoing with largefiles shows "no remote repo" | |
1632 unexpectedly | |
1633 | |
1634 $ mkdir issue3651 | |
1635 $ cd issue3651 | |
1636 | |
1637 $ hg init src | |
1638 $ echo a > src/a | |
1639 $ hg -R src add --large src/a | |
1640 $ hg -R src commit -m '#0' | |
1641 Invoking status precommit hook | |
1642 A a | |
1643 | |
1644 check messages when no remote repository is specified: | |
1645 "no remote repo" route for "hg outgoing --large" is not tested here, | |
1646 because it can't be reproduced easily. | |
1647 | |
1648 $ hg init clone1 | |
1649 $ hg -R clone1 -q pull src | |
1650 $ hg -R clone1 -q update | |
1651 $ hg -R clone1 paths | grep default | |
1652 [1] | |
1653 | |
1654 $ hg -R clone1 summary --large | |
1655 parent: 0:fc0bd45326d3 tip | |
1656 #0 | |
1657 branch: default | |
1658 commit: (clean) | |
1659 update: (current) | |
1660 largefiles: No remote repo | |
1661 | |
1662 check messages when there is no files to upload: | |
1663 | |
1664 $ hg -q clone src clone2 | |
1665 $ hg -R clone2 paths | grep default | |
1666 default = $TESTTMP/issue3651/src | |
1667 | |
1668 $ hg -R clone2 summary --large | |
1669 parent: 0:fc0bd45326d3 tip | |
1670 #0 | |
1671 branch: default | |
1672 commit: (clean) | |
1673 update: (current) | |
1674 searching for changes | |
1675 largefiles: (no files to upload) | |
1676 $ hg -R clone2 outgoing --large | |
1677 comparing with $TESTTMP/issue3651/src | |
1678 searching for changes | |
1679 no changes found | |
1680 searching for changes | |
1681 largefiles: no files to upload | |
1682 [1] | |
1683 | |
1684 check messages when there are files to upload: | |
1685 | |
1686 $ echo b > clone2/b | |
1687 $ hg -R clone2 add --large clone2/b | |
1688 $ hg -R clone2 commit -m '#1' | |
1689 Invoking status precommit hook | |
1690 A b | |
1691 $ hg -R clone2 summary --large | |
1692 parent: 1:1acbe71ce432 tip | |
1693 #1 | |
1694 branch: default | |
1695 commit: (clean) | |
1696 update: (current) | |
1697 searching for changes | |
1698 largefiles: 1 to upload | |
1699 $ hg -R clone2 outgoing --large | |
1700 comparing with $TESTTMP/issue3651/src | |
1701 searching for changes | |
1702 changeset: 1:1acbe71ce432 | |
1703 tag: tip | |
1704 user: test | |
1705 date: Thu Jan 01 00:00:00 1970 +0000 | |
1706 summary: #1 | |
1707 | |
1708 searching for changes | |
1709 largefiles to upload: | |
1710 b | |
1711 | |
1712 | |
1713 $ cd .. |