Show More
@@ -277,7 +277,7 b' def goutgoing(ui, repo, dest=None, **opt' | |||
|
277 | 277 | |
|
278 | 278 | check_unsupported_flags(opts) |
|
279 | 279 | dest = ui.expandpath(dest or 'default-push', dest or 'default') |
|
280 | dest, branches = hg.parseurl(dest) | |
|
280 | dest, branches = hg.parseurl(dest, opts.get('branch')) | |
|
281 | 281 | revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev')) |
|
282 | 282 | other = hg.repository(cmdutil.remoteui(ui, opts), dest) |
|
283 | 283 | if revs: |
@@ -305,7 +305,7 b' def gincoming(ui, repo, source="default"' | |||
|
305 | 305 | """ |
|
306 | 306 | |
|
307 | 307 | check_unsupported_flags(opts) |
|
308 | source, branches = hg.parseurl(ui.expandpath(source)) | |
|
308 | source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch')) | |
|
309 | 309 | other = hg.repository(cmdutil.remoteui(repo, opts), source) |
|
310 | 310 | revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev')) |
|
311 | 311 | ui.status(_('comparing with %s\n') % url.hidepassword(source)) |
@@ -538,7 +538,7 b' def bundle(ui, repo, fname, dest=None, *' | |||
|
538 | 538 | visit.append(p) |
|
539 | 539 | else: |
|
540 | 540 | dest = ui.expandpath(dest or 'default-push', dest or 'default') |
|
541 | dest, branches = hg.parseurl(dest) | |
|
541 | dest, branches = hg.parseurl(dest, opts.get('branch')) | |
|
542 | 542 | other = hg.repository(cmdutil.remoteui(repo, opts), dest) |
|
543 | 543 | revs, checkout = hg.addbranchrevs(repo, other, branches, revs) |
|
544 | 544 | o = repo.findoutgoing(other, force=opts.get('force')) |
@@ -607,8 +607,9 b' def clone(ui, source, dest=None, **opts)' | |||
|
607 | 607 | |
|
608 | 608 | a) the changeset, tag or branch specified with -u/--updaterev |
|
609 | 609 | b) the changeset, tag or branch given with the first -r/--rev |
|
610 |
c) the branch given with the |
|
|
611 | d) the head of the default branch | |
|
610 | c) the branch given with the first -b/--branch | |
|
611 | d) the branch given with the url#branch source syntax | |
|
612 | e) the head of the default branch | |
|
612 | 613 | |
|
613 | 614 | Use 'hg clone -u . src dst' to checkout the source repository's |
|
614 | 615 | parent changeset (applicable for local source repositories only). |
@@ -651,7 +652,8 b' def clone(ui, source, dest=None, **opts)' | |||
|
651 | 652 | pull=opts.get('pull'), |
|
652 | 653 | stream=opts.get('uncompressed'), |
|
653 | 654 | rev=opts.get('rev'), |
|
654 |
update=opts.get('updaterev') or not opts.get('noupdate') |
|
|
655 | update=opts.get('updaterev') or not opts.get('noupdate'), | |
|
656 | branch=opts.get('branch')) | |
|
655 | 657 | |
|
656 | 658 | def commit(ui, repo, *pats, **opts): |
|
657 | 659 | """commit the specified files or all outstanding changes |
@@ -1921,7 +1923,7 b' def incoming(ui, repo, source="default",' | |||
|
1921 | 1923 | See pull for valid source format details. |
|
1922 | 1924 | """ |
|
1923 | 1925 | limit = cmdutil.loglimit(opts) |
|
1924 | source, branches = hg.parseurl(ui.expandpath(source)) | |
|
1926 | source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch')) | |
|
1925 | 1927 | other = hg.repository(cmdutil.remoteui(repo, opts), source) |
|
1926 | 1928 | ui.status(_('comparing with %s\n') % url.hidepassword(source)) |
|
1927 | 1929 | revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev')) |
@@ -2210,7 +2212,7 b' def outgoing(ui, repo, dest=None, **opts' | |||
|
2210 | 2212 | """ |
|
2211 | 2213 | limit = cmdutil.loglimit(opts) |
|
2212 | 2214 | dest = ui.expandpath(dest or 'default-push', dest or 'default') |
|
2213 | dest, branches = hg.parseurl(dest) | |
|
2215 | dest, branches = hg.parseurl(dest, opts.get('branch')) | |
|
2214 | 2216 | revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev')) |
|
2215 | 2217 | if revs: |
|
2216 | 2218 | revs = [repo.lookup(rev) for rev in revs] |
@@ -2330,7 +2332,7 b' def pull(ui, repo, source="default", **o' | |||
|
2330 | 2332 | If SOURCE is omitted, the 'default' path will be used. |
|
2331 | 2333 | See 'hg help urls' for more information. |
|
2332 | 2334 | """ |
|
2333 | source, branches = hg.parseurl(ui.expandpath(source)) | |
|
2335 | source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch')) | |
|
2334 | 2336 | other = hg.repository(cmdutil.remoteui(repo, opts), source) |
|
2335 | 2337 | ui.status(_('pulling from %s\n') % url.hidepassword(source)) |
|
2336 | 2338 | revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev')) |
@@ -2368,7 +2370,7 b' def push(ui, repo, dest=None, **opts):' | |||
|
2368 | 2370 | URLs. If DESTINATION is omitted, a default path will be used. |
|
2369 | 2371 | """ |
|
2370 | 2372 | dest = ui.expandpath(dest or 'default-push', dest or 'default') |
|
2371 | dest, branches = hg.parseurl(dest) | |
|
2373 | dest, branches = hg.parseurl(dest, opts.get('branch')) | |
|
2372 | 2374 | revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev')) |
|
2373 | 2375 | other = hg.repository(cmdutil.remoteui(repo, opts), dest) |
|
2374 | 2376 | ui.status(_('pushing to %s\n') % url.hidepassword(dest)) |
@@ -3415,6 +3417,8 b' table = {' | |||
|
3415 | 3417 | _('run even when the destination is unrelated')), |
|
3416 | 3418 | ('r', 'rev', [], |
|
3417 | 3419 | _('a changeset intended to be added to the destination')), |
|
3420 | ('b', 'branch', [], | |
|
3421 | _('a specific branch you would like to bundle')), | |
|
3418 | 3422 | ('', 'base', [], |
|
3419 | 3423 | _('a base changeset assumed to be available at the destination')), |
|
3420 | 3424 | ('a', 'all', None, _('bundle all changesets in the repository')), |
@@ -3436,6 +3440,8 b' table = {' | |||
|
3436 | 3440 | _('revision, tag or branch to check out')), |
|
3437 | 3441 | ('r', 'rev', [], |
|
3438 | 3442 | _('include the specified changeset')), |
|
3443 | ('b', 'branch', [], | |
|
3444 | _('clone only the specified branch')), | |
|
3439 | 3445 | ('', 'pull', None, _('use pull protocol to copy metadata')), |
|
3440 | 3446 | ('', 'uncompressed', None, |
|
3441 | 3447 | _('use uncompressed transfer (fast over LAN)')), |
@@ -3567,6 +3573,8 b' table = {' | |||
|
3567 | 3573 | ('', 'bundle', '', _('file to store the bundles into')), |
|
3568 | 3574 | ('r', 'rev', [], |
|
3569 | 3575 | _('a remote changeset intended to be added')), |
|
3576 | ('b', 'branch', [], | |
|
3577 | _('a specific branch you would like to pull')), | |
|
3570 | 3578 | ] + logopts + remoteopts, |
|
3571 | 3579 | _('[-p] [-n] [-M] [-f] [-r REV]...' |
|
3572 | 3580 | ' [--bundle FILENAME] [SOURCE]')), |
@@ -3621,6 +3629,8 b' table = {' | |||
|
3621 | 3629 | ('r', 'rev', [], |
|
3622 | 3630 | _('a changeset intended to be included in the destination')), |
|
3623 | 3631 | ('n', 'newest-first', None, _('show newest record first')), |
|
3632 | ('b', 'branch', [], | |
|
3633 | _('a specific branch you would like to push')), | |
|
3624 | 3634 | ] + logopts + remoteopts, |
|
3625 | 3635 | _('[-M] [-p] [-n] [-f] [-r REV]... [DEST]')), |
|
3626 | 3636 | "parents": |
@@ -3637,6 +3647,8 b' table = {' | |||
|
3637 | 3647 | _('run even when remote repository is unrelated')), |
|
3638 | 3648 | ('r', 'rev', [], |
|
3639 | 3649 | _('a remote changeset intended to be added')), |
|
3650 | ('b', 'branch', [], | |
|
3651 | _('a specific branch you would like to pull')), | |
|
3640 | 3652 | ] + remoteopts, |
|
3641 | 3653 | _('[-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE]')), |
|
3642 | 3654 | "^push": |
@@ -3644,6 +3656,8 b' table = {' | |||
|
3644 | 3656 | [('f', 'force', None, _('force push')), |
|
3645 | 3657 | ('r', 'rev', [], |
|
3646 | 3658 | _('a changeset intended to be included in the destination')), |
|
3659 | ('b', 'branch', [], | |
|
3660 | _('a specific branch you would like to push')), | |
|
3647 | 3661 | ] + remoteopts, |
|
3648 | 3662 | _('[-f] [-r REV]... [-e CMD] [--remotecmd CMD] [DEST]')), |
|
3649 | 3663 | "recover": (recover, []), |
@@ -164,7 +164,7 b' def share(ui, source, dest=None, update=' | |||
|
164 | 164 | _update(r, uprev) |
|
165 | 165 | |
|
166 | 166 | def clone(ui, source, dest=None, pull=False, rev=None, update=True, |
|
167 | stream=False): | |
|
167 | stream=False, branch=None): | |
|
168 | 168 | """Make a copy of an existing repository. |
|
169 | 169 | |
|
170 | 170 | Create a copy of an existing repository in a new directory. The |
@@ -196,11 +196,13 b' def clone(ui, source, dest=None, pull=Fa' | |||
|
196 | 196 | update: update working directory after clone completes, if |
|
197 | 197 | destination is local repository (True means update to default rev, |
|
198 | 198 | anything else is treated as a revision) |
|
199 | ||
|
200 | branch: branches to clone | |
|
199 | 201 | """ |
|
200 | 202 | |
|
201 | 203 | if isinstance(source, str): |
|
202 | 204 | origsource = ui.expandpath(source) |
|
203 | source, branch = parseurl(origsource) | |
|
205 | source, branch = parseurl(origsource, branch) | |
|
204 | 206 | src_repo = repository(ui, source) |
|
205 | 207 | else: |
|
206 | 208 | src_repo = source |
@@ -26,8 +26,10 b" hg ci -d '0 0' -mb2" | |||
|
26 | 26 | |
|
27 | 27 | echo in rev c branch a |
|
28 | 28 | hg in -qr c ../branch#a |
|
29 | hg in -qr c -b a | |
|
29 | 30 | echo out branch . |
|
30 | 31 | hg out -q ../branch#. |
|
32 | hg out -q -b . | |
|
31 | 33 | echo clone branch b |
|
32 | 34 | cd .. |
|
33 | 35 | hg clone branch2#b branch3 |
@@ -18,8 +18,11 b' created new head' | |||
|
18 | 18 | in rev c branch a |
|
19 | 19 | 1:dd6e60a716c6 |
|
20 | 20 | 2:f25d57ab0566 |
|
21 | 1:dd6e60a716c6 | |
|
22 | 2:f25d57ab0566 | |
|
21 | 23 | out branch . |
|
22 | 24 | 2:65511d0e2b55 |
|
25 | 2:65511d0e2b55 | |
|
23 | 26 | clone branch b |
|
24 | 27 | requesting all changes |
|
25 | 28 | adding changesets |
@@ -165,7 +165,7 b" hg: command 's' is ambiguous:" | |||
|
165 | 165 | % Show all commands + options |
|
166 | 166 | add: include, exclude, dry-run |
|
167 | 167 | annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, include, exclude |
|
168 | clone: noupdate, updaterev, rev, pull, uncompressed, ssh, remotecmd | |
|
168 | clone: noupdate, updaterev, rev, branch, pull, uncompressed, ssh, remotecmd | |
|
169 | 169 | commit: addremove, close-branch, include, exclude, message, logfile, date, user |
|
170 | 170 | diff: rev, change, text, git, nodates, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, unified, stat, include, exclude |
|
171 | 171 | export: output, switch-parent, rev, text, git, nodates |
@@ -173,8 +173,8 b' forget: include, exclude' | |||
|
173 | 173 | init: ssh, remotecmd |
|
174 | 174 | log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, prune, patch, git, limit, no-merges, style, template, include, exclude |
|
175 | 175 | merge: force, rev, preview |
|
176 | pull: update, force, rev, ssh, remotecmd | |
|
177 | push: force, rev, ssh, remotecmd | |
|
176 | pull: update, force, rev, branch, ssh, remotecmd | |
|
177 | push: force, rev, branch, ssh, remotecmd | |
|
178 | 178 | remove: after, force, include, exclude |
|
179 | 179 | serve: accesslog, daemon, daemon-pipefds, errorlog, port, address, prefix, name, webdir-conf, pid-file, stdio, templates, style, ipv6, certificate |
|
180 | 180 | status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, copies, print0, rev, change, include, exclude |
@@ -186,7 +186,7 b' backout: merge, parent, rev, include, ex' | |||
|
186 | 186 | bisect: reset, good, bad, skip, command, noupdate |
|
187 | 187 | branch: force, clean |
|
188 | 188 | branches: active, closed |
|
189 | bundle: force, rev, base, all, type, ssh, remotecmd | |
|
189 | bundle: force, rev, branch, base, all, type, ssh, remotecmd | |
|
190 | 190 | cat: output, rev, decode, include, exclude |
|
191 | 191 | copy: after, force, include, exclude, dry-run |
|
192 | 192 | debugancestor: |
@@ -210,10 +210,10 b' heads: rev, topo, active, closed, style,' | |||
|
210 | 210 | help: |
|
211 | 211 | identify: rev, num, id, branch, tags |
|
212 | 212 | import: strip, base, force, no-commit, exact, import-branch, message, logfile, date, user, similarity |
|
213 | incoming: force, newest-first, bundle, rev, patch, git, limit, no-merges, style, template, ssh, remotecmd | |
|
213 | incoming: force, newest-first, bundle, rev, branch, patch, git, limit, no-merges, style, template, ssh, remotecmd | |
|
214 | 214 | locate: rev, print0, fullpath, include, exclude |
|
215 | 215 | manifest: rev |
|
216 | outgoing: force, rev, newest-first, patch, git, limit, no-merges, style, template, ssh, remotecmd | |
|
216 | outgoing: force, rev, newest-first, branch, patch, git, limit, no-merges, style, template, ssh, remotecmd | |
|
217 | 217 | parents: rev, style, template |
|
218 | 218 | paths: |
|
219 | 219 | recover: |
General Comments 0
You need to be logged in to leave comments.
Login now