##// END OF EJS Templates
merge with stable
Matt Mackall -
r28218:41dcd754 merge default
parent child Browse files
Show More
@@ -163,8 +163,8 b' def config(orig, self, section, key, def'
163 return path
163 return path
164 return orig(self, section, key, default, untrusted)
164 return orig(self, section, key, default, untrusted)
165
165
166 def configitems(orig, self, section, untrusted=False):
166 def configitems(orig, self, section, *args, **kwargs):
167 repos = orig(self, section, untrusted)
167 repos = orig(self, section, *args, **kwargs)
168 if section == "paths":
168 if section == "paths":
169 repos += getzcpaths()
169 repos += getzcpaths()
170 return repos
170 return repos
@@ -2850,10 +2850,6 b' def revert(ui, repo, ctx, parents, *pats'
2850 mf = ctx.manifest()
2850 mf = ctx.manifest()
2851 if node == p2:
2851 if node == p2:
2852 parent = p2
2852 parent = p2
2853 if node == parent:
2854 pmf = mf
2855 else:
2856 pmf = None
2857
2853
2858 # need all matching names in dirstate and manifest of target rev,
2854 # need all matching names in dirstate and manifest of target rev,
2859 # so have to walk both. do not print errors if files exist in one
2855 # so have to walk both. do not print errors if files exist in one
@@ -2968,11 +2964,7 b' def revert(ui, repo, ctx, parents, *pats'
2968 # in case of merge, files that are actually added can be reported as
2964 # in case of merge, files that are actually added can be reported as
2969 # modified, we need to post process the result
2965 # modified, we need to post process the result
2970 if p2 != nullid:
2966 if p2 != nullid:
2971 if pmf is None:
2967 mergeadd = dsmodified - smf
2972 # only need parent manifest in the merge case,
2973 # so do not read by default
2974 pmf = repo[parent].manifest()
2975 mergeadd = dsmodified - set(pmf)
2976 dsadded |= mergeadd
2968 dsadded |= mergeadd
2977 dsmodified -= mergeadd
2969 dsmodified -= mergeadd
2978
2970
@@ -435,8 +435,8 b' def eol(mctx, x):'
435 styles.
435 styles.
436 """
436 """
437
437
438 # i18n: "encoding" is a keyword
438 # i18n: "eol" is a keyword
439 enc = getstring(x, _("encoding requires an encoding name"))
439 enc = getstring(x, _("eol requires a style name"))
440
440
441 s = []
441 s = []
442 for f in mctx.existing():
442 for f in mctx.existing():
@@ -276,7 +276,7 b' run arbitrary commands. As an example, :'
276 will let you do ``hg echo foo`` to have ``foo`` printed in your
276 will let you do ``hg echo foo`` to have ``foo`` printed in your
277 terminal. A better example might be::
277 terminal. A better example might be::
278
278
279 purge = !$HG status --no-status --unknown -0 | xargs -0 rm
279 purge = !$HG status --no-status --unknown -0 re: | xargs -0 rm
280
280
281 which will make ``hg purge`` delete all unknown files in the
281 which will make ``hg purge`` delete all unknown files in the
282 repository in the same manner as the purge extension.
282 repository in the same manner as the purge extension.
@@ -334,7 +334,7 b' Each line has the following format::'
334 where ``<name>`` is used to group arguments into authentication
334 where ``<name>`` is used to group arguments into authentication
335 entries. Example::
335 entries. Example::
336
336
337 foo.prefix = hg.intevation.org/mercurial
337 foo.prefix = hg.intevation.de/mercurial
338 foo.username = foo
338 foo.username = foo
339 foo.password = bar
339 foo.password = bar
340 foo.schemes = http https
340 foo.schemes = http https
@@ -977,7 +977,8 b' The CA chain and web.cacerts is not used'
977 For example::
977 For example::
978
978
979 [hostfingerprints]
979 [hostfingerprints]
980 hg.intevation.org = fa:1f:d9:48:f1:e7:74:30:38:8d:d8:58:b6:94:b8:58:28:7d:8b:d0
980 hg.intevation.de = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
981 hg.intevation.org = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
981
982
982 This feature is only supported when using Python 2.6 or later.
983 This feature is only supported when using Python 2.6 or later.
983
984
@@ -43,13 +43,13 b' In addition to filters, there are some b'
43
43
44 .. functionsmarker
44 .. functionsmarker
45
45
46 Also, for any expression that returns a list, there is a list operator:
46 Also, for any expression that returns a list, there is a list operator::
47
47
48 - expr % "{template}"
48 expr % "{template}"
49
49
50 As seen in the above example, "{template}" is interpreted as a template.
50 As seen in the above example, ``{template}`` is interpreted as a template.
51 To prevent it from being interpreted, you can use an escape character "\{"
51 To prevent it from being interpreted, you can use an escape character ``\{``
52 or a raw string prefix, "r'...'".
52 or a raw string prefix, ``r'...'``.
53
53
54 Some sample command line templates:
54 Some sample command line templates:
55
55
@@ -796,7 +796,7 b' class ui(object):'
796 If ui is not interactive, the default is returned.
796 If ui is not interactive, the default is returned.
797 """
797 """
798 if not self.interactive():
798 if not self.interactive():
799 self.write(msg, ' ', default, "\n")
799 self.write(msg, ' ', default or '', "\n")
800 return default
800 return default
801 try:
801 try:
802 r = self._readline(self.label(msg, 'ui.prompt'))
802 r = self._readline(self.label(msg, 'ui.prompt'))
@@ -304,7 +304,7 b' class hgbuildext(build_ext):'
304
304
305 class hgbuildscripts(build_scripts):
305 class hgbuildscripts(build_scripts):
306 def run(self):
306 def run(self):
307 if os.name != 'nt':
307 if os.name != 'nt' or self.distribution.pure:
308 return build_scripts.run(self)
308 return build_scripts.run(self)
309
309
310 exebuilt = False
310 exebuilt = False
@@ -66,6 +66,31 b''
66 date: Thu Jan 01 00:00:00 1970 +0000
66 date: Thu Jan 01 00:00:00 1970 +0000
67 summary: commit-1
67 summary: commit-1
68
68
69 # test prompt username
70
71 $ cat > .hg/hgrc <<EOF
72 > [ui]
73 > askusername = True
74 > EOF
75
76 $ echo 12345 > asdf
77 $ hg commit --config ui.interactive=False -m ask
78 enter a commit username:
79 no username found, using '[^']*' instead (re)
80 $ hg rollback -q
81
82 $ hg commit --config ui.interactive=True -m ask <<EOF
83 > Asked User <ask@example.com>
84 > EOF
85 enter a commit username: Asked User <ask@example.com>
86 $ hg tip
87 changeset: 5:84c91d963b70
88 tag: tip
89 user: Asked User <ask@example.com>
90 date: Thu Jan 01 00:00:00 1970 +0000
91 summary: ask
92
93
69 # test no .hg/hgrc (uses generated non-interactive username)
94 # test no .hg/hgrc (uses generated non-interactive username)
70
95
71 $ echo space > asdf
96 $ echo space > asdf
@@ -97,6 +97,14 b' password should be masked in plain outpu'
97 }
97 }
98 ]
98 ]
99
99
100 zeroconf wraps ui.configitems(), which shouldn't crash at least:
101
102 $ hg paths --config extensions.zeroconf=
103 dupe = $TESTTMP/b#tip (glob)
104 dupe:pushurl = https://example.com/dupe
105 expand = $TESTTMP/a/$SOMETHING/bar (glob)
106 insecure = http://foo:***@example.com/
107
100 $ cd ..
108 $ cd ..
101
109
102 sub-options for an undeclared path are ignored
110 sub-options for an undeclared path are ignored
@@ -1076,3 +1076,72 b' check resulting directory against the --'
1076 $ cd ..
1076 $ cd ..
1077 $ diff -U 0 -- content-base-all.txt content-base-explicit.txt | grep _
1077 $ diff -U 0 -- content-base-all.txt content-base-explicit.txt | grep _
1078 [1]
1078 [1]
1079
1080 Revert to an ancestor of P2 during a merge (issue5052)
1081 -----------------------------------------------------
1082
1083 (prepare the repository)
1084
1085 $ hg init issue5052
1086 $ cd issue5052
1087 $ echo '.\.orig' > .hgignore
1088 $ echo 0 > root
1089 $ hg ci -qAm C0
1090 $ echo 0 > A
1091 $ hg ci -qAm C1
1092 $ echo 1 >> A
1093 $ hg ci -qm C2
1094 $ hg up -q 0
1095 $ echo 1 > B
1096 $ hg ci -qAm C3
1097 $ hg status --rev 'ancestor(.,2)' --rev 2
1098 A A
1099 $ hg log -G -T '{rev} ({files})\n'
1100 @ 3 (B)
1101 |
1102 | o 2 (A)
1103 | |
1104 | o 1 (A)
1105 |/
1106 o 0 (.hgignore root)
1107
1108
1109 actual tests: reverting to something else than a merge parent
1110
1111 $ hg merge
1112 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1113 (branch merge, don't forget to commit)
1114
1115 $ hg status --rev 'p1()'
1116 M A
1117 $ hg status --rev 'p2()'
1118 A B
1119 $ hg status --rev '1'
1120 M A
1121 A B
1122 $ hg revert --rev 1 --all
1123 reverting A
1124 removing B
1125 $ hg status --rev 1
1126
1127 From the other parents
1128
1129 $ hg up -C 'p2()'
1130 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1131 $ hg merge
1132 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1133 (branch merge, don't forget to commit)
1134
1135 $ hg status --rev 'p1()'
1136 M B
1137 $ hg status --rev 'p2()'
1138 A A
1139 $ hg status --rev '1'
1140 M A
1141 A B
1142 $ hg revert --rev 1 --all
1143 reverting A
1144 removing B
1145 $ hg status --rev 1
1146
1147 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now