Mercurial > hg-stable
changeset 27278:42aa0e570eaa
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 07 Dec 2015 18:06:13 -0600 |
parents | 07ae7e8c8ac9 (current diff) cea1473ba468 (diff) |
children | 40eb385f798f |
files | mercurial/localrepo.py tests/test-hook.t |
diffstat | 9 files changed, 123 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsigs Sat Dec 05 23:14:49 2015 -0800 +++ b/.hgsigs Mon Dec 07 18:06:13 2015 -0600 @@ -116,3 +116,4 @@ b66e3ca0b90c3095ea28dfd39aa24247bebf5c20 0 iQIVAwUAViarTyBXgaxoKi1yAQLZgRAAh7c7ebn7kUWI5M/b/T6qHGjFrU5azkjamzy9IG+KIa2hZgSMxyEM7JJUFqKP4TiWa3sW03bjKGSM/SjjDSSyheX+JIVSPNyKrBwneYhPq45Ius8eiHziClkt0CSsl2d9xDRpI0JmHbN0Pf8nh7rnbL+231GDAOT6dP+2S8K1HGa/0BgEcL9gpYs4/2GyjL+hBSUjyrabzvwe48DCN5W0tEJbGFw5YEADxdfbVbNEuXL81tR4PFGiJxPW0QKRLDB74MWmiWC0gi2ZC/IhbNBZ2sLb6694d4Bx4PVwtiARh63HNXVMEaBrFu1S9NcMQyHvAOc6Zw4izF/PCeTcdEnPk8J1t5PTz09Lp0EAKxe7CWIViy350ke5eiaxO3ySrNMX6d83BOHLDqEFMSWm+ad+KEMT4CJrK4X/n/XMgEFAaU5nWlIRqrLRIeU2Ifc625T0Xh4BgTqXPpytQxhgV5b+Fi6duNk4cy+QnHT4ymxI6BPD9HvSQwc+O7h37qjvJVZmpQX6AP8O75Yza8ZbcYKRIIxZzOkwNpzE5A/vpvP5bCRn7AGcT3ORWmAYr/etr3vxUvt2fQz6U/R4S915V+AeWBdcp+uExu6VZ42M0vhhh0lyzx1VRJGVdV+LoxFKkaC42d0yT+O1QEhSB7WL1D3/a/iWubv6ieB/cvNMhFaK9DA= 47dd34f2e7272be9e3b2a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4El1ePrdFzG3dXSVA3eHvMDRnYnNlue9wHvKhYbBle5xTOZBgGuMzhDVe+54JLql5JYr4WrI1pvA=
--- a/.hgtags Sat Dec 05 23:14:49 2015 -0800 +++ b/.hgtags Mon Dec 07 18:06:13 2015 -0600 @@ -129,3 +129,4 @@ b66e3ca0b90c3095ea28dfd39aa24247bebf5c20 3.6-rc 47dd34f2e7272be9e3b2a5a83cd0d20be44293f4 3.6 1aa5083cbebbe7575c88f3402ab377539b484897 3.6.1 +2d437a0f3355834a9485bbbeb30a52a052c98f19 3.6.2
--- a/contrib/dockerlib.sh Sat Dec 05 23:14:49 2015 -0800 +++ b/contrib/dockerlib.sh Mon Dec 07 18:06:13 2015 -0600 @@ -14,8 +14,8 @@ fi $DOCKER -h 2> /dev/null | grep -q Jansens && { echo "Error: $DOCKER is the Docking System Tray - install docker.io instead"; exit 1; } - $DOCKER version | grep -q "^Client version:" || { echo "Error: unexpected output from \"$DOCKER version\""; exit 1; } - $DOCKER version | grep -q "^Server version:" || { echo "Error: could not get docker server version - check it is running and your permissions"; exit 1; } + $DOCKER version | grep -Eq "^Client( version)?:" || { echo "Error: unexpected output from \"$DOCKER version\""; exit 1; } + $DOCKER version | grep -Eq "^Server( version)?:" || { echo "Error: could not get docker server version - check it is running and your permissions"; exit 1; } } # Construct a container and leave its name in $CONTAINER for future use. @@ -35,8 +35,8 @@ # running docker. This is *very likely* to fail at some point. echo RUN useradd $DBUILDUSER -u 1000 else - echo RUN groupadd $DBUILDUSER -g `id -g` --non-unique - echo RUN useradd $DBUILDUSER -u `id -u` -g $DBUILDUSER --non-unique + echo RUN groupadd $DBUILDUSER -g `id -g` -o + echo RUN useradd $DBUILDUSER -u `id -u` -g $DBUILDUSER -o fi ) | $DOCKER build --tag $CONTAINER - }
--- a/mercurial/hook.py Sat Dec 05 23:14:49 2015 -0800 +++ b/mercurial/hook.py Mon Dec 07 18:06:13 2015 -0600 @@ -120,10 +120,11 @@ env = {} # make in-memory changes visible to external process - tr = repo.currenttransaction() - repo.dirstate.write(tr) - if tr and tr.writepending(): - env['HG_PENDING'] = repo.root + if repo is not None: + tr = repo.currenttransaction() + repo.dirstate.write(tr) + if tr and tr.writepending(): + env['HG_PENDING'] = repo.root for k, v in args.iteritems(): if callable(v):
--- a/mercurial/localrepo.py Sat Dec 05 23:14:49 2015 -0800 +++ b/mercurial/localrepo.py Mon Dec 07 18:06:13 2015 -0600 @@ -1569,19 +1569,12 @@ if merge and cctx.deleted(): raise error.Abort(_("cannot commit merge with missing files")) - unresolved, driverresolved = False, False ms = mergemod.mergestate.read(self) - for f in status.modified: - if f in ms: - if ms[f] == 'u': - unresolved = True - elif ms[f] == 'd': - driverresolved = True - if unresolved: + if list(ms.unresolved()): raise error.Abort(_('unresolved merge conflicts ' '(see "hg help resolve")')) - if driverresolved or ms.mdstate() != 's': + if ms.mdstate() != 's' or list(ms.driverresolved()): raise error.Abort(_('driver-resolved merge conflicts'), hint=_('run "hg resolve --all" to resolve'))
--- a/mercurial/parsers.c Sat Dec 05 23:14:49 2015 -0800 +++ b/mercurial/parsers.c Mon Dec 07 18:06:13 2015 -0600 @@ -493,6 +493,11 @@ /* read filenames */ while (pos >= 40 && pos < len) { + if (pos + 17 > len) { + PyErr_SetString(PyExc_ValueError, + "overflow in dirstate"); + goto quit; + } cur = str + pos; /* unpack header */ state = *cur;
--- a/tests/test-commit-unresolved.t Sat Dec 05 23:14:49 2015 -0800 +++ b/tests/test-commit-unresolved.t Mon Dec 07 18:06:13 2015 -0600 @@ -43,4 +43,25 @@ (no more unresolved files) $ hg commit -m "Merged" +Test that if a file is removed but not marked resolved, the commit still fails +(issue4972) + + $ hg up ".^" + 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg merge 2 + merging A + warning: conflicts while merging A! (edit, then use 'hg resolve --mark') + 1 files updated, 0 files merged, 0 files removed, 1 files unresolved + use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon + [1] + $ hg rm --force A + $ hg commit -m merged + abort: unresolved merge conflicts (see "hg help resolve") + [255] + + $ hg resolve -ma + (no more unresolved files) + $ hg commit -m merged + created new head + $ cd ..
--- a/tests/test-hook.t Sat Dec 05 23:14:49 2015 -0800 +++ b/tests/test-hook.t Mon Dec 07 18:06:13 2015 -0600 @@ -681,10 +681,19 @@ $ hg tag -f foo ['a', 'foo', 'tip'] +post-init hooks must not crash (issue4983) +This also creates the `to` repo for the next test block. + + $ cd .. + $ cat << EOF >> hgrc-with-post-init-hook + > [hooks] + > post-init = printenv.py post-init + > EOF + $ HGRCPATH=hgrc-with-post-init-hook hg init to + post-init hook: HG_ARGS=init to HG_OPTS={'insecure': None, 'remotecmd': '', 'ssh': ''} HG_PATS=['to'] HG_RESULT=0 + new commits must be visible in pretxnchangegroup (issue3428) - $ cd .. - $ hg init to $ echo '[hooks]' >> to/.hg/hgrc $ echo 'prechangegroup = hg --traceback tip' >> to/.hg/hgrc $ echo 'pretxnchangegroup = hg --traceback tip' >> to/.hg/hgrc
--- a/tests/test-obsolete-changeset-exchange.t Sat Dec 05 23:14:49 2015 -0800 +++ b/tests/test-obsolete-changeset-exchange.t Mon Dec 07 18:06:13 2015 -0600 @@ -83,3 +83,76 @@ adding file changes added 1 changesets with 0 changes to 1 files (+1 heads) (run 'hg heads' to see heads) + $ cd .. + +pull does not fetch excessive changesets when common node is hidden (issue4982) +------------------------------------------------------------------------------- + +initial repo with server and client matching + + $ hg init pull-hidden-common + $ cd pull-hidden-common + $ touch foo + $ hg -q commit -A -m initial + $ echo 1 > foo + $ hg commit -m 1 + $ echo 2a > foo + $ hg commit -m 2a + $ cd .. + $ hg clone --pull pull-hidden-common pull-hidden-common-client + requesting all changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 3 changes to 1 files + updating to branch default + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + +server obsoletes the old head + + $ cd pull-hidden-common + $ hg -q up -r 1 + $ echo 2b > foo + $ hg -q commit -m 2b + $ hg debugobsolete 6a29ed9c68defff1a139e5c6fa9696fb1a75783d bec0734cd68e84477ba7fc1d13e6cff53ab70129 + $ cd .. + +client only pulls down 1 changeset +("all local heads known remotely" may change if the wire protocol discovery +commands ever stop saying they have hidden changesets) + + $ cd pull-hidden-common-client + $ hg pull --debug + pulling from $TESTTMP/pull-hidden-common (glob) + query 1; heads + searching for changes + all local heads known remotely + 3 changesets found + list of changesets: + 96ee1d7354c4ad7372047672c36a1f561e3a6a4c + a33779fdfc23063680fc31e9ff637dff6876d3d2 + bec0734cd68e84477ba7fc1d13e6cff53ab70129 + listing keys for "phase" + listing keys for "bookmarks" + bundle2-output-bundle: "HG20", 3 parts total + bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload + bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload + bundle2-output-part: "listkeys" (params: 1 mandatory) empty payload + bundle2-input-bundle: with-transaction + bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported + adding changesets + add changeset 96ee1d7354c4 + add changeset a33779fdfc23 + add changeset bec0734cd68e + adding manifests + adding file changes + adding foo revisions + added 1 changesets with 1 changes to 1 files (+1 heads) + bundle2-input-part: total payload size 1378 + bundle2-input-part: "listkeys" (params: 1 mandatory) supported + bundle2-input-part: "listkeys" (params: 1 mandatory) supported + bundle2-input-bundle: 2 parts total + checking for updated bookmarks + listing keys for "phases" + updating the branch cache + (run 'hg heads' to see heads, 'hg merge' to merge)