Show More
@@ -52,6 +52,11 b' import os, sys, re, errno, shutil' | |||||
52 |
|
52 | |||
53 | commands.norepo += " qclone" |
|
53 | commands.norepo += " qclone" | |
54 |
|
54 | |||
|
55 | seriesopts = [('s', 'summary', None, _('print first line of patch header'))] | |||
|
56 | ||||
|
57 | cmdtable = {} | |||
|
58 | command = cmdutil.command(cmdtable) | |||
|
59 | ||||
55 | # Patch names looks like unix-file names. |
|
60 | # Patch names looks like unix-file names. | |
56 | # They must be joinable with queue directory and result in the patch path. |
|
61 | # They must be joinable with queue directory and result in the patch path. | |
57 | normname = util.normpath |
|
62 | normname = util.normpath | |
@@ -1856,6 +1861,11 b' class queue(object):' | |||||
1856 |
|
1861 | |||
1857 | self.removeundo(repo) |
|
1862 | self.removeundo(repo) | |
1858 |
|
1863 | |||
|
1864 | @command("qdelete|qremove|qrm", | |||
|
1865 | [('k', 'keep', None, _('keep patch file')), | |||
|
1866 | ('r', 'rev', [], | |||
|
1867 | _('stop managing a revision (DEPRECATED)'), _('REV'))], | |||
|
1868 | _('hg qdelete [-k] [PATCH]...')) | |||
1859 | def delete(ui, repo, *patches, **opts): |
|
1869 | def delete(ui, repo, *patches, **opts): | |
1860 | """remove patches from queue |
|
1870 | """remove patches from queue | |
1861 |
|
1871 | |||
@@ -1869,6 +1879,10 b' def delete(ui, repo, *patches, **opts):' | |||||
1869 | q.save_dirty() |
|
1879 | q.save_dirty() | |
1870 | return 0 |
|
1880 | return 0 | |
1871 |
|
1881 | |||
|
1882 | @command("qapplied", | |||
|
1883 | [('1', 'last', None, _('show only the last patch')) | |||
|
1884 | ] + seriesopts, | |||
|
1885 | _('hg qapplied [-1] [-s] [PATCH]')) | |||
1872 | def applied(ui, repo, patch=None, **opts): |
|
1886 | def applied(ui, repo, patch=None, **opts): | |
1873 | """print the patches already applied |
|
1887 | """print the patches already applied | |
1874 |
|
1888 | |||
@@ -1899,6 +1913,9 b' def applied(ui, repo, patch=None, **opts' | |||||
1899 | summary=opts.get('summary')) |
|
1913 | summary=opts.get('summary')) | |
1900 |
|
1914 | |||
1901 |
|
1915 | |||
|
1916 | @command("qunapplied", | |||
|
1917 | [('1', 'first', None, _('show only the first patch'))] + seriesopts, | |||
|
1918 | _('hg qunapplied [-1] [-s] [PATCH]')) | |||
1902 | def unapplied(ui, repo, patch=None, **opts): |
|
1919 | def unapplied(ui, repo, patch=None, **opts): | |
1903 | """print the patches not yet applied |
|
1920 | """print the patches not yet applied | |
1904 |
|
1921 | |||
@@ -1920,6 +1937,16 b' def unapplied(ui, repo, patch=None, **op' | |||||
1920 | q.qseries(repo, start=start, length=length, status='U', |
|
1937 | q.qseries(repo, start=start, length=length, status='U', | |
1921 | summary=opts.get('summary')) |
|
1938 | summary=opts.get('summary')) | |
1922 |
|
1939 | |||
|
1940 | @command("qimport", | |||
|
1941 | [('e', 'existing', None, _('import file in patch directory')), | |||
|
1942 | ('n', 'name', '', | |||
|
1943 | _('name of patch file'), _('NAME')), | |||
|
1944 | ('f', 'force', None, _('overwrite existing files')), | |||
|
1945 | ('r', 'rev', [], | |||
|
1946 | _('place existing revisions under mq control'), _('REV')), | |||
|
1947 | ('g', 'git', None, _('use git extended diff format')), | |||
|
1948 | ('P', 'push', None, _('qpush after importing'))], | |||
|
1949 | _('hg qimport [-e] [-n NAME] [-f] [-g] [-P] [-r REV]... FILE...')) | |||
1923 | def qimport(ui, repo, *filename, **opts): |
|
1950 | def qimport(ui, repo, *filename, **opts): | |
1924 | """import a patch |
|
1951 | """import a patch | |
1925 |
|
1952 | |||
@@ -1991,6 +2018,9 b' def qinit(ui, repo, create):' | |||||
1991 | commands.add(ui, r) |
|
2018 | commands.add(ui, r) | |
1992 | return 0 |
|
2019 | return 0 | |
1993 |
|
2020 | |||
|
2021 | @command("^qinit", | |||
|
2022 | [('c', 'create-repo', None, _('create queue repository'))], | |||
|
2023 | _('hg qinit [-c]')) | |||
1994 | def init(ui, repo, **opts): |
|
2024 | def init(ui, repo, **opts): | |
1995 | """init a new queue repository (DEPRECATED) |
|
2025 | """init a new queue repository (DEPRECATED) | |
1996 |
|
2026 | |||
@@ -2004,6 +2034,15 b' def init(ui, repo, **opts):' | |||||
2004 | commands. With -c, use :hg:`init --mq` instead.""" |
|
2034 | commands. With -c, use :hg:`init --mq` instead.""" | |
2005 | return qinit(ui, repo, create=opts.get('create_repo')) |
|
2035 | return qinit(ui, repo, create=opts.get('create_repo')) | |
2006 |
|
2036 | |||
|
2037 | @command("qclone", | |||
|
2038 | [('', 'pull', None, _('use pull protocol to copy metadata')), | |||
|
2039 | ('U', 'noupdate', None, _('do not update the new working directories')), | |||
|
2040 | ('', 'uncompressed', None, | |||
|
2041 | _('use uncompressed transfer (fast over LAN)')), | |||
|
2042 | ('p', 'patches', '', | |||
|
2043 | _('location of source patch repository'), _('REPO')), | |||
|
2044 | ] + commands.remoteopts, | |||
|
2045 | _('hg qclone [OPTION]... SOURCE [DEST]')) | |||
2007 | def clone(ui, source, dest=None, **opts): |
|
2046 | def clone(ui, source, dest=None, **opts): | |
2008 | '''clone main and patch repository at same time |
|
2047 | '''clone main and patch repository at same time | |
2009 |
|
2048 | |||
@@ -2070,6 +2109,9 b' def clone(ui, source, dest=None, **opts)' | |||||
2070 | ui.note(_('updating destination repository\n')) |
|
2109 | ui.note(_('updating destination repository\n')) | |
2071 | hg.update(dr, dr.changelog.tip()) |
|
2110 | hg.update(dr, dr.changelog.tip()) | |
2072 |
|
2111 | |||
|
2112 | @command("qcommit|qci", | |||
|
2113 | commands.table["^commit|ci"][1], | |||
|
2114 | _('hg qcommit [OPTION]... [FILE]...')) | |||
2073 | def commit(ui, repo, *pats, **opts): |
|
2115 | def commit(ui, repo, *pats, **opts): | |
2074 | """commit changes in the queue repository (DEPRECATED) |
|
2116 | """commit changes in the queue repository (DEPRECATED) | |
2075 |
|
2117 | |||
@@ -2080,6 +2122,10 b' def commit(ui, repo, *pats, **opts):' | |||||
2080 | raise util.Abort('no queue repository') |
|
2122 | raise util.Abort('no queue repository') | |
2081 | commands.commit(r.ui, r, *pats, **opts) |
|
2123 | commands.commit(r.ui, r, *pats, **opts) | |
2082 |
|
2124 | |||
|
2125 | @command("qseries", | |||
|
2126 | [('m', 'missing', None, _('print patches not in series')), | |||
|
2127 | ] + seriesopts, | |||
|
2128 | _('hg qseries [-ms]')) | |||
2083 | def series(ui, repo, **opts): |
|
2129 | def series(ui, repo, **opts): | |
2084 | """print the entire series file |
|
2130 | """print the entire series file | |
2085 |
|
2131 | |||
@@ -2087,6 +2133,7 b' def series(ui, repo, **opts):' | |||||
2087 | repo.mq.qseries(repo, missing=opts.get('missing'), summary=opts.get('summary')) |
|
2133 | repo.mq.qseries(repo, missing=opts.get('missing'), summary=opts.get('summary')) | |
2088 | return 0 |
|
2134 | return 0 | |
2089 |
|
2135 | |||
|
2136 | @command("qtop", [] + seriesopts, _('hg qtop [-s]')) | |||
2090 | def top(ui, repo, **opts): |
|
2137 | def top(ui, repo, **opts): | |
2091 | """print the name of the current patch |
|
2138 | """print the name of the current patch | |
2092 |
|
2139 | |||
@@ -2100,6 +2147,7 b' def top(ui, repo, **opts):' | |||||
2100 | ui.write(_("no patches applied\n")) |
|
2147 | ui.write(_("no patches applied\n")) | |
2101 | return 1 |
|
2148 | return 1 | |
2102 |
|
2149 | |||
|
2150 | @command("qnext", [] + seriesopts, _('hg qnext [-s]')) | |||
2103 | def next(ui, repo, **opts): |
|
2151 | def next(ui, repo, **opts): | |
2104 | """print the name of the next patch |
|
2152 | """print the name of the next patch | |
2105 |
|
2153 | |||
@@ -2111,6 +2159,7 b' def next(ui, repo, **opts):' | |||||
2111 | return 1 |
|
2159 | return 1 | |
2112 | q.qseries(repo, start=end, length=1, summary=opts.get('summary')) |
|
2160 | q.qseries(repo, start=end, length=1, summary=opts.get('summary')) | |
2113 |
|
2161 | |||
|
2162 | @command("qprev", [] + seriesopts, _('hg qprev [-s]')) | |||
2114 | def prev(ui, repo, **opts): |
|
2163 | def prev(ui, repo, **opts): | |
2115 | """print the name of the previous patch |
|
2164 | """print the name of the previous patch | |
2116 |
|
2165 | |||
@@ -2132,6 +2181,18 b' def setupheaderopts(ui, opts):' | |||||
2132 | if not opts.get('date') and opts.get('currentdate'): |
|
2181 | if not opts.get('date') and opts.get('currentdate'): | |
2133 | opts['date'] = "%d %d" % util.makedate() |
|
2182 | opts['date'] = "%d %d" % util.makedate() | |
2134 |
|
2183 | |||
|
2184 | @command("^qnew", | |||
|
2185 | [('e', 'edit', None, _('edit commit message')), | |||
|
2186 | ('f', 'force', None, _('import uncommitted changes (DEPRECATED)')), | |||
|
2187 | ('g', 'git', None, _('use git extended diff format')), | |||
|
2188 | ('U', 'currentuser', None, _('add "From: <current user>" to patch')), | |||
|
2189 | ('u', 'user', '', | |||
|
2190 | _('add "From: <USER>" to patch'), _('USER')), | |||
|
2191 | ('D', 'currentdate', None, _('add "Date: <current date>" to patch')), | |||
|
2192 | ('d', 'date', '', | |||
|
2193 | _('add "Date: <DATE>" to patch'), _('DATE')) | |||
|
2194 | ] + commands.walkopts + commands.commitopts, | |||
|
2195 | _('hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]...')) | |||
2135 | def new(ui, repo, patch, *args, **opts): |
|
2196 | def new(ui, repo, patch, *args, **opts): | |
2136 | """create a new patch |
|
2197 | """create a new patch | |
2137 |
|
2198 | |||
@@ -2171,6 +2232,21 b' def new(ui, repo, patch, *args, **opts):' | |||||
2171 | q.save_dirty() |
|
2232 | q.save_dirty() | |
2172 | return 0 |
|
2233 | return 0 | |
2173 |
|
2234 | |||
|
2235 | @command("^qrefresh", | |||
|
2236 | [('e', 'edit', None, _('edit commit message')), | |||
|
2237 | ('g', 'git', None, _('use git extended diff format')), | |||
|
2238 | ('s', 'short', None, | |||
|
2239 | _('refresh only files already in the patch and specified files')), | |||
|
2240 | ('U', 'currentuser', None, | |||
|
2241 | _('add/update author field in patch with current user')), | |||
|
2242 | ('u', 'user', '', | |||
|
2243 | _('add/update author field in patch with given user'), _('USER')), | |||
|
2244 | ('D', 'currentdate', None, | |||
|
2245 | _('add/update date field in patch with current date')), | |||
|
2246 | ('d', 'date', '', | |||
|
2247 | _('add/update date field in patch with given date'), _('DATE')) | |||
|
2248 | ] + commands.walkopts + commands.commitopts, | |||
|
2249 | _('hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...')) | |||
2174 | def refresh(ui, repo, *pats, **opts): |
|
2250 | def refresh(ui, repo, *pats, **opts): | |
2175 | """update the current patch |
|
2251 | """update the current patch | |
2176 |
|
2252 | |||
@@ -2212,6 +2288,9 b' def refresh(ui, repo, *pats, **opts):' | |||||
2212 | q.save_dirty() |
|
2288 | q.save_dirty() | |
2213 | return ret |
|
2289 | return ret | |
2214 |
|
2290 | |||
|
2291 | @command("^qdiff", | |||
|
2292 | commands.diffopts + commands.diffopts2 + commands.walkopts, | |||
|
2293 | _('hg qdiff [OPTION]... [FILE]...')) | |||
2215 | def diff(ui, repo, *pats, **opts): |
|
2294 | def diff(ui, repo, *pats, **opts): | |
2216 | """diff of the current patch and subsequent modifications |
|
2295 | """diff of the current patch and subsequent modifications | |
2217 |
|
2296 | |||
@@ -2230,6 +2309,11 b' def diff(ui, repo, *pats, **opts):' | |||||
2230 | repo.mq.diff(repo, pats, opts) |
|
2309 | repo.mq.diff(repo, pats, opts) | |
2231 | return 0 |
|
2310 | return 0 | |
2232 |
|
2311 | |||
|
2312 | @command('qfold', | |||
|
2313 | [('e', 'edit', None, _('edit patch header')), | |||
|
2314 | ('k', 'keep', None, _('keep folded patch files')), | |||
|
2315 | ] + commands.commitopts, | |||
|
2316 | _('hg qfold [-e] [-k] [-m TEXT] [-l FILE] PATCH...')) | |||
2233 | def fold(ui, repo, *files, **opts): |
|
2317 | def fold(ui, repo, *files, **opts): | |
2234 | """fold the named patches into the current patch |
|
2318 | """fold the named patches into the current patch | |
2235 |
|
2319 | |||
@@ -2295,6 +2379,9 b' def fold(ui, repo, *files, **opts):' | |||||
2295 | q.delete(repo, patches, opts) |
|
2379 | q.delete(repo, patches, opts) | |
2296 | q.save_dirty() |
|
2380 | q.save_dirty() | |
2297 |
|
2381 | |||
|
2382 | @command("qgoto", | |||
|
2383 | [('f', 'force', None, _('overwrite any local changes'))], | |||
|
2384 | _('hg qgoto [OPTION]... PATCH')) | |||
2298 | def goto(ui, repo, patch, **opts): |
|
2385 | def goto(ui, repo, patch, **opts): | |
2299 | '''push or pop patches until named patch is at top of stack |
|
2386 | '''push or pop patches until named patch is at top of stack | |
2300 |
|
2387 | |||
@@ -2308,6 +2395,10 b' def goto(ui, repo, patch, **opts):' | |||||
2308 | q.save_dirty() |
|
2395 | q.save_dirty() | |
2309 | return ret |
|
2396 | return ret | |
2310 |
|
2397 | |||
|
2398 | @command("qguard", | |||
|
2399 | [('l', 'list', None, _('list all patches and guards')), | |||
|
2400 | ('n', 'none', None, _('drop all guards'))], | |||
|
2401 | _('hg qguard [-l] [-n] [PATCH] [-- [+GUARD]... [-GUARD]...]')) | |||
2311 | def guard(ui, repo, *args, **opts): |
|
2402 | def guard(ui, repo, *args, **opts): | |
2312 | '''set or print guards for a patch |
|
2403 | '''set or print guards for a patch | |
2313 |
|
2404 | |||
@@ -2377,6 +2468,7 b' def guard(ui, repo, *args, **opts):' | |||||
2377 | else: |
|
2468 | else: | |
2378 | status(q.series.index(q.lookup(patch))) |
|
2469 | status(q.series.index(q.lookup(patch))) | |
2379 |
|
2470 | |||
|
2471 | @command("qheader", [], _('hg qheader [PATCH]')) | |||
2380 | def header(ui, repo, patch=None): |
|
2472 | def header(ui, repo, patch=None): | |
2381 | """print the header of the topmost or specified patch |
|
2473 | """print the header of the topmost or specified patch | |
2382 |
|
2474 | |||
@@ -2418,6 +2510,16 b' def savename(path):' | |||||
2418 | newpath = path + ".%d" % (index + 1) |
|
2510 | newpath = path + ".%d" % (index + 1) | |
2419 | return newpath |
|
2511 | return newpath | |
2420 |
|
2512 | |||
|
2513 | @command("^qpush", | |||
|
2514 | [('f', 'force', None, _('apply on top of local changes')), | |||
|
2515 | ('e', 'exact', None, _('apply the target patch to its recorded parent')), | |||
|
2516 | ('l', 'list', None, _('list patch name in commit text')), | |||
|
2517 | ('a', 'all', None, _('apply all patches')), | |||
|
2518 | ('m', 'merge', None, _('merge from another queue (DEPRECATED)')), | |||
|
2519 | ('n', 'name', '', | |||
|
2520 | _('merge queue name (DEPRECATED)'), _('NAME')), | |||
|
2521 | ('', 'move', None, _('reorder patch series and apply only the patch'))], | |||
|
2522 | _('hg qpush [-f] [-l] [-a] [--move] [PATCH | INDEX]')) | |||
2421 | def push(ui, repo, patch=None, **opts): |
|
2523 | def push(ui, repo, patch=None, **opts): | |
2422 | """push the next patch onto the stack |
|
2524 | """push the next patch onto the stack | |
2423 |
|
2525 | |||
@@ -2444,6 +2546,12 b' def push(ui, repo, patch=None, **opts):' | |||||
2444 | exact=opts.get('exact')) |
|
2546 | exact=opts.get('exact')) | |
2445 | return ret |
|
2547 | return ret | |
2446 |
|
2548 | |||
|
2549 | @command("^qpop", | |||
|
2550 | [('a', 'all', None, _('pop all patches')), | |||
|
2551 | ('n', 'name', '', | |||
|
2552 | _('queue name to pop (DEPRECATED)'), _('NAME')), | |||
|
2553 | ('f', 'force', None, _('forget any local changes to patched files'))], | |||
|
2554 | _('hg qpop [-a] [-f] [PATCH | INDEX]')) | |||
2447 | def pop(ui, repo, patch=None, **opts): |
|
2555 | def pop(ui, repo, patch=None, **opts): | |
2448 | """pop the current patch off the stack |
|
2556 | """pop the current patch off the stack | |
2449 |
|
2557 | |||
@@ -2465,6 +2573,7 b' def pop(ui, repo, patch=None, **opts):' | |||||
2465 | q.save_dirty() |
|
2573 | q.save_dirty() | |
2466 | return ret |
|
2574 | return ret | |
2467 |
|
2575 | |||
|
2576 | @command("qrename|qmv", [], _('hg qrename PATCH1 [PATCH2]')) | |||
2468 | def rename(ui, repo, patch, name=None, **opts): |
|
2577 | def rename(ui, repo, patch, name=None, **opts): | |
2469 | """rename a patch |
|
2578 | """rename a patch | |
2470 |
|
2579 | |||
@@ -2531,6 +2640,10 b' def rename(ui, repo, patch, name=None, *' | |||||
2531 |
|
2640 | |||
2532 | q.save_dirty() |
|
2641 | q.save_dirty() | |
2533 |
|
2642 | |||
|
2643 | @command("qrestore", | |||
|
2644 | [('d', 'delete', None, _('delete save entry')), | |||
|
2645 | ('u', 'update', None, _('update queue working directory'))], | |||
|
2646 | _('hg qrestore [-d] [-u] REV')) | |||
2534 | def restore(ui, repo, rev, **opts): |
|
2647 | def restore(ui, repo, rev, **opts): | |
2535 | """restore the queue state saved by a revision (DEPRECATED) |
|
2648 | """restore the queue state saved by a revision (DEPRECATED) | |
2536 |
|
2649 | |||
@@ -2542,6 +2655,13 b' def restore(ui, repo, rev, **opts):' | |||||
2542 | q.save_dirty() |
|
2655 | q.save_dirty() | |
2543 | return 0 |
|
2656 | return 0 | |
2544 |
|
2657 | |||
|
2658 | @command("qsave", | |||
|
2659 | [('c', 'copy', None, _('copy patch directory')), | |||
|
2660 | ('n', 'name', '', | |||
|
2661 | _('copy directory name'), _('NAME')), | |||
|
2662 | ('e', 'empty', None, _('clear queue status file')), | |||
|
2663 | ('f', 'force', None, _('force copy'))] + commands.commitopts, | |||
|
2664 | _('hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f]')) | |||
2545 | def save(ui, repo, **opts): |
|
2665 | def save(ui, repo, **opts): | |
2546 | """save current queue state (DEPRECATED) |
|
2666 | """save current queue state (DEPRECATED) | |
2547 |
|
2667 | |||
@@ -2574,6 +2694,16 b' def save(ui, repo, **opts):' | |||||
2574 | pass |
|
2694 | pass | |
2575 | return 0 |
|
2695 | return 0 | |
2576 |
|
2696 | |||
|
2697 | @command("strip", | |||
|
2698 | [('f', 'force', None, _('force removal of changesets, discard ' | |||
|
2699 | 'uncommitted changes (no backup)')), | |||
|
2700 | ('b', 'backup', None, _('bundle only changesets with local revision' | |||
|
2701 | ' number greater than REV which are not' | |||
|
2702 | ' descendants of REV (DEPRECATED)')), | |||
|
2703 | ('n', 'no-backup', None, _('no backups')), | |||
|
2704 | ('', 'nobackup', None, _('no backups (DEPRECATED)')), | |||
|
2705 | ('k', 'keep', None, _("do not modify working copy during strip"))], | |||
|
2706 | _('hg strip [-k] [-f] [-n] REV...')) | |||
2577 | def strip(ui, repo, *revs, **opts): |
|
2707 | def strip(ui, repo, *revs, **opts): | |
2578 | """strip changesets and all their descendants from the repository |
|
2708 | """strip changesets and all their descendants from the repository | |
2579 |
|
2709 | |||
@@ -2656,6 +2786,12 b' def strip(ui, repo, *revs, **opts):' | |||||
2656 | force=opts.get('force')) |
|
2786 | force=opts.get('force')) | |
2657 | return 0 |
|
2787 | return 0 | |
2658 |
|
2788 | |||
|
2789 | @command("qselect", | |||
|
2790 | [('n', 'none', None, _('disable all guards')), | |||
|
2791 | ('s', 'series', None, _('list all guards in series file')), | |||
|
2792 | ('', 'pop', None, _('pop to before first guarded applied patch')), | |||
|
2793 | ('', 'reapply', None, _('pop, then reapply patches'))], | |||
|
2794 | _('hg qselect [OPTION]... [GUARD]...')) | |||
2659 | def select(ui, repo, *args, **opts): |
|
2795 | def select(ui, repo, *args, **opts): | |
2660 | '''set or print guarded patches to push |
|
2796 | '''set or print guarded patches to push | |
2661 |
|
2797 | |||
@@ -2761,6 +2897,9 b' def select(ui, repo, *args, **opts):' | |||||
2761 | finally: |
|
2897 | finally: | |
2762 | q.save_dirty() |
|
2898 | q.save_dirty() | |
2763 |
|
2899 | |||
|
2900 | @command("qfinish", | |||
|
2901 | [('a', 'applied', None, _('finish all applied changesets'))], | |||
|
2902 | _('hg qfinish [-a] [REV]...')) | |||
2764 | def finish(ui, repo, *revrange, **opts): |
|
2903 | def finish(ui, repo, *revrange, **opts): | |
2765 | """move applied patches into repository history |
|
2904 | """move applied patches into repository history | |
2766 |
|
2905 | |||
@@ -2794,6 +2933,14 b' def finish(ui, repo, *revrange, **opts):' | |||||
2794 | q.save_dirty() |
|
2933 | q.save_dirty() | |
2795 | return 0 |
|
2934 | return 0 | |
2796 |
|
2935 | |||
|
2936 | @command("qqueue", | |||
|
2937 | [('l', 'list', False, _('list all available queues')), | |||
|
2938 | ('c', 'create', False, _('create new queue')), | |||
|
2939 | ('', 'rename', False, _('rename active queue')), | |||
|
2940 | ('', 'delete', False, _('delete reference to queue')), | |||
|
2941 | ('', 'purge', False, _('delete queue, and remove patch dir')), | |||
|
2942 | ], | |||
|
2943 | _('[OPTION] [QUEUE]')) | |||
2797 | def qqueue(ui, repo, name=None, **opts): |
|
2944 | def qqueue(ui, repo, name=None, **opts): | |
2798 | '''manage multiple patch queues |
|
2945 | '''manage multiple patch queues | |
2799 |
|
2946 | |||
@@ -3150,175 +3297,6 b' def uisetup(ui):' | |||||
3150 | if extmodule.__file__ != __file__: |
|
3297 | if extmodule.__file__ != __file__: | |
3151 | dotable(getattr(extmodule, 'cmdtable', {})) |
|
3298 | dotable(getattr(extmodule, 'cmdtable', {})) | |
3152 |
|
3299 | |||
3153 | seriesopts = [('s', 'summary', None, _('print first line of patch header'))] |
|
|||
3154 |
|
||||
3155 | cmdtable = { |
|
|||
3156 | "qapplied": |
|
|||
3157 | (applied, |
|
|||
3158 | [('1', 'last', None, _('show only the last patch'))] + seriesopts, |
|
|||
3159 | _('hg qapplied [-1] [-s] [PATCH]')), |
|
|||
3160 | "qclone": |
|
|||
3161 | (clone, |
|
|||
3162 | [('', 'pull', None, _('use pull protocol to copy metadata')), |
|
|||
3163 | ('U', 'noupdate', None, _('do not update the new working directories')), |
|
|||
3164 | ('', 'uncompressed', None, |
|
|||
3165 | _('use uncompressed transfer (fast over LAN)')), |
|
|||
3166 | ('p', 'patches', '', |
|
|||
3167 | _('location of source patch repository'), _('REPO')), |
|
|||
3168 | ] + commands.remoteopts, |
|
|||
3169 | _('hg qclone [OPTION]... SOURCE [DEST]')), |
|
|||
3170 | "qcommit|qci": |
|
|||
3171 | (commit, |
|
|||
3172 | commands.table["^commit|ci"][1], |
|
|||
3173 | _('hg qcommit [OPTION]... [FILE]...')), |
|
|||
3174 | "^qdiff": |
|
|||
3175 | (diff, |
|
|||
3176 | commands.diffopts + commands.diffopts2 + commands.walkopts, |
|
|||
3177 | _('hg qdiff [OPTION]... [FILE]...')), |
|
|||
3178 | "qdelete|qremove|qrm": |
|
|||
3179 | (delete, |
|
|||
3180 | [('k', 'keep', None, _('keep patch file')), |
|
|||
3181 | ('r', 'rev', [], |
|
|||
3182 | _('stop managing a revision (DEPRECATED)'), _('REV'))], |
|
|||
3183 | _('hg qdelete [-k] [PATCH]...')), |
|
|||
3184 | 'qfold': |
|
|||
3185 | (fold, |
|
|||
3186 | [('e', 'edit', None, _('edit patch header')), |
|
|||
3187 | ('k', 'keep', None, _('keep folded patch files')), |
|
|||
3188 | ] + commands.commitopts, |
|
|||
3189 | _('hg qfold [-e] [-k] [-m TEXT] [-l FILE] PATCH...')), |
|
|||
3190 | 'qgoto': |
|
|||
3191 | (goto, |
|
|||
3192 | [('f', 'force', None, _('overwrite any local changes'))], |
|
|||
3193 | _('hg qgoto [OPTION]... PATCH')), |
|
|||
3194 | 'qguard': |
|
|||
3195 | (guard, |
|
|||
3196 | [('l', 'list', None, _('list all patches and guards')), |
|
|||
3197 | ('n', 'none', None, _('drop all guards'))], |
|
|||
3198 | _('hg qguard [-l] [-n] [PATCH] [-- [+GUARD]... [-GUARD]...]')), |
|
|||
3199 | 'qheader': (header, [], _('hg qheader [PATCH]')), |
|
|||
3200 | "qimport": |
|
|||
3201 | (qimport, |
|
|||
3202 | [('e', 'existing', None, _('import file in patch directory')), |
|
|||
3203 | ('n', 'name', '', |
|
|||
3204 | _('name of patch file'), _('NAME')), |
|
|||
3205 | ('f', 'force', None, _('overwrite existing files')), |
|
|||
3206 | ('r', 'rev', [], |
|
|||
3207 | _('place existing revisions under mq control'), _('REV')), |
|
|||
3208 | ('g', 'git', None, _('use git extended diff format')), |
|
|||
3209 | ('P', 'push', None, _('qpush after importing'))], |
|
|||
3210 | _('hg qimport [-e] [-n NAME] [-f] [-g] [-P] [-r REV]... FILE...')), |
|
|||
3211 | "^qinit": |
|
|||
3212 | (init, |
|
|||
3213 | [('c', 'create-repo', None, _('create queue repository'))], |
|
|||
3214 | _('hg qinit [-c]')), |
|
|||
3215 | "^qnew": |
|
|||
3216 | (new, |
|
|||
3217 | [('e', 'edit', None, _('edit commit message')), |
|
|||
3218 | ('f', 'force', None, _('import uncommitted changes (DEPRECATED)')), |
|
|||
3219 | ('g', 'git', None, _('use git extended diff format')), |
|
|||
3220 | ('U', 'currentuser', None, _('add "From: <current user>" to patch')), |
|
|||
3221 | ('u', 'user', '', |
|
|||
3222 | _('add "From: <USER>" to patch'), _('USER')), |
|
|||
3223 | ('D', 'currentdate', None, _('add "Date: <current date>" to patch')), |
|
|||
3224 | ('d', 'date', '', |
|
|||
3225 | _('add "Date: <DATE>" to patch'), _('DATE')) |
|
|||
3226 | ] + commands.walkopts + commands.commitopts, |
|
|||
3227 | _('hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]...')), |
|
|||
3228 | "qnext": (next, [] + seriesopts, _('hg qnext [-s]')), |
|
|||
3229 | "qprev": (prev, [] + seriesopts, _('hg qprev [-s]')), |
|
|||
3230 | "^qpop": |
|
|||
3231 | (pop, |
|
|||
3232 | [('a', 'all', None, _('pop all patches')), |
|
|||
3233 | ('n', 'name', '', |
|
|||
3234 | _('queue name to pop (DEPRECATED)'), _('NAME')), |
|
|||
3235 | ('f', 'force', None, _('forget any local changes to patched files'))], |
|
|||
3236 | _('hg qpop [-a] [-f] [PATCH | INDEX]')), |
|
|||
3237 | "^qpush": |
|
|||
3238 | (push, |
|
|||
3239 | [('f', 'force', None, _('apply on top of local changes')), |
|
|||
3240 | ('e', 'exact', None, _('apply the target patch to its recorded parent')), |
|
|||
3241 | ('l', 'list', None, _('list patch name in commit text')), |
|
|||
3242 | ('a', 'all', None, _('apply all patches')), |
|
|||
3243 | ('m', 'merge', None, _('merge from another queue (DEPRECATED)')), |
|
|||
3244 | ('n', 'name', '', |
|
|||
3245 | _('merge queue name (DEPRECATED)'), _('NAME')), |
|
|||
3246 | ('', 'move', None, _('reorder patch series and apply only the patch'))], |
|
|||
3247 | _('hg qpush [-f] [-l] [-a] [--move] [PATCH | INDEX]')), |
|
|||
3248 | "^qrefresh": |
|
|||
3249 | (refresh, |
|
|||
3250 | [('e', 'edit', None, _('edit commit message')), |
|
|||
3251 | ('g', 'git', None, _('use git extended diff format')), |
|
|||
3252 | ('s', 'short', None, |
|
|||
3253 | _('refresh only files already in the patch and specified files')), |
|
|||
3254 | ('U', 'currentuser', None, |
|
|||
3255 | _('add/update author field in patch with current user')), |
|
|||
3256 | ('u', 'user', '', |
|
|||
3257 | _('add/update author field in patch with given user'), _('USER')), |
|
|||
3258 | ('D', 'currentdate', None, |
|
|||
3259 | _('add/update date field in patch with current date')), |
|
|||
3260 | ('d', 'date', '', |
|
|||
3261 | _('add/update date field in patch with given date'), _('DATE')) |
|
|||
3262 | ] + commands.walkopts + commands.commitopts, |
|
|||
3263 | _('hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...')), |
|
|||
3264 | 'qrename|qmv': |
|
|||
3265 | (rename, [], _('hg qrename PATCH1 [PATCH2]')), |
|
|||
3266 | "qrestore": |
|
|||
3267 | (restore, |
|
|||
3268 | [('d', 'delete', None, _('delete save entry')), |
|
|||
3269 | ('u', 'update', None, _('update queue working directory'))], |
|
|||
3270 | _('hg qrestore [-d] [-u] REV')), |
|
|||
3271 | "qsave": |
|
|||
3272 | (save, |
|
|||
3273 | [('c', 'copy', None, _('copy patch directory')), |
|
|||
3274 | ('n', 'name', '', |
|
|||
3275 | _('copy directory name'), _('NAME')), |
|
|||
3276 | ('e', 'empty', None, _('clear queue status file')), |
|
|||
3277 | ('f', 'force', None, _('force copy'))] + commands.commitopts, |
|
|||
3278 | _('hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f]')), |
|
|||
3279 | "qselect": |
|
|||
3280 | (select, |
|
|||
3281 | [('n', 'none', None, _('disable all guards')), |
|
|||
3282 | ('s', 'series', None, _('list all guards in series file')), |
|
|||
3283 | ('', 'pop', None, _('pop to before first guarded applied patch')), |
|
|||
3284 | ('', 'reapply', None, _('pop, then reapply patches'))], |
|
|||
3285 | _('hg qselect [OPTION]... [GUARD]...')), |
|
|||
3286 | "qseries": |
|
|||
3287 | (series, |
|
|||
3288 | [('m', 'missing', None, _('print patches not in series')), |
|
|||
3289 | ] + seriesopts, |
|
|||
3290 | _('hg qseries [-ms]')), |
|
|||
3291 | "strip": |
|
|||
3292 | (strip, |
|
|||
3293 | [('f', 'force', None, _('force removal of changesets, discard ' |
|
|||
3294 | 'uncommitted changes (no backup)')), |
|
|||
3295 | ('b', 'backup', None, _('bundle only changesets with local revision' |
|
|||
3296 | ' number greater than REV which are not' |
|
|||
3297 | ' descendants of REV (DEPRECATED)')), |
|
|||
3298 | ('n', 'no-backup', None, _('no backups')), |
|
|||
3299 | ('', 'nobackup', None, _('no backups (DEPRECATED)')), |
|
|||
3300 | ('k', 'keep', None, _("do not modify working copy during strip"))], |
|
|||
3301 | _('hg strip [-k] [-f] [-n] REV...')), |
|
|||
3302 | "qtop": (top, [] + seriesopts, _('hg qtop [-s]')), |
|
|||
3303 | "qunapplied": |
|
|||
3304 | (unapplied, |
|
|||
3305 | [('1', 'first', None, _('show only the first patch'))] + seriesopts, |
|
|||
3306 | _('hg qunapplied [-1] [-s] [PATCH]')), |
|
|||
3307 | "qfinish": |
|
|||
3308 | (finish, |
|
|||
3309 | [('a', 'applied', None, _('finish all applied changesets'))], |
|
|||
3310 | _('hg qfinish [-a] [REV]...')), |
|
|||
3311 | 'qqueue': |
|
|||
3312 | (qqueue, |
|
|||
3313 | [ |
|
|||
3314 | ('l', 'list', False, _('list all available queues')), |
|
|||
3315 | ('c', 'create', False, _('create new queue')), |
|
|||
3316 | ('', 'rename', False, _('rename active queue')), |
|
|||
3317 | ('', 'delete', False, _('delete reference to queue')), |
|
|||
3318 | ('', 'purge', False, _('delete queue, and remove patch dir')), |
|
|||
3319 | ], |
|
|||
3320 | _('[OPTION] [QUEUE]')), |
|
|||
3321 | } |
|
|||
3322 |
|
3300 | |||
3323 | colortable = {'qguard.negative': 'red', |
|
3301 | colortable = {'qguard.negative': 'red', | |
3324 | 'qguard.positive': 'yellow', |
|
3302 | 'qguard.positive': 'yellow', |
General Comments 0
You need to be logged in to leave comments.
Login now