D9721: convert: set date and time for svn commits

2021-01-11 Thread nslsrv (Nikita Slyusarev)
nslsrv created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Committing to subversion repository is changed to use commit dates from
  the source. Subversion always uses commit dates with UTC timezone, so only
  timestamps are used.
  
  By default svn commit dates are kept monotonically increasing by replacing
  locally decreasing date and time values. This behaviour is disabled using
  `convert.svn.allowdecreasingdates` configuration option.
  
  Test `test-convert-svn-sink.t` uses `svnxml.py` script to dump history of svn
  repositories. Atm the script is not printing `date` field from svn log. This
  patch changes this to allow checks on correctness of date and time convertion.
  
  Additional test cases are added to test commit dates autofixing.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/convert/__init__.py
  hgext/convert/subversion.py
  mercurial/configitems.py
  tests/svnxml.py
  tests/test-convert-hg-svn.t
  tests/test-convert-svn-sink.t
  tests/test-convert.t

CHANGE DETAILS

diff --git a/tests/test-convert.t b/tests/test-convert.t
--- a/tests/test-convert.t
+++ b/tests/test-convert.t
@@ -388,6 +388,18 @@
 does not convert tags from the source repo to the target
 repo. The default is False.
   
+  Subversion Destination
+  ##
+  
+  Commit dates being converted to subversion destination are kept
+  monotonically increasing by default.
+  
+  convert.svn.allowdecreasingdates
+convert commit dates as is allowing svn commit dates to
+decrease. This may break some subversion functionality when
+using the resulting repository (e.g. filtering revisions by
+using date ranges with "svn log").
+  
   options ([+] can be repeated):
   
-s --source-type TYPE source repository type
diff --git a/tests/test-convert-svn-sink.t b/tests/test-convert-svn-sink.t
--- a/tests/test-convert-svn-sink.t
+++ b/tests/test-convert-svn-sink.t
@@ -54,10 +54,12 @@
2 2 test a
   revision: 2
   author: test
+  date: 1970-01-01T00:00:01.00Z
   msg: modify a file
M /a
   revision: 1
   author: test
+  date: 1970-01-01T00:00:00.00Z
   msg: add a file
A /a
A /d1
@@ -95,6 +97,7 @@
3 3 test b
   revision: 3
   author: test
+  date: 1970-01-01T00:00:02.00Z
   msg: rename a file
D /a
A /b (from /a@2)
@@ -131,6 +134,7 @@
4 4 test c
   revision: 4
   author: test
+  date: 1970-01-01T00:00:03.00Z
   msg: copy a file
A /c (from /b@3)
   $ ls a a-hg-wc
@@ -167,6 +171,7 @@
5 5 test .
   revision: 5
   author: test
+  date: 1970-01-01T00:00:04.00Z
   msg: remove a file
D /b
   $ ls a a-hg-wc
@@ -209,6 +214,7 @@
6 6 test c
   revision: 6
   author: test
+  date: 1970-01-01T00:00:05.00Z
   msg: make a file executable
M /c
 #if execbit
@@ -237,7 +243,9 @@
   3 remove a file
   2 make a file executable
   1 add symlink
+  prevented svn commit date from decreasing for revision 7, used 
1970-01-01T00:00:05.00Z instead of 1970-01-01T00:00:00.00Z
   0 move symlink
+  prevented svn commit date from decreasing for revision 8, used 
1970-01-01T00:00:05.00Z instead of 1970-01-01T00:00:00.00Z
   $ svnupanddisplay a-svnlink-wc 1
8 1 test d1
8 1 test d1/d2
@@ -247,6 +255,7 @@
8 8 test newlink
   revision: 8
   author: test
+  date: 1970-01-01T00:00:05.00Z
   msg: move symlink
D /link
A /newlink (from /link@7)
@@ -278,6 +287,7 @@
7 7 test f
   revision: 7
   author: test
+  date: 1970-01-01T00:00:00.00Z
   msg: f
D /c
A /d
@@ -315,6 +325,7 @@
1 1 test d1/a
   revision: 1
   author: test
+  date: 1970-01-01T00:00:00.00Z
   msg: add executable file in new directory
A /d1
A /d1/a
@@ -343,6 +354,7 @@
2 2 test d2/a
   revision: 2
   author: test
+  date: 1970-01-01T00:00:01.00Z
   msg: copy file to new directory
A /d2
A /d2/a (from /d1/a@1)
@@ -416,21 +428,25 @@
4 4 test right-2
   revision: 4
   author: test
