D8244: copies: fix the changeset based algorithm regarding merge

2020-04-28 Thread marmoute (Pierre-Yves David)
Closed by commit rHG45f3f35cefe7: copies: fix the changeset based algorithm 
regarding merge (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs 
Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8244?vs=21181=21235

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8244/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8244

AFFECTED FILES
  mercurial/copies.py
  tests/test-copies-chain-merge.t

CHANGE DETAILS

diff --git a/tests/test-copies-chain-merge.t b/tests/test-copies-chain-merge.t
--- a/tests/test-copies-chain-merge.t
+++ b/tests/test-copies-chain-merge.t
@@ -1,3 +1,5 @@
+#testcases filelog compatibility sidedata
+
 =
 Test Copy tracing for chain of copies involving merge
 =
@@ -6,6 +8,7 @@
 are involved. It cheks we do not have unwanted update of behavior and that the
 different options to retrieve copies behave correctly.
 
+
 Setup
 =
 
@@ -18,6 +21,22 @@
   > logtemplate={rev} {desc}\n
   > EOF
 
+#if compatibility
+  $ cat >> $HGRCPATH << EOF
+  > [experimental]
+  > copies.read-from = compatibility
+  > EOF
+#endif
+
+#if sidedata
+  $ cat >> $HGRCPATH << EOF
+  > [format]
+  > exp-use-side-data = yes
+  > exp-use-copies-side-data-changeset = yes
+  > EOF
+#endif
+
+
   $ hg init repo-chain
   $ cd repo-chain
 
@@ -453,17 +472,26 @@
0   4 0dd616bc7ab1  
1  10 6da5a2eecb9c  
2  19 eb806e34ef6b 0dd616bc7ab1 6da5a2eecb9c
+
+# Here the filelog based implementation is not looking at the rename
+# information (because the file exist on both side). However the changelog
+# based on works fine. We have different output.
+
   $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mAEm-0")'
   M f
+b (no-filelog !)
   R b
   $ hg status --copies --rev 'desc("a-2")' --rev 'desc("mEAm-0")'
   M f
+b (no-filelog !)
   R b
   $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mAEm-0")'
   M f
+d (no-filelog !)
   R d
   $ hg status --copies --rev 'desc("e-2")' --rev 'desc("mEAm-0")'
   M f
+d (no-filelog !)
   R d
   $ hg status --copies --rev 'desc("i-2")' --rev 'desc("a-2")'
   A f
@@ -473,6 +501,18 @@
   A f
 b
   R b
+
+# From here, we run status against revision where both source file exists.
+#
+# The filelog based implementation picks an arbitrary side based on revision
+# numbers. So the same side "wins" whatever the parents order is. This is
+# sub-optimal because depending on revision numbers means the result can be
+# different from one repository to the next.
+#
+# The changeset based algorithm use the parent order to break tie on 
conflicting
+# information and will have a different order depending on who is p1 and p2.
+# That order is stable accross repositories. (data from p1 prevails)
+
   $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mAEm-0")'
   A f
 d
@@ -480,7 +520,8 @@
   R d
   $ hg status --copies --rev 'desc("i-2")' --rev 'desc("mEAm-0")'
   A f
-d
+d (filelog !)
+b (no-filelog !)
   R b
   R d
   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mAEm-0")'
@@ -490,7 +531,8 @@
   R b
   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mEAm-0")'
   A f
-a
+a (filelog !)
+b (no-filelog !)
   R a
   R b
 
@@ -563,21 +605,25 @@
   R h
   $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mBFm-0")'
   M d
+h (no-filelog !)
   R h
   $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mBFm-0")'
   M b
   $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mBFm-0")'
   M b
   M d
+i (no-filelog !)
   R i
   $ hg status --copies --rev 'desc("b-1")' --rev 'desc("mFBm-0")'
   M d
+h (no-filelog !)
   R h
   $ hg status --copies --rev 'desc("f-2")' --rev 'desc("mFBm-0")'
   M b
   $ hg status --copies --rev 'desc("f-1")' --rev 'desc("mFBm-0")'
   M b
   M d
+i (no-filelog !)
   R i
 
 The following graphlog is wrong, the "a -> c -> d" chain was overwritten and 
should not appear.
@@ -645,9 +691,15 @@
   |
   o  0 i-0 initial commit: a b h
   
+One side of the merge have a long history with rename. The other side of the
+merge point to a new file with a smaller history. Each side is "valid".
+
+(and again the filelog based algorithm only explore one, with a pick based on
+revision numbers)
+
   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mDGm-0")'
   A d
-a
+a (filelog !)
   R a
   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGDm-0")'
   A d
@@ -740,7 +792,8 @@
   
   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mFGm-0")'
   A d
-a
+h (no-filelog !)
+a (filelog !)
   R a
   R h
   $ hg status --copies --rev 'desc("i-0")' --rev 'desc("mGFm-0")'
@@ -754,15 +807,19 @@
   M d
   $ hg status 

[Bug 6309] New: Exception while pushing

2020-04-28 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=6309

Bug ID: 6309
   Summary: Exception while pushing
   Product: Mercurial
   Version: 5.3
  Hardware: PC
OS: Linux
Status: UNCONFIRMED
  Severity: feature
  Priority: wish
 Component: Mercurial
  Assignee: bugzi...@mercurial-scm.org
  Reporter: sebunge...@gmail.com
CC: mercurial-devel@mercurial-scm.org
Python Version: ---

seb@eragon:~/Documents/work/Terminals[130]$ hg push
pushing to ssh://s...@x...xx/.HGREPOS2/TerminalsRoot
searching for changes
remote has heads on branch '/feature/seb/otap2' that are not known locally:
3e73c3896baf fdb37b2c4fb9
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 2 changes to 3 files (+1 heads)
remote: 1 new obsolescence markers
remote: ** unknown exception encountered, please report by visiting
remote: ** https://mercurial-scm.org/wiki/BugTracker
remote: ** Python 2.7.17 (default, Apr 15 2020, 17:20:14) [GCC 7.5.0]
remote: ** Mercurial Distributed SCM (version 4.8.2)
remote: ** Extensions loaded: graphlog, strip, mq, extdiff, rebase, convert,
purge, eol, evolve
remote: Traceback (most recent call last):
remote:   File "/usr/bin/hg", line 43, in 
remote: dispatch.run()
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line
96, in run
remote: status = dispatch(req)
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line
220, in dispatch
remote: ret = _runcatch(req) or 0
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line
363, in _runcatch
remote: return _callcatch(ui, _runcatchfunc)
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line
371, in _callcatch
remote: return scmutil.callcatch(ui, func)
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/scmutil.py", line
166, in callcatch
remote: return func()
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line
354, in _runcatchfunc
remote: return _dispatch(req)
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line
994, in _dispatch
remote: cmdpats, cmdoptions)
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line
737, in runcommand
remote: ret = _runcommand(ui, options, cmd, d)
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line
1003, in _runcommand
remote: return cmdfunc()
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line
991, in 
remote: 
remote: d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1646,
in check
remote: return func(*args, **kwargs)
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1646,
in check
remote: return func(*args, **kwargs)
remote:   File "/usr/lib/python2.7/dist-packages/hgext/mq.py", line 3631, in
mqcommand
remote: return orig(ui, repo, *args, **kwargs)
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1646,
in check
remote: return func(*args, **kwargs)
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line
5207, in serve
remote: s.serve_forever()
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/wireprotoserver.py",
line 797, in serve_forever
remote: self.serveuntil(threading.Event())
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/wireprotoserver.py",
line 804, in serveuntil
remote: _runsshserver(self._ui, self._repo, self._fin, self._fout, ev)
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/wireprotoserver.py",
line 656, in _runsshserver
remote: rsp = wireprotov1server.dispatch(repo, proto, request)
remote:   File
"/usr/lib/python2.7/dist-packages/mercurial/wireprotov1server.py", line 74, in
dispatch
remote: return func(repo, proto, *args)
remote:   File
"/usr/lib/python2.7/dist-packages/mercurial/wireprotov1server.py", line 599, in
unbundle
remote: proto.client())
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/exchange.py", line
2385, in unbundle
remote: lockandtr[2].close()
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/transaction.py",
line 44, in _active
remote: return func(self, *args, **kwds)
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/transaction.py",
line 522, in close
remote: self._postclosecallback[cat](self)
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line
2014, in updater
remote: repo.updatecaches(tr)
remote:   File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line
153, in wrapper
remote: return orig(repo.unfiltered(), *args, **kwargs)
remote:   File "/usr/lib/python2.7/dist-packages/hgext3rd/evolve/obscache.py",
line 492, in updatecaches

