merge with stable
authorMatt Mackall <mpm@selenic.com>
Wed, 24 Feb 2016 15:55:44 -0600
changeset 28218 41dcd7545266
parent 28217 d2ac8b57a75d (current diff)
parent 28192 cb6a952efbf4 (diff)
child 28219 97fe88806f6f
merge with stable
mercurial/cmdutil.py
mercurial/help/config.txt
mercurial/ui.py
tests/test-paths.t
--- a/hgext/zeroconf/__init__.py	Wed Feb 24 10:41:15 2016 -0800
+++ b/hgext/zeroconf/__init__.py	Wed Feb 24 15:55:44 2016 -0600
@@ -163,8 +163,8 @@
                 return path
     return orig(self, section, key, default, untrusted)
 
-def configitems(orig, self, section, untrusted=False):
-    repos = orig(self, section, untrusted)
+def configitems(orig, self, section, *args, **kwargs):
+    repos = orig(self, section, *args, **kwargs)
     if section == "paths":
         repos += getzcpaths()
     return repos
--- a/mercurial/cmdutil.py	Wed Feb 24 10:41:15 2016 -0800
+++ b/mercurial/cmdutil.py	Wed Feb 24 15:55:44 2016 -0600
@@ -2850,10 +2850,6 @@
     mf = ctx.manifest()
     if node == p2:
         parent = p2
-    if node == parent:
-        pmf = mf
-    else:
-        pmf = None
 
     # need all matching names in dirstate and manifest of target rev,
     # so have to walk both. do not print errors if files exist in one
@@ -2968,11 +2964,7 @@
         # in case of merge, files that are actually added can be reported as
         # modified, we need to post process the result
         if p2 != nullid:
-            if pmf is None:
-                # only need parent manifest in the merge case,
-                # so do not read by default
-                pmf = repo[parent].manifest()
-            mergeadd = dsmodified - set(pmf)
+            mergeadd = dsmodified - smf
             dsadded |= mergeadd
             dsmodified -= mergeadd
 
--- a/mercurial/fileset.py	Wed Feb 24 10:41:15 2016 -0800
+++ b/mercurial/fileset.py	Wed Feb 24 15:55:44 2016 -0600
@@ -435,8 +435,8 @@
     styles.
     """
 
-    # i18n: "encoding" is a keyword
-    enc = getstring(x, _("encoding requires an encoding name"))
+    # i18n: "eol" is a keyword
+    enc = getstring(x, _("eol requires a style name"))
 
     s = []
     for f in mctx.existing():
--- a/mercurial/help/config.txt	Wed Feb 24 10:41:15 2016 -0800
+++ b/mercurial/help/config.txt	Wed Feb 24 15:55:44 2016 -0600
@@ -276,7 +276,7 @@
 will let you do ``hg echo foo`` to have ``foo`` printed in your
 terminal. A better example might be::
 
-   purge = !$HG status --no-status --unknown -0 | xargs -0 rm
+   purge = !$HG status --no-status --unknown -0 re: | xargs -0 rm
 
 which will make ``hg purge`` delete all unknown files in the
 repository in the same manner as the purge extension.
@@ -334,7 +334,7 @@
 where ``<name>`` is used to group arguments into authentication
 entries. Example::
 
-    foo.prefix = hg.intevation.org/mercurial
+    foo.prefix = hg.intevation.de/mercurial
     foo.username = foo
     foo.password = bar
     foo.schemes = http https
@@ -977,7 +977,8 @@
 For example::
 
     [hostfingerprints]
-    hg.intevation.org = fa:1f:d9:48:f1:e7:74:30:38:8d:d8:58:b6:94:b8:58:28:7d:8b:d0
+    hg.intevation.de = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
+    hg.intevation.org = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33
 
 This feature is only supported when using Python 2.6 or later.
 
--- a/mercurial/help/templates.txt	Wed Feb 24 10:41:15 2016 -0800
+++ b/mercurial/help/templates.txt	Wed Feb 24 15:55:44 2016 -0600
@@ -43,13 +43,13 @@
 
 .. functionsmarker
 
-Also, for any expression that returns a list, there is a list operator:
+Also, for any expression that returns a list, there is a list operator::
 
-- expr % "{template}"
+    expr % "{template}"
 
-As seen in the above example, "{template}" is interpreted as a template.
-To prevent it from being interpreted, you can use an escape character "\{"
-or a raw string prefix, "r'...'".
+As seen in the above example, ``{template}`` is interpreted as a template.
+To prevent it from being interpreted, you can use an escape character ``\{``
+or a raw string prefix, ``r'...'``.
 
 Some sample command line templates:
 
--- a/mercurial/ui.py	Wed Feb 24 10:41:15 2016 -0800
+++ b/mercurial/ui.py	Wed Feb 24 15:55:44 2016 -0600
@@ -796,7 +796,7 @@
         If ui is not interactive, the default is returned.
         """
         if not self.interactive():
