##// END OF EJS Templates
mq: added return 0 on success...
Erik Zielke -
r12538:c87216e5 default
parent child Browse files
Show More
@@ -1753,7 +1753,9 b' def delete(ui, repo, *patches, **opts):'
1753 1753 return 0
1754 1754
1755 1755 def applied(ui, repo, patch=None, **opts):
1756 """print the patches already applied"""
1756 """print the patches already applied
1757
1758 Returns 0 on success."""
1757 1759
1758 1760 q = repo.mq
1759 1761
@@ -1780,7 +1782,9 b' def applied(ui, repo, patch=None, **opts'
1780 1782 summary=opts.get('summary'))
1781 1783
1782 1784 def unapplied(ui, repo, patch=None, **opts):
1783 """print the patches not yet applied"""
1785 """print the patches not yet applied
1786
1787 Returns 0 on success."""
1784 1788
1785 1789 q = repo.mq
1786 1790 if patch:
@@ -1828,6 +1832,8 b' def qimport(ui, repo, *filename, **opts)'
1828 1832 To import an existing patch while renaming it::
1829 1833
1830 1834 hg qimport -e existing-patch -n new-name
1835
1836 Returns 0 if import succeeded.
1831 1837 """
1832 1838 q = repo.mq
1833 1839 try:
@@ -1846,7 +1852,9 b' def qinit(ui, repo, create):'
1846 1852
1847 1853 This command also creates a series file for ordering patches, and
1848 1854 an mq-specific .hgignore file in the queue repository, to exclude
1849 the status and guards files (these contain mostly transient state)."""
1855 the status and guards files (these contain mostly transient state).
1856
1857 Returns 0 if initialization succeeded."""
1850 1858 q = repo.mq
1851 1859 r = q.init(repo, create)
1852 1860 q.save_dirty()
@@ -1892,6 +1900,8 b' def clone(ui, source, dest=None, **opts)'
1892 1900
1893 1901 The patch directory must be a nested Mercurial repository, as
1894 1902 would be created by :hg:`init --mq`.
1903
1904 Return 0 on success.
1895 1905 '''
1896 1906 def patchdir(repo):
1897 1907 url = repo.url()
@@ -1953,12 +1963,16 b' def commit(ui, repo, *pats, **opts):'
1953 1963 commands.commit(r.ui, r, *pats, **opts)
1954 1964
1955 1965 def series(ui, repo, **opts):
1956 """print the entire series file"""
1966 """print the entire series file
1967
1968 Returns 0 on success."""
1957 1969 repo.mq.qseries(repo, missing=opts.get('missing'), summary=opts.get('summary'))
1958 1970 return 0
1959 1971
1960 1972 def top(ui, repo, **opts):
1961 """print the name of the current patch"""
1973 """print the name of the current patch
1974
1975 Returns 0 on success."""
1962 1976 q = repo.mq
1963 1977 t = q.applied and q.series_end(True) or 0
1964 1978 if t:
@@ -1969,7 +1983,9 b' def top(ui, repo, **opts):'
1969 1983 return 1
1970 1984
1971 1985 def next(ui, repo, **opts):
1972 """print the name of the next patch"""
1986 """print the name of the next patch
1987
1988 Returns 0 on success."""
1973 1989 q = repo.mq
1974 1990 end = q.series_end()
1975 1991 if end == len(q.series):
@@ -1978,7 +1994,9 b' def next(ui, repo, **opts):'
1978 1994 return q.qseries(repo, start=end, length=1, summary=opts.get('summary'))
1979 1995
1980 1996 def prev(ui, repo, **opts):
1981 """print the name of the previous patch"""
1997 """print the name of the previous patch
1998
1999 Returns 0 on success."""
1982 2000 q = repo.mq
1983 2001 l = len(q.applied)
1984 2002 if l == 1:
@@ -2018,6 +2036,8 b' def new(ui, repo, patch, *args, **opts):'
2018 2036 format. Read the diffs help topic for more information on why this
2019 2037 is important for preserving permission changes and copy/rename
2020 2038 information.
2039
2040 Returns 0 on successful creation of a new patch.
2021 2041 """
2022 2042 msg = cmdutil.logmessage(opts)
2023 2043 def getmsg():
@@ -2051,6 +2071,8 b' def refresh(ui, repo, *pats, **opts):'
2051 2071 use git-style patches (-g/--git or [diff] git=1) to track copies
2052 2072 and renames. See the diffs help topic for more information on the
2053 2073 git diff format.
2074
2075 Returns 0 on success.
2054 2076 """
2055 2077 q = repo.mq
2056 2078 message = cmdutil.logmessage(opts)
@@ -2084,6 +2106,8 b' def diff(ui, repo, *pats, **opts):'
2084 2106 last qrefresh, or :hg:`export qtip` if you want to see changes
2085 2107 made by the current patch without including changes made since the
2086 2108 qrefresh.
2109
2110 Returns 0 on success.
2087 2111 """
2088 2112 repo.mq.diff(repo, pats, opts)
2089 2113 return 0
@@ -2099,7 +2123,9 b' def fold(ui, repo, *files, **opts):'
2099 2123 removed afterwards.
2100 2124
2101 2125 The header for each folded patch will be concatenated with the
2102 current patch header, separated by a line of '* * *'."""
2126 current patch header, separated by a line of '* * *'.
2127
2128 Returns 0 on success."""
2103 2129
2104 2130 q = repo.mq
2105 2131
@@ -2153,7 +2179,9 b' def fold(ui, repo, *files, **opts):'
2153 2179 q.save_dirty()
2154 2180
2155 2181 def goto(ui, repo, patch, **opts):
2156 '''push or pop patches until named patch is at top of stack'''
2182 '''push or pop patches until named patch is at top of stack
2183
2184 Returns 0 on success.'''
2157 2185 q = repo.mq
2158 2186 patch = q.lookup(patch)
2159 2187 if q.isapplied(patch):
@@ -2181,6 +2209,8 b' def guard(ui, repo, *args, **opts):'
2181 2209 To set guards on another patch::
2182 2210
2183 2211 hg qguard other.patch -- +2.6.17 -stable
2212
2213 Returns 0 on success.
2184 2214 '''
2185 2215 def status(idx):
2186 2216 guards = q.series_guards[idx] or ['unguarded']
@@ -2231,7 +2261,9 b' def guard(ui, repo, *args, **opts):'
2231 2261 status(q.series.index(q.lookup(patch)))
2232 2262
2233 2263 def header(ui, repo, patch=None):
2234 """print the header of the topmost or specified patch"""
2264 """print the header of the topmost or specified patch
2265
2266 Returns 0 on success."""
2235 2267 q = repo.mq
2236 2268
2237 2269 if patch:
@@ -2274,6 +2306,8 b' def push(ui, repo, patch=None, **opts):'
2274 2306
2275 2307 When -f/--force is applied, all local changes in patched files
2276 2308 will be lost.
2309
2310 Return 0 on succces.
2277 2311 """
2278 2312 q = repo.mq
2279 2313 mergeq = None
@@ -2298,6 +2332,8 b' def pop(ui, repo, patch=None, **opts):'
2298 2332 By default, pops off the top of the patch stack. If given a patch
2299 2333 name, keeps popping off patches until the named patch is at the
2300 2334 top of the stack.
2335
2336 Return 0 on success.
2301 2337 """
2302 2338 localupdate = True
2303 2339 if opts.get('name'):
@@ -2315,7 +2351,9 b' def rename(ui, repo, patch, name=None, *'
2315 2351 """rename a patch
2316 2352
2317 2353 With one argument, renames the current patch to PATCH1.
2318 With two arguments, renames PATCH1 to PATCH2."""
2354 With two arguments, renames PATCH1 to PATCH2.
2355
2356 Returns 0 on success."""
2319 2357
2320 2358 q = repo.mq
2321 2359
@@ -2439,6 +2477,8 b' def strip(ui, repo, *revs, **opts):'
2439 2477
2440 2478 Use the --no-backup option to discard the backup bundle once the
2441 2479 operation completes.
2480
2481 Return 0 on success.
2442 2482 """
2443 2483 backup = 'all'
2444 2484 if opts.get('backup'):
@@ -2515,7 +2555,9 b' def select(ui, repo, *args, **opts):'
2515 2555 guarded patches.
2516 2556
2517 2557 Use -s/--series to print a list of all guards in the series file
2518 (no other arguments needed). Use -v for more information.'''
2558 (no other arguments needed). Use -v for more information.
2559
2560 Returns 0 on success.'''
2519 2561
2520 2562 q = repo.mq
2521 2563 guards = q.active()
@@ -2602,6 +2644,8 b' def finish(ui, repo, *revrange, **opts):'
2602 2644 This can be especially useful if your changes have been applied to
2603 2645 an upstream repository, or if you are about to push your changes
2604 2646 to upstream.
2647
2648 Returns 0 on success.
2605 2649 """
2606 2650 if not opts.get('applied') and not revrange:
2607 2651 raise util.Abort(_('no revisions specified'))
@@ -2635,6 +2679,8 b' def qqueue(ui, repo, name=None, **opts):'
2635 2679
2636 2680 To delete an existing queue, use --delete. You cannot delete the currently
2637 2681 active queue.
2682
2683 Returns 0 on success.
2638 2684 '''
2639 2685
2640 2686 q = repo.mq
General Comments 0
You need to be logged in to leave comments. Login now