+  date: 1970-01-01T00:00:05.00Z
   msg: merge
A /right-1
A /right-2
   revision: 3
   author: test
+  date: 1970-01-01T00:00:02.00Z
   msg: left-2
M /b
A /left-2
   revision: 2
   author: test
+  date: 1970-01-01T00:00:01.00Z
   msg: left-1
M /b
A /left-1
   revision: 1
   author: test
+  date: 1970-01-01T00:00:00.00Z
   msg: base
A /b
 
@@ -459,10 +475,12 @@
2 2 test .hgtags
   revision: 2
   author: test
+  date: 1970-01-01T00:00:01.00Z
   msg: Tagged as v1.0
A /.hgtags
   revision: 1
   author: test
+  date: 1970-01-01T00:00:00.00Z
   msg: Add file a
A /a
   $ rm -rf a a-hg a-hg-wc
@@ -494,10 +512,12 @@
2 2 test exec
   revision: 2
   author: test
+  date: 1970-01-01T00:00:02.00Z
   msg: remove 

mercurial-devel | Pipeline #15947 has failed for branch/default | 23e7a114

2021-01-11 Thread Heptapod


Your pipeline 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: 23e7a114 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/commit/23e7a11494ff9682fa38e4af9d6046b0b6451c80
 )
Commit Message: beautifygraph: change the current commit symbol...
Commit Author: msuo...@google.com

