Mercurial > hg
changeset 48992:bde2e4ef968a
merge: stable into default
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Tue, 29 Mar 2022 14:27:45 +0200 |
parents | 8d7eaff92f9c (current diff) d4752aeb20f1 (diff) |
children | 225659936fff |
files | mercurial/bundle2.py mercurial/cext/parsers.c mercurial/rewriteutil.py mercurial/tags.py |
diffstat | 6 files changed, 73 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bundle2.py Thu Mar 24 21:26:45 2022 -0500 +++ b/mercurial/bundle2.py Tue Mar 29 14:27:45 2022 +0200 @@ -2527,7 +2527,8 @@ @parthandler(b'stream2', (b'requirements', b'filecount', b'bytecount')) def handlestreamv2bundle(op, part): - requirements = urlreq.unquote(part.params[b'requirements']).split(b',') + requirements = urlreq.unquote(part.params[b'requirements']) + requirements = requirements.split(b',') if requirements else [] filecount = int(part.params[b'filecount']) bytecount = int(part.params[b'bytecount'])
--- a/mercurial/cext/parsers.c Thu Mar 24 21:26:45 2022 -0500 +++ b/mercurial/cext/parsers.c Tue Mar 29 14:27:45 2022 +0200 @@ -501,6 +501,8 @@ static PyObject *dirstate_item_set_untracked(dirstateItemObject *self) { self->flags &= ~dirstate_flag_wc_tracked; + self->flags &= ~dirstate_flag_has_meaningful_data; + self->flags &= ~dirstate_flag_has_mtime; self->mode = 0; self->size = 0; self->mtime_s = 0;
--- a/mercurial/rewriteutil.py Thu Mar 24 21:26:45 2022 -0500 +++ b/mercurial/rewriteutil.py Tue Mar 29 14:27:45 2022 +0200 @@ -48,10 +48,13 @@ return summary -def precheck(repo, revs, action=b'rewrite'): +def precheck(repo, revs, action=b'rewrite', check_divergence=True): """check if revs can be rewritten action is used to control the error message. + check_divergence allows skipping the divergence checks in cases like adding + a prune marker (A, ()) to obsstore (which can't be diverging). + Make sure this function is called after taking the lock. """ if nullrev in revs: @@ -84,6 +87,9 @@ hint=hint, ) + if not check_divergence: + return + if not obsolete.isenabled(repo, obsolete.allowdivergenceopt): new_divergence = _find_new_divergence(repo, revs) if new_divergence:
--- a/mercurial/tags.py Thu Mar 24 21:26:45 2022 -0500 +++ b/mercurial/tags.py Tue Mar 29 14:27:45 2022 +0200 @@ -806,7 +806,7 @@ # There is some no-merge changeset where p1 is null and p2 is set # Processing them as merge is just slower, but still gives a good # result. - p2node = cl.node(p1rev) + p2node = cl.node(p2rev) p2fnode = self.getfnode(p2node, computemissing=False) if p1fnode != p2fnode: # we cannot rely on readfast because we don't know against what
--- a/tests/test-clone-stream.t Thu Mar 24 21:26:45 2022 -0500 +++ b/tests/test-clone-stream.t Tue Mar 29 14:27:45 2022 +0200 @@ -817,3 +817,9 @@ $ killdaemons.py #endif + +Cloning a repo with no requirements doesn't give some obscure error + + $ mkdir -p empty-repo/.hg + $ hg clone -q --stream ssh://user@dummy/empty-repo empty-repo2 + $ hg --cwd empty-repo2 verify -q
--- a/tests/test-tags.t Thu Mar 24 21:26:45 2022 -0500 +++ b/tests/test-tags.t Tue Mar 29 14:27:45 2022 +0200 @@ -933,3 +933,58 @@ a8a82d372bb35b42ff736e74f07c23bcd99c371f a a8a82d372bb35b42ff736e74f07c23bcd99c371f a 0000000000000000000000000000000000000000 a + + $ cd .. + +.hgtags fnode should be properly resolved at merge revision (issue6673) + + $ hg init issue6673 + $ cd issue6673 + + $ touch a + $ hg ci -qAm a + $ hg branch -q stable + $ hg ci -m branch + + $ hg up -q default + $ hg merge -q stable + $ hg ci -m merge + + add tag to stable branch: + + $ hg up -q stable + $ echo a >> a + $ hg ci -m a + $ hg tag whatever + $ hg log -GT'{rev} {tags}\n' + @ 4 tip + | + o 3 whatever + | + | o 2 + |/| + o | 1 + |/ + o 0 + + + merge tagged stable into default: + + $ hg up -q default + $ hg merge -q stable + $ hg ci -m merge + $ hg log -GT'{rev} {tags}\n' + @ 5 tip + |\ + | o 4 + | | + | o 3 whatever + | | + o | 2 + |\| + | o 1 + |/ + o 0 + + + $ cd ..