-            self.write(msg, ' ', default, "\n")
+            self.write(msg, ' ', default or '', "\n")
             return default
         try:
             r = self._readline(self.label(msg, 'ui.prompt'))
--- a/setup.py	Wed Feb 24 10:41:15 2016 -0800
+++ b/setup.py	Wed Feb 24 15:55:44 2016 -0600
@@ -304,7 +304,7 @@
 
 class hgbuildscripts(build_scripts):
     def run(self):
-        if os.name != 'nt':
+        if os.name != 'nt' or self.distribution.pure:
             return build_scripts.run(self)
 
         exebuilt = False
--- a/tests/test-committer.t	Wed Feb 24 10:41:15 2016 -0800
+++ b/tests/test-committer.t	Wed Feb 24 15:55:44 2016 -0600
@@ -66,6 +66,31 @@
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     commit-1
   
+# test prompt username
+
+  $ cat > .hg/hgrc <<EOF
+  > [ui]
+  > askusername = True
+  > EOF
+
+  $ echo 12345 > asdf
+  $ hg commit --config ui.interactive=False -m ask
+  enter a commit username: 
+  no username found, using '[^']*' instead (re)
+  $ hg rollback -q
+
+  $ hg commit --config ui.interactive=True -m ask <<EOF
+  > Asked User <ask@example.com>
+  > EOF
+  enter a commit username: Asked User <ask@example.com>
+  $ hg tip
+  changeset:   5:84c91d963b70
+  tag:         tip
+  user:        Asked User <ask@example.com>
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     ask
+  
+
 # test no .hg/hgrc (uses generated non-interactive username)
 
   $ echo space > asdf
--- a/tests/test-paths.t	Wed Feb 24 10:41:15 2016 -0800
+++ b/tests/test-paths.t	Wed Feb 24 15:55:44 2016 -0600
@@ -97,6 +97,14 @@
    }
   ]
 
+zeroconf wraps ui.configitems(), which shouldn't crash at least:
+
+  $ hg paths --config extensions.zeroconf=
+  dupe = $TESTTMP/b#tip (glob)
+  dupe:pushurl = https://example.com/dupe
+  expand = $TESTTMP/a/$SOMETHING/bar (glob)
+  insecure = http://foo:***@example.com/
+
   $ cd ..
 
 sub-options for an undeclared path are ignored
--- a/tests/test-revert.t	Wed Feb 24 10:41:15 2016 -0800
+++ b/tests/test-revert.t	Wed Feb 24 15:55:44 2016 -0600
@@ -1076,3 +1076,72 @@
   $ cd ..
   $ diff -U 0 -- content-base-all.txt content-base-explicit.txt | grep _
   [1]
+
+Revert to an ancestor of P2 during a merge (issue5052)
+-----------------------------------------------------
+
+(prepare the repository)
+
+  $ hg init issue5052
+  $ cd issue5052
+  $ echo '.\.orig' > .hgignore
+  $ echo 0 > root
+  $ hg ci -qAm C0
+  $ echo 0 > A
+  $ hg ci -qAm C1
+  $ echo 1 >> A
+  $ hg ci -qm C2
+  $ hg up -q 0
+  $ echo 1 > B
+  $ hg ci -qAm C3
+  $ hg status --rev 'ancestor(.,2)' --rev 2
+  A A
+  $ hg log -G -T '{rev} ({files})\n'
+  @  3 (B)
+  |
+  | o  2 (A)
+  | |
+  | o  1 (A)
+  |/
+  o  0 (.hgignore root)
+  
+
+actual tests: reverting to something else than a merge parent
+
+  $ hg merge
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+
+  $ hg status --rev 'p1()'
+  M A
+  $ hg status --rev 'p2()'
+  A B
+  $ hg status --rev '1'
+  M A
+  A B
+  $ hg revert --rev 1 --all
+  reverting A
+  removing B
+  $ hg status --rev 1
+
+From the other parents
+
+  $ hg up -C 'p2()'
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg merge
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+
+  $ hg status --rev 'p1()'
+  M B
+  $ hg status --rev 'p2()'
+  A A
+  $ hg status --rev '1'
+  M A
+  A B
+  $ hg revert --rev 1 --all
+  reverting A
+  removing B
+  $ hg status --rev 1
+
+  $ cd ..