Pipeline #15947 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/pipelines/15947 ) triggered 
by Administrator ( https://foss.heptapod.net/root )
had 2 failed builds.

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

Stage: tests
Name: checks-py2
Job #149113 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/149113/raw )

Stage: tests
Name: checks-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


mercurial@46202: 55 new changesets

2021-01-11 Thread Mercurial Commits
55 new changesets in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/70a9eb899637
changeset:   46148:70a9eb899637
parent:  46146:d109dda4a3e7
user:Pierre-Yves David 
date:Mon Dec 14 11:32:20 2020 +0100
summary: copies: document the current algorithm step

https://www.mercurial-scm.org/repo/hg/rev/294d5aca4ff5
changeset:   46149:294d5aca4ff5
user:Pierre-Yves David 
date:Mon Dec 14 11:32:24 2020 +0100
summary: copies: iterate over children directly (instead of parents)

https://www.mercurial-scm.org/repo/hg/rev/a132aa5979ec
changeset:   46150:a132aa5979ec
user:Pierre-Yves David 
date:Fri Nov 20 13:46:14 2020 +0100
summary: copies: no longer cache the ChangedFiles during copy tracing

https://www.mercurial-scm.org/repo/hg/rev/c6bc77f7e593
changeset:   46151:c6bc77f7e593
user:Pierre-Yves David 
date:Sat Apr 25 12:37:46 2020 +0200
summary: copies-rust: tokenize all paths into integer

https://www.mercurial-scm.org/repo/hg/rev/e166e8a035a7
changeset:   46152:e166e8a035a7
user:Pierre-Yves David 
date:Wed Dec 02 10:51:40 2020 +0100
summary: copies-rust: use the entry API to overwrite deleted entry

https://www.mercurial-scm.org/repo/hg/rev/0a721fc457bf
changeset:   46153:0a721fc457bf
user:Pierre-Yves David 
date:Wed Dec 02 11:04:11 2020 +0100
summary: copies-rust: use the `entry` API for copy information too

https://www.mercurial-scm.org/repo/hg/rev/ecbb2fc9418c
changeset:   46154:ecbb2fc9418c
user:Pierre-Yves David 
date:Wed Dec 02 16:11:35 2020 +0100
summary: copies-rust: rename Oracle.is_ancestor to Oracle.is_overwrite

https://www.mercurial-scm.org/repo/hg/rev/fce2f20a54ce
changeset:   46155:fce2f20a54ce
user:Pierre-Yves David 
date:Sat Nov 21 17:00:32 2020 +0100
summary: copies-rust: start recording overwrite as they happens

https://www.mercurial-scm.org/repo/hg/rev/7d99614b7b77
changeset:   46156:7d99614b7b77
user:Pierre-Yves David 
date:Wed Dec 02 15:24:10 2020 +0100
summary: copies-rust: make the comparison aware of the revision being 
current merged

https://www.mercurial-scm.org/repo/hg/rev/021925827c60
changeset:   46157:021925827c60
user:Pierre-Yves David 
date:Wed Dec 02 15:37:54 2020 +0100
summary: copies-rust: record overwrite when merging

https://www.mercurial-scm.org/repo/hg/rev/1fcfff09cac5
changeset:   46158:1fcfff09cac5
user:Pierre-Yves David 
date:Sun Dec 13 20:26:27 2020 +0100
summary: copies: avoid early return in _combine_changeset_copies

https://www.mercurial-scm.org/repo/hg/rev/929054848d6c
changeset:   46159:929054848d6c
user:Pierre-Yves David 
date:Sun Dec 13 20:16:34 2020 +0100
summary: copies: properly match result during changeset centric copy tracing

https://www.mercurial-scm.org/repo/hg/rev/1d6aac94e6d5
changeset:   46160:1d6aac94e6d5
user:Pierre-Yves David 
date:Sun Dec 13 19:18:10 2020 +0100
summary: copies: explain the "arbitrary" copy source pick in case of 
conflict

https://www.mercurial-scm.org/repo/hg/rev/3a0c41336961
changeset:   46161:3a0c41336961
user:Pierre-Yves David 
date:Mon Dec 14 01:30:32 2020 +0100
summary: copies: extract value comparison in the python copy tracing

https://www.mercurial-scm.org/repo/hg/rev/6b9d65298484
changeset:   46162:6b9d65298484
user:Pierre-Yves David 
date:Mon Dec 14 01:32:22 2020 +0100
summary: copies: rename value/other variable to minor/major for clarity

https://www.mercurial-scm.org/repo/hg/rev/ebcc52046096
changeset:   46163:ebcc52046096
user:Pierre-Yves David 
date:Mon Dec 14 17:22:11 2020 +0100
summary: hghave: add some official category for known-bad and missing-good 
output

https://www.mercurial-scm.org/repo/hg/rev/a27aa754d6ba
changeset:   46164:a27aa754d6ba
user:Martin von Zweigbergk 
date:Thu Dec 17 09:35:07 2020 -0800
summary: relnotes: document that `hg extdiff` also got -r replaced by 
--from/--to

https://www.mercurial-scm.org/repo/hg/rev/41d695a08e90
changeset:   46165:41d695a08e90
user:Joerg Sonnenberger 
date:Fri Apr 24 16:36:04 2020 +0200
summary: bundle: optional advisory obsolescence parts

https://www.mercurial-scm.org/repo/hg/rev/c511fef30290
changeset:   46166:c511fef30290
user:Pierre-Yves David 
date:Sat Dec 19 15:56:54 2020 +0100
summary: bundle2: drop some outdated comment

https://www.mercurial-scm.org/repo/hg/rev/8a4914397d02
changeset:   46167:8a4914397d02
user:Simon Sapin 
date:Mon Dec 14 16:33:15 2020 +0100
summary: rust: introduce Repo and Vfs types for filesystem abstraction

https://www.mercurial-scm.org/repo/hg/rev/24ee0c7e7fd2
changeset:   46168:24ee0c7e7fd2
user:Matt Harbison 
date:Sat Dec 19 01:10:57 2020 -0500
summary: mergetools: sync up comments with the TortoiseHg 

mercurial-devel | Pipeline #15942 has failed for branch/default | d9fcb69e

2021-01-11 Thread Heptapod


Your pipeline 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: d9fcb69e ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/commit/d9fcb69e9e1190f770c755c88984569e44a9a4b7
 )
Commit Message: beautifygraph: change the current commit symbol...
Commit Author: msuo...@google.com

