Mercurial > hg-stable
changeset 25195:472a685a4961
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 19 May 2015 07:17:57 -0500 |
parents | 08d1ef09ed37 (current diff) ef4538ba67ef (diff) |
children | 7a1af58ab242 |
files | mercurial/context.py mercurial/exchange.py mercurial/match.py tests/test-subrepo-deep-nested-change.t |
diffstat | 5 files changed, 35 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Fri Apr 24 14:30:30 2015 -0700 +++ b/mercurial/context.py Tue May 19 07:17:57 2015 -0500 @@ -9,7 +9,7 @@ from i18n import _ import mdiff, error, util, scmutil, subrepo, patch, encoding, phases import match as matchmod -import os, errno, stat +import copy, os, errno, stat import obsolete as obsmod import repoview import fileset @@ -592,8 +592,14 @@ '''Generates matching file names.''' # Override match.bad method to have message with nodeid + match = copy.copy(match) oldbad = match.bad def bad(fn, msg): + # The manifest doesn't know about subrepos, so don't complain about + # paths into valid subrepos. + if any(fn == s or fn.startswith(s + '/') + for s in self.substate): + return oldbad(fn, _('no such file in rev %s') % self) match.bad = bad
--- a/mercurial/exchange.py Fri Apr 24 14:30:30 2015 -0700 +++ b/mercurial/exchange.py Tue May 19 07:17:57 2015 -0500 @@ -1290,7 +1290,7 @@ # quick fix for output mismatch with bundle2 in 3.4 captureoutput = repo.ui.configbool('experimental', 'bundle2-output-capture', False) - if url.startswith('remote:http:') or url.startswith('remote:https:'): + if url.startswith('remote:'): captureoutput = True try: check_heads(repo, heads, 'uploading changes')
--- a/mercurial/match.py Fri Apr 24 14:30:30 2015 -0700 +++ b/mercurial/match.py Tue May 19 07:17:57 2015 -0500 @@ -274,6 +274,12 @@ self._files = [f[len(path) + 1:] for f in matcher._files if f.startswith(path + "/")] + + # If the parent repo had a path to this subrepo and no patterns are + # specified, this submatcher always matches. + if not self._always and not matcher._anypats: + self._always = any(f == path for f in matcher._files) + self._anypats = matcher._anypats self.matchfn = lambda fn: matcher.matchfn(self._path + "/" + fn) self._fileroots = set(self._files)
--- a/tests/test-bundle2-exchange.t Fri Apr 24 14:30:30 2015 -0700 +++ b/tests/test-bundle2-exchange.t Tue May 19 07:17:57 2015 -0500 @@ -694,7 +694,6 @@ $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6 pushing to ssh://user@dummy/other searching for changes - abort: pretxnchangegroup hook exited with status 1 remote: adding changesets remote: adding manifests remote: adding file changes @@ -703,6 +702,7 @@ remote: transaction abort! remote: Cleaning up the mess... remote: rollback completed + abort: pretxnchangegroup hook exited with status 1 [255] $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6 pushing to http://localhost:$HGPORT2/
--- a/tests/test-subrepo-deep-nested-change.t Fri Apr 24 14:30:30 2015 -0700 +++ b/tests/test-subrepo-deep-nested-change.t Tue May 19 07:17:57 2015 -0500 @@ -232,6 +232,26 @@ sub1/sub2/sub2 (glob) sub1/sub2/test.txt (glob) + $ hg files -S -r '.^' sub1/sub2/folder + sub1/sub2/folder/test.txt (glob) + + $ hg files -S -r '.^' sub1/sub2/missing + sub1/sub2/missing: no such file in rev 78026e779ea6 (glob) + [1] + + $ hg files -S -r '.^' sub1/ + sub1/.hgsub (glob) + sub1/.hgsubstate (glob) + sub1/sub1 (glob) + sub1/sub2/folder/test.txt (glob) + sub1/sub2/sub2 (glob) + sub1/sub2/test.txt (glob) + + $ hg files -S -r '.^' sub1/sub2 + sub1/sub2/folder/test.txt (glob) + sub1/sub2/sub2 (glob) + sub1/sub2/test.txt (glob) + $ hg rollback -q $ hg up -Cq