D11444: dirstate: make dirstate flags char be unsigned

2021-09-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Since https://phab.mercurial-scm.org/D11387, `CC='clang -Werror' make
  local` has started failing like this:
  
mercurial/cext/util.h:41:50: error: implicit conversion from 'int' to 
'char' changes value from 128 to -128 [-Werror,-Wconstant-conversion]
static const char dirstate_flag_rust_special = 1 << 7;
  ~~   ~~^~~~
  
  This patch fixes that by making the flags be an unsigned char. That
  also matches the `bool` typedef we have in `util.h`, which seems good
  since many of the `dirstate_item_c_*()` functions return a `bool`.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/cext/parsers.c
  mercurial/cext/util.h

CHANGE DETAILS

diff --git a/mercurial/cext/util.h b/mercurial/cext/util.h
--- a/mercurial/cext/util.h
+++ b/mercurial/cext/util.h
@@ -24,21 +24,21 @@
 /* clang-format off */
 typedef struct {
PyObject_HEAD
-   char flags;
+   unsigned char flags;
int mode;
int size;
int mtime;
 } dirstateItemObject;
 /* clang-format on */
 
-static const char dirstate_flag_wc_tracked = 1;
-static const char dirstate_flag_p1_tracked = 1 << 1;
-static const char dirstate_flag_p2_tracked = 1 << 2;
-static const char dirstate_flag_possibly_dirty = 1 << 3;
-static const char dirstate_flag_merged = 1 << 4;
-static const char dirstate_flag_clean_p1 = 1 << 5;
-static const char dirstate_flag_clean_p2 = 1 << 6;
-static const char dirstate_flag_rust_special = 1 << 7;
+static const unsigned char dirstate_flag_wc_tracked = 1;
+static const unsigned char dirstate_flag_p1_tracked = 1 << 1;
+static const unsigned char dirstate_flag_p2_tracked = 1 << 2;
+static const unsigned char dirstate_flag_possibly_dirty = 1 << 3;
+static const unsigned char dirstate_flag_merged = 1 << 4;
+static const unsigned char dirstate_flag_clean_p1 = 1 << 5;
+static const unsigned char dirstate_flag_clean_p2 = 1 << 6;
+static const unsigned char dirstate_flag_rust_special = 1 << 7;
 
 extern PyTypeObject dirstateItemType;
 #define dirstate_tuple_check(op) (Py_TYPE(op) == )
diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c
--- a/mercurial/cext/parsers.c
+++ b/mercurial/cext/parsers.c
@@ -144,9 +144,9 @@
 
 static inline bool dirstate_item_c_added(dirstateItemObject *self)
 {
-   char mask = (dirstate_flag_wc_tracked | dirstate_flag_p1_tracked |
+   unsigned char mask = (dirstate_flag_wc_tracked | 
dirstate_flag_p1_tracked |
 dirstate_flag_p2_tracked);
-   char target = dirstate_flag_wc_tracked;
+   unsigned char target = dirstate_flag_wc_tracked;
return (self->flags & mask) == target;
 }
 



To: martinvonz, #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


D11445: dirstate: fix compilation warnings in `dirstate_item_set_possibly_dirty()`

2021-09-16 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Since https://phab.mercurial-scm.org/D11387 (i.e. the same patch as
  mentioned in my previous patch), Clang has also started warning about
  `dirstate_item_set_possibly_dirty()` missing an explicit return, and
  about its use of the result of an assignment as a condition without
  using parentheses. This patch fixes that. I don't know if `return
  NULL` was the intent.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/cext/parsers.c

CHANGE DETAILS

diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c
--- a/mercurial/cext/parsers.c
+++ b/mercurial/cext/parsers.c
@@ -487,9 +487,11 @@
to make sure it is correct. */
 static PyObject *dirstate_item_set_possibly_dirty(dirstateItemObject *self)
 {
-   if (self->flags |= dirstate_flag_possibly_dirty) {
+   self->flags |= dirstate_flag_possibly_dirty;
+   if (self->flags) {
Py_RETURN_NONE;
}
+   return NULL;
 }
 
 /* See docstring of the python implementation for details */



To: martinvonz, #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


mercurial@47974: 33 new changesets

2021-09-16 Thread Mercurial Commits
33 new changesets in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/9beea3a023ac
changeset:   47942:9beea3a023ac
parent:  47938:508394e38580
parent:  47939:053dd53a0b59
user:Augie Fackler 
date:Wed Sep 08 15:59:48 2021 -0400
summary: merge: with stable

https://www.mercurial-scm.org/repo/hg/rev/fea24454f919
changeset:   47943:fea24454f919
user:Pierre-Yves David 
date:Thu Sep 02 00:16:37 2021 +0200
summary: dirstate: clarify the message in nonnormal checking

https://www.mercurial-scm.org/repo/hg/rev/e02f9af7aed1
changeset:   47944:e02f9af7aed1
user:Pierre-Yves David 
date:Mon Aug 30 18:45:54 2021 +0200
summary: pathutil: replace the `skip` argument of `dirs` with a boolean

https://www.mercurial-scm.org/repo/hg/rev/3337eec29d5b
changeset:   47945:3337eec29d5b
user:Pierre-Yves David 
date:Fri Aug 27 19:19:21 2021 +0200
summary: dirstate-item: `dirstate_item_from_v1_data` replaces 
make_dirstate_item

https://www.mercurial-scm.org/repo/hg/rev/0919d66e279a
changeset:   47946:0919d66e279a
user:Pierre-Yves David 
date:Fri Aug 27 20:06:07 2021 +0200
summary: dirstate-item: factor some code in the C implementation

https://www.mercurial-scm.org/repo/hg/rev/154e4dcac68c
changeset:   47947:154e4dcac68c
user:Pierre-Yves David 
date:Tue Aug 31 09:23:50 2021 +0200
summary: dirstate-item: introduce low level C function

https://www.mercurial-scm.org/repo/hg/rev/83f0e93ec34b
changeset:   47948:83f0e93ec34b
user:Pierre-Yves David 
date:Mon Aug 30 21:18:29 2021 +0200
summary: dirstate-item: move the C implementation to the same logic

https://www.mercurial-scm.org/repo/hg/rev/696abab107b4
changeset:   47949:696abab107b4
user:Simon Sapin 
date:Fri Sep 03 16:37:20 2021 +0200
summary: rust: Generalize the `trim_end_newlines` utility of byte strings

https://www.mercurial-scm.org/repo/hg/rev/6961eca0b3ee
changeset:   47950:6961eca0b3ee
user:Simon Sapin 
date:Wed Feb 17 20:49:53 2021 +0100
summary: rhg: Port Python’s `ui.configlist` as `Config::get_list`

https://www.mercurial-scm.org/repo/hg/rev/cff41e168c25
changeset:   47951:cff41e168c25
user:Simon Sapin 
date:Fri Sep 03 16:32:35 2021 +0200
summary: rhg: Switch rhg.ignored-extensions config to Python-compatible 
list syntax

https://www.mercurial-scm.org/repo/hg/rev/9cd35c8c6044
changeset:   47952:9cd35c8c6044
user:Simon Sapin 
date:Mon Sep 06 11:39:59 2021 +0200
summary: rust: Move VFS code to its own module

https://www.mercurial-scm.org/repo/hg/rev/8f031a274cd6
changeset:   47953:8f031a274cd6
user:Simon Sapin 
date:Mon Sep 06 13:39:54 2021 +0200
summary: rust: Move PyBytesWithData out of copy-tracing code

https://www.mercurial-scm.org/repo/hg/rev/4afd6cc447b9
changeset:   47954:4afd6cc447b9
user:Simon Sapin 
date:Thu Sep 09 18:07:40 2021 +0200
summary: rust: Make OwningDirstateMap generic and move it into hg-core

https://www.mercurial-scm.org/repo/hg/rev/e834b79def74
changeset:   47955:e834b79def74
user:Simon Sapin 
date:Fri Sep 10 09:53:09 2021 +0200
summary: rust: Switch to the memmap2-rs crate

https://www.mercurial-scm.org/repo/hg/rev/81aedf1fc897
changeset:   47956:81aedf1fc897
user:Simon Sapin 
date:Thu Sep 09 21:04:55 2021 +0200
summary: rust: Add Repo::dirstate_map and use it in `rhg status`

https://www.mercurial-scm.org/repo/hg/rev/d44740725b95
changeset:   47957:d44740725b95
user:Simon Sapin 
date:Mon Sep 13 13:01:25 2021 +0200
summary: rust: Rename Manifest to Manifestlog, ManifestEntry to Manifest

https://www.mercurial-scm.org/repo/hg/rev/fc208d6faed3
changeset:   47958:fc208d6faed3
user:Simon Sapin 
date:Mon Sep 13 13:16:10 2021 +0200
summary: rust: Move lazy initialization of `Repo::dirstate_map` into a 
generic struct

https://www.mercurial-scm.org/repo/hg/rev/21d25e9ee58e
changeset:   47959:21d25e9ee58e
user:Simon Sapin 
date:Mon Sep 13 13:29:55 2021 +0200
summary: rust: Keep lazily-initialized Changelog and Manifest log on the 
Repo object

https://www.mercurial-scm.org/repo/hg/rev/cfb6e6699b25
changeset:   47960:cfb6e6699b25
user:Simon Sapin 
date:Mon Sep 13 13:45:10 2021 +0200
summary: rust: Add Repo::manifest(revision)

https://www.mercurial-scm.org/repo/hg/rev/4d2a5ca060e3
changeset:   47961:4d2a5ca060e3
user:Simon Sapin 
date:Mon Sep 13 15:42:39 2021 +0200
summary: rust: Add a Filelog struct that wraps Revlog

https://www.mercurial-scm.org/repo/hg/rev/8c29af0f6d6e
changeset:   47962:8c29af0f6d6e
user:Simon Sapin 
date:Mon Sep 13 17:23:42 2021 +0200
summary: rhg: Align with Python on some revset parsing corner cases

https://www.mercurial-scm.org/repo/hg/rev/001d747c2baf
changeset:   47963:001d747c2baf
user:

D11443: dirstate: drop the `dirstatemap.dropfile` method

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  All use have been migrated.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstatemap.py

CHANGE DETAILS

diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -320,17 +320,6 @@
 entry.set_untracked()
 return True
 
-def dropfile(self, f):
-"""
-Remove a file from the dirstate.  Returns True if the file was
-previously recorded.
-"""
-old_entry = self._map.pop(f, None)
-self._dirs_decr(f, old_entry=old_entry)
-self.nonnormalset.discard(f)
-self.copymap.pop(f, None)
-return old_entry is not None
-
 def clearambiguoustimes(self, files, now):
 for f in files:
 e = self.get(f)



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


D11442: dirstate: use `reset_state` instead of `dropfile` in test-rebuildstate.t

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  As `dirstatemap.dropfile` is on its way out.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-rebuildstate.t

CHANGE DETAILS

diff --git a/tests/test-rebuildstate.t b/tests/test-rebuildstate.t
--- a/tests/test-rebuildstate.t
+++ b/tests/test-rebuildstate.t
@@ -25,7 +25,7 @@
   > possibly_dirty=True,
   > )
   >   else:
-  > repo.dirstate._map.dropfile(file)
+  > repo.dirstate._map.reset_state(file)
   > repo.dirstate._dirty = True
   > 
   > repo.dirstate.write(repo.currenttransaction())



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


D11441: dirstate: use `reset_state` instead of `dropfile` in largefile

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  As `dirstatemap.dropfile` is on its way out.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/largefiles/lfcommands.py

CHANGE DETAILS

diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py
--- a/hgext/largefiles/lfcommands.py
+++ b/hgext/largefiles/lfcommands.py
@@ -577,7 +577,7 @@
 repo.wvfs.unlinkpath(lfutil.standin(f))
 # This needs to happen for dropped files, otherwise they stay 
in
 # the M state.
-lfdirstate._map.dropfile(f)
+lfdirstate._map.reset_state(f)
 
 statuswriter(_(b'getting changed largefiles\n'))
 cachelfiles(ui, repo, None, lfiles)



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


D11440: dirstate: use `reset_state` in `rebuild` instead of `dropfile`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  As `dirstatemap.dropfile` is on its way out.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -814,8 +814,8 @@
 )
 self._updatedfiles.add(f)
 for f in to_drop:
-if self._map.dropfile(f):
-self._updatedfiles.add(f)
+self._map.reset_state(f)
+self._updatedfiles.add(f)
 
 self._dirty = True
 



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


D11439: dirstate: use `reset_state` to drop file in `update_file_p1`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The `dropfile` function is on its way out.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -556,7 +556,8 @@
 possibly_dirty = True
 elif not (p1_tracked or wc_tracked):
 # the file is no longer relevant to anyone
-if self._map.dropfile(filename):
+if self._map.get(filename) is not None:
+self._map.reset_state(filename)
 self._dirty = True
 self._updatedfiles.add(filename)
 elif (not p1_tracked) and wc_tracked:



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


D11438: dirstate: support file tracked nowhere in `reset_state`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This let the dirstatemap decide when to drop files.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstatemap.py

CHANGE DETAILS

diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -180,8 +180,8 @@
 def reset_state(
 self,
 filename,
-wc_tracked,
-p1_tracked,
+wc_tracked=False,
+p1_tracked=False,
 p2_tracked=False,
 merged=False,
 clean_p1=False,
@@ -206,7 +206,10 @@
 self.copymap.pop(filename, None)
 
 if not (p1_tracked or p2_tracked or wc_tracked):
-self.dropfile(filename)
+old_entry = self._map.pop(filename, None)
+self._dirs_decr(filename, old_entry=old_entry)
+self.nonnormalset.discard(filename)
+self.copymap.pop(filename, None)
 return
 elif merged:
 # XXX might be merged and removed ?
@@ -576,8 +579,8 @@
 def reset_state(
 self,
 filename,
-wc_tracked,
-p1_tracked,
+wc_tracked=False,
+p1_tracked=False,
 p2_tracked=False,
 merged=False,
 clean_p1=False,



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


D11437: dirstate: drop dirstatemap.addfile

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  All users have been migrated.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstatemap.py

CHANGE DETAILS

diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -177,51 +177,6 @@
 self.copymap.pop(filename, None)
 self.nonnormalset.discard(filename)
 
-def addfile(
-self,
-f,
-mode=0,
-size=None,
-mtime=None,
-added=False,
-merged=False,
-from_p2=False,
-possibly_dirty=False,
-):
-"""Add a tracked file to the dirstate."""
-if added:
-assert not merged
-assert not possibly_dirty
-assert not from_p2
-new_entry = DirstateItem.new_added()
-self.copymap.pop(f, None)
-elif merged:
-assert not possibly_dirty
-assert not from_p2
-new_entry = DirstateItem.new_merged()
-elif from_p2:
-assert not possibly_dirty
-new_entry = DirstateItem.new_from_p2()
-elif possibly_dirty:
-new_entry = DirstateItem.new_possibly_dirty()
-else:
-assert size is not None
-assert mtime is not None
-size = size & rangemask
-mtime = mtime & rangemask
-new_entry = DirstateItem.new_normal(mode, size, mtime)
-old_entry = self.get(f)
-self._dirs_incr(f, old_entry)
-self._map[f] = new_entry
-if new_entry.dm_nonnormal:
-self.nonnormalset.add(f)
-else:
-self.nonnormalset.discard(f)
-if new_entry.dm_otherparent:
-self.otherparentset.add(f)
-else:
-self.otherparentset.discard(f)
-
 def reset_state(
 self,
 filename,



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


D11436: dirstate: update the documentation of the dirstatemap API

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The API changed so should the documentation.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstatemap.py

CHANGE DETAILS

diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -46,8 +46,14 @@
 - the state map maps filenames to tuples of (state, mode, size, mtime),
   where state is a single character representing 'normal', 'added',
   'removed', or 'merged'. It is read by treating the dirstate as a
-  dict.  File state is updated by calling the `addfile`, `removefile` and
-  `dropfile` methods.
+  dict.  File state is updated by calling various methods (see each
+  documentation for details):
+
+  - `reset_state`,
+  - `set_tracked`
+  - `set_untracked`
+  - `set_clean`
+  - `set_possibly_dirty`
 
 - `copymap` maps destination filenames to their source filename.
 



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


D11435: dirstate: drop the `_addpath` method

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  All user have been migrated.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -667,33 +667,6 @@
 # modifications that happen within the same timeslot.
 self._lastnormaltime = parentfiledata[2]
 
-def _addpath(
-self,
-f,
-mode=0,
-size=None,
-mtime=None,
-added=False,
-merged=False,
-from_p2=False,
-possibly_dirty=False,
-):
-entry = self._map.get(f)
-if added or entry is not None and not entry.tracked:
-self._check_new_tracked_filename(f)
-self._dirty = True
-self._updatedfiles.add(f)
-self._map.addfile(
-f,
-mode=mode,
-size=size,
-mtime=mtime,
-added=added,
-merged=merged,
-from_p2=from_p2,
-possibly_dirty=possibly_dirty,
-)
-
 def _check_new_tracked_filename(self, filename):
 scmutil.checkfilename(filename)
 if self._map.hastrackeddir(filename):



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


D11434: dirstate: remove the `normallookup` function

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  All use have been migrated.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -718,31 +718,6 @@
 mtime = s[stat.ST_MTIME]
 return (mode, size, mtime)
 
-def _normallookup(self, f):
-'''Mark a file normal, but possibly dirty.'''
-if self.in_merge:
-# if there is a merge going on and the file was either
-# "merged" or coming from other parent (-2) before
-# being removed, restore that state.
-entry = self._map.get(f)
-if entry is not None:
-# XXX this should probably be dealt with a a lower level
-# (see `merged_removed` and `from_p2_removed`)
-if entry.merged_removed or entry.from_p2_removed:
-source = self._map.copymap.get(f)
-if entry.merged_removed:
-self._addpath(f, merged=True)
-else:
-self._addpath(f, from_p2=True)
-self._map.copymap.pop(f, None)
-if source is not None:
-self.copy(source, f)
-return
-elif entry.merged or entry.from_p2:
-return
-self._addpath(f, possibly_dirty=True)
-self._map.copymap.pop(f, None)
-
 def _discoverpath(self, path, normed, ignoremissing, exists, storemap):
 if exists is None:
 exists = os.path.lexists(os.path.join(self._root, path))



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


D11433: dirstatE: stop using `_normallookup` in the adddrop extension

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  That extensions is just trying to produce "corrupted" dirstate.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-rebuildstate.t

CHANGE DETAILS

diff --git a/tests/test-rebuildstate.t b/tests/test-rebuildstate.t
--- a/tests/test-rebuildstate.t
+++ b/tests/test-rebuildstate.t
@@ -17,7 +17,13 @@
   >   try:
   > for file in pats:
   >   if opts.get('normal_lookup'):
-  > repo.dirstate._normallookup(file)
+  > with repo.dirstate.parentchange():
+  > repo.dirstate.update_file(
+  > file,
+  > p1_tracked=True,
+  > wc_tracked=True,
+  > possibly_dirty=True,
+  > )
   >   else:
   > repo.dirstate._map.dropfile(file)
   > repo.dirstate._dirty = True



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


D11432: dirstate: replace the use of `_normallookup` in `rebuild`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Normal lookup is a complicated function that we want to get rid of.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -853,7 +853,17 @@
 self._map.setparents(parent, self._nodeconstants.nullid)
 
 for f in to_lookup:
-self._normallookup(f)
+
+if self.in_merge:
+self.set_tracked(f)
+else:
+self._map.reset_state(
+f,
+wc_tracked=True,
+p1_tracked=True,
+possibly_dirty=True,
+)
+self._updatedfiles.add(f)
 for f in to_drop:
 if self._map.dropfile(f):
 self._updatedfiles.add(f)



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


D11430: dirstate: introduce a set_tracked method on "map" and "item"

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This move more implementation details withing the DirstateItem itself, which 
is
  what we have been doing for a while.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/cext/parsers.c
  mercurial/dirstate.py
  mercurial/dirstatemap.py
  mercurial/pure/parsers.py

CHANGE DETAILS

diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py
--- a/mercurial/pure/parsers.py
+++ b/mercurial/pure/parsers.py
@@ -240,6 +240,18 @@
 self._size = size
 self._mtime = mtime
 
+def set_tracked(self):
+"""mark a file as tracked in the working copy
+
+This will ultimately be called by command like `hg add`.
+"""
+self._wc_tracked = True
+# `set_tracked` is replacing various `normallookup` call. So we set
+# "possibly dirty" to stay on the safe side.
+#
+# Consider dropping this in the future in favor of something less 
broad.
+self._possibly_dirty = True
+
 def set_untracked(self):
 """mark a file as untracked in the working copy
 
diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -307,6 +307,36 @@
 self.otherparentset.discard(filename)
 self._map[filename] = entry
 
+def set_tracked(self, filename):
+new = False
+entry = self.get(filename)
+if entry is None:
+self._dirs_incr(filename)
+entry = DirstateItem(
+p1_tracked=False,
+p2_tracked=False,
+wc_tracked=True,
+merged=False,
+clean_p1=False,
+clean_p2=False,
+possibly_dirty=False,
+parentfiledata=None,
+)
+self._map[filename] = entry
+if entry.dm_nonnormal:
+self.nonnormalset.add(filename)
+new = True
+elif not entry.tracked:
+self._dirs_incr(filename, entry)
+entry.set_tracked()
+new = True
+else:
+# XXX This is probably overkill for more case, but we need this to
+# fully replace the `normallookup` call with `set_tracked` one.
+# Consider smoothing this in the future.
+self.set_possibly_dirty(filename)
+return new
+
 def set_untracked(self, f):
 """Mark a file as no longer tracked in the dirstate map"""
 entry = self.get(f)
@@ -663,6 +693,23 @@
 else:
 assert False, 'unreachable'
 
+def set_tracked(self, filename):
+new = False
+entry = self.get(filename)
+if entry is None:
+self.addfile(filename, added=True)
+new = True
+elif not entry.tracked:
+entry.set_tracked()
+self._rustmap.set_v1(filename, entry)
+new = True
+else:
+# XXX This is probably overkill for more case, but we need 
this to
+# fully replace the `normallookup` call with `set_tracked` one.
+# Consider smoothing this in the future.
+self.set_possibly_dirty(filename)
+return new
+
 def set_untracked(self, f):
 """Mark a file as no longer tracked in the dirstate map"""
 # in merge is only trigger more logic, so it "fine" to pass it.
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -478,18 +478,9 @@
 self._dirty = True
 self._updatedfiles.add(filename)
 entry = self._map.get(filename)
-if entry is None:
+if entry is None or not entry.tracked:
 self._check_new_tracked_filename(filename)
-self._map.addfile(filename, added=True)
-return True
-elif not entry.tracked:
-self._normallookup(filename)
-return True
-# XXX This is probably overkill for more case, but we need this to
-# fully replace the `normallookup` call with `set_tracked` one.
-# Consider smoothing this in the future.
-self.set_possibly_dirty(filename)
-return False
+return self._map.set_tracked(filename)
 
 @requires_no_parents_change
 def set_untracked(self, filename):
diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c
--- a/mercurial/cext/parsers.c
+++ b/mercurial/cext/parsers.c
@@ -507,6 +507,17 @@
Py_RETURN_NONE;
 }
 
+static PyObject *dirstate_item_set_tracked(dirstateItemObject *self)
+{
+   self->flags |= dirstate_flag_wc_tracked;
+   self->flags |= dirstate_flag_possibly_dirty;
+   /* size = None on the python 

D11431: dirstate: replace the use of _normallookup in `setparents`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  normal lookup is a complicated function that we want to get rid of.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -401,7 +401,12 @@
 source = self._map.copymap.get(f)
 if source:
 copies[f] = source
-self._normallookup(f)
+self._map.reset_state(
+f,
+wc_tracked=True,
+p1_tracked=True,
+possibly_dirty=True,
+)
 # Also fix up otherparent markers
 elif s.from_p2:
 source = self._map.copymap.get(f)



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


D11429: dirstate: fix restoration of "merged" state after a remove

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Before this change, "merged" file that get removed and re-added later were
  recorded as "from_p2" instead.
  
  This came from 8fe74328f700 
, a 
2014 changeset that start explicitly doing so
  for reason I have not been able to fully grasp.  The graft test mentioned in
  the description are still happy after this changeset.
  
  So this changeset restore what seems to be the intended behavior. Restoring
  information as it was before the removal.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py
  tests/test-merge-remove.t

CHANGE DETAILS

diff --git a/tests/test-merge-remove.t b/tests/test-merge-remove.t
--- a/tests/test-merge-remove.t
+++ b/tests/test-merge-remove.t
@@ -55,8 +55,8 @@
   adding foo1
 
   $ hg debugstate --no-dates
-  n   0 -2 unset   bar
-  n   0 -2 unset   foo1
+  m   0 -2 unset   bar
+  m   0 -2 unset   foo1
   copy: foo -> foo1
 
   $ hg st -qC
@@ -74,8 +74,8 @@
   reverting foo1
 
   $ hg debugstate --no-dates
-  n   0 -2 unset   bar
-  n   0 -2 unset   foo1
+  m   0 -2 unset   bar
+  m   0 -2 unset   foo1
   copy: foo -> foo1
 
   $ hg st -qC
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -734,7 +734,10 @@
 # (see `merged_removed` and `from_p2_removed`)
 if entry.merged_removed or entry.from_p2_removed:
 source = self._map.copymap.get(f)
-self._addpath(f, from_p2=True)
+if entry.merged_removed:
+self._addpath(f, merged=True)
+else:
+self._addpath(f, from_p2=True)
 self._map.copymap.pop(f, None)
 if source is not None:
 self.copy(source, f)



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


D11428: dirstate: inline the last two `_drop` usage

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The function is small and having the associated code directly inline help use 
to cleanup the dirstate API.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/largefiles/lfcommands.py
  mercurial/dirstate.py
  tests/test-rebuildstate.t

CHANGE DETAILS

diff --git a/tests/test-rebuildstate.t b/tests/test-rebuildstate.t
--- a/tests/test-rebuildstate.t
+++ b/tests/test-rebuildstate.t
@@ -19,7 +19,8 @@
   >   if opts.get('normal_lookup'):
   > repo.dirstate._normallookup(file)
   >   else:
-  > repo.dirstate._drop(file)
+  > repo.dirstate._map.dropfile(file)
+  > repo.dirstate._dirty = True
   > 
   > repo.dirstate.write(repo.currenttransaction())
   >   finally:
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -560,7 +560,9 @@
 possibly_dirty = True
 elif not (p1_tracked or wc_tracked):
 # the file is no longer relevant to anyone
-self._drop(filename)
+if self._map.dropfile(filename):
+self._dirty = True
+self._updatedfiles.add(filename)
 elif (not p1_tracked) and wc_tracked:
 if entry is not None and entry.added:
 return  # avoid dropping copy information (maybe?)
@@ -742,12 +744,6 @@
 self._addpath(f, possibly_dirty=True)
 self._map.copymap.pop(f, None)
 
-def _drop(self, filename):
-"""internal function to drop a file from the dirstate"""
-if self._map.dropfile(filename):
-self._dirty = True
-self._updatedfiles.add(filename)
-
 def _discoverpath(self, path, normed, ignoremissing, exists, storemap):
 if exists is None:
 exists = os.path.lexists(os.path.join(self._root, path))
@@ -860,7 +856,8 @@
 for f in to_lookup:
 self._normallookup(f)
 for f in to_drop:
-self._drop(f)
+if self._map.dropfile(f):
+self._updatedfiles.add(f)
 
 self._dirty = True
 
diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py
--- a/hgext/largefiles/lfcommands.py
+++ b/hgext/largefiles/lfcommands.py
@@ -577,7 +577,7 @@
 repo.wvfs.unlinkpath(lfutil.standin(f))
 # This needs to happen for dropped files, otherwise they stay 
in
 # the M state.
-lfdirstate._drop(f)
+lfdirstate._map.dropfile(f)
 
 statuswriter(_(b'getting changed largefiles\n'))
 cachelfiles(ui, repo, None, lfiles)



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


D11427: dirstate: make a conditionnal easier to read in `setparents`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  By grabing `nullid` in the local space, we get the conditionnal to fit in one
  line.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -387,10 +387,8 @@
 self._origpl = self._pl
 self._map.setparents(p1, p2)
 copies = {}
-if (
-oldp2 != self._nodeconstants.nullid
-and p2 == self._nodeconstants.nullid
-):
+nullid = self._nodeconstants.nullid
+if oldp2 != nullid and p2 == nullid:
 candidatefiles = self._map.non_normal_or_other_parent_paths()
 
 for f in candidatefiles:



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


D11426: dirstate: removed the now unused `_add` method

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -744,10 +744,6 @@
 self._addpath(f, possibly_dirty=True)
 self._map.copymap.pop(f, None)
 
-def _add(self, filename):
-"""internal function to mark a file as added"""
-self._addpath(filename, added=True)
-
 def _drop(self, filename):
 """internal function to drop a file from the dirstate"""
 if self._map.dropfile(filename):



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


D11425: dirstate: replace `_add` call in `setparent`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Same logic as the previous changeset, it get us closer to removed older API on
  the dirstate.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -409,7 +409,13 @@
 source = self._map.copymap.get(f)
 if source:
 copies[f] = source
-self._add(f)
+self._check_new_tracked_filename(f)
+self._updatedfiles.add(f)
+self._map.reset_state(
+f,
+p1_tracked=False,
+wc_tracked=True,
+)
 return copies
 
 def setbranch(self, branch):



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


D11424: dirstate: directly call the right function in `set_tracked`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This get use closer to removing some older API on the dirstate.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -471,9 +471,12 @@
 
 return True the file was previously untracked, False otherwise.
 """
+self._dirty = True
+self._updatedfiles.add(filename)
 entry = self._map.get(filename)
 if entry is None:
-self._add(filename)
+self._check_new_tracked_filename(filename)
+self._map.addfile(filename, added=True)
 return True
 elif not entry.tracked:
 self._normallookup(filename)



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


D11423: dirstate: same logic as what we did for `_drop`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is part of the dirstatemap so let le dirstatemap deal with it.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py
  mercurial/dirstatemap.py

CHANGE DETAILS

diff --git a/mercurial/dirstatemap.py b/mercurial/dirstatemap.py
--- a/mercurial/dirstatemap.py
+++ b/mercurial/dirstatemap.py
@@ -188,6 +188,7 @@
 assert not possibly_dirty
 assert not from_p2
 new_entry = DirstateItem.new_added()
+self.copymap.pop(f, None)
 elif merged:
 assert not possibly_dirty
 assert not from_p2
@@ -567,7 +568,7 @@
 from_p2=False,
 possibly_dirty=False,
 ):
-return self._rustmap.addfile(
+ret = self._rustmap.addfile(
 f,
 mode,
 size,
@@ -577,6 +578,9 @@
 from_p2,
 possibly_dirty,
 )
+if added:
+self.copymap.pop(f, None)
+return ret
 
 def reset_state(
 self,
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -738,7 +738,6 @@
 def _add(self, filename):
 """internal function to mark a file as added"""
 self._addpath(filename, added=True)
-self._map.copymap.pop(filename, None)
 
 def _drop(self, filename):
 """internal function to drop a file from the dirstate"""



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


D11422: dirstate: use `tracked` property in `_addpath`

2021-09-16 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  It is semantically better.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -674,7 +674,7 @@
 possibly_dirty=False,
 ):
 entry = self._map.get(f)
-if added or entry is not None and entry.removed:
+if added or entry is not None and not entry.tracked:
 self._check_new_tracked_filename(f)
 self._dirty = True
 self._updatedfiles.add(f)



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


Re: Octobus monthly mini-sprints

2021-09-16 Thread Raphaël Gomès

Hi all,

Reminder that the Mercurial mini-sprint is coming up soon, see the info 
in the mail I'm replying to


Raphaël

On 8/31/21 4:04 PM, Raphaël Gomès wrote:

Hi all,

The next Mercurial minisprint will be held on Friday September 17th in 
place of the planned Evolve September 3rd.
For those of you who would like to join us, we (Octobus) will be 
present during the entire day, Paris time. This is a good opportunity 
to fix bugs, work on features, discuss themandget help in general.


A video-conferencing link will be sent as a reply to this email on the 
day of the sprint.


On behalf of the Octobus team,
Raphaël

On 6/1/21 2:35 PM, Georges Racinet wrote:

Hi everybody,

In order to keep on improving our coordination with the community,
Octobus will organize periodic mini-sprints, starting next month.

We'll dedicate one day per month to work with whomever is interested on
one of the three areas we're active in: Mercurial core, Evolve and
Heptapod. Of course, in the current context, these will be held entirely
in virtual.

The sprints will happen every first Friday of the month.

The whole thing will start next month. Here's our schedule for the next
three mini-sprints:

- 2021-07-02: Heptapod [1]

- 2021-08-06: Mercurial core (early in development cycle after 5.9)

- 2021-09-03: Evolve

Since we're trying to start a routine, we'll try and keep the same
rotation for a while after that.

The backbone of communication should be provided by the chat systems
[2], and of course we can add videoconferencing on the fly when needed,
but we can work out the details until then.

Hope to "see" you there, we're looking forward for your feedback, ideas
of things to discuss etc.

Best,

[1] I'll be organizing that one, more about it soon to come.

[2] should be
https://mattermost.heptapod.net/heptapod/channels/development  for
Heptapod and IRC channels in other cases.



___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


mercurial-devel | Failed pipeline for branch/default | 5183e553

2021-09-16 Thread Heptapod


Pipeline #26865 has failed!

Project: mercurial-devel ( https://foss.heptapod.net/octobus/mercurial-devel )
Branch: branch/default ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/commits/branch/default )

Commit: 5183e553 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/commit/5183e5539c11536425e080e4b2947dd341a8cb8a
 )
Commit Message: dirstate: introduce a `set_clean` method on dir...
Commit Author: Pierre-Yves David ( https://foss.heptapod.net/marmoute )

Pipeline #26865 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/pipelines/26865 ) triggered 
by Administrator ( https://foss.heptapod.net/root )
had 3 failed jobs.

Job #246125 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/246125/raw )

Stage: tests
Name: windows-py3
Job #246126 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/246126/raw )

Stage: tests
Name: windows-py3-pyox
Job #246124 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/246124/raw )

Stage: tests
Name: check-pytype-py3

-- 
You're receiving this email because of your account on foss.heptapod.net.



___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel