Show More
@@ -3591,6 +3591,9 b' def paths(ui, repo, search=None):' | |||||
3591 | Show definition of symbolic path name NAME. If no name is given, |
|
3591 | Show definition of symbolic path name NAME. If no name is given, | |
3592 | show definition of all available names. |
|
3592 | show definition of all available names. | |
3593 |
|
3593 | |||
|
3594 | Option -q/--quiet suppresses all output when searching for NAME | |||
|
3595 | and shows only the path names when listing all definitions. | |||
|
3596 | ||||
3594 | Path names are defined in the [paths] section of your |
|
3597 | Path names are defined in the [paths] section of your | |
3595 | configuration file and in ``/etc/mercurial/hgrc``. If run inside a |
|
3598 | configuration file and in ``/etc/mercurial/hgrc``. If run inside a | |
3596 | repository, ``.hg/hgrc`` is used, too. |
|
3599 | repository, ``.hg/hgrc`` is used, too. | |
@@ -3613,13 +3616,17 b' def paths(ui, repo, search=None):' | |||||
3613 | if search: |
|
3616 | if search: | |
3614 | for name, path in ui.configitems("paths"): |
|
3617 | for name, path in ui.configitems("paths"): | |
3615 | if name == search: |
|
3618 | if name == search: | |
3616 |
ui. |
|
3619 | ui.status("%s\n" % util.hidepassword(path)) | |
3617 | return |
|
3620 | return | |
3618 | ui.warn(_("not found!\n")) |
|
3621 | if not ui.quiet: | |
|
3622 | ui.warn(_("not found!\n")) | |||
3619 | return 1 |
|
3623 | return 1 | |
3620 | else: |
|
3624 | else: | |
3621 | for name, path in ui.configitems("paths"): |
|
3625 | for name, path in ui.configitems("paths"): | |
3622 | ui.write("%s = %s\n" % (name, util.hidepassword(path))) |
|
3626 | if ui.quiet: | |
|
3627 | ui.write("%s\n" % name) | |||
|
3628 | else: | |||
|
3629 | ui.write("%s = %s\n" % (name, util.hidepassword(path))) | |||
3623 |
|
3630 | |||
3624 | def postincoming(ui, repo, modheads, optupdate, checkout): |
|
3631 | def postincoming(ui, repo, modheads, optupdate, checkout): | |
3625 | if modheads == 0: |
|
3632 | if modheads == 0: |
@@ -25,6 +25,17 b'' | |||||
25 | $ SOMETHING=/foo hg paths |
|
25 | $ SOMETHING=/foo hg paths | |
26 | dupe = $TESTTMP/b |
|
26 | dupe = $TESTTMP/b | |
27 | expand = /foo/bar |
|
27 | expand = /foo/bar | |
|
28 | $ hg paths -q | |||
|
29 | dupe | |||
|
30 | expand | |||
|
31 | $ hg paths dupe | |||
|
32 | $TESTTMP/b | |||
|
33 | $ hg paths -q dupe | |||
|
34 | $ hg paths unknown | |||
|
35 | not found! | |||
|
36 | [1] | |||
|
37 | $ hg paths -q unknown | |||
|
38 | [1] | |||
28 | $ cd .. |
|
39 | $ cd .. | |
29 |
|
40 | |||
30 | 'file:' disables [paths] entries for clone destination |
|
41 | 'file:' disables [paths] entries for clone destination |
General Comments 0
You need to be logged in to leave comments.
Login now