# HG changeset patch # User Matt Mackall # Date 1456789440 21600 # Node ID 5f95d6a70e9b37bf11487580a5c750d861baa8f5 # Parent c407583cf5f6639b680c638b0596376e50542716# Parent c82b290c9560dff307473024b1267da36f8c34a5 merge with i18n diff -r c82b290c9560 -r 5f95d6a70e9b mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py Mon Feb 29 22:52:29 2016 +0900 +++ b/mercurial/bundlerepo.py Mon Feb 29 17:44:00 2016 -0600 @@ -325,7 +325,8 @@ self.bundle.seek(self.manstart) # consume the header if it exists self.bundle.manifestheader() - m = bundlemanifest(self.svfs, self.bundle, self.changelog.rev) + linkmapper = self.unfiltered().changelog.rev + m = bundlemanifest(self.svfs, self.bundle, linkmapper) # XXX: hack to work with changegroup3, but we still don't handle # tree manifests correctly if self.bundle.version == "03": @@ -362,7 +363,8 @@ if f in self.bundlefilespos: self.bundle.seek(self.bundlefilespos[f]) - return bundlefilelog(self.svfs, f, self.bundle, self.changelog.rev) + linkmapper = self.unfiltered().changelog.rev + return bundlefilelog(self.svfs, f, self.bundle, linkmapper) else: return filelog.filelog(self.svfs, f) diff -r c82b290c9560 -r 5f95d6a70e9b mercurial/cmdutil.py --- a/mercurial/cmdutil.py Mon Feb 29 22:52:29 2016 +0900 +++ b/mercurial/cmdutil.py Mon Feb 29 17:44:00 2016 -0600 @@ -2139,9 +2139,15 @@ # Revset matches can reorder revisions. "A or B" typically returns # returns the revision matching A then the revision matching B. Sort # again to fix that. + fixopts = ['branch', 'only_branch', 'keyword', 'user'] + oldrevs = revs revs = matcher(repo, revs) if not opts.get('rev'): revs.sort(reverse=True) + elif len(pats) > 1 or any(len(opts.get(op, [])) > 1 for op in fixopts): + # XXX "A or B" is known to change the order; fix it by filtering + # matched set again (issue5100) + revs = oldrevs & revs if limit is not None: limitedrevs = [] for idx, r in enumerate(revs): diff -r c82b290c9560 -r 5f95d6a70e9b mercurial/demandimport.py --- a/mercurial/demandimport.py Mon Feb 29 22:52:29 2016 +0900 +++ b/mercurial/demandimport.py Mon Feb 29 17:44:00 2016 -0600 @@ -230,6 +230,8 @@ ignore = [ '__future__', '_hashlib', + # ImportError during pkg_resources/__init__.py:fixup_namespace_package + '_imp', '_xmlplus', 'fcntl', 'win32com.gen_py', diff -r c82b290c9560 -r 5f95d6a70e9b mercurial/unionrepo.py --- a/mercurial/unionrepo.py Mon Feb 29 22:52:29 2016 +0900 +++ b/mercurial/unionrepo.py Mon Feb 29 17:44:00 2016 -0600 @@ -211,14 +211,14 @@ @localrepo.unfilteredpropertycache def manifest(self): return unionmanifest(self.svfs, self.repo2.svfs, - self._clrev) + self.unfiltered()._clrev) def url(self): return self._url def file(self, f): return unionfilelog(self.svfs, f, self.repo2.svfs, - self._clrev, self) + self.unfiltered()._clrev, self) def close(self): self.repo2.close() diff -r c82b290c9560 -r 5f95d6a70e9b tests/test-log.t --- a/tests/test-log.t Mon Feb 29 22:52:29 2016 +0900 +++ b/tests/test-log.t Mon Feb 29 17:44:00 2016 -0600 @@ -920,6 +920,116 @@ $ cd .. +Test that log should respect the order of -rREV even if multiple OR conditions +are specified (issue5100): + + $ hg init revorder + $ cd revorder + + $ hg branch -q b0 + $ echo 0 >> f0 + $ hg ci -qAm k0 -u u0 + $ hg branch -q b1 + $ echo 1 >> f1 + $ hg ci -qAm k1 -u u1 + $ hg branch -q b2 + $ echo 2 >> f2 + $ hg ci -qAm k2 -u u2 + + $ hg update -q b2 + $ echo 3 >> f2 + $ hg ci -qAm k2 -u u2 + $ hg update -q b1 + $ echo 4 >> f1 + $ hg ci -qAm k1 -u u1 + $ hg update -q b0 + $ echo 5 >> f0 + $ hg ci -qAm k0 -u u0 + + summary of revisions: + + $ hg log -G -T '{rev} {branch} {author} {desc} {files}\n' + @ 5 b0 u0 k0 f0 + | + | o 4 b1 u1 k1 f1 + | | + | | o 3 b2 u2 k2 f2 + | | | + | | o 2 b2 u2 k2 f2 + | |/ + | o 1 b1 u1 k1 f1 + |/ + o 0 b0 u0 k0 f0 + + + log -b BRANCH in ascending order: + + $ hg log -r0:tip -T '{rev} {branch}\n' -b b0 -b b1 + 0 b0 + 1 b1 + 4 b1 + 5 b0 + $ hg log -r0:tip -T '{rev} {branch}\n' -b b1 -b b0 + 0 b0 + 1 b1 + 4 b1 + 5 b0 + + log --only-branch BRANCH in descending order: + + $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b1 --only-branch b2 + 4 b1 + 3 b2 + 2 b2 + 1 b1 + $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b2 --only-branch b1 + 4 b1 + 3 b2 + 2 b2 + 1 b1 + + log -u USER in ascending order, against compound set: + + $ hg log -r'::head()' -T '{rev} {author}\n' -u u0 -u u2 + 0 u0 + 2 u2 + 3 u2 + 5 u0 + $ hg log -r'::head()' -T '{rev} {author}\n' -u u2 -u u0 + 0 u0 + 2 u2 + 3 u2 + 5 u0 + + log -k TEXT in descending order, against compound set: + + $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k0 -k k1 -k k2 + 5 k0 + 3 k2 + 2 k2 + 1 k1 + 0 k0 + $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k2 -k k1 -k k0 + 5 k0 + 3 k2 + 2 k2 + 1 k1 + 0 k0 + + log FILE in ascending order, against dagrange: + + $ hg log -r1:: -T '{rev} {files}\n' f1 f2 + 1 f1 + 2 f2 + 3 f2 + 4 f1 + $ hg log -r1:: -T '{rev} {files}\n' f2 f1 + 1 f1 + 2 f2 + 3 f2 + 4 f1 + + $ cd .. User diff -r c82b290c9560 -r 5f95d6a70e9b tests/test-obsolete.t --- a/tests/test-obsolete.t Mon Feb 29 22:52:29 2016 +0900 +++ b/tests/test-obsolete.t Mon Feb 29 17:44:00 2016 -0600 @@ -1004,5 +1004,74 @@ (use --hidden to access hidden revisions) [255] +Test ability to pull changeset with locally applying obsolescence markers +(issue4945) + $ cd .. + $ hg init issue4845 + $ cd issue4845 + $ echo foo > f0 + $ hg add f0 + $ hg ci -m '0' + $ echo foo > f1 + $ hg add f1 + $ hg ci -m '1' + $ echo foo > f2 + $ hg add f2 + $ hg ci -m '2' + + $ echo bar > f2 + $ hg commit --amend --config experimetnal.evolution=createmarkers + $ hg log -G + @ 4:b0551702f918 (draft) [tip ] 2 + | + o 1:e016b03fd86f (draft) [ ] 1 + | + o 0:a78f55e5508c (draft) [ ] 0 + + $ hg log -G --hidden + @ 4:b0551702f918 (draft) [tip ] 2 + | + | x 3:f27abbcc1f77 (draft) [ ] temporary amend commit for e008cf283490 + | | + | x 2:e008cf283490 (draft) [ ] 2 + |/ + o 1:e016b03fd86f (draft) [ ] 1 + | + o 0:a78f55e5508c (draft) [ ] 0 + + + $ hg strip -r 1 --config extensions.strip= + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-c41c6bcc-backup.hg (glob) + $ hg log -G + @ 0:a78f55e5508c (draft) [tip ] 0 + + $ hg log -G --hidden + @ 0:a78f55e5508c (draft) [tip ] 0 + + + $ hg pull .hg/strip-backup/* + pulling from .hg/strip-backup/e016b03fd86f-c41c6bcc-backup.hg + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files + (run 'hg update' to get a working copy) + $ hg log -G + o 2:b0551702f918 (draft) [tip ] 2 + | + o 1:e016b03fd86f (draft) [ ] 1 + | + @ 0:a78f55e5508c (draft) [ ] 0 + + $ hg log -G --hidden + o 2:b0551702f918 (draft) [tip ] 2 + | + o 1:e016b03fd86f (draft) [ ] 1 + | + @ 0:a78f55e5508c (draft) [ ] 0 + +