bugzilla weekly report (2022-01-31)

2022-01-30 Thread Octobot
Bug activity report, between 2022-01-24 and 2022-01-31
 * urgent+: 4 bugs
 * unconfirmed: 76 bugs (3 added, 1 removed)
 * new: 2 bugs
 * closed: 4 bugs
 * need example: 0 bugs
 * new details: 0 bugs
 * active: 26 bugs
 * long inactive: 2 bugs

urgent+
---

Open of urgent or critical bugs.
Found 4 bugs with our query.

 id  summary
--- 
(#6219) mercurial can generate incomplete bundle, corrupting the reposit
(#6220) [hg/python3] pre-tag hook can't fixup arguments anymore 
(#6536) test-chg.t is flaky 
(#6537) frequent time-out during `test-py2-chg` CI  

unconfirmed
---

Bugs with status 'unconfirmed'.
Found 76 bugs with our query (3 added, 1 removed).

 id  summary
--- 
(#5836) import of a git patch containing 'From' in the commit message co
(#6049) `hg split` fails on long paths  
(#6075) explicit GC on every request make repositories with thousands of
(#6212) monoblue: many help pages illegible due to layout problems  
(#6246) hg push gives error sqlite3.OperationalError: unable to open dat
(#6309) Exception while pushing 
(#6337) Raising Abort from hook running server-side breaks protocol if m
(#6340) Occasional "IndexError: revlog out of range" on amends  
(#6345) Rebasing adds unrelated file changes
(#6348) Occasional "depthcache must be warmed before use" errors on push
(#6355) Comparision with None problem in mercurial.obsolete 
(#6377) hg split failure
(#6387) topic - merge - rebase  
(#6397) Th prompt 'password:' is written to STDERR stream.  
(#6402) test-stdio.py flakiness 
(#6406) Picking a commit with a topic to a wdir without a topic neither 
(#6408) hggit incoming: 'overlaymanifestlog' object has no attribute '_r
(#6414) In-memory rebase does not reactivate bookmark after falling back
(#6417) --per-file does not work when only one file has changed 
(#6421) Missing but unneeded merge-tool entries too noisy even for verbo
(#6433) duplicated output for `hg next` when ambiguous changesets   
(#6435) In memory rebase drops the topic
(#6441) Rename topics more easily   
(#6442) prune: add -t --topic   
(#6453) Unknown exception on execute the command "hg pull -u"   
(#6454) Rebase w/ dirty wdir + in-memory merge can lead to data loss
(#6457) Integrity Check Failed  
(#6462) Add support for lightweight, unversioned tags   
(#6463) hg commit --amend crashes if committemplate contains "{revset(..
(#6464) largefiles.usercache configuration option is not documented 
(#6465) Provide option to not use largefiles usercache  
(#6467) purge remove files following directory junctions, included desti
(#6468) test-sqlitestore.t is flaky 
(#6470) test-wireproto-exchangev2-shallow.t is flaky
(#6490) hgweb error on /archive/ without node   
(#6491) Repository in a state where files are erroneously identified as 
(#6495) utf-8 encoding error in hg log --style changelog
(#6497) RFE: hg which command, that identifies where a subcommand is def
(#6498) [evolve] user/username confusion
(#6501) Rebase switches parent order of merge   
(#6502) Hg archive download in a slow manner.   
(#6507) share can't work with repo at samba-path
(#6509) Mercurial rust extensions crash 
(#6522) strip seems to confuse commandserver about where topics are appl
(#6525) push with local subrepo infer subrepo content to remote-repo
(#6527) Incorrect error message shown when aborting a merge with an ongo
(#6531) Working directory has uncommitted changes after merge   
(#6534) Crash on hg rebase  
(#6535) hg prints nothing in win8 cmd console   
(#6539) possible dirstate corruption combining commit and revert -ri
(#6543) Does 123.hp.com/setup site provide authentic guides and tutorial
(#6551) How to download Hp smart app from 123.hp.com/setup for mac? 
(#6552) hg fails checout caused by linux name impossible in windos  
(#6555) test-remotefilelog-repack-fast.t can timeout
(#6559) Followlines button shows +/- 

D12119: narrow: allow merging non-conflicting change outside of the narrow spec

2022-01-30 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: durin42.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  We use the mergestate to carry information about these merge action and
  reprocess them at commit time to apply the necessary update.
  
  The dirstate itself is never affected and remains "pure", with content only in
  the narrow-spec. This file involved in such merge are therefor not listed in 
`hg
  status`.
  
  The current testing is based on a modification of the previous testing, that
  refused to do such merges. As a result it is a bit simple and more extensive
  testing will have to be introduced later. I am planning to do this extra
  testing.
  
  In addition, this only works for flat manifest. Support for tree manifest will
  need more work. I am not currently planning to do this work.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/commit.py
  mercurial/merge.py
  tests/test-narrow-merge.t

CHANGE DETAILS

diff --git a/tests/test-narrow-merge.t b/tests/test-narrow-merge.t
--- a/tests/test-narrow-merge.t
+++ b/tests/test-narrow-merge.t
@@ -83,12 +83,67 @@
 TODO: Can merge non-conflicting changes outside narrow spec
 
   $ hg update -q 'desc("modify inside/f1")'
+
+#if flat
+
   $ hg merge 'desc("modify outside/f1")'
-  abort: merge affects file 'outside/f1' outside narrow, which is not yet 
supported (flat !)
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+
+status should be clean
+
+  $ hg status
+  ? inside/f1.orig
+
+file out of the spec should still not be in the dirstate at all
+
+  $ hg debugdirstate | grep outside/f1
+  [1]
+
+Commit that merge
+
+  $ hg ci -m 'merge from outside to inside'
+
+status should be clean
+
+  $ hg status
+  ? inside/f1.orig
+
+file out of the spec should not be in the mergestate anymore
+
+  $ hg debugmergestate | grep outside/f1
+  [1]
+
+file out of the spec should still not be in the dirstate at all
+
+  $ hg debugdirstate | grep outside/f1
+  [1]
+
+The filenode used should come from p2
+
+  $ hg manifest --debug --rev . | grep outside/f1
+  83cd11431a3b2aff8a3995e5f27bcf33cdb5be98 644   outside/f1
+  $ hg manifest --debug --rev 'p1(.)' | grep outside/f1
+  c6b956c48be2cd4fa94be16002aba311143806fa 644   outside/f1
+  $ hg manifest --debug --rev 'p2(.)' | grep outside/f1
+  83cd11431a3b2aff8a3995e5f27bcf33cdb5be98 644   outside/f1
+
+
+remove the commit to get in the previous situation again
+
+  $ hg debugstrip -r .
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  saved backup bundle to 
$TESTTMP/narrow/.hg/strip-backup/48eb25338b19-a1bb8350-backup.hg
+
+#else
+
+  $ hg merge 'desc("modify outside/f1")'
   abort: merge affects file 'outside/' outside narrow, which is not yet 
supported (tree !)
   (merging in the other direction may work)
   [255]
 
+#endif
+
   $ hg update -q 'desc("modify outside/f1")'
   $ hg merge 'desc("modify inside/f1")'
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -518,13 +518,20 @@
 mresult.removefile(f)  # just updating, ignore changes outside 
clone
 elif action[0].no_op:
 mresult.removefile(f)  # merge does not affect file
-elif action[0].narrow_safe:  # TODO: handle these cases
-msg = _(
-b'merge affects file \'%s\' outside narrow, '
-b'which is not yet supported'
-)
-hint = _(b'merging in the other direction may work')
-raise error.Abort(msg % f, hint=hint)
+elif action[0].narrow_safe:
+if not f.endswith(b'/'):
+mresult.removefile(f)  # merge won't affect on-disk files
+
+mresult.addcommitinfo(
+f, b'outside-narrow-merge-action', action[0].changes
+)
+else:  # TODO: handle the tree case
+msg = _(
+b'merge affects file \'%s\' outside narrow, '
+b'which is not yet supported'
+)
+hint = _(b'merging in the other direction may work')
+raise error.Abort(msg % f, hint=hint)
 else:
 msg = _(b'conflict in file \'%s\' is outside narrow clone')
 raise error.StateError(msg % f)
diff --git a/mercurial/commit.py b/mercurial/commit.py
--- a/mercurial/commit.py
+++ b/mercurial/commit.py
@@ -134,7 +134,13 @@
 for s in salvaged:
 files.mark_salvaged(s)
 
-if ctx.manifestnode():
+narrow_files = {}
+if not ctx.repo().narrowmatch().always():
+for f, e in ms.allextras().items():
+action = e.get(b'outside-narrow-merge-action')
+if action is not None:
+

D12117: merge-actions: have an attribute for narrow safetiness

2022-01-30 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This allow the core doing narrow filtering to process action without
  explicitely listing all possible actions. This is important to make the 
actions
  system more flexible in the future.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/merge.py
  mercurial/mergestate.py

CHANGE DETAILS

diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py
--- a/mercurial/mergestate.py
+++ b/mercurial/mergestate.py
@@ -107,17 +107,22 @@
 _short: internal representation used to identify each action
 
 no_op:  True if the action does affect the file content or tracking status
+
+narrow_safe:
+True if the action can be safely used for a file outside of the narrow
+set
 """
 
 ALL_ACTIONS = weakref.WeakSet()
 NO_OP_ACTIONS = weakref.WeakSet()
 
-def __init__(self, short, no_op=False):
+def __init__(self, short, no_op=False, narrow_safe=False):
 self._short = short
 self.ALL_ACTIONS.add(self)
 self.no_op = no_op
 if self.no_op:
 self.NO_OP_ACTIONS.add(self)
+self.narrow_safe = narrow_safe
 
 def __hash__(self):
 return hash(self._short)
@@ -138,14 +143,14 @@
 return self._short < other._short
 
 
-ACTION_FORGET = MergeAction(b'f')
-ACTION_REMOVE = MergeAction(b'r')
-ACTION_ADD = MergeAction(b'a')
-ACTION_GET = MergeAction(b'g')
+ACTION_FORGET = MergeAction(b'f', narrow_safe=True)
+ACTION_REMOVE = MergeAction(b'r', narrow_safe=True)
+ACTION_ADD = MergeAction(b'a', narrow_safe=True)
+ACTION_GET = MergeAction(b'g', narrow_safe=True)
 ACTION_PATH_CONFLICT = MergeAction(b'p')
 ACTION_PATH_CONFLICT_RESOLVE = MergeAction('pr')
-ACTION_ADD_MODIFIED = MergeAction(b'am')
-ACTION_CREATED = MergeAction(b'c')
+ACTION_ADD_MODIFIED = MergeAction(b'am', narrow_safe=True)
+ACTION_CREATED = MergeAction(b'c', narrow_safe=True)
 ACTION_DELETED_CHANGED = MergeAction(b'dc')
 ACTION_CHANGED_DELETED = MergeAction(b'cd')
 ACTION_MERGE = MergeAction(b'm')
@@ -159,8 +164,8 @@
 # the file is absent on the ancestor and remote side of the merge
 # hence this file is new and we should keep it
 ACTION_KEEP_NEW = MergeAction(b'kn', no_op=True)
-ACTION_EXEC = MergeAction(b'e')
-ACTION_CREATED_MERGE = MergeAction(b'cm')
+ACTION_EXEC = MergeAction(b'e', narrow_safe=True)
+ACTION_CREATED_MERGE = MergeAction(b'cm', narrow_safe=True)
 
 
 # Used by concert to detect situation it does not like, not sure what the exact
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -509,17 +509,6 @@
 Raise an exception if the merge cannot be completed because the repo is
 narrowed.
 """
-# TODO: handle with nonconflicttypes
-nonconflicttypes = {
-mergestatemod.ACTION_ADD,
-mergestatemod.ACTION_ADD_MODIFIED,
-mergestatemod.ACTION_CREATED,
-mergestatemod.ACTION_CREATED_MERGE,
-mergestatemod.ACTION_FORGET,
-mergestatemod.ACTION_GET,
-mergestatemod.ACTION_REMOVE,
-mergestatemod.ACTION_EXEC,
-}
 # We mutate the items in the dict during iteration, so iterate
 # over a copy.
 for f, action in mresult.filemap():
@@ -529,7 +518,7 @@
 mresult.removefile(f)  # just updating, ignore changes outside 
clone
 elif action[0].no_op:
 mresult.removefile(f)  # merge does not affect file
-elif action[0] in nonconflicttypes:
+elif action[0].narrow_safe:  # TODO: handle these cases
 msg = _(
 b'merge affects file \'%s\' outside narrow, '
 b'which is not yet supported'



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


D12118: merge-actions: add some information about the "changes" the action do

2022-01-30 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This will be useful when processing merges action outside of the narrow-spec.
  
  "support" outside of narrow file on commit

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/mergestate.py

CHANGE DETAILS

diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py
--- a/mercurial/mergestate.py
+++ b/mercurial/mergestate.py
@@ -98,6 +98,10 @@
 # This record was release in 3.7 and usage was removed in 5.6
 LEGACY_MERGE_DRIVER_MERGE = b'D'
 
+CHANGE_ADDED = b'added'
+CHANGE_REMOVED = b'removed'
+CHANGE_MODIFIED = b'modified'
+
 
 class MergeAction(object):
 """represent an "action" merge need to take for a given file
@@ -111,18 +115,29 @@
 narrow_safe:
 True if the action can be safely used for a file outside of the narrow
 set
+
+changes:
+The types of changes that his actions involves. This is a work in
+progress and not all actions have one yet. In addition, some requires
+user changes and cannot be fully decided. The value currently available
+are:
+
+- ADDED: the files is new in both parents
+- REMOVED: the files existed in one parent and is getting removed
+- MODIFIED: the files existed in at least one parent and is getting 
changed
 """
 
 ALL_ACTIONS = weakref.WeakSet()
 NO_OP_ACTIONS = weakref.WeakSet()
 
-def __init__(self, short, no_op=False, narrow_safe=False):
+def __init__(self, short, no_op=False, narrow_safe=False, changes=None):
 self._short = short
 self.ALL_ACTIONS.add(self)
 self.no_op = no_op
 if self.no_op:
 self.NO_OP_ACTIONS.add(self)
 self.narrow_safe = narrow_safe
+self.changes = changes
 
 def __hash__(self):
 return hash(self._short)
@@ -143,14 +158,16 @@
 return self._short < other._short
 
 
-ACTION_FORGET = MergeAction(b'f', narrow_safe=True)
-ACTION_REMOVE = MergeAction(b'r', narrow_safe=True)
-ACTION_ADD = MergeAction(b'a', narrow_safe=True)
-ACTION_GET = MergeAction(b'g', narrow_safe=True)
+ACTION_FORGET = MergeAction(b'f', narrow_safe=True, changes=CHANGE_REMOVED)
+ACTION_REMOVE = MergeAction(b'r', narrow_safe=True, changes=CHANGE_REMOVED)
+ACTION_ADD = MergeAction(b'a', narrow_safe=True, changes=CHANGE_ADDED)
+ACTION_GET = MergeAction(b'g', narrow_safe=True, changes=CHANGE_MODIFIED)
 ACTION_PATH_CONFLICT = MergeAction(b'p')
 ACTION_PATH_CONFLICT_RESOLVE = MergeAction('pr')
-ACTION_ADD_MODIFIED = MergeAction(b'am', narrow_safe=True)
-ACTION_CREATED = MergeAction(b'c', narrow_safe=True)
+ACTION_ADD_MODIFIED = MergeAction(
+b'am', narrow_safe=True, changes=CHANGE_ADDED
+)  # not 100% about the changes value here
+ACTION_CREATED = MergeAction(b'c', narrow_safe=True, changes=CHANGE_ADDED)
 ACTION_DELETED_CHANGED = MergeAction(b'dc')
 ACTION_CHANGED_DELETED = MergeAction(b'cd')
 ACTION_MERGE = MergeAction(b'm')
@@ -164,8 +181,10 @@
 # the file is absent on the ancestor and remote side of the merge
 # hence this file is new and we should keep it
 ACTION_KEEP_NEW = MergeAction(b'kn', no_op=True)
-ACTION_EXEC = MergeAction(b'e', narrow_safe=True)
-ACTION_CREATED_MERGE = MergeAction(b'cm', narrow_safe=True)
+ACTION_EXEC = MergeAction(b'e', narrow_safe=True, changes=CHANGE_MODIFIED)
+ACTION_CREATED_MERGE = MergeAction(
+b'cm', narrow_safe=True, changes=CHANGE_ADDED
+)
 
 
 # Used by concert to detect situation it does not like, not sure what the exact



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