Pipeline #15942 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/pipelines/15942 ) triggered 
by Administrator ( https://foss.heptapod.net/root )
had 2 failed builds.

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

Stage: tests
Name: checks-py2
Job #148999 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/148999/raw )

Stage: tests
Name: checks-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


D9720: shelve: don't crash on file with unexpected extension in .hg/shelved/

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

REVISION SUMMARY
  We assumed that the files in the `.hg/shelved/` directory have an
  extension. That's a valid assumption except that users may put garbage
  in the directory. This patch fixes the crash by simply not assuming
  that the result of splittin a string at '.' yields an extension. We
  don't use the extension since the previous patch anyway.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/shelve.py
  tests/test-shelve2.t

CHANGE DETAILS

diff --git a/tests/test-shelve2.t b/tests/test-shelve2.t
--- a/tests/test-shelve2.t
+++ b/tests/test-shelve2.t
@@ -779,10 +779,10 @@
 
 # A file with an unexpected extension
   $ touch .hg/shelved/junk3
-  $ hg shelve -l 2>&1 | grep ValueError
-  ValueError: not enough values to unpack (expected 2, got 1)
-  $ hg unshelve 2>&1 | grep ValueError
-  ValueError: not enough values to unpack (expected 2, got 1)
+  $ hg shelve -l
+  $ hg unshelve
+  abort: no shelved changes to apply!
+  [20]
   $ hg shelve -d junk3
   abort: shelved change 'junk3' not found
   [10]
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -625,7 +625,7 @@
 info = []
 seen = set()
 for (filename, _type) in names:
-name, ext = filename.rsplit(b'.', 1)
+name = filename.rsplit(b'.', 1)[0]
 if name in seen:
 continue
 seen.add(name)



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


D9719: shelve: don't include invalid shelves in `hg shelve --list`

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

REVISION SUMMARY
  Before this patch, if a shelved change is missing its `.hg` file, we
  still list it in `hg shelve --list`, but then `hg unshelve`
  crashes. This patch makes it so we only list valid shelved changes.
  
  This patch means that users who do `touch .hg/shelve/buy-milk.patch`
  as a form of TODO list will no longer see their TODO items in `hg
  shelve --list` (OTOH, we also no longer garbage collect their TOOD
  items, for better or worse).

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/shelve.py
  tests/test-shelve2.t

CHANGE DETAILS

diff --git a/tests/test-shelve2.t b/tests/test-shelve2.t
--- a/tests/test-shelve2.t
+++ b/tests/test-shelve2.t
@@ -753,16 +753,15 @@
 # A (corrupt) .patch file without a .hg file
   $ touch .hg/shelved/junk1.patch
   $ hg shelve -l
-  junk1   (* ago) (glob)
   $ hg unshelve
-  unshelving change 'junk1'
-  abort: $ENOENT$: '$TESTTMP/corrupt-shelves/.hg/shelved/junk1.hg'
-  [255]
+  abort: no shelved changes to apply!
+  [20]
   $ hg shelve -d junk1
+  abort: shelved change 'junk1' not found
+  [10]
   $ find .hg/shelve*
-  .hg/shelve-backup
-  .hg/shelve-backup/junk1.patch
   .hg/shelved
+  .hg/shelved/junk1.patch
 
 # A .hg file without a .patch file
   $ touch .hg/shelved/junk2.hg
@@ -774,9 +773,8 @@
   abort: shelved change 'junk2' not found
   [10]
   $ find .hg/shelve*
-  .hg/shelve-backup
-  .hg/shelve-backup/junk1.patch
   .hg/shelved
+  .hg/shelved/junk1.patch
   .hg/shelved/junk2.hg
 
 # A file with an unexpected extension
@@ -789,9 +787,8 @@
   abort: shelved change 'junk3' not found
   [10]
   $ find .hg/shelve*
-  .hg/shelve-backup
-  .hg/shelve-backup/junk1.patch
   .hg/shelved
+  .hg/shelved/junk1.patch
   .hg/shelved/junk3
   .hg/shelved/junk2.hg
 
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -87,7 +87,9 @@
 self.backupvfs = vfsmod.vfs(repo.vfs.join(backupdir))
 
 def exists(self):
-return self.vfs.exists(self.name + b'.' + patchextension)
+return self.vfs.exists(
+self.name + b'.' + patchextension
+) and self.vfs.exists(self.name + b'.hg')
 
 def mtime(self):
 return self.vfs.stat(self.name + b'.' + patchextension)[stat.ST_MTIME]
@@ -621,12 +623,17 @@
 raise
 return []
 info = []
-for (name, _type) in names:
-pfx, sfx = name.rsplit(b'.', 1)
-if not pfx or sfx != patchextension:
+seen = set()
+for (filename, _type) in names:
+name, ext = filename.rsplit(b'.', 1)
+if name in seen:
 continue
-mtime = Shelf(repo, pfx).mtime()
-info.append((mtime, pfx))
+seen.add(name)
+shelve = Shelf(repo, name)
+if not shelve.exists():
+continue
+mtime = shelve.mtime()
+info.append((mtime, name))
 return sorted(info, reverse=True)
 
 



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


D9718: tests: add tests for corrupt .hg/shelved/ directory

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

REVISION SUMMARY
  I don't care much how we behave in these cases, except that we should
  provide a way for the user to get out of the broken state.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-shelve2.t

CHANGE DETAILS

diff --git a/tests/test-shelve2.t b/tests/test-shelve2.t
--- a/tests/test-shelve2.t
+++ b/tests/test-shelve2.t
@@ -745,6 +745,58 @@
 #endif
   $ cd ..
 
+Test corrupt shelves (in .hg/shelved/, not .hg/shelvestate)
+  $ hg init corrupt-shelves
+  $ cd corrupt-shelves
+  $ mkdir .hg/shelved
+
+# A (corrupt) .patch file without a .hg file
+  $ touch .hg/shelved/junk1.patch
+  $ hg shelve -l
+  junk1   (* ago) (glob)
+  $ hg unshelve
+  unshelving change 'junk1'
+  abort: shelved change 'junk1' not found
+  [255]
+  $ hg shelve -d junk1
+  $ find .hg/shelve*
+  .hg/shelve-backup
+  .hg/shelve-backup/junk1.patch
+  .hg/shelved
+
+# A .hg file without a .patch file
+  $ touch .hg/shelved/junk2.hg
+  $ hg shelve -l
+  $ hg unshelve
+  abort: no shelved changes to apply!
+  [255]
+  $ hg shelve -d junk2
+  abort: shelved change 'junk2' not found
+  [255]
+  $ find .hg/shelve*
+  .hg/shelve-backup
+  .hg/shelve-backup/junk1.patch
+  .hg/shelve-backup/junk2.hg
+  .hg/shelved
+
+# A file with an unexpected extension
+  $ touch .hg/shelved/junk3
+  $ hg shelve -l 2>&1 | grep ValueError
+  ValueError: not enough values to unpack (expected 2, got 1)
+  $ hg unshelve 2>&1 | grep ValueError
+  ValueError: not enough values to unpack (expected 2, got 1)
+  $ hg shelve -d junk3
+  abort: shelved change 'junk3' not found
+  [255]
+  $ find .hg/shelve*
+  .hg/shelve-backup
+  .hg/shelve-backup/junk1.patch
+  .hg/shelve-backup/junk2.hg
+  .hg/shelved
+  .hg/shelved/junk3
+
+  $ cd ..
+
 Unshelve respects --keep even if user intervention is needed
   $ hg init unshelvekeep && cd unshelvekeep
   $ echo 1 > file && hg ci -Am 1



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


Re: New revlog format, plan page

2021-01-11 Thread Joerg Sonnenberger
On Mon, Jan 11, 2021 at 01:12:30PM +0100, Pierre-Yves David wrote:
> (1) Some of the current cache we have would fit well in such index
> * The hgtagsfnodes cache: taking 4 bytes to cache the `.hgtags` revision
> number associated with a changelog revisions. (This will requires some
> bookkeeping while adding/stripping),
> * the `rbc-revs-v1`: using an integer (4bytes) and an external list to store
> the branch on which each revision is,
> * (probably another 4 bytes to store the sub-branch/topic,)

I'd be reluctant to move them into the revlog. If anything, it would
call for a more variant friendly format specification. Ultimately, we
should figure out first how "hot" the various caches are before dedicing
to tie them tighter to changelog. Also, at the very least in the case of
rbc-revs-v1, it would also prevent some useful optimisations. When we
sort out the cache invalidation story, having a strict linear mapping of
32bit entries would make queries for all revisions of a given branch
easier than if it is part of a more complex data structure.

> (2) Some cache key mechanism. Right now a lot of cache validate their
> content using a (tip-rev, tip-node) pair. That pair is fragile as it does
> not garantee that the content before the tip is the same. Having "some"
> bytes that gather some kind of accumulated value from the previously added
> nodes. It does not have to be too many bytes, as the (tip-node, tip-rev,
> cache-key) should be good enough. We can probably build it using a series of
> shift and xor of the hash we are adding.

See my mail from Dec, 14th. Having done a few more things in the mean
time, I'd add phases and obslog as cache keys on top and that's
something we don't handle well right now at all. At that point the
current invalidation strategy just becomes way too fragile.

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


Re: New revlog format, plan page

2021-01-11 Thread Pierre-Yves David

I finally remember a couple of things I though we could move in an index.

(1) Some of the current cache we have would fit well in such index
* The hgtagsfnodes cache: taking 4 bytes to cache the `.hgtags` revision 
number associated with a changelog revisions. (This will requires some 
bookkeeping while adding/stripping),
* the `rbc-revs-v1`: using an integer (4bytes) and an external list to 
store the branch on which each revision is,

* (probably another 4 bytes to store the sub-branch/topic,)

(2) Some cache key mechanism. Right now a lot of cache validate their 
content using a (tip-rev, tip-node) pair. That pair is fragile as it 
does not garantee that the content before the tip is the same. Having 
"some" bytes that gather some kind of accumulated value from the 
previously added nodes. It does not have to be too many bytes, as the 
(tip-node, tip-rev, cache-key) should be good enough. We can probably 
build it using a series of shift and xor of the hash we are adding.


Note that with this, the index is heavily biased toward the changelog. 
So it is probably worth having distinct format: one mean for changelog 
were we can reclaim bytes related to filelog/manifestlog (linkrev and 
unified-revlog ID).


On 1/5/21 4:38 PM, Raphaël Gomès wrote:

Hi all,

During the last (virtual) sprint, a lot of us spoke about the need for a 
format change of the revlog to overcome some of its limitations.


I've opened a very much draft plan page [1] to try to list all the 
things we want to do in that version and try to figure out an efficient 
new format.


I'm aware that the v2 is already planned, but I figured that we can just 
merge that (seemingly) paused effort and this new one.


I wish you all a nice 2021!
Raphaël

[1] https://www.mercurial-scm.org/wiki/RevlogV2Plan

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


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


D9717: contrib: stop building rust for every job

2021-01-11 Thread Raphaël Gomès
Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is just wasteful for all steps that do not use Rust.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

AFFECTED FILES
  contrib/heptapod-ci.yml

CHANGE DETAILS

diff --git a/contrib/heptapod-ci.yml b/contrib/heptapod-ci.yml
--- a/contrib/heptapod-ci.yml
+++ b/contrib/heptapod-ci.yml
@@ -5,8 +5,6 @@
 before_script:
 - hg clone . /tmp/mercurial-ci/ --noupdate
 - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
-- cd /tmp/mercurial-ci/rust/rhg
-- cargo build
 - cd /tmp/mercurial-ci/
 - ls -1 tests/test-check-*.* > /tmp/check-tests.txt
 
@@ -20,6 +18,16 @@
 - echo "$RUNTEST_ARGS"
 - HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py 
--color=always $RUNTEST_ARGS
 
+.rust_template: 
+before_script:
+- hg clone . /tmp/mercurial-ci/ --noupdate
+- hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template 
'{node}'`
+- cd /tmp/mercurial-ci/
+- ls -1 tests/test-check-*.* > /tmp/check-tests.txt
+- cd /tmp/mercurial-ci/rust/rhg
+- cargo build
+- cd /tmp/mercurial-ci/
+
 checks-py2:
 <<: *runtests
 variables:
@@ -69,6 +77,7 @@
 
 test-py2-rust:
 <<: *runtests
+<<: *rust
 variables:
 HGWITHRUSTEXT: cpython
 RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"
@@ -76,6 +85,7 @@
 
 test-py3-rust:
 <<: *runtests
+<<: *rust
 variables:
 HGWITHRUSTEXT: cpython
 RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"



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


D9716: contrib: remove testing for `dirstate-tree` Rust feature

2021-01-11 Thread Raphaël Gomès
Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This feature will be replaced in a few months, and served more as a
  proof-of-concept. Keeping it in CI when no one is using it anymore is just
  wasteful.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

AFFECTED FILES
  contrib/heptapod-ci.yml

CHANGE DETAILS

diff --git a/contrib/heptapod-ci.yml b/contrib/heptapod-ci.yml
--- a/contrib/heptapod-ci.yml
+++ b/contrib/heptapod-ci.yml
@@ -41,12 +41,6 @@
 variables:
 PYTHON: python3
 
-rust-cargo-test-py3-dirstate-tree:
-<<: *rust_cargo_test
-variables:
-PYTHON: python3
-HG_RUST_FEATURES: dirstate-tree
-
 test-py2:
 <<: *runtests
 variables:
@@ -88,15 +82,6 @@
 PYTHON: python3
 TEST_HGMODULEPOLICY: "rust+c"
 
-test-py3-rust-dirstate-tree:
-<<: *runtests
-variables:
-HGWITHRUSTEXT: cpython
-RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"
-PYTHON: python3
-TEST_HGMODULEPOLICY: "rust+c"
-HG_RUST_FEATURES: "dirstate-tree"
-
 test-py2-chg:
 <<: *runtests
 variables:



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