Show More
@@ -1435,7 +1435,12 b' def new(ui, repo, patch, **opts):' | |||||
1435 | return 0 |
|
1435 | return 0 | |
1436 |
|
1436 | |||
1437 | def refresh(ui, repo, *pats, **opts): |
|
1437 | def refresh(ui, repo, *pats, **opts): | |
1438 |
"""update the current patch |
|
1438 | """update the current patch | |
|
1439 | ||||
|
1440 | If any file patterns are provided, the refreshed patch will contain only | |||
|
1441 | the modifications that match those patterns; the remaining modifications | |||
|
1442 | will remain in the working directory. | |||
|
1443 | """ | |||
1439 | q = repo.mq |
|
1444 | q = repo.mq | |
1440 | message = commands.logmessage(opts) |
|
1445 | message = commands.logmessage(opts) | |
1441 | if opts['edit']: |
|
1446 | if opts['edit']: | |
@@ -1515,20 +1520,20 b' def fold(ui, repo, *files, **opts):' | |||||
1515 | def guard(ui, repo, *args, **opts): |
|
1520 | def guard(ui, repo, *args, **opts): | |
1516 | '''set or print guards for a patch |
|
1521 | '''set or print guards for a patch | |
1517 |
|
1522 | |||
1518 |
|
|
1523 | Guards control whether a patch can be pushed. A patch with no | |
1519 |
guards is aways pushed. |
|
1524 | guards is always pushed. A patch with a positive guard ("+foo") is | |
1520 |
pushed only if qselect command |
|
1525 | pushed only if the qselect command has activated it. A patch with | |
1521 |
|
|
1526 | a negative guard ("-foo") is never pushed if the qselect command | |
1522 | guard "foo". |
|
1527 | has activated it. | |
1523 |
|
1528 | |||
1524 |
|
|
1529 | With no arguments, print the currently active guards. | |
1525 |
|
|
1530 | With arguments, set guards for the named patch. | |
1526 |
|
1531 | |||
1527 |
|
|
1532 | To set a negative guard "-foo" on topmost patch ("--" is needed so | |
1528 |
hg will not interpret "-foo" as a |
|
1533 | hg will not interpret "-foo" as an option): | |
1529 | hg qguard -- -foo |
|
1534 | hg qguard -- -foo | |
1530 |
|
1535 | |||
1531 |
|
|
1536 | To set guards on another patch: | |
1532 | hg qguard other.patch +2.6.17 -stable |
|
1537 | hg qguard other.patch +2.6.17 -stable | |
1533 | ''' |
|
1538 | ''' | |
1534 | def status(idx): |
|
1539 | def status(idx): | |
@@ -1734,32 +1739,34 b' def strip(ui, repo, rev, **opts):' | |||||
1734 | def select(ui, repo, *args, **opts): |
|
1739 | def select(ui, repo, *args, **opts): | |
1735 | '''set or print guarded patches to push |
|
1740 | '''set or print guarded patches to push | |
1736 |
|
1741 | |||
1737 |
|
|
1742 | Use the qguard command to set or print guards on patch, then use | |
1738 |
qselect to tell mq which guards to use. |
|
1743 | qselect to tell mq which guards to use. A patch will be pushed if it | |
|
1744 | has no guards or any positive guards match the currently selected guard, | |||
|
1745 | but will not be pushed if any negative guards match the current guard. | |||
|
1746 | For example: | |||
1739 |
|
1747 | |||
1740 |
qguard foo.patch -stable (n |
|
1748 | qguard foo.patch -stable (negative guard) | |
1741 |
qguard bar.patch +stable (pos |
|
1749 | qguard bar.patch +stable (positive guard) | |
1742 | qselect stable |
|
1750 | qselect stable | |
1743 |
|
1751 | |||
1744 |
|
|
1752 | This activates the "stable" guard. mq will skip foo.patch (because | |
1745 |
|
|
1753 | it has a negative match) but push bar.patch (because it | |
1746 | match). patch is pushed if any posative guards match and no |
|
1754 | has a positive match). | |
1747 | nagative guards match. |
|
|||
1748 |
|
1755 | |||
1749 |
|
|
1756 | With no arguments, prints the currently active guards. | |
1750 |
|
|
1757 | With one argument, sets the active guard. | |
1751 |
|
1758 | |||
1752 |
|
|
1759 | Use -n/--none to deactivate guards (no other arguments needed). | |
1753 |
|
|
1760 | When no guards are active, patches with positive guards are skipped | |
1754 |
patches with n |
|
1761 | and patches with negative guards are pushed. | |
1755 |
|
1762 | |||
1756 |
qselect can change guards o |
|
1763 | qselect can change the guards on applied patches. It does not pop | |
1757 |
guarded patches by default. |
|
1764 | guarded patches by default. Use --pop to pop back to the last applied | |
1758 |
patch that is not guarded. |
|
1765 | patch that is not guarded. Use --reapply (which implies --pop) to push | |
1759 | back to current patch afterwards, but skip guarded patches. |
|
1766 | back to the current patch afterwards, but skip guarded patches. | |
1760 |
|
1767 | |||
1761 |
|
|
1768 | Use -s/--series to print a list of all guards in the series file (no | |
1762 |
other arguments needed). |
|
1769 | other arguments needed). Use -v for more information.''' | |
1763 |
|
1770 | |||
1764 | q = repo.mq |
|
1771 | q = repo.mq | |
1765 | guards = q.active() |
|
1772 | guards = q.active() |
General Comments 0
You need to be logged in to leave comments.
Login now