D6026: lock: Improve the waiting for lock message which will help newcomers(issue6081)

2020-04-28 Thread baymax (Baymax, Your Personal Patch-care Companion)
Herald added a subscriber: mercurial-patches.
This revision now requires changes to proceed.
baymax added a comment.
baymax requested changes to this revision.


  There seems to have been no activities on this Diff for the past 3 Months.
  
  By policy, we are automatically moving it out of the `need-review` state.
  
  Please, move it back to `need-review` without hesitation if this diff should 
still be discussed.
  
  :baymax:need-review-idle:

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6026/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6026

To: akshjain.jain74, #hg-reviewers, baymax
Cc: mercurial-patches, marmoute, pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6123: similar: add condition to avoid Zerodivisonerror in function _score() (issue6099)

2020-04-28 Thread baymax (Baymax, Your Personal Patch-care Companion)
Herald added a subscriber: mercurial-patches.
This revision now requires changes to proceed.
baymax added a comment.
baymax requested changes to this revision.


  There seems to have been no activities on this Diff for the past 3 Months.
  
  By policy, we are automatically moving it out of the `need-review` state.
  
  Please, move it back to `need-review` without hesitation if this diff should 
still be discussed.
  
  :baymax:need-review-idle:

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6123/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6123

To: akshjain.jain74, durin42, #hg-reviewers, baymax
Cc: mercurial-patches, marmoute, av6, pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6027: mq: make unshelve to apply on modified mq patch (issue4318)

2020-04-28 Thread baymax (Baymax, Your Personal Patch-care Companion)
Herald added a subscriber: mercurial-patches.
This revision now requires changes to proceed.
baymax added a comment.
baymax requested changes to this revision.


  There seems to have been no activities on this Diff for the past 3 Months.
  
  By policy, we are automatically moving it out of the `need-review` state.
  
  Please, move it back to `need-review` without hesitation if this diff should 
still be discussed.
  
  :baymax:need-review-idle:

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6027/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6027

To: navaneeth.suresh, martinvonz, #hg-reviewers, baymax
Cc: mercurial-patches, marmoute, yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel