D7003: grep: put --diff in the first line of usage

2019-10-16 Thread navaneeth.suresh (Navaneeth Suresh)
Closed by commit rHG0b8b7905f239: grep: put --diff in the first line of usage 
(authored by navaneeth.suresh).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs 
Review".

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D7003?vs=17117=17262#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7003?vs=17117=17262

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

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3318,7 +3318,7 @@
 ]
 + formatteropts
 + walkopts,
-_(b'[OPTION]... PATTERN [FILE]...'),
+_(b'[--diff] [OPTION]... PATTERN [FILE]...'),
 helpcategory=command.CATEGORY_FILE_CONTENTS,
 inferrepo=True,
 intents={INTENT_READONLY},



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


D6987: debugstrip: add debugstrip to core

2019-10-12 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh retitled this revision from "strip: move strip extension to 
core as debugstrip" to "debugstrip: add debugstrip to core".
navaneeth.suresh updated this revision to Diff 17120.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6987?vs=16914=17120

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

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

AFFECTED FILES
  mercurial/debugcommands.py
  tests/test-completion.t
  tests/test-debugstrip.t
  tests/test-help.t
  tests/test-strip.t

CHANGE DETAILS

diff --git a/tests/test-help.t b/tests/test-help.t
--- a/tests/test-help.t
+++ b/tests/test-help.t
@@ -1051,6 +1051,7 @@
debugsidedata
  dump the side data for a cl/manifest/file revision
debugssl  test a secure connection to a server
+   debugstripstrip changesets and all their descendants from the repository
debugsub  (no help text available)
debugsuccessorssets
  show set of successors for revision
diff --git a/tests/test-strip.t b/tests/test-debugstrip.t
copy from tests/test-strip.t
copy to tests/test-debugstrip.t
--- a/tests/test-strip.t
+++ b/tests/test-debugstrip.t
@@ -1,17 +1,16 @@
   $ echo "[extensions]" >> $HGRCPATH
-  $ echo "strip=" >> $HGRCPATH
   $ echo "drawdag=$TESTDIR/drawdag.py" >> $HGRCPATH
 
   $ restore() {
   > hg unbundle -q .hg/strip-backup/*
   > rm .hg/strip-backup/*
   > }
-  $ teststrip() {
+  $ testdebugstrip() {
   > hg up -C $1
-  > echo % before update $1, strip $2
+  > echo % before update $1, debugstrip $2
   > hg log -G -T '{rev}:{node}'
-  > hg --traceback strip $2
-  > echo % after update $1, strip $2
+  > hg --traceback debugstrip $2
+  > echo % after update $1, debugstrip $2
   > hg log -G -T '{rev}:{node}'
   > restore
   > }
@@ -67,9 +66,9 @@
   summary: a
   
 
-  $ teststrip 4 4
+  $ testdebugstrip 4 4
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  % before update 4, strip 4
+  % before update 4, debugstrip 4
   @  4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
   |
   o  3:65bd5f99a4a376cdea23a1153f07856b0d881d64
@@ -82,7 +81,7 @@
   
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
-  % after update 4, strip 4
+  % after update 4, debugstrip 4
   @  3:65bd5f99a4a376cdea23a1153f07856b0d881d64
   |
   | o  2:264128213d290d868c54642d13aeaa3675551a78
@@ -91,9 +90,9 @@
   |
   o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
   
-  $ teststrip 4 3
+  $ testdebugstrip 4 3
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  % before update 4, strip 3
+  % before update 4, debugstrip 3
   @  4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
   |
   o  3:65bd5f99a4a376cdea23a1153f07856b0d881d64
@@ -106,16 +105,16 @@
   
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
-  % after update 4, strip 3
+  % after update 4, debugstrip 3
   o  2:264128213d290d868c54642d13aeaa3675551a78
   |
   @  1:ef3a871183d7199c541cc140218298bbfcc6c28a
   |
   o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
   
-  $ teststrip 1 4
+  $ testdebugstrip 1 4
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  % before update 1, strip 4
+  % before update 1, debugstrip 4
   o  4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
   |
   o  3:65bd5f99a4a376cdea23a1153f07856b0d881d64
@@ -127,7 +126,7 @@
   o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
   
   saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
-  % after update 1, strip 4
+  % after update 1, debugstrip 4
   o  3:65bd5f99a4a376cdea23a1153f07856b0d881d64
   |
   | o  2:264128213d290d868c54642d13aeaa3675551a78
@@ -136,9 +135,9 @@
   |
   o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
   
-  $ teststrip 4 2
+  $ testdebugstrip 4 2
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  % before update 4, strip 2
+  % before update 4, debugstrip 2
   @  4:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
   |
   o  3:65bd5f99a4a376cdea23a1153f07856b0d881d64
@@ -150,7 +149,7 @@
   o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
   
   saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
-  % after update 4, strip 2
+  % after update 4, debugstrip 2
   @  3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
   |
   o  2:65bd5f99a4a376cdea23a1153f07856b0d881d64
@@ -159,9 +158,9 @@
   |
   o  0:9ab35a2d17cb64271241ea881efcc19dd953215b
   
-  $ teststrip 4 1
+  $ testdebugstrip 4 1
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  % before update 4, strip 1
+  % before update 4, debugstrip 1
   @  4:264128213d290d868c54642d13aeaa3675551a78
   |
   | o  3:443431ffac4f5b5a19b0b6c298a21b7ba736bcce
@@ -174,12 +173,12 @@
   
   1 files updated, 0 files merged, 

D7003: grep: put --diff in the first line of usage

2019-10-12 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 17117.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7003?vs=16916=17117

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

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2729,7 +2729,7 @@
 ('u', 'user', None, _('list the author (long with -v)')),
 ('d', 'date', None, _('list the date (short with -q)')),
 ] + formatteropts + walkopts,
-_('[OPTION]... PATTERN [FILE]...'),
+_('--diff [OPTION] ... PATTERN [FILE]...'),
 helpcategory=command.CATEGORY_FILE_CONTENTS,
 inferrepo=True,
 intents={INTENT_READONLY})



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


D7003: grep: put --diff in the first line of usage

2019-10-06 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/commands.py
  tests/test-completion.t

CHANGE DETAILS

diff --git a/tests/test-completion.t b/tests/test-completion.t
--- a/tests/test-completion.t
+++ b/tests/test-completion.t
@@ -326,7 +326,7 @@
   files: rev, print0, include, exclude, template, subrepos
   forget: interactive, include, exclude, dry-run
   graft: rev, base, continue, stop, abort, edit, log, no-commit, force, 
currentdate, currentuser, date, user, tool, dry-run
-  grep: print0, all, diff, text, follow, ignore-case, files-with-matches, 
line-number, rev, all-files, user, date, template, include, exclude
+  grep: diff, print0, all, text, follow, ignore-case, files-with-matches, 
line-number, rev, all-files, user, date, template, include, exclude
   heads: rev, topo, active, closed, style, template
   help: extension, command, keyword, system
   identify: rev, num, id, branch, tags, bookmarks, ssh, remotecmd, insecure, 
template
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2710,10 +2710,10 @@
 )
 
 @command('grep',
-[('0', 'print0', None, _('end fields with NUL')),
+[('', 'diff', None, _('print all revisions when the term was introduced '
+  'or removed')),
+('0', 'print0', None, _('end fields with NUL')),
 ('', 'all', None, _('print all revisions that match (DEPRECATED) ')),
-('', 'diff', None, _('print all revisions when the term was introduced '
- 'or removed')),
 ('a', 'text', None, _('treat all files as text')),
 ('f', 'follow', None,
  _('follow changeset history,'



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


D6987: strip: move strip extension to core

2019-10-06 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16914.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6987?vs=16856=16914

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

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

AFFECTED FILES
  hgext/mq.py
  hgext/strip.py
  mercurial/debugcommands.py
  mercurial/strip.py
  tests/remotefilelog-library.sh
  tests/test-backout.t
  tests/test-blackbox.t
  tests/test-bookmarks-pushpull.t
  tests/test-bookmarks-strip.t
  tests/test-bookmarks.t
  tests/test-branches.t
  tests/test-bundle-phases.t
  tests/test-commandserver.t
  tests/test-completion.t
  tests/test-convert-filemap.t
  tests/test-convert-svn-sink.t
  tests/test-copy-move-merge.t
  tests/test-debugcommands.t
  tests/test-debugstrip.t
  tests/test-exchange-obsmarkers-case-D1.t
  tests/test-exchange-obsmarkers-case-D2.t
  tests/test-exchange-obsmarkers-case-D3.t
  tests/test-extension.t
  tests/test-flagprocessor.t
  tests/test-generaldelta.t
  tests/test-graft.t
  tests/test-help.t
  tests/test-hgweb-bundle.t
  tests/test-histedit-arguments.t
  tests/test-histedit-edit.t
  tests/test-histedit-obsolete.t
  tests/test-hook.t
  tests/test-import-bypass.t
  tests/test-import-merge.t
  tests/test-import.t
  tests/test-keyword.t
  tests/test-lfs.t
  tests/test-mq-qpush-exact.t
  tests/test-mq.t
  tests/test-narrow-strip.t
  tests/test-obsolete-changeset-exchange.t
  tests/test-obsolete.t
  tests/test-phase-archived.t
  tests/test-phases-exchange.t
  tests/test-phases.t
  tests/test-pull-update.t
  tests/test-push-http.t
  tests/test-push.t
  tests/test-rebase-abort.t
  tests/test-rebase-cache.t
  tests/test-rebase-collapse.t
  tests/test-rebase-inmemory.t
  tests/test-remotefilelog-bgprefetch.t
  tests/test-remotefilelog-bundles.t
  tests/test-remotefilelog-linknodes.t
  tests/test-remotefilelog-local.t
  tests/test-remotefilelog-prefetch.t
  tests/test-remotefilelog-push-pull.t
  tests/test-remotefilelog-repack-fast.t
  tests/test-remotefilelog-repack.t
  tests/test-remotefilelog-sparse.t
  tests/test-repair-strip.t
  tests/test-shelve.t
  tests/test-shelve2.t
  tests/test-single-head.t
  tests/test-sparse-clear.t
  tests/test-sparse-clone.t
  tests/test-sparse-fsmonitor.t
  tests/test-sparse-import.t
  tests/test-sparse-merges.t
  tests/test-sparse-profiles.t
  tests/test-sparse-verbose-json.t
  tests/test-sparse.t
  tests/test-ssh-proto-unbundle.t
  tests/test-strip.t
  tests/test-subrepo-missing.t
  tests/test-subrepo.t
  tests/test-tags.t
  tests/test-template-map.t
  tests/test-transplant.t
  tests/test-treemanifest.t
  tests/testlib/exchange-obsmarker-util.sh
  tests/testlib/push-checkheads-util.sh

CHANGE DETAILS

diff --git a/tests/testlib/push-checkheads-util.sh 
b/tests/testlib/push-checkheads-util.sh
--- a/tests/testlib/push-checkheads-util.sh
+++ b/tests/testlib/push-checkheads-util.sh
@@ -9,10 +9,6 @@
 # non publishing server
 publish=False
 
-[extensions]
-# we need to strip some changeset for some test cases
-strip=
-
 [experimental]
 # enable evolution
 evolution=all
diff --git a/tests/testlib/exchange-obsmarker-util.sh 
b/tests/testlib/exchange-obsmarker-util.sh
--- a/tests/testlib/exchange-obsmarker-util.sh
+++ b/tests/testlib/exchange-obsmarker-util.sh
@@ -28,10 +28,6 @@
 # enable evolution
 evolution=true
 
-[extensions]
-# we need to strip some changeset for some test cases
-hgext.strip=
-
 [devel]
 strip-obsmarkers = no
 
diff --git a/tests/test-treemanifest.t b/tests/test-treemanifest.t
--- a/tests/test-treemanifest.t
+++ b/tests/test-treemanifest.t
@@ -316,7 +316,7 @@
 
   $ hg st --change tip
   M dir1/a
-  $ hg --config extensions.strip= strip tip
+  $ hg debugstrip tip
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   saved backup bundle to 
$TESTTMP/repo-mixed/.hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg
   $ hg debugindex --dir dir1
@@ -343,7 +343,7 @@
   added 1 changesets with 1 changes to 1 files
   new changesets 51cfd7b1e13b (1 drafts)
   (run 'hg update' to get a working copy)
-  $ hg --config extensions.strip= strip tip
+  $ hg debugstrip tip
   saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/*-backup.hg 
(glob)
   $ hg unbundle -q .hg/strip-backup/*
   $ hg debugindex --dir dir1
@@ -897,4 +897,4 @@
   $ hg log -r 'tip + tip^' -T '{manifest}\n'
   1:678d3574b88c
   1:678d3574b88c
-  $ hg --config extensions.strip= strip -r . -q
+  $ hg debugstrip -r . -q
diff --git a/tests/test-transplant.t b/tests/test-transplant.t
--- a/tests/test-transplant.t
+++ b/tests/test-transplant.t
@@ -647,7 +647,7 @@
 
 test "--merge" causing pull from source repository on local host
 
-  $ hg --config extensions.mq= -q strip 2
+  $ hg --config extensions.mq= -q debugstrip 2
   $ hg transplant -s ../t --merge tip
   searching for changes
   searching for changes
@@ -660,7 +660,7 @@
 
 test interactive transplant
 
-  $ hg --config extensions.strip= -q strip 0
+  $ hg -q debugstrip 0
   $ 

D6987: strip: move strip extension to core as debugstrip

2019-10-06 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.


  @durin42 Done,

REPOSITORY
  rHG Mercurial

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

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

To: navaneeth.suresh, durin42, #hg-reviewers
Cc: mjpieters, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6987: strip: move strip extension to core

2019-10-05 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added inline comments.

INLINE COMMENTS

> durin42 wrote in commands.py:5646
> debugstrip please (and put it in debugcommands)
> 
> and Gregory points out we need a strip extension that preserves the old 
> `strip` name for users that are used to that

i see. do i need to replace `strip` by `debugstrip` on every occurrence in 
tests? otherwise, i would have to revert the changes in the tests and keep the 
extension as it is.

REPOSITORY
  rHG Mercurial

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

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

To: navaneeth.suresh, durin42, #hg-reviewers
Cc: mjpieters, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6987: strip: move strip extension to core

2019-10-05 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a reviewer: durin42.
Herald added a reviewer: durin42.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Until now, `strip` was bootstrapped as an extension. This patch adds
  `strip` on core.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  contrib/win32/mercurial.ini
  hgext/mq.py
  hgext/strip.py
  mercurial/commands.py
  mercurial/extensions.py
  mercurial/strip.py
  tests/remotefilelog-library.sh
  tests/test-backout.t
  tests/test-branches.t
  tests/test-bundle-phases.t
  tests/test-commandserver.t
  tests/test-completion.t
  tests/test-convert-svn-sink.t
  tests/test-copy-move-merge.t
  tests/test-debugcommands.t
  tests/test-extension.t
  tests/test-flagprocessor.t
  tests/test-generaldelta.t
  tests/test-globalopts.t
  tests/test-graft.t
  tests/test-help-hide.t
  tests/test-help.t
  tests/test-hgweb-bundle.t
  tests/test-hgweb-json.t
  tests/test-histedit-arguments.t
  tests/test-histedit-edit.t
  tests/test-histedit-obsolete.t
  tests/test-hook.t
  tests/test-i18n.t
  tests/test-import-bypass.t
  tests/test-import.t
  tests/test-lfs.t
  tests/test-narrow-strip.t
  tests/test-obsolete.t
  tests/test-phase-archived.t
  tests/test-phases-exchange.t
  tests/test-pull-update.t
  tests/test-push-http.t
  tests/test-push.t
  tests/test-rebase-inmemory.t
  tests/test-rebase-obsolete.t
  tests/test-single-head.t
  tests/test-sparse-clear.t
  tests/test-sparse-clone.t
  tests/test-sparse-fsmonitor.t
  tests/test-sparse-import.t
  tests/test-sparse-merges.t
  tests/test-sparse-profiles.t
  tests/test-sparse-verbose-json.t
  tests/test-sparse.t
  tests/test-ssh-proto-unbundle.t
  tests/test-strip.t
  tests/test-subrepo-missing.t
  tests/test-subrepo.t
  tests/test-tags.t
  tests/test-template-map.t
  tests/test-transplant.t
  tests/test-treemanifest.t
  tests/testlib/exchange-obsmarker-util.sh
  tests/testlib/push-checkheads-util.sh

CHANGE DETAILS

diff --git a/tests/testlib/push-checkheads-util.sh 
b/tests/testlib/push-checkheads-util.sh
--- a/tests/testlib/push-checkheads-util.sh
+++ b/tests/testlib/push-checkheads-util.sh
@@ -9,10 +9,6 @@
 # non publishing server
 publish=False
 
-[extensions]
-# we need to strip some changeset for some test cases
-strip=
-
 [experimental]
 # enable evolution
 evolution=all
diff --git a/tests/testlib/exchange-obsmarker-util.sh 
b/tests/testlib/exchange-obsmarker-util.sh
--- a/tests/testlib/exchange-obsmarker-util.sh
+++ b/tests/testlib/exchange-obsmarker-util.sh
@@ -28,10 +28,6 @@
 # enable evolution
 evolution=true
 
-[extensions]
-# we need to strip some changeset for some test cases
-hgext.strip=
-
 [devel]
 strip-obsmarkers = no
 
diff --git a/tests/test-treemanifest.t b/tests/test-treemanifest.t
--- a/tests/test-treemanifest.t
+++ b/tests/test-treemanifest.t
@@ -316,7 +316,7 @@
 
   $ hg st --change tip
   M dir1/a
-  $ hg --config extensions.strip= strip tip
+  $ hg strip tip
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   saved backup bundle to 
$TESTTMP/repo-mixed/.hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg
   $ hg debugindex --dir dir1
@@ -343,7 +343,7 @@
   added 1 changesets with 1 changes to 1 files
   new changesets 51cfd7b1e13b (1 drafts)
   (run 'hg update' to get a working copy)
-  $ hg --config extensions.strip= strip tip
+  $ hg strip tip
   saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/*-backup.hg 
(glob)
   $ hg unbundle -q .hg/strip-backup/*
   $ hg debugindex --dir dir1
@@ -897,4 +897,4 @@
   $ hg log -r 'tip + tip^' -T '{manifest}\n'
   1:678d3574b88c
   1:678d3574b88c
-  $ hg --config extensions.strip= strip -r . -q
+  $ hg strip -r . -q
diff --git a/tests/test-transplant.t b/tests/test-transplant.t
--- a/tests/test-transplant.t
+++ b/tests/test-transplant.t
@@ -660,7 +660,7 @@
 
 test interactive transplant
 
-  $ hg --config extensions.strip= -q strip 0
+  $ hg -q strip 0
   $ hg -R ../t log -G --template "{rev}:{node|short}"
   @  4:a53251cdf717
   |
diff --git a/tests/test-template-map.t b/tests/test-template-map.t
--- a/tests/test-template-map.t
+++ b/tests/test-template-map.t
@@ -294,7 +294,7 @@
 Remove commit with empty commit message, so as to not pollute further
 tests.
 
-  $ hg --config extensions.strip= strip -q .
+  $ hg strip -q .
 
 Revision with no copies (used to print a traceback):
 
diff --git a/tests/test-tags.t b/tests/test-tags.t
--- a/tests/test-tags.t
+++ b/tests/test-tags.t
@@ -407,7 +407,7 @@
   $ f --size .hg/cache/hgtagsfnodes1
   .hg/cache/hgtagsfnodes1: size=168
 
-  $ hg -q --config extensions.strip= strip -r 6 --no-backup
+  $ hg -q strip -r 6 --no-backup
 #endif
 
 Stripping doesn't truncate the tags cache until new data is available
@@ -420,7 +420,7 @@
   $ f --size .hg/cache/hgtagsfnodes1
   .hg/cache/hgtagsfnodes1: size=144
 
-  $ hg -q --config extensions.strip= strip -r 5 --no-backup
+  $ hg -q 

D6738: unshelve: add --unresolved flag to unshelve mergestate with unresolved files

2019-10-05 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16815.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6738?vs=16808=16815

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/shelve.py
  tests/test-completion.t
  tests/test-shelve-unresolved.t

CHANGE DETAILS

diff --git a/tests/test-shelve-unresolved.t b/tests/test-shelve-unresolved.t
--- a/tests/test-shelve-unresolved.t
+++ b/tests/test-shelve-unresolved.t
@@ -171,3 +171,290 @@
   +===
   +B
   +>>> merge rev:fd9a4049234b - test: B
+
+-- now, fix an urgent bug
+  $ echo fixed >> bug
+  $ ls
+  bar
+  bug
+  file1
+  file1.orig
+  file2
+  file2.orig
+  $ hg add bug
+  $ hg ci -m "fix bug"
+  $ hg log -G
+  @  changeset:   3:a53a9a7475b3
+  |  tag: tip
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: fix bug
+  |
+  o  changeset:   2:69004294ad57
+  |  parent:  0:c32ef6121744
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: C
+  |
+  | o  changeset:   1:fd9a4049234b
+  |/   user:test
+  |date:Thu Jan 01 00:00:00 1970 +
+  |summary: B
+  |
+  o  changeset:   0:c32ef6121744
+ user:test
+ date:Thu Jan 01 00:00:00 1970 +
+ summary: A
+  
+-- let's get back to the old mergestate
+-- we need to update to one of the merge parents. otherwise, abort.
+  $ hg unshelve --unresolved
+  unshelving change 'default'
+  abort: dirstate is not on either of the merge parents.
+  use hg update to one of the merge parents.
+  [255]
+
+  $ hg up 2
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ cat file2
+  A
+  C
+
+-- flag --unshelve is not passed. but, the last shelve is unresolved
+  $ hg unshelve
+  unshelving change 'default'
+  abort: default is an unresolved shelve, use --unresolved to unshelve it
+  [255]
+
+  $ hg unshelve --unresolved
+  unshelving change 'default'
+
+  $ hg log -G
+  o  changeset:   3:a53a9a7475b3
+  |  tag: tip
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: fix bug
+  |
+  @  changeset:   2:69004294ad57
+  |  parent:  0:c32ef6121744
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: C
+  |
+  | @  changeset:   1:fd9a4049234b
+  |/   user:test
+  |date:Thu Jan 01 00:00:00 1970 +
+  |summary: B
+  |
+  o  changeset:   0:c32ef6121744
+ user:test
+ date:Thu Jan 01 00:00:00 1970 +
+ summary: A
+  
+  $ cat file1
+  A
+  B
+  C
+  $ hg diff
+  diff -r 69004294ad57 file1
+  --- a/file1  Thu Jan 01 00:00:00 1970 +
+  +++ b/file1  Thu Jan 01 00:00:00 1970 +
+  @@ -1,2 +1,3 @@
+   A
+  +B
+   C
+  diff -r 69004294ad57 file2
+  --- a/file2  Thu Jan 01 00:00:00 1970 +
+  +++ b/file2  Thu Jan 01 00:00:00 1970 +
+  @@ -1,2 +1,6 @@
+   A
+  +<<< working copy: 69004294ad57 - test: C
+   C
+  +===
+  +B
+  +>>> merge rev:fd9a4049234b - test: B
+  $ cat file2
+  A
+  <<< working copy: 69004294ad57 - test: C
+  C
+  ===
+  B
+  >>> merge rev:fd9a4049234b - test: B
+  $ hg resolve -l
+  R file1
+  U file2
+
+-- flag --unresolved is passed but the top most shelve is not unresolved
+  $ hg shelve --unresolved
+  shelved as default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ echo garbage >> bug
+  $ hg st
+  ? bar
+  ? bug
+  ? file1.orig
+  ? file2.orig
+  $ hg add bug
+  $ hg shelve
+  shelved as default-01
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg unshelve --unresolved
+  unshelving change 'default-01'
+  abort: default-01 is not an unresolved shelve
+  
+  [255]
+
+-- now, unshelve default
+  $ hg unshelve -n default --unresolved
+
+-- commit the merge after completing conflict resolution
+  $ cat >> file2 < A
+  > B
+  > C
+  > EOF
+  $ hg resolve -m file2
+  (no more unresolved files)
+  $ hg ci -m merge
+  $ hg verify
+  checking changesets
+  checking manifests
+  crosschecking files in changesets and manifests
+  checking files
+  checked 5 changesets with 9 changes to 3 files
+  $ hg log -G
+  @changeset:   4:745dca2ee1f1
+  |\   tag: tip
+  | |  parent:  2:69004294ad57
+  | |  parent:  1:fd9a4049234b
+  | |  user:test
+  | |  date:Thu Jan 01 00:00:00 1970 +
+  | |  summary: merge
+  | |
+  | | o  changeset:   3:a53a9a7475b3
+  | |/   user:test
+  | |date:Thu Jan 01 00:00:00 1970 +
+  | |summary: fix bug
+  | |
+  | o  changeset:   2:69004294ad57
+  | |  parent:  0:c32ef6121744
+  | |  user:test
+  | |  date:Thu Jan 01 00:00:00 1970 +
+  | |  summary: C
+  | |
+  o |  changeset:   1:fd9a4049234b
+  |/   

D6737: shelve: add --unresolved flag to shelve mergestate with unresolved files

2019-10-05 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16814.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6737?vs=16807=16814

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/shelve.py
  tests/test-completion.t
  tests/test-shelve-unresolved.t
  tests/test-shelve.t

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -83,6 +83,7 @@
   --statoutput diffstat-style summary of changes (provide
 the names of the shelved changes as positional
 arguments)
+  --unresolved  shelve mergestate with unresolved files
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
   --mq  operate on patch repository
diff --git a/tests/test-shelve-unresolved.t b/tests/test-shelve-unresolved.t
new file mode 100644
--- /dev/null
+++ b/tests/test-shelve-unresolved.t
@@ -0,0 +1,173 @@
+  $ addunresolvedmerge() {
+  >   echo A >> $1
+  >   echo A >> $2
+  >   hg ci -m A
+  >   echo B >> $1
+  >   echo B >> $2
+  >   hg ci -m B
+  >   hg up $3
+  >   echo C >> $1
+  >   echo C >> $2
+  >   hg ci -m C
+  >   hg merge -r $(($3+1))
+  > }
+
+Test shelve with unresolved mergestate
+
+  $ cat >> $HGRCPATH < [extensions]
+  > shelve =
+  > EOF
+
+  $ hg init shelve-unresolved
+  $ cd shelve-unresolved
+  $ echo A >> file1
+  $ echo A >> file2
+  $ hg ci -Am A
+  adding file1
+  adding file2
+  $ echo foo >> bar
+  $ hg add bar
+
+-- should abort on absence of mergestate
+  $ hg shelve --unresolved
+  abort: no active mergestate found
+  [255]
+
+  $ hg forget bar
+  $ echo B >> file1
+  $ echo B >> file2
+  $ hg ci -m B
+  $ hg up 0
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo C >> file1
+  $ echo C >> file2
+  $ hg ci -m C
+  created new head
+  $ hg merge
+  merging file1
+  merging file2
+  warning: conflicts while merging file1! (edit, then use 'hg resolve --mark')
+  warning: conflicts while merging file2! (edit, then use 'hg resolve --mark')
+  0 files updated, 0 files merged, 0 files removed, 2 files unresolved
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to 
abandon
+  [1]
+
+-- let's partially solve the conflicts
+  $ cat > file1 < A
+  > B
+  > C
+  > EOF
+  $ hg resolve -m file1
+
+-- mark file2 as resolved to check abort
+  $ hg resolve -m file2
+  (no more unresolved files)
+  $ hg log -G
+  @  changeset:   2:69004294ad57
+  |  tag: tip
+  |  parent:  0:c32ef6121744
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: C
+  |
+  | @  changeset:   1:fd9a4049234b
+  |/   user:test
+  |date:Thu Jan 01 00:00:00 1970 +
+  |summary: B
+  |
+  o  changeset:   0:c32ef6121744
+ user:test
+ date:Thu Jan 01 00:00:00 1970 +
+ summary: A
+  
+  $ cat file1
+  A
+  B
+  C
+  $ hg diff
+  diff -r 69004294ad57 file1
+  --- a/file1  Thu Jan 01 00:00:00 1970 +
+  +++ b/file1  Thu Jan 01 00:00:00 1970 +
+  @@ -1,2 +1,3 @@
+   A
+  +B
+   C
+  diff -r 69004294ad57 file2
+  --- a/file2  Thu Jan 01 00:00:00 1970 +
+  +++ b/file2  Thu Jan 01 00:00:00 1970 +
+  @@ -1,2 +1,6 @@
+   A
+  +<<< working copy: 69004294ad57 - test: C
+   C
+  +===
+  +B
+  +>>> merge rev:fd9a4049234b - test: B
+
+-- should abort on absence of conflicts
+  $ hg shelve
+  abort: mergestate found
+  try with --unresolved to shelve conflicts
+  [255]
+  $ hg shelve --unresolved
+  abort: no unresolved files found in the mergestate
+  [255]
+  $ hg resolve -u file2
+  $ hg resolve -l
+  R file1
+  U file2
+
+-- should suggest --unresolved on shelving with mergestate
+  $ hg shelve
+  abort: mergestate found
+  try with --unresolved to shelve conflicts
+  [255]
+
+  $ hg shelve --unresolved
+  shelved as default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ cat file1
+  A
+  C
+  $ hg log -G
+  @  changeset:   2:69004294ad57
+  |  tag: tip
+  |  parent:  0:c32ef6121744
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: C
+  |
+  | o  changeset:   1:fd9a4049234b
+  |/   user:test
+  |date:Thu Jan 01 00:00:00 1970 +
+  |summary: B
+  |
+  o  changeset:   0:c32ef6121744
+ user:test
+ date:Thu Jan 01 00:00:00 1970 +
+ summary: A
+  
+  $ hg shelve --list
+  default (1s ago)changes to: C
+  $ hg shelve --patch
+  default (1s ago)changes to: C
+  
+  diff --git a/file1 b/file1
+  --- a/file1
+  +++ b/file1
+  @@ -1,2 +1,3 @@
+   A
+  +B
+   C
+  diff --git a/file2 

D6966: shelve: add method for storing mergestate in changeset extras

2019-10-05 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh edited the summary of this revision.
navaneeth.suresh updated this revision to Diff 16813.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6966?vs=16806=16813

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

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

AFFECTED FILES
  mercurial/shelve.py

CHANGE DETAILS

diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -26,6 +26,7 @@
 import errno
 import itertools
 import stat
+import struct
 
 from .i18n import _
 from . import (
@@ -56,6 +57,8 @@
 stringutil,
 )
 
+_pack = struct.pack
+
 backupdir = 'shelve-backup'
 shelvedir = 'shelved'
 shelvefileextensions = ['hg', 'patch', 'shelve']
@@ -66,6 +69,12 @@
 # generic user for all shelve operations
 shelveuser = 'shelve@localhost'
 
+# Merge state record types. See ``mergestate`` docs for more.
+RECORD_LOCAL = b'L'
+RECORD_OTHER = b'O'
+RECORD_MERGED = b'F'
+RECORD_OVERRIDE = b't'
+
 class shelvedfile(object):
 """Helper for the file storing a single shelve
 
@@ -413,6 +422,22 @@
 cmdutil.exportfile(repo, [node], fp, opts=mdiff.diffopts(git=True),
match=match)
 
+def _storeunresolvedmerge(ui, repo, name=None, extra=None):
+"""Store the mergestate information in changeset extra
+for later restoration.
+"""
+ms = merge.mergestate.read(repo)
+records = ms._readrecords()
+allowlist = (RECORD_LOCAL, RECORD_OTHER, RECORD_MERGED)
+mergedata = ''
+for key, data in records:
+assert len(key) == 1
+if key not in allowlist:
+key, data = RECORD_OVERRIDE, '%s%s' % (key, data)
+format = r'>sI%is' % len(data)
+mergedata = mergedata + _pack(format, key, len(data), data)
+extra['mergerecords'] = mergedata
+
 def _includeunknownfiles(repo, pats, opts, extra):
 s = repo.status(match=scmutil.match(repo[None], pats, opts),
 unknown=True)



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


D6967: shelve: add method for storing mergestate in changeset extras

2019-10-04 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We store mergestate records in `.hg/merge`. This patch adds a method
  of storage in changeset extras. This will help in the exchange of
  mergestate records to other repos. Also, this can be used by
  `shelve --unresolved` to store the mergestate records.
  
  It uses the storage format supported for hg versions 3.7 or later. For the
  time being, I have omitted the storage of the content of the local version
  of unresolved files.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/shelve.py

CHANGE DETAILS

diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -26,6 +26,7 @@
 import errno
 import itertools
 import stat
+import struct
 
 from .i18n import _
 from . import (
@@ -56,6 +57,9 @@
 stringutil,
 )
 
+_pack = struct.pack
+_unpack = struct.unpack
+
 backupdir = 'shelve-backup'
 shelvedir = 'shelved'
 shelvefileextensions = ['hg', 'patch', 'shelve']
@@ -66,6 +70,47 @@
 # generic user for all shelve operations
 shelveuser = 'shelve@localhost'
 
+# Merge state record types. See ``mergestate`` docs for more.
+RECORD_LOCAL = b'L'
+RECORD_OTHER = b'O'
+RECORD_MERGED = b'F'
+RECORD_CHANGEDELETE_CONFLICT = b'C'
+RECORD_MERGE_DRIVER_MERGE = b'D'
+RECORD_PATH_CONFLICT = b'P'
+RECORD_MERGE_DRIVER_STATE = b'm'
+RECORD_FILE_VALUES = b'f'
+RECORD_LABELS = b'l'
+RECORD_OVERRIDE = b't'
+RECORD_UNSUPPORTED_MANDATORY = b'X'
+RECORD_UNSUPPORTED_ADVISORY = b'x'
+
+MERGE_DRIVER_STATE_UNMARKED = b'u'
+MERGE_DRIVER_STATE_MARKED = b'm'
+MERGE_DRIVER_STATE_SUCCESS = b's'
+
+MERGE_RECORD_UNRESOLVED = b'u'
+MERGE_RECORD_RESOLVED = b'r'
+MERGE_RECORD_UNRESOLVED_PATH = b'pu'
+MERGE_RECORD_RESOLVED_PATH = b'pr'
+MERGE_RECORD_DRIVER_RESOLVED = b'd'
+
+ACTION_FORGET = b'f'
+ACTION_REMOVE = b'r'
+ACTION_ADD = b'a'
+ACTION_GET = b'g'
+ACTION_PATH_CONFLICT = b'p'
+ACTION_PATH_CONFLICT_RESOLVE = b'pr'
+ACTION_ADD_MODIFIED = b'am'
+ACTION_CREATED = b'c'
+ACTION_DELETED_CHANGED = b'dc'
+ACTION_CHANGED_DELETED = b'cd'
+ACTION_MERGE = b'm'
+ACTION_LOCAL_DIR_RENAME_GET = b'dg'
+ACTION_DIR_RENAME_MOVE_LOCAL = b'dm'
+ACTION_KEEP = b'k'
+ACTION_EXEC = b'e'
+ACTION_CREATED_MERGE = b'cm'
+
 class shelvedfile(object):
 """Helper for the file storing a single shelve
 
@@ -413,6 +458,25 @@
 cmdutil.exportfile(repo, [node], fp, opts=mdiff.diffopts(git=True),
match=match)
 
+def _storeunresolvedmerge(ui, repo, name=None, extra=None):
+"""Store the mergestate information in changeset extra
+
+This will clear the mergestate and also stores the mergestate
+information for later restoration.
+"""
+ms = merge.mergestate.read(repo)
+records = ms._readrecords()
+allowlist = (RECORD_LOCAL, RECORD_OTHER, RECORD_MERGED)
+mergedata = ''
+for key, data in records:
+assert len(key) == 1
+if key not in allowlist:
+key, data = RECORD_OVERRIDE, '%s%s' % (key, data)
+format = '>sI%is' % len(data)
+mergedata = ''.join([mergedata, _pack(format, key, len(data), data)])
+extra['mergerecords'] = mergedata
+ms.reset()
+
 def _includeunknownfiles(repo, pats, opts, extra):
 s = repo.status(match=scmutil.match(repo[None], pats, opts),
 unknown=True)



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


D6966: shelve: add method for storing mergestate in changeset extras

2019-10-04 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We store mergestate records in `.hg/merge`. This patch adds a method
  of storage in changeset extras. This will help in the exchange of
  mergestate records to other repos. Also, this can be used by
  `shelve --unresolved` to store the mergestate records.
  
  It uses the storage format supported for hg versions 3.7 or later. For the
  time being, I have omitted the storage of the content of the local version
  of unresolved files.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/shelve.py

CHANGE DETAILS

diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -26,6 +26,7 @@
 import errno
 import itertools
 import stat
+import struct
 
 from .i18n import _
 from . import (
@@ -56,6 +57,9 @@
 stringutil,
 )
 
+_pack = struct.pack
+_unpack = struct.unpack
+
 backupdir = 'shelve-backup'
 shelvedir = 'shelved'
 shelvefileextensions = ['hg', 'patch', 'shelve']
@@ -66,6 +70,47 @@
 # generic user for all shelve operations
 shelveuser = 'shelve@localhost'
 
+# Merge state record types. See ``mergestate`` docs for more.
+RECORD_LOCAL = b'L'
+RECORD_OTHER = b'O'
+RECORD_MERGED = b'F'
+RECORD_CHANGEDELETE_CONFLICT = b'C'
+RECORD_MERGE_DRIVER_MERGE = b'D'
+RECORD_PATH_CONFLICT = b'P'
+RECORD_MERGE_DRIVER_STATE = b'm'
+RECORD_FILE_VALUES = b'f'
+RECORD_LABELS = b'l'
+RECORD_OVERRIDE = b't'
+RECORD_UNSUPPORTED_MANDATORY = b'X'
+RECORD_UNSUPPORTED_ADVISORY = b'x'
+
+MERGE_DRIVER_STATE_UNMARKED = b'u'
+MERGE_DRIVER_STATE_MARKED = b'm'
+MERGE_DRIVER_STATE_SUCCESS = b's'
+
+MERGE_RECORD_UNRESOLVED = b'u'
+MERGE_RECORD_RESOLVED = b'r'
+MERGE_RECORD_UNRESOLVED_PATH = b'pu'
+MERGE_RECORD_RESOLVED_PATH = b'pr'
+MERGE_RECORD_DRIVER_RESOLVED = b'd'
+
+ACTION_FORGET = b'f'
+ACTION_REMOVE = b'r'
+ACTION_ADD = b'a'
+ACTION_GET = b'g'
+ACTION_PATH_CONFLICT = b'p'
+ACTION_PATH_CONFLICT_RESOLVE = b'pr'
+ACTION_ADD_MODIFIED = b'am'
+ACTION_CREATED = b'c'
+ACTION_DELETED_CHANGED = b'dc'
+ACTION_CHANGED_DELETED = b'cd'
+ACTION_MERGE = b'm'
+ACTION_LOCAL_DIR_RENAME_GET = b'dg'
+ACTION_DIR_RENAME_MOVE_LOCAL = b'dm'
+ACTION_KEEP = b'k'
+ACTION_EXEC = b'e'
+ACTION_CREATED_MERGE = b'cm'
+
 class shelvedfile(object):
 """Helper for the file storing a single shelve
 
@@ -413,6 +458,25 @@
 cmdutil.exportfile(repo, [node], fp, opts=mdiff.diffopts(git=True),
match=match)
 
+def _storeunresolvedmerge(ui, repo, name=None, extra=None):
+"""Store the mergestate information in changeset extra
+
+This will clear the mergestate and also stores the mergestate
+information for later restoration.
+"""
+ms = merge.mergestate.read(repo)
+records = ms._readrecords()
+allowlist = (RECORD_LOCAL, RECORD_OTHER, RECORD_MERGED)
+mergedata = ''
+for key, data in records:
+assert len(key) == 1
+if key not in allowlist:
+key, data = RECORD_OVERRIDE, '%s%s' % (key, data)
+format = '>sI%is' % len(data)
+mergedata = ''.join([mergedata, _pack(format, key, len(data), data)])
+extra['mergerecords'] = mergedata
+ms.reset()
+
 def _includeunknownfiles(repo, pats, opts, extra):
 s = repo.status(match=scmutil.match(repo[None], pats, opts),
 unknown=True)



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


D6709: config: add --registered flag to show all known configs

2019-10-04 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.


  Now I understand that this patch does an enormous number of changes. I've 
split this patch into three. Will be working on each of them separately from 
now on.

REPOSITORY
  rHG Mercurial

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

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

To: navaneeth.suresh, #hg-reviewers, av6, marmoute, durin42
Cc: durin42, mharbison72, yuja, pulkit, marmoute, av6, mjpieters, 
mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6963: config: show config options in a user-friendly format

2019-10-04 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This patch does the following things to display the output in a
  user-friendly format:
  
  - Replace bool by yes/no.
  - Converts list to string.
  
  I will be modifying this soon to handle list values in a better way.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -228,125 +228,125 @@
 test --registered flag
 
   $ hg showconfig --registered
-  annotate.git=False
-  annotate.ignoreblanklines=False
-  annotate.ignorews=False
-  annotate.ignorewsamount=False
-  annotate.ignorewseol=False
-  annotate.nobinary=False
-  annotate.nodates=False
-  annotate.noprefix=False
-  annotate.showfunc=False
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
   annotate.unified=None
-  annotate.word-diff=False
+  annotate.word-diff=no
   auth.cookiefile=None
-  bookmarks.pushing=[]
+  bookmarks.pushing=
   bundle.mainreporoot=$TESTTMP
   chgserver.idletimeout=3600
-  chgserver.skiphash=False
+  chgserver.skiphash=no
   cmdserver.log=None
   cmdserver.max-log-files=7
   cmdserver.max-log-size=1 MB
-  cmdserver.track-log=[b'chgserver', b'cmdserver', b'repocache']
+  cmdserver.track-log=chgserver cmdserver repocache
   color.mode=auto
-  commands.commit.interactive.git=False
-  commands.commit.interactive.ignoreblanklines=False
-  commands.commit.interactive.ignorews=False
-  commands.commit.interactive.ignorewsamount=False
-  commands.commit.interactive.ignorewseol=False
-  commands.commit.interactive.nobinary=False
-  commands.commit.interactive.nodates=False
-  commands.commit.interactive.noprefix=False
-  commands.commit.interactive.showfunc=False
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
   commands.commit.interactive.unified=None
-  commands.commit.interactive.word-diff=False
-  commands.commit.post-status=False
-  commands.rebase.requiredest=False
-  commands.resolve.confirm=False
-  commands.resolve.explicit-re-merge=False
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
   commands.resolve.mark-check=none
-  commands.revert.interactive.git=False
-  commands.revert.interactive.ignoreblanklines=False
-  commands.revert.interactive.ignorews=False
-  commands.revert.interactive.ignorewsamount=False
-  commands.revert.interactive.ignorewseol=False
-  commands.revert.interactive.nobinary=False
-  commands.revert.interactive.nodates=False
-  commands.revert.interactive.noprefix=False
-  commands.revert.interactive.showfunc=False
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
   commands.revert.interactive.unified=None
-  commands.revert.interactive.word-diff=False
-  commands.show.aliasprefix=[]
-  commands.status.relative=False
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=
+  commands.status.relative=no
   commands.status.terse=
-  commands.status.verbose=False
+  commands.status.verbose=no
   commands.update.check=None
-  commands.update.requiredest=False
-  convert.bzr.saverev=True
-  convert.cvsps.cache=True
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
   convert.cvsps.fuzz=60
   convert.cvsps.logencoding=None
   convert.cvsps.mergefrom=None
   convert.cvsps.mergeto=None
-  convert.git.committeractions=[b'messagedifferent']
-  convert.git.extrakeys=[]
-  convert.git.findcopiesharder=False
+  convert.git.committeractions=messagedifferent
+  convert.git.extrakeys=
+  convert.git.findcopiesharder=no
   convert.git.remoteprefix=remote
   convert.git.renamelimit=400
-  convert.git.saverev=True
+  convert.git.saverev=yes
   convert.git.similarity=50
-  convert.git.skipsubmodules=False
-  convert.hg.clonebranches=False
-  convert.hg.ignoreerrors=False
-  

D6962: config: add defaults and experimental status for --debug flag

2019-10-04 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This patch adds `EXPERIMENTAL` to the output of 'showconfig --debug'
  for experimental flags which are not under the `section == 'experimental'`.
  This also adds the default value of the config item if it differs from
  the current value.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -972,3 +972,11 @@
   diff.showfunc=False
   diff.unified=None
   diff.word-diff=False
+
+  $ hg showconfig --debug --registered | grep 'cmdserver'
+  none: cmdserver.log=None
+  none: cmdserver.max-log-files=7
+  none: cmdserver.max-log-size=1 MB
+  none: cmdserver.max-repo-cache(EXPERIMENTAL)=0 (default: None)
+  none: cmdserver.message-encodings(EXPERIMENTAL)=[] (default: None)
+  none: cmdserver.track-log=[b'chgserver', b'cmdserver', b'repocache']
diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -833,6 +833,9 @@
 # --verbose is specified.
 continue
 value = self._config(section, name, untrusted=untrusted)
+if self.debugflag:
+if item.experimental or 'experimental' in name:
+name = ''.join([name, '(EXPERIMENTAL)'])
 yield section, name, value
 
 def plain(self, feature=None):
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1890,7 +1890,12 @@
 fm.data(name=entryname)
 fm.write('value', '%s\n', value)
 else:
-fm.write('name value', '%s=%s\n', entryname, value)
+if (opts.get('registered') and
+value != pycompat.bytestr(defaultvalue) and ui.debugflag):
+fm.write('name value defaultvalue', '%s=%s (default: %s)\n',
+  entryname, value, pycompat.bytestr(defaultvalue))
+else:
+fm.write('name value', '%s=%s\n', entryname, value)
 matched = True
 fm.end()
 if matched:



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


D6709: config: add --registered flag to show all known configs

2019-10-04 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh edited the summary of this revision.
navaneeth.suresh updated this revision to Diff 16800.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16306=16800

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-basic.t
  tests/test-commandserver.t
  tests/test-completion.t
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -224,3 +224,751 @@
   > done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=False
+  annotate.ignoreblanklines=False
+  annotate.ignorews=False
+  annotate.ignorewsamount=False
+  annotate.ignorewseol=False
+  annotate.nobinary=False
+  annotate.nodates=False
+  annotate.noprefix=False
+  annotate.showfunc=False
+  annotate.unified=None
+  annotate.word-diff=False
+  auth.cookiefile=None
+  bookmarks.pushing=[]
+  bundle.mainreporoot=$TESTTMP
+  chgserver.idletimeout=3600
+  chgserver.skiphash=False
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.track-log=[b'chgserver', b'cmdserver', b'repocache']
+  color.mode=auto
+  commands.commit.interactive.git=False
+  commands.commit.interactive.ignoreblanklines=False
+  commands.commit.interactive.ignorews=False
+  commands.commit.interactive.ignorewsamount=False
+  commands.commit.interactive.ignorewseol=False
+  commands.commit.interactive.nobinary=False
+  commands.commit.interactive.nodates=False
+  commands.commit.interactive.noprefix=False
+  commands.commit.interactive.showfunc=False
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=False
+  commands.commit.post-status=False
+  commands.rebase.requiredest=False
+  commands.resolve.confirm=False
+  commands.resolve.explicit-re-merge=False
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=False
+  commands.revert.interactive.ignoreblanklines=False
+  commands.revert.interactive.ignorews=False
+  commands.revert.interactive.ignorewsamount=False
+  commands.revert.interactive.ignorewseol=False
+  commands.revert.interactive.nobinary=False
+  commands.revert.interactive.nodates=False
+  commands.revert.interactive.noprefix=False
+  commands.revert.interactive.showfunc=False
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=False
+  commands.show.aliasprefix=[]
+  commands.status.relative=False
+  commands.status.terse=
+  commands.status.verbose=False
+  commands.update.check=None
+  commands.update.requiredest=False
+  convert.bzr.saverev=True
+  convert.cvsps.cache=True
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=[b'messagedifferent']
+  convert.git.extrakeys=[]
+  convert.git.findcopiesharder=False
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=True
+  convert.git.similarity=50
+  convert.git.skipsubmodules=False
+  convert.hg.clonebranches=False
+  convert.hg.ignoreerrors=False
+  convert.hg.preserve-hash=False
+  convert.hg.revs=None
+  convert.hg.saverev=False
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=True
+  convert.localtimezone=False
+  convert.p4.startrev=0
+  convert.skiptags=False
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=True
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  diff.git=False
+  diff.ignoreblanklines=False
+  diff.ignorews=False
+  diff.ignorewsamount=False
+  diff.ignorewseol=False
+  diff.nobinary=False
+  diff.nodates=False
+  diff.noprefix=False
+  diff.showfunc=False
+  diff.unified=None
+  diff.word-diff=False
+  email.bcc=None
+  email.cc=None
+  email.charsets=[]
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=False
+  format.dotencode=True
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.sparse-revlog=True
+  format.usefncache=True
+  format.usegeneraldelta=True
+  format.usestore=True
+  fsmonitor.warn_update_file_count=5
+  fsmonitor.warn_when_unused=True
+  hostsecurity.ciphers=None
+  hostsecurity.disabletls10warning=False
+  http.timeout=None
+  http_proxy.always=False
+  http_proxy.host=None
+  http_proxy.no=[]
+  http_proxy.passwd=None
+  http_proxy.user=None
+  logtoprocess.command=None
+  logtoprocess.commandexception=None
+  logtoprocess.commandfinish=None
+  logtoprocess.develwarn=None
+  logtoprocess.uiblocked=None
+  merge.checkignored=abort
+  merge.checkunknown=abort
+  merge.followcopies=True
+  merge.on-failure=continue
+  

D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-25 Thread navaneeth.suresh (Navaneeth Suresh)
Closed by commit rHG3332bde53714: exchange: abort on pushing bookmarks pointing 
to secret changesets (issue6159) (authored by navaneeth.suresh).
This revision was automatically updated to reflect the committed changes.

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D6731?vs=16305=16315#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6731?vs=16305=16315

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

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

AFFECTED FILES
  mercurial/exchange.py
  tests/test-bookmarks-pushpull.t

CHANGE DETAILS

diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -1344,39 +1344,9 @@
   $ hg commit -qAm_ --config phases.new-commit=secret
 
 Pushing the bookmark "foo" now fails as it contains a secret changeset
-#if b2-pushkey
-  $ hg push -r foo
-  pushing to $TESTTMP/issue6159remote
-  searching for changes
-  no changes found (ignored 1 secret changesets)
-  abort: updating bookmark foo failed!
-  [255]
-#endif
-
-#if b2-binary
   $ hg push -r foo
   pushing to $TESTTMP/issue6159remote
   searching for changes
   no changes found (ignored 1 secret changesets)
-  updating bookmark foo
-  [1]
-#endif
-
-Now the "remote" repo contains a bookmark pointing to a nonexistent revision
-  $ cd ../issue6159remote
-#if b2-pushkey
-  $ hg bookmark
-   * foo   0:1599bc8b897a
-  $ hg log -r 1599bc8b897a
-  0:1599bc8b897a _ (no-eol)
-#endif
-
-#if b2-binary
-  $ hg bookmark
-  no bookmarks set
-  $ cat .hg/bookmarks
-  cf489fd8a374cab73c2dc19e899bde6fe3a43f8f foo
-  $ hg log -r cf489fd8a374
-  abort: unknown revision 'cf489fd8a374'!
+  abort: cannot push bookmark foo as it points to a secret changeset
   [255]
-#endif
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1034,6 +1034,12 @@
 return 'delete'
 return 'update'
 
+def _abortonsecretctx(pushop, node, b):
+"""abort if a given bookmark points to a secret changeset"""
+if node and pushop.repo[node].phase() == phases.secret:
+raise error.Abort(_('cannot push bookmark %s as it points to a secret'
+' changeset') % b)
+
 def _pushb2bookmarkspart(pushop, bundler):
 pushop.stepsdone.add('bookmarks')
 if not pushop.outbookmarks:
@@ -1042,6 +1048,7 @@
 allactions = []
 data = []
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 new = bin(new)
 data.append((book, new))
 allactions.append((book, _bmaction(old, new)))
@@ -1070,6 +1077,7 @@
 assert False
 
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 part = bundler.newpart('pushkey')
 part.addparam('namespace', enc('bookmarks'))
 part.addparam('key', enc(book))



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


D6740: tests: add test to demonstrate issue6159

2019-08-25 Thread navaneeth.suresh (Navaneeth Suresh)
Closed by commit rHGcf9dbc7377de: tests: add test to demonstrate issue6159 
(authored by navaneeth.suresh).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6740?vs=16298=16314

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

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

AFFECTED FILES
  tests/test-bookmarks-pushpull.t

CHANGE DETAILS

diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -1322,3 +1322,61 @@
   abort: push failed on remote
   [255]
 #endif
+
+-- test for pushing bookmarks pointing to secret changesets
+
+Set up a "remote" repo
+  $ hg init issue6159remote
+  $ cd issue6159remote
+  $ echo a > a
+  $ hg add a
+  $ hg commit -m_
+  $ hg bookmark foo
+  $ cd ..
+
+Clone a local repo
+  $ hg clone -q issue6159remote issue6159local
+  $ cd issue6159local
+  $ hg up -qr foo
+  $ echo b > b
+
+Move the bookmark "foo" to point at a secret changeset
+  $ hg commit -qAm_ --config phases.new-commit=secret
+
+Pushing the bookmark "foo" now fails as it contains a secret changeset
+#if b2-pushkey
+  $ hg push -r foo
+  pushing to $TESTTMP/issue6159remote
+  searching for changes
+  no changes found (ignored 1 secret changesets)
+  abort: updating bookmark foo failed!
+  [255]
+#endif
+
+#if b2-binary
+  $ hg push -r foo
+  pushing to $TESTTMP/issue6159remote
+  searching for changes
+  no changes found (ignored 1 secret changesets)
+  updating bookmark foo
+  [1]
+#endif
+
+Now the "remote" repo contains a bookmark pointing to a nonexistent revision
+  $ cd ../issue6159remote
+#if b2-pushkey
+  $ hg bookmark
+   * foo   0:1599bc8b897a
+  $ hg log -r 1599bc8b897a
+  0:1599bc8b897a _ (no-eol)
+#endif
+
+#if b2-binary
+  $ hg bookmark
+  no bookmarks set
+  $ cat .hg/bookmarks
+  cf489fd8a374cab73c2dc19e899bde6fe3a43f8f foo
+  $ hg log -r cf489fd8a374
+  abort: unknown revision 'cf489fd8a374'!
+  [255]
+#endif



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


D6709: config: add --registered flag to show all known configs

2019-08-24 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.


  @av6 I have updated the tests. @marmoute can we just get rid of 
`(EXPERIMENTAL)` in the output? If we want to do that, changes have to be made 
in `ui.walkregisteredconfig()`. But, that's a hack which appends to either name 
or value and as @av6 mentioned, the user will see it on using with `-T` which 
they might not wanted.

REPOSITORY
  rHG Mercurial

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

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

To: navaneeth.suresh, #hg-reviewers, av6, marmoute, durin42
Cc: durin42, mharbison72, yuja, pulkit, marmoute, av6, mjpieters, 
mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6709: config: add --registered flag to show all known configs

2019-08-24 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16306.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16290=16306

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-basic.t
  tests/test-commandserver.t
  tests/test-completion.t
  tests/test-config.t
  tests/test-hgrc.t

CHANGE DETAILS

diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
--- a/tests/test-hgrc.t
+++ b/tests/test-hgrc.t
@@ -80,9 +80,9 @@
 
   $ hg showconfig --config ui.verbose=True --quiet
   bundle.mainreporoot=$TESTTMP
-  ui.verbose=False
-  ui.debug=False
-  ui.quiet=True
+  ui.verbose=no
+  ui.debug=no
+  ui.quiet=yes
 
   $ touch foobar/untracked
   $ cat >> foobar/.hg/hgrc < done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=
+  bundle.mainreporoot=$TESTTMP (default: )
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.track-log=chgserver cmdserver repocache
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=
+  commands.status.relative=no
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=messagedifferent
+  convert.git.extrakeys=
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.dotencode=yes
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
+  fsmonitor.warn_update_file_count=5
+  fsmonitor.warn_when_unused=yes
+  hostsecurity.ciphers=None
+  hostsecurity.disabletls10warning=no
+  http.timeout=None
+  http_proxy.always=no
+  http_proxy.host=None
+  http_proxy.no=
+  http_proxy.passwd=None
+  http_proxy.user=None
+  logtoprocess.command=None
+  logtoprocess.commandexception=None
+  logtoprocess.commandfinish=None
+  logtoprocess.develwarn=None
+  logtoprocess.uiblocked=None
+  merge.checkignored=abort
+  merge.checkunknown=abort
+  merge.followcopies=yes
+  merge.on-failure=continue
+  merge.strict-capability-check=no
+  

D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-23 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.


  In D6731#99192 , @pulkit wrote:
  
  > Looks like you forgot to update tests.
  
  My bad! Sorry about that. Updated it now. Kindly review.

REPOSITORY
  rHG Mercurial

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

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

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


D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-23 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16305.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6731?vs=16299=16305

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

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

AFFECTED FILES
  mercurial/exchange.py
  tests/test-bookmarks-pushpull.t

CHANGE DETAILS

diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -1349,7 +1349,7 @@
   pushing to $TESTTMP/issue6159remote
   searching for changes
   no changes found (ignored 1 secret changesets)
-  abort: updating bookmark foo failed!
+  abort: cannot push bookmark foo as it points to a secret changeset
   [255]
 #endif
 
@@ -1358,25 +1358,6 @@
   pushing to $TESTTMP/issue6159remote
   searching for changes
   no changes found (ignored 1 secret changesets)
-  updating bookmark foo
-  [1]
-#endif
-
-Now the "remote" repo contains a bookmark pointing to a nonexistent revision
-  $ cd ../issue6159remote
-#if b2-pushkey
-  $ hg bookmark
-   * foo   0:1599bc8b897a
-  $ hg log -r 1599bc8b897a
-  0:1599bc8b897a _ (no-eol)
-#endif
-
-#if b2-binary
-  $ hg bookmark
-  no bookmarks set
-  $ cat .hg/bookmarks
-  cf489fd8a374cab73c2dc19e899bde6fe3a43f8f foo
-  $ hg log -r cf489fd8a374
-  abort: unknown revision 'cf489fd8a374'!
+  abort: cannot push bookmark foo as it points to a secret changeset
   [255]
 #endif
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1034,6 +1034,12 @@
 return 'delete'
 return 'update'
 
+def _abortonsecretctx(pushop, node, b):
+"""abort if a given bookmark points to a secret changeset"""
+if node and pushop.repo[node].phase() == phases.secret:
+raise error.Abort(_('cannot push bookmark %s as it points to a secret'
+' changeset') % b)
+
 def _pushb2bookmarkspart(pushop, bundler):
 pushop.stepsdone.add('bookmarks')
 if not pushop.outbookmarks:
@@ -1042,6 +1048,7 @@
 allactions = []
 data = []
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 new = bin(new)
 data.append((book, new))
 allactions.append((book, _bmaction(old, new)))
@@ -1070,6 +1077,7 @@
 assert False
 
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 part = bundler.newpart('pushkey')
 part.addparam('namespace', enc('bookmarks'))
 part.addparam('key', enc(book))



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


D6740: tests: add test to demonstrate issue6159

2019-08-23 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.


  I'm able to reproduce the tests now. The case `b2-binary` can reproduce the 
test results.

REPOSITORY
  rHG Mercurial

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

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

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


D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-23 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16299.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6731?vs=16291=16299

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

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

AFFECTED FILES
  mercurial/exchange.py

CHANGE DETAILS

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1034,6 +1034,12 @@
 return 'delete'
 return 'update'
 
+def _abortonsecretctx(pushop, node, b):
+"""abort if a given bookmark points to a secret changeset"""
+if node and pushop.repo[node].phase() == phases.secret:
+raise error.Abort(_('cannot push bookmark %s as it points to a secret'
+' changeset') % b)
+
 def _pushb2bookmarkspart(pushop, bundler):
 pushop.stepsdone.add('bookmarks')
 if not pushop.outbookmarks:
@@ -1042,6 +1048,7 @@
 allactions = []
 data = []
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 new = bin(new)
 data.append((book, new))
 allactions.append((book, _bmaction(old, new)))
@@ -1070,6 +1077,7 @@
 assert False
 
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 part = bundler.newpart('pushkey')
 part.addparam('namespace', enc('bookmarks'))
 part.addparam('key', enc(book))



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


D6740: tests: add test to demonstrate issue6159

2019-08-23 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16298.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6740?vs=16266=16298

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

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

AFFECTED FILES
  tests/test-bookmarks-pushpull.t

CHANGE DETAILS

diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -1322,3 +1322,61 @@
   abort: push failed on remote
   [255]
 #endif
+
+-- test for pushing bookmarks pointing to secret changesets
+
+Set up a "remote" repo
+  $ hg init issue6159remote
+  $ cd issue6159remote
+  $ echo a > a
+  $ hg add a
+  $ hg commit -m_
+  $ hg bookmark foo
+  $ cd ..
+
+Clone a local repo
+  $ hg clone -q issue6159remote issue6159local
+  $ cd issue6159local
+  $ hg up -qr foo
+  $ echo b > b
+
+Move the bookmark "foo" to point at a secret changeset
+  $ hg commit -qAm_ --config phases.new-commit=secret
+
+Pushing the bookmark "foo" now fails as it contains a secret changeset
+#if b2-pushkey
+  $ hg push -r foo
+  pushing to $TESTTMP/issue6159remote
+  searching for changes
+  no changes found (ignored 1 secret changesets)
+  abort: updating bookmark foo failed!
+  [255]
+#endif
+
+#if b2-binary
+  $ hg push -r foo
+  pushing to $TESTTMP/issue6159remote
+  searching for changes
+  no changes found (ignored 1 secret changesets)
+  updating bookmark foo
+  [1]
+#endif
+
+Now the "remote" repo contains a bookmark pointing to a nonexistent revision
+  $ cd ../issue6159remote
+#if b2-pushkey
+  $ hg bookmark
+   * foo   0:1599bc8b897a
+  $ hg log -r 1599bc8b897a
+  0:1599bc8b897a _ (no-eol)
+#endif
+
+#if b2-binary
+  $ hg bookmark
+  no bookmarks set
+  $ cat .hg/bookmarks
+  cf489fd8a374cab73c2dc19e899bde6fe3a43f8f foo
+  $ hg log -r cf489fd8a374
+  abort: unknown revision 'cf489fd8a374'!
+  [255]
+#endif



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


D6709: config: add --registered flag to show all known configs

2019-08-23 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.


  In D6709#99166 , @av6 wrote:
  
  > @marmoute did you want this flag marked as experimental or am I 
misremembering?
  
  @av6 @marmoute told me to add `EXPERIMENTAL` in the output of the config 
options which are experimental but, not come under the section experimental.
  There are 28 of them. For example, `sparse.missingwarning(EXPERIMENTAL)=yes 
(default: None)`. We had this conversation in IRC. I think you are
  referring to that.

REPOSITORY
  rHG Mercurial

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

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

To: navaneeth.suresh, #hg-reviewers, av6, marmoute, durin42
Cc: durin42, mharbison72, yuja, pulkit, marmoute, av6, mjpieters, 
mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-22 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added inline comments.
navaneeth.suresh marked 2 inline comments as done.

INLINE COMMENTS

> navaneeth.suresh wrote in exchange.py:1044
> `ctx = pushop.repo[node]` is needed to check the phase of the ctx. also, 
> iiuc, if i write `if a and b: pass` in python, both a and b are evaluated 
> before performing the comparison. iiuc, when ctx is `None`, `ctx.phase()` 
> won't exist as `ctx = repo[None]` is not actually a changeset but, the 
> uncommitted changes in the working directory instead. if we need to skip the 
> return, we need to have the `ctx = pushop.repo[node]` inside the `if` 
> statement. but, for me, skipping the further evaluation earlier using a 
> `return` without the nested `if` with more alignment sounds good.

@pulkit i have updated as you suggested to get rid of all returns. sorry for 
being vague, thanks for the suggestion.

REPOSITORY
  rHG Mercurial

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

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

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


D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-22 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16291.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6731?vs=16267=16291

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

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

AFFECTED FILES
  mercurial/exchange.py
  tests/test-bookmarks-pushpull.t

CHANGE DETAILS

diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -1345,38 +1345,27 @@
   $ hg log -r . --template '{node}'
   cf489fd8a374cab73c2dc19e899bde6fe3a43f8f (no-eol)
 
+Create a bookmark that points to a non-secret changeset
+  $ hg bookmark bar
+  $ echo c > c
+  $ hg ci -Am_
+  adding c
 
 Pushing the bookmark "foo" now fails as it contains a secret changeset
 #if b2-pushkey
-  $ hg push -r foo
+  $ hg push
   pushing to $TESTTMP/issue6159remote
   searching for changes
-  no changes found (ignored 1 secret changesets)
-  abort: updating bookmark foo failed!
+  no changes found (ignored 2 secret changesets)
+  abort: cannot push bookmark foo as it points to a secret changeset
   [255]
 #endif
 
 #if b2-binary
-  $ hg push -r foo
+  $ hg push
   pushing to $TESTTMP/issue6159remote
   searching for changes
-  no changes found (ignored 1 secret changesets)
-  updating bookmark foo
-  [1]
+  no changes found (ignored 2 secret changesets)
+  abort: cannot push bookmark foo as it points to a secret changeset
+  [255]
 #endif
-
-Now the "remote" repo contains a bookmark pointing to a nonexistent revision
-$ cd ../issue6159remote
-#if b2-pushkey
-  $ hg bookmark
-   * foo   1:cf489fd8a374
-  $ hg log -r cf489fd8a374
-  1:cf489fd8a374 _ (no-eol)
-#endif
-
-#if b2-binary
-  $ hg bookmark
-   * foo   1:cf489fd8a374
-  $ hg log -r cf489fd8a374
-  1:cf489fd8a374 _ (no-eol)
-#endif
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1034,6 +1034,12 @@
 return 'delete'
 return 'update'
 
+def _abortonsecretctx(pushop, node, b):
+"""abort if a given bookmark points to a secret changeset"""
+if node and pushop.repo[node].phase() == phases.secret:
+raise error.Abort(_('cannot push bookmark %s as it points to a secret'
+' changeset') % b)
+
 def _pushb2bookmarkspart(pushop, bundler):
 pushop.stepsdone.add('bookmarks')
 if not pushop.outbookmarks:
@@ -1042,6 +1048,7 @@
 allactions = []
 data = []
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 new = bin(new)
 data.append((book, new))
 allactions.append((book, _bmaction(old, new)))
@@ -1070,6 +1077,7 @@
 assert False
 
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 part = bundler.newpart('pushkey')
 part.addparam('namespace', enc('bookmarks'))
 part.addparam('key', enc(book))



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


D6709: config: add --registered flag to show all known configs

2019-08-22 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16290.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16286=16290

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-basic.t
  tests/test-commandserver.t
  tests/test-completion.t
  tests/test-config.t
  tests/test-hgrc.t

CHANGE DETAILS

diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
--- a/tests/test-hgrc.t
+++ b/tests/test-hgrc.t
@@ -80,9 +80,9 @@
 
   $ hg showconfig --config ui.verbose=True --quiet
   bundle.mainreporoot=$TESTTMP
-  ui.verbose=False
-  ui.debug=False
-  ui.quiet=True
+  ui.verbose=no
+  ui.debug=no
+  ui.quiet=yes
 
   $ touch foobar/untracked
   $ cat >> foobar/.hg/hgrc < done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=
+  bundle.mainreporoot=$TESTTMP (default: )
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.track-log=chgserver cmdserver repocache
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=
+  commands.status.relative=no
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=messagedifferent
+  convert.git.extrakeys=
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.dotencode=yes
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
+  fsmonitor.warn_update_file_count=5
+  fsmonitor.warn_when_unused=yes
+  hostsecurity.ciphers=None
+  hostsecurity.disabletls10warning=no
+  http.timeout=None
+  http_proxy.always=no
+  http_proxy.host=None
+  http_proxy.no=
+  http_proxy.passwd=None
+  http_proxy.user=None
+  logtoprocess.command=None
+  logtoprocess.commandexception=None
+  logtoprocess.commandfinish=None
+  logtoprocess.develwarn=None
+  logtoprocess.uiblocked=None
+  merge.checkignored=abort
+  merge.checkunknown=abort
+  merge.followcopies=yes
+  merge.on-failure=continue
+  merge.strict-capability-check=no
+  

D6709: config: add --registered flag to show all known configs

2019-08-20 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16286.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16248=16286

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-basic.t
  tests/test-commandserver.t
  tests/test-completion.t
  tests/test-config.t
  tests/test-hgrc.t

CHANGE DETAILS

diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
--- a/tests/test-hgrc.t
+++ b/tests/test-hgrc.t
@@ -80,9 +80,9 @@
 
   $ hg showconfig --config ui.verbose=True --quiet
   bundle.mainreporoot=$TESTTMP
-  ui.verbose=False
-  ui.debug=False
-  ui.quiet=True
+  ui.verbose=no
+  ui.debug=no
+  ui.quiet=yes
 
   $ touch foobar/untracked
   $ cat >> foobar/.hg/hgrc < done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=
+  bundle.mainreporoot=$TESTTMP (default: )
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.track-log=chgserver cmdserver repocache
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=
+  commands.status.relative=no
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=messagedifferent
+  convert.git.extrakeys=
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.dotencode=yes
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
+  fsmonitor.warn_update_file_count=5
+  fsmonitor.warn_when_unused=yes
+  hostsecurity.ciphers=None
+  hostsecurity.disabletls10warning=no
+  http.timeout=None
+  http_proxy.always=no
+  http_proxy.host=None
+  http_proxy.no=
+  http_proxy.passwd=None
+  http_proxy.user=None
+  logtoprocess.command=None
+  logtoprocess.commandexception=None
+  logtoprocess.commandfinish=None
+  logtoprocess.develwarn=None
+  logtoprocess.uiblocked=None
+  merge.checkignored=abort
+  merge.checkunknown=abort
+  merge.followcopies=yes
+  merge.on-failure=continue
+  merge.strict-capability-check=no
+  

D6746: perf: don't pass experimental argument in config for older Mercurial versions

2019-08-20 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh marked an inline comment as done.
navaneeth.suresh updated this revision to Diff 16271.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6746?vs=16268=16271

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

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

AFFECTED FILES
  contrib/perf.py

CHANGE DETAILS

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -267,6 +267,30 @@
 )
 except (ImportError, AttributeError):
 pass
+except TypeError:
+# compatibility fix for a11fd395e83f
+# hg version: 5.2
+configitem(b'perf', b'presleep',
+default=mercurial.configitems.dynamicdefault,
+)
+configitem(b'perf', b'stub',
+default=mercurial.configitems.dynamicdefault,
+)
+configitem(b'perf', b'parentscount',
+default=mercurial.configitems.dynamicdefault,
+)
+configitem(b'perf', b'all-timing',
+default=mercurial.configitems.dynamicdefault,
+)
+configitem(b'perf', b'pre-run',
+default=mercurial.configitems.dynamicdefault,
+)
+configitem(b'perf', b'profile-benchmark',
+default=mercurial.configitems.dynamicdefault,
+)
+configitem(b'perf', b'run-limits',
+default=mercurial.configitems.dynamicdefault,
+)
 
 def getlen(ui):
 if ui.configbool(b"perf", b"stub", False):



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


D6746: perf: don't pass experimental argument in config for older Mercurial versions

2019-08-20 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This is a follow-up patch to a11fd395e83f 
. 
This patch makes older Mercurial
  versions to not use `experimental` argument in config options.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  contrib/perf.py

CHANGE DETAILS

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -267,6 +267,28 @@
 )
 except (ImportError, AttributeError):
 pass
+except TypeError:
+configitem(b'perf', b'presleep',
+default=mercurial.configitems.dynamicdefault,
+)
+configitem(b'perf', b'stub',
+default=mercurial.configitems.dynamicdefault,
+)
+configitem(b'perf', b'parentscount',
+default=mercurial.configitems.dynamicdefault,
+)
+configitem(b'perf', b'all-timing',
+default=mercurial.configitems.dynamicdefault,
+)
+configitem(b'perf', b'pre-run',
+default=mercurial.configitems.dynamicdefault,
+)
+configitem(b'perf', b'profile-benchmark',
+default=mercurial.configitems.dynamicdefault,
+)
+configitem(b'perf', b'run-limits',
+default=mercurial.configitems.dynamicdefault,
+)
 
 def getlen(ui):
 if ui.configbool(b"perf", b"stub", False):



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


D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-20 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added inline comments.

INLINE COMMENTS

> pulkit wrote in exchange.py:1044
> You won't need `ctx = pushop.repo[node]` anymore then.
> 
> In general, I suggest understanding the error as why are they are happening 
> and you will find a fix.

`ctx = pushop.repo[node]` is needed to check the phase of the ctx. also, iiuc, 
if i write `if a and b: pass` in python, both a and b are evaluated before 
performing the comparison. iiuc, when ctx is `None`, `ctx.phase()` won't exist 
as `ctx = repo[None]` is not actually a changeset but, the uncommitted changes 
in the working directory instead. if we need to skip the return, we need to 
have the `ctx = pushop.repo[node]` inside the `if` statement. but, for me, 
skipping the further evaluation earlier using a `return` without the nested 
`if` with more alignment sounds good.

REPOSITORY
  rHG Mercurial

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

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

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


D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-20 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added inline comments.
navaneeth.suresh marked an inline comment as done.

INLINE COMMENTS

> pulkit wrote in exchange.py:1044
> If the node is None, then `if node and ` will be false and the second 
> condition won't be executed.

I'm getting the following error with the code snippet that you've suggested:

  +  Traceback (most recent call last):
  +File "/tmp/hgtests.nS3TJv/install/bin/hg", line 43, in 
  +  dispatch.run()
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", 
line 99, in run
  +  status = dispatch(req)
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", 
line 225, in dispatch
  +  ret = _runcatch(req) or 0
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", 
line 376, in _runcatch
  +  return _callcatch(ui, _runcatchfunc)
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", 
line 384, in _callcatch
  +  return scmutil.callcatch(ui, func)
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/scmutil.py", line 
167, in callcatch
  +  return func()
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", 
line 367, in _runcatchfunc
  +  return _dispatch(req)
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", 
line 1021, in _dispatch
  +  cmdpats, cmdoptions)
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", 
line 756, in runcommand
  +  ret = _runcommand(ui, options, cmd, d)
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", 
line 1030, in _runcommand
  +  return cmdfunc()
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/dispatch.py", 
line 1018, in 
  +  d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/util.py", line 
1682, in check
  +  return func(*args, **kwargs)
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/commands.py", 
line 4666, in push
  +  opargs=opargs)
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/exchange.py", 
line 568, in push
  +  _pushbundle2(pushop)
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/exchange.py", 
line 1149, in _pushbundle2
  +  ret = partgen(pushop, bundler)
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/exchange.py", 
line 1025, in _pushb2bookmarks
  +  return _pushb2bookmarkspart(pushop, bundler)
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/exchange.py", 
line 1052, in _pushb2bookmarkspart
  +  _abortonsecretctx(pushop, new, book)
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/exchange.py", 
line 1039, in _abortonsecretctx
  +  ctx = pushop.repo[node]
  +File "/tmp/hgtests.nS3TJv/install/lib/python/mercurial/localrepo.py", 
line 1430, in __getitem__
  +  (changeid, type(changeid)))
  +  mercurial.error.ProgrammingError: unsupported changeid '' of type 
 [1]

REPOSITORY
  rHG Mercurial

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

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

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


D6736: shelve: add method for storing mergestate in changeset extras

2019-08-20 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added inline comments.

INLINE COMMENTS

> pulkit wrote in shelve.py:416
> What do you think about refactoring the code to write mergestate v2 on disk 
> and use that encoding to achieve this?

i feel like the current approach is more simpler and easy to understand.

REPOSITORY
  rHG Mercurial

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

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

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


D6738: unshelve: add --unresolved flag to unshelve mergestate with unresolved files

2019-08-20 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added inline comments.

INLINE COMMENTS

> pulkit wrote in shelve.py:754
> we should write both the versions, `_writerecords()` should be used.

i had tried to support it earlier. but, it throws the following error. i think 
it's okay to use the latest format only since, we haven't stored any mergestate 
using the previous format. the repo won't get corrupted.

  +  Traceback (most recent call last):
  +File "/tmp/hgtests.TEheee/install/bin/hg", line 43, in 
  +  dispatch.run()
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/dispatch.py", 
line 99, in run
  +  status = dispatch(req)
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/dispatch.py", 
line 225, in dispatch
  +  ret = _runcatch(req) or 0
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/dispatch.py", 
line 376, in _runcatch
  +  return _callcatch(ui, _runcatchfunc)
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/dispatch.py", 
line 384, in _callcatch
  +  return scmutil.callcatch(ui, func)
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/scmutil.py", line 
167, in callcatch
  +  return func()
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/dispatch.py", 
line 367, in _runcatchfunc
  +  return _dispatch(req)
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/dispatch.py", 
line 1021, in _dispatch
  +  cmdpats, cmdoptions)
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/dispatch.py", 
line 756, in runcommand
  +  ret = _runcommand(ui, options, cmd, d)
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/dispatch.py", 
line 1030, in _runcommand
  +  return cmdfunc()
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/dispatch.py", 
line 1018, in 
  +  d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/util.py", line 
1682, in check
  +  return func(*args, **kwargs)
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/commands.py", 
line 6229, in unshelve
  +  return shelvemod.dounshelve(ui, repo, *shelved, **opts)
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/shelve.py", line 
1090, in dounshelve
  +  restoreunresolvedshelve(ui, repo, shelvectx, basename)
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/shelve.py", line 
754, in restoreunresolvedshelve
  +  ms._writerecords(_decodemergerecords(records))
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/merge.py", line 
452, in _writerecords
  +  self._writerecordsv1(records)
  +File "/tmp/hgtests.TEheee/install/lib/python/mercurial/merge.py", line 
460, in _writerecordsv1
  +  assert lrecords[0] == RECORD_LOCAL
  +  AssertionError
  +  [1]

REPOSITORY
  rHG Mercurial

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

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

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


D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-20 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added inline comments.
navaneeth.suresh marked 2 inline comments as done.

INLINE COMMENTS

> pulkit wrote in exchange.py:1044
> What does the return value mean here? I think we can get rid of this.
> 
> Something like this:
> 
>   if node and pushop.repo[node].phase() == phases.secret:
>  raise 

updated to get rid of one return. if node is `None`, then hg will throw an 
error there.

REPOSITORY
  rHG Mercurial

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

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

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


D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-20 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16267.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6731?vs=16258=16267

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

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

AFFECTED FILES
  mercurial/exchange.py
  tests/test-bookmarks-pushpull.t

CHANGE DETAILS

diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -1345,10 +1345,15 @@
   $ hg log -r . --template '{node}'
   cf489fd8a374cab73c2dc19e899bde6fe3a43f8f (no-eol)
 
+Create a bookmark that points to a non-secret changeset
+  $ hg bookmark bar
+  $ echo c > c
+  $ hg ci -Am_
+  adding c
 
 Pushing the bookmark "foo" now fails as it contains a secret changeset
 #if b2-pushkey
-  $ hg push -r foo
+  $ hg push
   pushing to $TESTTMP/issue6159remote
   searching for changes
   no changes found (ignored 1 secret changesets)
@@ -1357,26 +1362,10 @@
 #endif
 
 #if b2-binary
-  $ hg push -r foo
+  $ hg push
   pushing to $TESTTMP/issue6159remote
   searching for changes
-  no changes found (ignored 1 secret changesets)
-  updating bookmark foo
-  [1]
+  no changes found (ignored 2 secret changesets)
+  abort: cannot push bookmark foo as it points to a secret changeset
+  [255]
 #endif
-
-Now the "remote" repo contains a bookmark pointing to a nonexistent revision
-$ cd ../issue6159remote
-#if b2-pushkey
-  $ hg bookmark
-   * foo   1:cf489fd8a374
-  $ hg log -r cf489fd8a374
-  1:cf489fd8a374 _ (no-eol)
-#endif
-
-#if b2-binary
-  $ hg bookmark
-   * foo   1:cf489fd8a374
-  $ hg log -r cf489fd8a374
-  1:cf489fd8a374 _ (no-eol)
-#endif
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1034,6 +1034,15 @@
 return 'delete'
 return 'update'
 
+def _abortonsecretctx(pushop, node, b):
+"""abort if a given bookmark points to a secret changeset"""
+if not node:
+return
+ctx = pushop.repo[node]
+if node and ctx.phase() == phases.secret:
+raise error.Abort(_('cannot push bookmark %s as it points to a secret'
+' changeset') % b)
+
 def _pushb2bookmarkspart(pushop, bundler):
 pushop.stepsdone.add('bookmarks')
 if not pushop.outbookmarks:
@@ -1042,6 +1051,7 @@
 allactions = []
 data = []
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 new = bin(new)
 data.append((book, new))
 allactions.append((book, _bmaction(old, new)))
@@ -1070,6 +1080,7 @@
 assert False
 
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 part = bundler.newpart('pushkey')
 part.addparam('namespace', enc('bookmarks'))
 part.addparam('key', enc(book))



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


D6740: tests: add test to demonstrate issue6159

2019-08-20 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.


  @pulkit Now I'm unable to reproduce the test result given in the bug report. 
It seems like the remote repo recognizes the secret changeset `cf489fd8a374`.

REPOSITORY
  rHG Mercurial

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

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

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


D6740: tests: add test to demonstrate issue6159

2019-08-20 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh marked 3 inline comments as done.
navaneeth.suresh updated this revision to Diff 16266.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6740?vs=16257=16266

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

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

AFFECTED FILES
  tests/test-bookmarks-pushpull.t

CHANGE DETAILS

diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -1322,3 +1322,61 @@
   abort: push failed on remote
   [255]
 #endif
+
+-- test for pushing bookmarks pointing to secret changesets
+
+Set up a "remote" repo
+  $ hg init issue6159remote
+  $ cd issue6159remote
+  $ echo a > a
+  $ hg add a
+  $ hg commit -m_
+  $ hg bookmark foo
+  $ cd ..
+
+Clone a local repo
+  $ hg clone -q issue6159remote issue6159local
+  $ cd issue6159local
+  $ hg up -qr foo
+  $ echo b > b
+
+Move the bookmark "foo" to point at a secret changeset
+  $ hg commit -qAm_ --config phases.new-commit=secret
+  $ hg log -r . --template '{node}'
+  cf489fd8a374cab73c2dc19e899bde6fe3a43f8f (no-eol)
+
+
+Pushing the bookmark "foo" now fails as it contains a secret changeset
+#if b2-pushkey
+  $ hg push -r foo
+  pushing to $TESTTMP/issue6159remote
+  searching for changes
+  no changes found (ignored 1 secret changesets)
+  abort: updating bookmark foo failed!
+  [255]
+#endif
+
+#if b2-binary
+  $ hg push -r foo
+  pushing to $TESTTMP/issue6159remote
+  searching for changes
+  no changes found (ignored 1 secret changesets)
+  updating bookmark foo
+  [1]
+#endif
+
+Now the "remote" repo contains a bookmark pointing to a nonexistent revision
+$ cd ../issue6159remote
+#if b2-pushkey
+  $ hg bookmark
+   * foo   1:cf489fd8a374
+  $ hg log -r cf489fd8a374
+  1:cf489fd8a374 _ (no-eol)
+#endif
+
+#if b2-binary
+  $ hg bookmark
+   * foo   1:cf489fd8a374
+  $ hg log -r cf489fd8a374
+  1:cf489fd8a374 _ (no-eol)
+#endif



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


D6728: config: add experimental argument to the config registrar

2019-08-18 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added inline comments.

INLINE COMMENTS

> pulkit wrote in perf.py:244
> This breaks `contrib/perf.py` with older versions of mercurial. Can you send 
> a compatibility fix as followup?

I'm not sure I understood that. Do you want me to remove the changes in 
`contrib/perf.py`?

REPOSITORY
  rHG Mercurial

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

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

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


D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-17 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.


  In D6731#98871 , @pulkit wrote:
  
  > In such cases, I like the idea of having fix as two patches, first which 
demonstrates the bug and the second which fixes the bug. What do you think?
  
  Yeah, sounds good to me. The stack has been updated.

REPOSITORY
  rHG Mercurial

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

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

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


D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-17 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16258.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6731?vs=16225=16258

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

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

AFFECTED FILES
  mercurial/exchange.py
  tests/test-bookmarks-pushpull.t

CHANGE DETAILS

diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -1343,9 +1343,6 @@
 Move the bookmark "foo" to point at a secret changeset
   $ hg commit -qAm_
   $ hg phase -s -f
-  $ hg log -r . --template '{node}'
-  cf489fd8a374cab73c2dc19e899bde6fe3a43f8f (no-eol)
-
 
 Pushing the bookmark "foo" now fails as it contains a secret changeset
 #if b2-pushkey
@@ -1353,60 +1350,14 @@
   pushing to $TESTTMP/issue6159remote
   searching for changes
   no changes found (ignored 1 secret changesets)
-  abort: updating bookmark foo failed!
+  abort: bookmark foo points to a secret changeset
   [255]
 #endif
-
 #if b2-binary
   $ hg push -r foo
   pushing to $TESTTMP/issue6159remote
   searching for changes
   no changes found (ignored 1 secret changesets)
-  updating bookmark foo
-  [1]
+  abort: bookmark foo points to a secret changeset
+  [255]
 #endif
-
-Now the "remote" repo contains a bookmark pointing to a nonexistent revision
-#if b2-pushkey
-  $ cd ../a
-  $ hg bookmark
- @ 1:0d2164f0ce0d
- @12:9b140be10808
-   * X 1:0d2164f0ce0d
- X@1   2:9b140be10808
- Y 5:c922c0139ca0
- Z 1:0d2164f0ce0d
- foo   -1:
- foobar2:9b140be10808
-  $ cat .hg/bookmarks
-  0d2164f0ce0d8f1d6f94351eba04b794909be66c @
-  9b140be1080824d768c5a4691a564088eede71f9 @1
-  0d2164f0ce0d8f1d6f94351eba04b794909be66c X
-  9b140be1080824d768c5a4691a564088eede71f9 X@1
-  c922c0139ca03858f655e4a2af4dd02796a63969 Y
-  0d2164f0ce0d8f1d6f94351eba04b794909be66c Z
-   foo
-  9b140be1080824d768c5a4691a564088eede71f9 foobar
-#endif
-
-#if b2-binary
-  $ cd ../a
-  $ hg bookmark
- @ 1:0d2164f0ce0d
- @12:9b140be10808
-   * X 1:0d2164f0ce0d
- X@1   2:9b140be10808
- Y 5:c922c0139ca0
- Z 1:0d2164f0ce0d
- foo   -1:
- foobar2:9b140be10808
-  $ cat .hg/bookmarks
-  0d2164f0ce0d8f1d6f94351eba04b794909be66c @
-  9b140be1080824d768c5a4691a564088eede71f9 @1
-  0d2164f0ce0d8f1d6f94351eba04b794909be66c X
-  9b140be1080824d768c5a4691a564088eede71f9 X@1
-  c922c0139ca03858f655e4a2af4dd02796a63969 Y
-  0d2164f0ce0d8f1d6f94351eba04b794909be66c Z
-   foo
-  9b140be1080824d768c5a4691a564088eede71f9 foobar
-#endif
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1034,6 +1034,15 @@
 return 'delete'
 return 'update'
 
+def _abortonsecretctx(pushop, node, b):
+"""abort if a given bookmark points to a secret changeset"""
+if not node:
+return False
+ctx = pushop.repo[node]
+if ctx.phase() == phases.secret:
+raise error.Abort(_('bookmark %s points to a secret changeset') % b)
+return False
+
 def _pushb2bookmarkspart(pushop, bundler):
 pushop.stepsdone.add('bookmarks')
 if not pushop.outbookmarks:
@@ -1042,6 +1051,7 @@
 allactions = []
 data = []
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 new = bin(new)
 data.append((book, new))
 allactions.append((book, _bmaction(old, new)))
@@ -1070,6 +1080,7 @@
 assert False
 
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 part = bundler.newpart('pushkey')
 part.addparam('namespace', enc('bookmarks'))
 part.addparam('key', enc(book))



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


D6740: tests: add test to demonstrate issue6159

2019-08-17 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-bookmarks-pushpull.t

CHANGE DETAILS

diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -1322,3 +1322,91 @@
   abort: push failed on remote
   [255]
 #endif
+
+-- test for stop pushing bookmarks pointing to secret changesets
+
+Set up a "remote" repo
+  $ hg init issue6159remote
+  $ cd issue6159remote
+  $ echo a > a
+  $ hg add a
+  $ hg commit -m_
+  $ hg bookmark foo
+  $ cd ..
+
+Clone a local repo
+  $ hg clone -q issue6159remote issue6159local
+  $ cd issue6159local
+  $ hg up -qr foo
+  $ echo b > b
+
+Move the bookmark "foo" to point at a secret changeset
+  $ hg commit -qAm_
+  $ hg phase -s -f
+  $ hg log -r . --template '{node}'
+  cf489fd8a374cab73c2dc19e899bde6fe3a43f8f (no-eol)
+
+
+Pushing the bookmark "foo" now fails as it contains a secret changeset
+#if b2-pushkey
+  $ hg push -r foo
+  pushing to $TESTTMP/issue6159remote
+  searching for changes
+  no changes found (ignored 1 secret changesets)
+  abort: updating bookmark foo failed!
+  [255]
+#endif
+
+#if b2-binary
+  $ hg push -r foo
+  pushing to $TESTTMP/issue6159remote
+  searching for changes
+  no changes found (ignored 1 secret changesets)
+  updating bookmark foo
+  [1]
+#endif
+
+Now the "remote" repo contains a bookmark pointing to a nonexistent revision
+#if b2-pushkey
+  $ cd ../a
+  $ hg bookmark
+ @ 1:0d2164f0ce0d
+ @12:9b140be10808
+   * X 1:0d2164f0ce0d
+ X@1   2:9b140be10808
+ Y 5:c922c0139ca0
+ Z 1:0d2164f0ce0d
+ foo   -1:
+ foobar2:9b140be10808
+  $ cat .hg/bookmarks
+  0d2164f0ce0d8f1d6f94351eba04b794909be66c @
+  9b140be1080824d768c5a4691a564088eede71f9 @1
+  0d2164f0ce0d8f1d6f94351eba04b794909be66c X
+  9b140be1080824d768c5a4691a564088eede71f9 X@1
+  c922c0139ca03858f655e4a2af4dd02796a63969 Y
+  0d2164f0ce0d8f1d6f94351eba04b794909be66c Z
+   foo
+  9b140be1080824d768c5a4691a564088eede71f9 foobar
+#endif
+
+#if b2-binary
+  $ cd ../a
+  $ hg bookmark
+ @ 1:0d2164f0ce0d
+ @12:9b140be10808
+   * X 1:0d2164f0ce0d
+ X@1   2:9b140be10808
+ Y 5:c922c0139ca0
+ Z 1:0d2164f0ce0d
+ foo   -1:
+ foobar2:9b140be10808
+  $ cat .hg/bookmarks
+  0d2164f0ce0d8f1d6f94351eba04b794909be66c @
+  9b140be1080824d768c5a4691a564088eede71f9 @1
+  0d2164f0ce0d8f1d6f94351eba04b794909be66c X
+  9b140be1080824d768c5a4691a564088eede71f9 X@1
+  c922c0139ca03858f655e4a2af4dd02796a63969 Y
+  0d2164f0ce0d8f1d6f94351eba04b794909be66c Z
+   foo
+  9b140be1080824d768c5a4691a564088eede71f9 foobar
+#endif



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


D6739: unshelve: add abort on using --interactive and --unresolved together

2019-08-17 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  It seems not to be a good idea to partially unshelve a mergestate. So,
  let us abort on using `--interactive` and `--unresolved` together.`

REPOSITORY
  rHG Mercurial

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

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

CHANGE DETAILS

diff --git a/tests/test-shelve-unresolved.t b/tests/test-shelve-unresolved.t
--- a/tests/test-shelve-unresolved.t
+++ b/tests/test-shelve-unresolved.t
@@ -220,6 +220,11 @@
   A
   C
 
+-- abort on using both --interactive and --unresolved
+  $ hg unshelve --unresolved --interactive
+  abort: cannot use both interactive and unresolved
+  [255]
+
 -- flag --unshelve is not passed. but, the last shelve is unresolved
   $ hg unshelve
   unshelving change 'default'
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -1008,6 +1008,8 @@
 
 if interactive and opts.get('keep'):
 raise error.Abort(_('--keep on --interactive is not yet supported'))
+if interactive and unresolved:
+raise error.Abort(_('cannot use both interactive and unresolved'))
 if abortf or continuef:
 if abortf and continuef:
 raise error.Abort(_('cannot use both abort and continue'))



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


D6738: unshelve: add --unresolved flag to unshelve mergestate with unresolved files

2019-08-17 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  `hg unshelve --unresolved` will get the user back to the old unresolved merge 
by
  the following steps:
  
  Step 1: If the user has committed new changesets after shelving the changes,
  they must update the working directory to one of the merge parents.
  
  Step 2: Change parents of dirstate to `p1` and `p2`.
  
  Step 3: In order to restore our partially resolved state, we will write from
  data stored in changeset extras.
  
  Step 4: We now have a state in which files marked as resolved might have
  conflicts. But, we will apply the changes in shelve on the top of this so 
that we
  can get our old unresolved merge again by the usual unshelve mechanism.
  
  The usual rebase step is avoided on unresolved shelve changesets.
  
  `$ hg unshelve --unresolved` will abort when:
  
  1. The working directory is dirty.
  2. If there is an ongoing merge.
  3. If the working directory is not at either p1 or p2.
  
  (`p1`, `p2` are the parents of the unresolved shelve changeset)

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/shelve.py
  tests/test-completion.t
  tests/test-shelve-unresolved.t

CHANGE DETAILS

diff --git a/tests/test-shelve-unresolved.t b/tests/test-shelve-unresolved.t
--- a/tests/test-shelve-unresolved.t
+++ b/tests/test-shelve-unresolved.t
@@ -171,3 +171,290 @@
   +===
   +B
   +>>> merge rev:fd9a4049234b - test: B
+
+-- now, fix an urgent bug
+  $ echo fixed >> bug
+  $ ls
+  bar
+  bug
+  file1
+  file1.orig
+  file2
+  file2.orig
+  $ hg add bug
+  $ hg ci -m "fix bug"
+  $ hg log -G
+  @  changeset:   3:a53a9a7475b3
+  |  tag: tip
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: fix bug
+  |
+  o  changeset:   2:69004294ad57
+  |  parent:  0:c32ef6121744
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: C
+  |
+  | o  changeset:   1:fd9a4049234b
+  |/   user:test
+  |date:Thu Jan 01 00:00:00 1970 +
+  |summary: B
+  |
+  o  changeset:   0:c32ef6121744
+ user:test
+ date:Thu Jan 01 00:00:00 1970 +
+ summary: A
+  
+-- let's get back to the old mergestate
+-- we need to update to one of the merge parents. otherwise, abort.
+  $ hg unshelve --unresolved
+  unshelving change 'default'
+  abort: dirstate is not on either of the merge parents.
+  use hg update to one of the merge parents.
+  [255]
+
+  $ hg up 2
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ cat file2
+  A
+  C
+
+-- flag --unshelve is not passed. but, the last shelve is unresolved
+  $ hg unshelve
+  unshelving change 'default'
+  abort: default is an unresolved shelve, use --unresolved to unshelve it
+  [255]
+
+  $ hg unshelve --unresolved
+  unshelving change 'default'
+
+  $ hg log -G
+  o  changeset:   3:a53a9a7475b3
+  |  tag: tip
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: fix bug
+  |
+  @  changeset:   2:69004294ad57
+  |  parent:  0:c32ef6121744
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: C
+  |
+  | @  changeset:   1:fd9a4049234b
+  |/   user:test
+  |date:Thu Jan 01 00:00:00 1970 +
+  |summary: B
+  |
+  o  changeset:   0:c32ef6121744
+ user:test
+ date:Thu Jan 01 00:00:00 1970 +
+ summary: A
+  
+  $ cat file1
+  A
+  B
+  C
+  $ hg diff
+  diff -r 69004294ad57 file1
+  --- a/file1  Thu Jan 01 00:00:00 1970 +
+  +++ b/file1  Thu Jan 01 00:00:00 1970 +
+  @@ -1,2 +1,3 @@
+   A
+  +B
+   C
+  diff -r 69004294ad57 file2
+  --- a/file2  Thu Jan 01 00:00:00 1970 +
+  +++ b/file2  Thu Jan 01 00:00:00 1970 +
+  @@ -1,2 +1,6 @@
+   A
+  +<<< working copy: 69004294ad57 - test: C
+   C
+  +===
+  +B
+  +>>> merge rev:fd9a4049234b - test: B
+  $ cat file2
+  A
+  <<< working copy: 69004294ad57 - test: C
+  C
+  ===
+  B
+  >>> merge rev:fd9a4049234b - test: B
+  $ hg resolve -l
+  R file1
+  U file2
+
+-- flag --unresolved is passed but the top most shelve is not unresolved
+  $ hg shelve --unresolved
+  shelved as default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ echo garbage >> bug
+  $ hg st
+  ? bar
+  ? bug
+  ? file1.orig
+  ? file2.orig
+  $ hg add bug
+  $ hg shelve
+  shelved as default-01
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg unshelve --unresolved
+  unshelving change 'default-01'
+  abort: default-01 is not an unresolved shelve
+  
+  [255]
+
+-- now, unshelve default
+  $ hg unshelve -n default --unresolved
+
+-- commit the merge after completing conflict resolution
+  $ cat >> 

D6737: shelve: add --unresolved flag to shelve mergestate with unresolved files

2019-08-17 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Until now, `shelve` used to abort on trying to `shelve` a mergestate.
  This patch adds an `--unresolved` flag to `shelve` and use the changeset
  extras to store the mergestate.
  
  After shelving, and the working directory is updated to `p1()`.
  
  `hg shelve` will abort when:
  
  1. No merge is active on calling with `--unresolved`.
  2. No unresolved files found in active merge on calling with `--unresolved`.
  3. Merge is active on calling without `--unresolved`.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/shelve.py
  tests/test-completion.t
  tests/test-shelve-unresolved.t
  tests/test-shelve.t

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -83,6 +83,7 @@
   --statoutput diffstat-style summary of changes (provide
 the names of the shelved changes as positional
 arguments)
+  --unresolved  shelve mergestate with unresolved files
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
   --mq  operate on patch repository
diff --git a/tests/test-shelve-unresolved.t b/tests/test-shelve-unresolved.t
new file mode 100644
--- /dev/null
+++ b/tests/test-shelve-unresolved.t
@@ -0,0 +1,173 @@
+  $ addunresolvedmerge() {
+  >   echo A >> $1
+  >   echo A >> $2
+  >   hg ci -m A
+  >   echo B >> $1
+  >   echo B >> $2
+  >   hg ci -m B
+  >   hg up $3
+  >   echo C >> $1
+  >   echo C >> $2
+  >   hg ci -m C
+  >   hg merge -r $(($3+1))
+  > }
+
+Test shelve with unresolved mergestate
+
+  $ cat >> $HGRCPATH < [extensions]
+  > shelve =
+  > EOF
+
+  $ hg init shelve-unresolved
+  $ cd shelve-unresolved
+  $ echo A >> file1
+  $ echo A >> file2
+  $ hg ci -Am A
+  adding file1
+  adding file2
+  $ echo foo >> bar
+  $ hg add bar
+
+-- should abort on absence of mergestate
+  $ hg shelve --unresolved
+  abort: no active mergestate found
+  [255]
+
+  $ hg forget bar
+  $ echo B >> file1
+  $ echo B >> file2
+  $ hg ci -m B
+  $ hg up 0
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo C >> file1
+  $ echo C >> file2
+  $ hg ci -m C
+  created new head
+  $ hg merge
+  merging file1
+  merging file2
+  warning: conflicts while merging file1! (edit, then use 'hg resolve --mark')
+  warning: conflicts while merging file2! (edit, then use 'hg resolve --mark')
+  0 files updated, 0 files merged, 0 files removed, 2 files unresolved
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to 
abandon
+  [1]
+
+-- let's partially solve the conflicts
+  $ cat > file1 < A
+  > B
+  > C
+  > EOF
+  $ hg resolve -m file1
+
+-- mark file2 as resolved to check abort
+  $ hg resolve -m file2
+  (no more unresolved files)
+  $ hg log -G
+  @  changeset:   2:69004294ad57
+  |  tag: tip
+  |  parent:  0:c32ef6121744
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: C
+  |
+  | @  changeset:   1:fd9a4049234b
+  |/   user:test
+  |date:Thu Jan 01 00:00:00 1970 +
+  |summary: B
+  |
+  o  changeset:   0:c32ef6121744
+ user:test
+ date:Thu Jan 01 00:00:00 1970 +
+ summary: A
+  
+  $ cat file1
+  A
+  B
+  C
+  $ hg diff
+  diff -r 69004294ad57 file1
+  --- a/file1  Thu Jan 01 00:00:00 1970 +
+  +++ b/file1  Thu Jan 01 00:00:00 1970 +
+  @@ -1,2 +1,3 @@
+   A
+  +B
+   C
+  diff -r 69004294ad57 file2
+  --- a/file2  Thu Jan 01 00:00:00 1970 +
+  +++ b/file2  Thu Jan 01 00:00:00 1970 +
+  @@ -1,2 +1,6 @@
+   A
+  +<<< working copy: 69004294ad57 - test: C
+   C
+  +===
+  +B
+  +>>> merge rev:fd9a4049234b - test: B
+
+-- should abort on absence of conflicts
+  $ hg shelve
+  abort: mergestate found
+  try with --unresolved to shelve conflicts
+  [255]
+  $ hg shelve --unresolved
+  abort: no unresolved files found in the mergestate
+  [255]
+  $ hg resolve -u file2
+  $ hg resolve -l
+  R file1
+  U file2
+
+-- should suggest --unresolved on shelving with mergestate
+  $ hg shelve
+  abort: mergestate found
+  try with --unresolved to shelve conflicts
+  [255]
+
+  $ hg shelve --unresolved
+  shelved as default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ cat file1
+  A
+  C
+  $ hg log -G
+  @  changeset:   2:69004294ad57
+  |  tag: tip
+  |  parent:  0:c32ef6121744
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: C
+  |
+  | o  changeset:   1:fd9a4049234b
+  |/   user:test
+  |date:Thu Jan 01 00:00:00 1970 +
+  |

D6736: shelve: add method for storing mergestate in changeset extras

2019-08-17 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We store mergestate records in `.hg/merge`. This patch adds a method
  of storage in changeset extras. This will help in the exchange of
  mergestate records to other repos. Also, this can be used by
  `shelve --unresolved` to store the mergestate records.
  
  It uses the storage format supported for hg versions 3.7 or later. For the
  time being, I have omitted the storage of the content of the local version
  of unresolved files.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/shelve.py

CHANGE DETAILS

diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -413,6 +413,36 @@
 cmdutil.exportfile(repo, [node], fp, opts=mdiff.diffopts(git=True),
match=match)
 
+def _encodemergerecords(records):
+"""Encode mergestate records to store in changeset extras.
+Takes list of tuples as input and returns str.
+"""
+items = [
+'%s\033%s' % (rtype, record)
+for rtype, record in sorted(records)
+]
+return "\n".join(items)
+
+def _decodemergerecords(data):
+"""Decode mergestate record from changeset extras to return
+a list of tuples.
+"""
+records = []
+for l in data.split('\n'):
+rtype, record = l.split('\033')
+records.append((rtype, record))
+return records
+
+def _storeunresolvedmerge(ui, repo, name=None, extra=None):
+"""Store the mergestate information in changeset extra
+
+This will clear the mergestate and also stores the mergestate
+information for later restoration.
+"""
+ms = merge.mergestate.read(repo)
+extra['mergerecords'] = _encodemergerecords(ms._readrecords())
+ms.reset()
+
 def _includeunknownfiles(repo, pats, opts, extra):
 s = repo.status(match=scmutil.match(repo[None], pats, opts),
 unknown=True)



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


D6709: config: add --registered flag to show all known configs

2019-08-17 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16248.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16247=16248

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-basic.t
  tests/test-commandserver.t
  tests/test-completion.t
  tests/test-config.t
  tests/test-hgrc.t

CHANGE DETAILS

diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
--- a/tests/test-hgrc.t
+++ b/tests/test-hgrc.t
@@ -80,9 +80,9 @@
 
   $ hg showconfig --config ui.verbose=True --quiet
   bundle.mainreporoot=$TESTTMP
-  ui.verbose=False
-  ui.debug=False
-  ui.quiet=True
+  ui.verbose=no
+  ui.debug=no
+  ui.quiet=yes
 
   $ touch foobar/untracked
   $ cat >> foobar/.hg/hgrc < done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=
+  bundle.mainreporoot=$TESTTMP (default: )
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.track-log=chgserver cmdserver repocache
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=
+  commands.status.relative=no
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=messagedifferent
+  convert.git.extrakeys=
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.dotencode=yes
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
+  fsmonitor.warn_update_file_count=5
+  fsmonitor.warn_when_unused=yes
+  hostsecurity.ciphers=None
+  hostsecurity.disabletls10warning=no
+  http.timeout=None
+  http_proxy.always=no
+  http_proxy.host=None
+  http_proxy.no=
+  http_proxy.passwd=None
+  http_proxy.user=None
+  logtoprocess.command=None
+  logtoprocess.commandexception=None
+  logtoprocess.commandfinish=None
+  logtoprocess.develwarn=None
+  logtoprocess.uiblocked=None
+  merge.checkignored=abort
+  merge.checkunknown=abort
+  merge.followcopies=yes
+  merge.on-failure=continue
+  merge.strict-capability-check=no
+  

D6730: config: handle default values of type list

2019-08-17 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.
navaneeth.suresh abandoned this revision.


  In D6730#98852 , @av6 wrote:
  
  > The changes in tests that this patch causes are actually already present in 
the D6709 , so let's fold this patch into 
it as well.
  
  Okay. Folded and updated D6709 . 
Abandoning this.

REPOSITORY
  rHG Mercurial

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

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

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


D6709: config: add --registered flag to show all known configs

2019-08-17 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16247.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16229=16247

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-basic.t
  tests/test-commandserver.t
  tests/test-completion.t
  tests/test-config.t
  tests/test-hgrc.t

CHANGE DETAILS

diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
--- a/tests/test-hgrc.t
+++ b/tests/test-hgrc.t
@@ -80,9 +80,9 @@
 
   $ hg showconfig --config ui.verbose=True --quiet
   bundle.mainreporoot=$TESTTMP
-  ui.verbose=False
-  ui.debug=False
-  ui.quiet=True
+  ui.verbose=no
+  ui.debug=no
+  ui.quiet=yes
 
   $ touch foobar/untracked
   $ cat >> foobar/.hg/hgrc < done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=
+  bundle.mainreporoot=$TESTTMP (default: )
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.track-log=chgserver cmdserver repocache
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=
+  commands.status.relative=no
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=messagedifferent
+  convert.git.extrakeys=
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.dotencode=yes
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
+  fsmonitor.warn_update_file_count=5
+  fsmonitor.warn_when_unused=yes
+  hostsecurity.ciphers=None
+  hostsecurity.disabletls10warning=no
+  http.timeout=None
+  http_proxy.always=no
+  http_proxy.host=None
+  http_proxy.no=
+  http_proxy.passwd=None
+  http_proxy.user=None
+  logtoprocess.command=None
+  logtoprocess.commandexception=None
+  logtoprocess.commandfinish=None
+  logtoprocess.develwarn=None
+  logtoprocess.uiblocked=None
+  merge.checkignored=abort
+  merge.checkunknown=abort
+  merge.followcopies=yes
+  merge.on-failure=continue
+  merge.strict-capability-check=no
+  

D6709: config: add --registered flag to show all known configs

2019-08-16 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16229.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16220=16229

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-basic.t
  tests/test-commandserver.t
  tests/test-completion.t
  tests/test-config.t
  tests/test-hgrc.t

CHANGE DETAILS

diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
--- a/tests/test-hgrc.t
+++ b/tests/test-hgrc.t
@@ -80,9 +80,9 @@
 
   $ hg showconfig --config ui.verbose=True --quiet
   bundle.mainreporoot=$TESTTMP
-  ui.verbose=False
-  ui.debug=False
-  ui.quiet=True
+  ui.verbose=no
+  ui.debug=no
+  ui.quiet=yes
 
   $ touch foobar/untracked
   $ cat >> foobar/.hg/hgrc < done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=
+  bundle.mainreporoot=$TESTTMP (default: )
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.track-log=chgserver cmdserver repocache
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=
+  commands.status.relative=no
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=messagedifferent
+  convert.git.extrakeys=
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.dotencode=yes
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
+  fsmonitor.warn_update_file_count=5
+  fsmonitor.warn_when_unused=yes
+  hostsecurity.ciphers=None
+  hostsecurity.disabletls10warning=no
+  http.timeout=None
+  http_proxy.always=no
+  http_proxy.host=None
+  http_proxy.no=
+  http_proxy.passwd=None
+  http_proxy.user=None
+  logtoprocess.command=None
+  logtoprocess.commandexception=None
+  logtoprocess.commandfinish=None
+  logtoprocess.develwarn=None
+  logtoprocess.uiblocked=None
+  merge.checkignored=abort
+  merge.checkunknown=abort
+  merge.followcopies=yes
+  merge.on-failure=continue
+  merge.strict-capability-check=no
+  

D6731: exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)

2019-08-16 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Until now, if there is a bookmark points to a changeset which is in secret
  phase, hg will push the bookmark, but not the changeset referenced by that
  bookmark. This leaves the server bookmarks in a bad state, because that
  bookmark now points to a revision that does not exist on the server. This
  patch makes hg to abort on such cases.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/exchange.py
  tests/test-bookmarks-pushpull.t

CHANGE DETAILS

diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -1322,3 +1322,42 @@
   abort: push failed on remote
   [255]
 #endif
+
+-- test for stop pushing bookmarks pointing to secret changesets
+
+Set up a "remote" repo
+  $ hg init issue6159remote
+  $ cd issue6159remote
+  $ echo a > a
+  $ hg add a
+  $ hg commit -m_
+  $ hg bookmark foo
+  $ cd ..
+
+Clone a local repo
+  $ hg clone -q issue6159remote issue6159local
+  $ cd issue6159local
+  $ hg up -qr foo
+  $ echo b > b
+
+Move the bookmark "foo" to point at a secret changeset
+  $ hg commit -qAm_
+  $ hg phase -s -f
+
+Pushing the bookmark "foo" now fails as it contains a secret changeset
+#if b2-pushkey
+  $ hg push -r foo
+  pushing to $TESTTMP/issue6159remote
+  searching for changes
+  no changes found (ignored 1 secret changesets)
+  abort: bookmark foo points to a secret changeset
+  [255]
+#endif
+#if b2-binary
+  $ hg push -r foo
+  pushing to $TESTTMP/issue6159remote
+  searching for changes
+  no changes found (ignored 1 secret changesets)
+  abort: bookmark foo points to a secret changeset
+  [255]
+#endif
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1034,6 +1034,15 @@
 return 'delete'
 return 'update'
 
+def _abortonsecretctx(pushop, node, b):
+"""abort if a given bookmark points to a secret changeset"""
+if not node:
+return False
+ctx = pushop.repo[node]
+if ctx.phase() == phases.secret:
+raise error.Abort(_('bookmark %s points to a secret changeset') % b)
+return False
+
 def _pushb2bookmarkspart(pushop, bundler):
 pushop.stepsdone.add('bookmarks')
 if not pushop.outbookmarks:
@@ -1042,6 +1051,7 @@
 allactions = []
 data = []
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 new = bin(new)
 data.append((book, new))
 allactions.append((book, _bmaction(old, new)))
@@ -1070,6 +1080,7 @@
 assert False
 
 for book, old, new in pushop.outbookmarks:
+_abortonsecretctx(pushop, new, book)
 part = bundler.newpart('pushkey')
 part.addparam('namespace', enc('bookmarks'))
 part.addparam('key', enc(book))



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


D6699: unshelve: abort on using --keep and --interactive together

2019-08-16 Thread navaneeth.suresh (Navaneeth Suresh)
Closed by commit rHG4b0c9d47f714: unshelve: abort on using --keep and 
--interactive together (authored by navaneeth.suresh).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6699?vs=16211=16222

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

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

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

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1475,3 +1475,7 @@
   record this change to 'bar2'?
   (enter ? for help) [Ynesfdaq?] y
   
+-- test for --interactive --keep
+  $ hg unshelve -i --keep
+  abort: --keep on --interactive is not yet supported
+  [255]
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -942,6 +942,8 @@
 if opts.get("name"):
 shelved.append(opts["name"])
 
+if interactive and opts.get('keep'):
+raise error.Abort(_('--keep on --interactive is not yet supported'))
 if abortf or continuef:
 if abortf and continuef:
 raise error.Abort(_('cannot use both abort and continue'))



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


D6709: config: add --registered flag to show all known configs

2019-08-16 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16220.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16218=16220

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-basic.t
  tests/test-completion.t
  tests/test-config.t
  tests/test-hgrc.t

CHANGE DETAILS

diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
--- a/tests/test-hgrc.t
+++ b/tests/test-hgrc.t
@@ -80,9 +80,9 @@
 
   $ hg showconfig --config ui.verbose=True --quiet
   bundle.mainreporoot=$TESTTMP
-  ui.verbose=False
-  ui.debug=False
-  ui.quiet=True
+  ui.verbose=no
+  ui.debug=no
+  ui.quiet=yes
 
   $ touch foobar/untracked
   $ cat >> foobar/.hg/hgrc < done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=
+  bundle.mainreporoot=$TESTTMP (default: )
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.track-log=chgserver cmdserver repocache
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=
+  commands.status.relative=no
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=messagedifferent
+  convert.git.extrakeys=
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.dotencode=yes
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
+  fsmonitor.warn_update_file_count=5
+  fsmonitor.warn_when_unused=yes
+  hostsecurity.ciphers=None
+  hostsecurity.disabletls10warning=no
+  http.timeout=None
+  http_proxy.always=no
+  http_proxy.host=None
+  http_proxy.no=
+  http_proxy.passwd=None
+  http_proxy.user=None
+  logtoprocess.command=None
+  logtoprocess.commandexception=None
+  logtoprocess.commandfinish=None
+  logtoprocess.develwarn=None
+  logtoprocess.uiblocked=None
+  merge.checkignored=abort
+  merge.checkunknown=abort
+  merge.followcopies=yes
+  merge.on-failure=continue
+  merge.strict-capability-check=no
+  pager.ignore=
+  

D6730: config: handle default values of type list

2019-08-16 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16219.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6730?vs=16217=16219

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

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

AFFECTED FILES
  mercurial/ui.py

CHANGE DETAILS

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -792,6 +792,8 @@
 itemdefault = item.default()
 else:
 itemdefault = item.default
+if isinstance(itemdefault, list):
+itemdefault = ' '.join(itemdefault)
 return itemdefault
 
 def hasconfig(self, section, name, untrusted=False):



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


D6709: config: add --registered flag to show all known configs

2019-08-16 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16218.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16216=16218

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-basic.t
  tests/test-completion.t
  tests/test-config.t
  tests/test-hgrc.t

CHANGE DETAILS

diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
--- a/tests/test-hgrc.t
+++ b/tests/test-hgrc.t
@@ -80,9 +80,9 @@
 
   $ hg showconfig --config ui.verbose=True --quiet
   bundle.mainreporoot=$TESTTMP
-  ui.verbose=False
-  ui.debug=False
-  ui.quiet=True
+  ui.verbose=no
+  ui.debug=no
+  ui.quiet=yes
 
   $ touch foobar/untracked
   $ cat >> foobar/.hg/hgrc < done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=[]
+  bundle.mainreporoot=$TESTTMP (default: )
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.track-log=chgserver cmdserver repocache
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=[]
+  commands.status.relative=no
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=messagedifferent
+  convert.git.extrakeys=[]
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=[]
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.dotencode=yes
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
+  fsmonitor.warn_update_file_count=5
+  fsmonitor.warn_when_unused=yes
+  hostsecurity.ciphers=None
+  hostsecurity.disabletls10warning=no
+  http.timeout=None
+  http_proxy.always=no
+  http_proxy.host=None
+  http_proxy.no=[]
+  http_proxy.passwd=None
+  http_proxy.user=None
+  logtoprocess.command=None
+  logtoprocess.commandexception=None
+  logtoprocess.commandfinish=None
+  logtoprocess.develwarn=None
+  logtoprocess.uiblocked=None
+  merge.checkignored=abort
+  merge.checkunknown=abort
+  merge.followcopies=yes
+  merge.on-failure=continue
+  merge.strict-capability-check=no
+  pager.ignore=[]
+  

D6730: config: handle default values of type list

2019-08-16 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This patch improves the output of the `defaultvalue` keyword.
  For example, `progress.format`.
  Its default value is shown to be `['topic', 'bar', 'number', 'estimate']`
  until now, but it does not match `hg help config.progress.format`
  (it says `default: topic bar number estimate`), and that is also not the
  format that users would need to use for the actual value in `hgrc` or using
  `--config` flag.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/ui.py

CHANGE DETAILS

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -792,6 +792,8 @@
 itemdefault = item.default()
 else:
 itemdefault = item.default
+if itemdefault and isinstance(itemdefault, list):
+itemdefault = ' '.join(itemdefault)
 return itemdefault
 
 def hasconfig(self, section, name, untrusted=False):



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


D6709: config: add --registered flag to show all known configs

2019-08-15 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh marked an inline comment as done.
navaneeth.suresh updated this revision to Diff 16216.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16209=16216

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-basic.t
  tests/test-completion.t
  tests/test-config.t
  tests/test-hgrc.t

CHANGE DETAILS

diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
--- a/tests/test-hgrc.t
+++ b/tests/test-hgrc.t
@@ -80,9 +80,9 @@
 
   $ hg showconfig --config ui.verbose=True --quiet
   bundle.mainreporoot=$TESTTMP
-  ui.verbose=False
-  ui.debug=False
-  ui.quiet=True
+  ui.verbose=no
+  ui.debug=no
+  ui.quiet=yes
 
   $ touch foobar/untracked
   $ cat >> foobar/.hg/hgrc < done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=[]
+  bundle.mainreporoot=$TESTTMP (default: )
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.track-log=['chgserver', 'cmdserver', 'repocache']
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=[]
+  commands.status.relative=no
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=['messagedifferent']
+  convert.git.extrakeys=[]
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=[]
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.dotencode=yes
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
+  fsmonitor.warn_update_file_count=5
+  fsmonitor.warn_when_unused=yes
+  hostsecurity.ciphers=None
+  hostsecurity.disabletls10warning=no
+  http.timeout=None
+  http_proxy.always=no
+  http_proxy.host=None
+  http_proxy.no=[]
+  http_proxy.passwd=None
+  http_proxy.user=None
+  logtoprocess.command=None
+  logtoprocess.commandexception=None
+  logtoprocess.commandfinish=None
+  logtoprocess.develwarn=None
+  logtoprocess.uiblocked=None
+  merge.checkignored=abort
+  merge.checkunknown=abort
+  merge.followcopies=yes
+  

D6479: shelve: first prototype of storing/restoring unresolved changes

2019-08-15 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.


  In D6479#98737 , @durin42 wrote:
  
  > The only thing I'm curious about really is why we have extrastorage and 
usualstorge. Can we get away with only one of those choices instead of having 
more options?
  
  The ultimate goal is to store the mergestate info in the changeset extras 
only. But, now , it has no support to store the local version of the files 
which are stored in the mergestate. This lacks info when the user gets 
conflicts other than a usual `hg merge`.

REPOSITORY
  rHG Mercurial

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

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

To: navaneeth.suresh, #hg-reviewers
Cc: durin42, pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6728: config: add experimental argument to the config registrar

2019-08-15 Thread navaneeth.suresh (Navaneeth Suresh)
Closed by commit rHGe67d9b6bad4d: config: add experimental argument to the 
config registrar (authored by navaneeth.suresh).
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/D6728?vs=16208=16213

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

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

AFFECTED FILES
  contrib/perf.py
  hgext/fsmonitor/__init__.py
  hgext/remotefilelog/__init__.py
  hgext/sqlitestore.py
  mercurial/configitems.py

CHANGE DETAILS

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -39,13 +39,14 @@
 """
 
 def __init__(self, section, name, default=None, alias=(),
- generic=False, priority=0):
+ generic=False, priority=0, experimental=False):
 self.section = section
 self.name = name
 self.default = default
 self.alias = list(alias)
 self.generic = generic
 self.priority = priority
+self.experimental = experimental
 self._re = None
 if generic:
 self._re = re.compile(self.name)
@@ -166,6 +167,7 @@
 )
 coreconfigitem('censor', 'policy',
 default='abort',
+experimental=True,
 )
 coreconfigitem('chgserver', 'idletimeout',
 default=3600,
@@ -184,9 +186,11 @@
 )
 coreconfigitem('cmdserver', 'max-repo-cache',
 default=0,
+experimental=True,
 )
 coreconfigitem('cmdserver', 'message-encodings',
 default=list,
+experimental=True,
 )
 coreconfigitem('cmdserver', 'track-log',
 default=lambda: ['chgserver', 'cmdserver', 'repocache'],
@@ -207,6 +211,7 @@
 )
 coreconfigitem('commands', 'grep.all-files',
 default=False,
+experimental=True,
 )
 coreconfigitem('commands', 'resolve.confirm',
 default=False,
@@ -226,6 +231,7 @@
 )
 coreconfigitem('commands', 'status.skipstates',
 default=[],
+experimental=True,
 )
 coreconfigitem('commands', 'status.terse',
 default='',
@@ -314,6 +320,7 @@
 )
 coreconfigitem('convert', 'ignoreancestorcheck',
 default=False,
+experimental=True,
 )
 coreconfigitem('convert', 'localtimezone',
 default=False,
@@ -687,18 +694,22 @@
 )
 coreconfigitem('format', 'chunkcachesize',
 default=None,
+experimental=True,
 )
 coreconfigitem('format', 'dotencode',
 default=True,
 )
 coreconfigitem('format', 'generaldelta',
 default=False,
+experimental=True,
 )
 coreconfigitem('format', 'manifestcachesize',
 default=None,
+experimental=True,
 )
 coreconfigitem('format', 'maxchainlen',
 default=dynamicdefault,
+experimental=True,
 )
 coreconfigitem('format', 'obsstore-version',
 default=None,
@@ -721,6 +732,7 @@
 )
 coreconfigitem('format', 'internal-phase',
 default=False,
+experimental=True,
 )
 coreconfigitem('fsmonitor', 'warn_when_unused',
 default=True,
@@ -826,6 +838,7 @@
 )
 coreconfigitem('merge', 'preferancestor',
 default=lambda: ['*'],
+experimental=True,
 )
 coreconfigitem('merge', 'strict-capability-check',
 default=False,
@@ -1010,6 +1023,7 @@
 )
 coreconfigitem('storage', 'new-repo-backend',
 default='revlogv1',
+experimental=True,
 )
 coreconfigitem('storage', 'revlog.optimize-delta-parent-choice',
 default=True,
@@ -1120,6 +1134,7 @@
 )
 coreconfigitem('sparse', 'missingwarning',
 default=True,
+experimental=True,
 )
 coreconfigitem('subrepos', 'allowed',
 default=dynamicdefault,  # to make backporting simpler
@@ -1466,6 +1481,7 @@
 )
 coreconfigitem('web', 'view',
 default='served',
+experimental=True,
 )
 coreconfigitem('worker', 'backgroundclose',
 default=dynamicdefault,
diff --git a/hgext/sqlitestore.py b/hgext/sqlitestore.py
--- a/hgext/sqlitestore.py
+++ b/hgext/sqlitestore.py
@@ -90,7 +90,8 @@
 
 # experimental config: storage.sqlite.compression
 configitem('storage', 'sqlite.compression',
-   default='zstd' if zstd else 'zlib')
+   default='zstd' if zstd else 'zlib',
+   experimental=True)
 
 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' 
for
 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
diff --git a/hgext/remotefilelog/__init__.py b/hgext/remotefilelog/__init__.py
--- a/hgext/remotefilelog/__init__.py
+++ b/hgext/remotefilelog/__init__.py
@@ -219,7 +219,7 @@
 
 configitem('remotefilelog', 'gcrepack', default=False)
 configitem('remotefilelog', 'repackonhggc', default=False)
-configitem('repack', 'chainorphansbysize', default=True)
+configitem('repack', 'chainorphansbysize', default=True, experimental=True)
 
 configitem('packs', 'maxpacksize', default=0)
 configitem('packs', 'maxchainlen', default=1000)
diff --git a/hgext/fsmonitor/__init__.py b/hgext/fsmonitor/__init__.py
--- 

D6699: unshelve: abort on using --keep and --interactive together

2019-08-15 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16211.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6699?vs=16168=16211

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

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

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

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1456,3 +1456,7 @@
   record this change to 'bar2'?
   (enter ? for help) [Ynesfdaq?] y
   
+-- test for --interactive --keep
+  $ hg unshelve -i --keep
+  abort: --keep on --interactive is not yet supported
+  [255]
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -941,6 +941,8 @@
 if opts.get("name"):
 shelved.append(opts["name"])
 
+if interactive and opts.get('keep'):
+raise error.Abort(_('--keep on --interactive is not yet supported'))
 if abortf or continuef:
 if abortf and continuef:
 raise error.Abort(_('cannot use both abort and continue'))



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


D6709: config: add --registered flag to show all known configs

2019-08-15 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.


  In D6709#98718 , @marmoute wrote:
  
  > I get 28 of them.
  > I think we need to add an `experimental` or `status` argument ot the config 
registration.
  
  Created D6728  to add an `experimental` 
argument to the config registrar and made it as a parent revision.

REPOSITORY
  rHG Mercurial

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

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

To: navaneeth.suresh, #hg-reviewers, av6, marmoute
Cc: mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6709: config: add --registered flag to show all known configs

2019-08-15 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16209.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16172=16209

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-completion.t
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -224,3 +224,736 @@
   > done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=[]
+  bundle.mainreporoot=$TESTTMP (default: )
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.track-log=['chgserver', 'cmdserver', 'repocache']
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=[]
+  commands.status.relative=no
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=['messagedifferent']
+  convert.git.extrakeys=[]
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=[]
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.dotencode=yes
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
+  fsmonitor.warn_update_file_count=5
+  fsmonitor.warn_when_unused=yes
+  hostsecurity.ciphers=None
+  hostsecurity.disabletls10warning=no
+  http.timeout=None
+  http_proxy.always=no
+  http_proxy.host=None
+  http_proxy.no=[]
+  http_proxy.passwd=None
+  http_proxy.user=None
+  logtoprocess.command=None
+  logtoprocess.commandexception=None
+  logtoprocess.commandfinish=None
+  logtoprocess.develwarn=None
+  logtoprocess.uiblocked=None
+  merge.checkignored=abort
+  merge.checkunknown=abort
+  merge.followcopies=yes
+  merge.on-failure=continue
+  merge.strict-capability-check=no
+  pager.ignore=[]
+  patch.eol=strict
+  patch.fuzz=2
+  paths.default=None
+  paths.default-push=None
+  phases.checksubrepos=follow
+  phases.new-commit=draft
+  phases.publish=yes
+  profiling.enabled=no
+  profiling.format=text
+  profiling.freq=1000
+  profiling.limit=30
+  

D6728: config: add experimental argument to the config registrar

2019-08-15 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Until now, there are almost 28 config items which are considered as
  `experimental` but, not present in the `experimental` section of
  the registrar. This patch adds an `experimental` argument to the
  config registrar to mark such config items.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  contrib/perf.py
  hgext/fsmonitor/__init__.py
  hgext/remotefilelog/__init__.py
  hgext/sqlitestore.py
  mercurial/configitems.py

CHANGE DETAILS

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -39,13 +39,14 @@
 """
 
 def __init__(self, section, name, default=None, alias=(),
- generic=False, priority=0):
+ generic=False, priority=0, experimental=False):
 self.section = section
 self.name = name
 self.default = default
 self.alias = list(alias)
 self.generic = generic
 self.priority = priority
+self.experimental = experimental
 self._re = None
 if generic:
 self._re = re.compile(self.name)
@@ -166,6 +167,7 @@
 )
 coreconfigitem('censor', 'policy',
 default='abort',
+experimental=True,
 )
 coreconfigitem('chgserver', 'idletimeout',
 default=3600,
@@ -184,9 +186,11 @@
 )
 coreconfigitem('cmdserver', 'max-repo-cache',
 default=0,
+experimental=True,
 )
 coreconfigitem('cmdserver', 'message-encodings',
 default=list,
+experimental=True,
 )
 coreconfigitem('cmdserver', 'track-log',
 default=lambda: ['chgserver', 'cmdserver', 'repocache'],
@@ -207,6 +211,7 @@
 )
 coreconfigitem('commands', 'grep.all-files',
 default=False,
+experimental=True,
 )
 coreconfigitem('commands', 'resolve.confirm',
 default=False,
@@ -226,6 +231,7 @@
 )
 coreconfigitem('commands', 'status.skipstates',
 default=[],
+experimental=True,
 )
 coreconfigitem('commands', 'status.terse',
 default='',
@@ -314,6 +320,7 @@
 )
 coreconfigitem('convert', 'ignoreancestorcheck',
 default=False,
+experimental=True,
 )
 coreconfigitem('convert', 'localtimezone',
 default=False,
@@ -684,18 +691,22 @@
 )
 coreconfigitem('format', 'chunkcachesize',
 default=None,
+experimental=True,
 )
 coreconfigitem('format', 'dotencode',
 default=True,
 )
 coreconfigitem('format', 'generaldelta',
 default=False,
+experimental=True,
 )
 coreconfigitem('format', 'manifestcachesize',
 default=None,
+experimental=True,
 )
 coreconfigitem('format', 'maxchainlen',
 default=dynamicdefault,
+experimental=True,
 )
 coreconfigitem('format', 'obsstore-version',
 default=None,
@@ -718,6 +729,7 @@
 )
 coreconfigitem('format', 'internal-phase',
 default=False,
+experimental=True,
 )
 coreconfigitem('fsmonitor', 'warn_when_unused',
 default=True,
@@ -823,6 +835,7 @@
 )
 coreconfigitem('merge', 'preferancestor',
 default=lambda: ['*'],
+experimental=True,
 )
 coreconfigitem('merge', 'strict-capability-check',
 default=False,
@@ -1007,6 +1020,7 @@
 )
 coreconfigitem('storage', 'new-repo-backend',
 default='revlogv1',
+experimental=True,
 )
 coreconfigitem('storage', 'revlog.optimize-delta-parent-choice',
 default=True,
@@ -1117,6 +1131,7 @@
 )
 coreconfigitem('sparse', 'missingwarning',
 default=True,
+experimental=True,
 )
 coreconfigitem('subrepos', 'allowed',
 default=dynamicdefault,  # to make backporting simpler
@@ -1463,6 +1478,7 @@
 )
 coreconfigitem('web', 'view',
 default='served',
+experimental=True,
 )
 coreconfigitem('worker', 'backgroundclose',
 default=dynamicdefault,
diff --git a/hgext/sqlitestore.py b/hgext/sqlitestore.py
--- a/hgext/sqlitestore.py
+++ b/hgext/sqlitestore.py
@@ -90,7 +90,8 @@
 
 # experimental config: storage.sqlite.compression
 configitem('storage', 'sqlite.compression',
-   default='zstd' if zstd else 'zlib')
+   default='zstd' if zstd else 'zlib',
+   experimental=True)
 
 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' 
for
 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
diff --git a/hgext/remotefilelog/__init__.py b/hgext/remotefilelog/__init__.py
--- a/hgext/remotefilelog/__init__.py
+++ b/hgext/remotefilelog/__init__.py
@@ -219,7 +219,7 @@
 
 configitem('remotefilelog', 'gcrepack', default=False)
 configitem('remotefilelog', 'repackonhggc', default=False)
-configitem('repack', 'chainorphansbysize', default=True)
+configitem('repack', 'chainorphansbysize', default=True, experimental=True)
 
 configitem('packs', 'maxpacksize', default=0)
 configitem('packs', 'maxchainlen', default=1000)
diff --git a/hgext/fsmonitor/__init__.py b/hgext/fsmonitor/__init__.py
--- a/hgext/fsmonitor/__init__.py
+++ 

D6724: unshelve: forget unknown files after a partial unshelve

2019-08-13 Thread navaneeth.suresh (Navaneeth Suresh)
Closed by commit rHGd684449eef67: unshelve: forget unknown files after a 
partial unshelve (authored by navaneeth.suresh).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6724?vs=16179=16180

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

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

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

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1272,15 +1272,21 @@
   > B
   > C
   > EOF
-  $ hg shelve
+  $ echo > garbage
+  $ hg st
+  M foo
+  ? garbage
+  $ hg shelve --unknown
   shelved as default
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ cat foo
   B
   $ hg unshelve -i < y
   > y
   > n
+  > y
+  > y
   > EOF
   unshelving change 'default'
   rebasing shelved changes
@@ -1292,15 +1298,28 @@
   @@ -1,1 +1,2 @@
   +A
B
-  record change 1/2 to 'foo'?
+  record change 1/3 to 'foo'?
   (enter ? for help) [Ynesfdaq?] y
   
   @@ -1,1 +2,2 @@
B
   +C
-  record change 2/2 to 'foo'?
+  record change 2/3 to 'foo'?
   (enter ? for help) [Ynesfdaq?] n
   
+  diff --git a/garbage b/garbage
+  new file mode 100644
+  examine changes to 'garbage'?
+  (enter ? for help) [Ynesfdaq?] y
+  
+  @@ -0,0 +1,1 @@
+  +
+  record change 3/3 to 'garbage'?
+  (enter ? for help) [Ynesfdaq?] y
+  
+  $ hg st
+  M foo
+  ? garbage
   $ cat foo
   A
   B
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -1005,8 +1005,8 @@
 restorebranch(ui, repo, branchtorestore)
 shelvedstate.clear(repo)
 _finishunshelve(repo, oldtiprev, tr, activebookmark)
+_forgetunknownfiles(repo, shelvectx, addedbefore)
 if not ispartialunshelve:
-_forgetunknownfiles(repo, shelvectx, addedbefore)
 unshelvecleanup(ui, repo, basename, opts)
 finally:
 if tr:



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


D6724: unshelve: forget unknown files after a partial unshelve

2019-08-13 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This is a follow-up patch to 6957f7b93e03 
. 
This allows hg to forget
  unknown files after a partial unshelve.

REPOSITORY
  rHG Mercurial

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

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

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1272,15 +1272,21 @@
   > B
   > C
   > EOF
-  $ hg shelve
+  $ echo > garbage
+  $ hg st
+  M foo
+  ? garbage
+  $ hg shelve --unknown
   shelved as default
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ cat foo
   B
   $ hg unshelve -i < y
   > y
   > n
+  > y
+  > y
   > EOF
   unshelving change 'default'
   rebasing shelved changes
@@ -1292,15 +1298,28 @@
   @@ -1,1 +1,2 @@
   +A
B
-  record change 1/2 to 'foo'?
+  record change 1/3 to 'foo'?
   (enter ? for help) [Ynesfdaq?] y
   
   @@ -1,1 +2,2 @@
B
   +C
-  record change 2/2 to 'foo'?
+  record change 2/3 to 'foo'?
   (enter ? for help) [Ynesfdaq?] n
   
+  diff --git a/garbage b/garbage
+  new file mode 100644
+  examine changes to 'garbage'?
+  (enter ? for help) [Ynesfdaq?] y
+  
+  @@ -0,0 +1,1 @@
+  +
+  record change 3/3 to 'garbage'?
+  (enter ? for help) [Ynesfdaq?] y
+  
+  $ hg st
+  M foo
+  ? garbage
   $ cat foo
   A
   B
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -1004,8 +1004,8 @@
 restorebranch(ui, repo, branchtorestore)
 shelvedstate.clear(repo)
 _finishunshelve(repo, oldtiprev, tr, activebookmark)
+_forgetunknownfiles(repo, shelvectx, addedbefore)
 if not ispartialunshelve:
-_forgetunknownfiles(repo, shelvectx, addedbefore)
 unshelvecleanup(ui, repo, basename, opts)
 finally:
 if tr:



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


D6709: config: add --registered flag to show all known configs

2019-08-11 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16172.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16171=16172

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-completion.t
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -224,3 +224,750 @@
   > done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=[]
+  bundle.mainreporoot=$TESTTMP (default: )
+  censor.policy=abort
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.max-repo-cache=0
+  cmdserver.message-encodings=[]
+  cmdserver.track-log=[b'chgserver', b'cmdserver', b'repocache']
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.grep.all-files=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=[]
+  commands.status.relative=no
+  commands.status.skipstates=[]
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=[b'messagedifferent']
+  convert.git.extrakeys=[]
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.ignoreancestorcheck=no
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=[]
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.chunkcachesize=None
+  format.dotencode=yes
+  format.generaldelta=no
+  format.internal-phase=no
+  format.manifestcachesize=None
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
+  fsmonitor.warn_update_file_count=5
+  fsmonitor.warn_when_unused=yes
+  hostsecurity.ciphers=None
+  hostsecurity.disabletls10warning=no
+  http.timeout=None
+  http_proxy.always=no
+  http_proxy.host=None
+  http_proxy.no=[]
+  http_proxy.passwd=None
+  http_proxy.user=None
+  logtoprocess.command=None
+  logtoprocess.commandexception=None
+  logtoprocess.commandfinish=None
+  logtoprocess.develwarn=None
+  logtoprocess.uiblocked=None
+  merge.checkignored=abort
+  merge.checkunknown=abort
+  merge.followcopies=yes
+  merge.on-failure=continue
+  

D6709: config: add --registered flag to show all known configs

2019-08-11 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16171.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16170=16171

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-completion.t
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -224,3 +224,751 @@
   > done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=[]
+  bundle.mainreporoot=$TESTTMP (default: )
+  censor.policy=abort
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.max-repo-cache=0
+  cmdserver.message-encodings=[]
+  cmdserver.track-log=[b'chgserver', b'cmdserver', b'repocache']
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.grep.all-files=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=[]
+  commands.status.relative=no
+  commands.status.skipstates=[]
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=[b'messagedifferent']
+  convert.git.extrakeys=[]
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.ignoreancestorcheck=no
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  debug.dirstate.delaywrite=0
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=[]
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.chunkcachesize=None
+  format.dotencode=yes
+  format.generaldelta=no
+  format.internal-phase=no
+  format.manifestcachesize=None
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
+  fsmonitor.warn_update_file_count=5
+  fsmonitor.warn_when_unused=yes
+  hostsecurity.ciphers=None
+  hostsecurity.disabletls10warning=no
+  http.timeout=None
+  http_proxy.always=no
+  http_proxy.host=None
+  http_proxy.no=[]
+  http_proxy.passwd=None
+  http_proxy.user=None
+  logtoprocess.command=None
+  logtoprocess.commandexception=None
+  logtoprocess.commandfinish=None
+  logtoprocess.develwarn=None
+  logtoprocess.uiblocked=None
+  merge.checkignored=abort
+  merge.checkunknown=abort
+  merge.followcopies=yes
+  

D6709: config: add --registered flag to show all known configs

2019-08-11 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.


  In D6709#98542 , @mharbison72 
wrote:
  
  > Should we hide `devel.*` like we do `experimental` when `verbose` isn’t 
applied?  Presumably we don’t want regular users to know about them.
  
  Done.

REPOSITORY
  rHG Mercurial

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

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

To: navaneeth.suresh, #hg-reviewers, av6, marmoute
Cc: mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6709: config: add --registered flag to show all known configs

2019-08-11 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16170.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16167=16170

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-completion.t
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -224,3 +224,773 @@
   > done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=[]
+  bundle.mainreporoot=$TESTTMP (default: )
+  censor.policy=abort
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.max-repo-cache=0
+  cmdserver.message-encodings=[]
+  cmdserver.track-log=[b'chgserver', b'cmdserver', b'repocache']
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.grep.all-files=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=[]
+  commands.status.relative=no
+  commands.status.skipstates=[]
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=[b'messagedifferent']
+  convert.git.extrakeys=[]
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.ignoreancestorcheck=no
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  debug.dirstate.delaywrite=0
+  devel.all-warnings=yes (default: no)
+  devel.bundle.delta=
+  devel.bundle2.debug=no
+  devel.cache-vfs=None
+  devel.check-locks=no
+  devel.check-relroot=no
+  devel.debug.copies=no
+  devel.debug.extensions=no
+  devel.debug.peer-request=no
+  devel.default-date=0 0 (default: None)
+  devel.deprec-warn=no
+  devel.disableloaddefaultcerts=no
+  devel.legacy.exchange=[]
+  devel.servercafile=
+  devel.serverexactprotocol=
+  devel.serverrequirecert=no
+  devel.strip-obsmarkers=yes
+  devel.user.obsmarker=None
+  devel.warn-config=None
+  devel.warn-config-default=None
+  devel.warn-config-unknown=None
+  devel.warn-empty-changegroup=no
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=[]
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.chunkcachesize=None
+  format.dotencode=yes
+  format.generaldelta=no
+  format.internal-phase=no
+  format.manifestcachesize=None
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$

D6709: config: add --registered flag to show all known configs

2019-08-11 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added inline comments.

INLINE COMMENTS

> marmoute wrote in test-config.t:232
> We should be consistent when printing. And we should also be consistent when 
> recording stuff in data.
> 
> I think it make sense to print human friendly version ('yes/no') and use the 
> actual boolean value in data()/json

okay. then, i should revert it to the previous revision.

REPOSITORY
  rHG Mercurial

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

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

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


D6709: config: add --registered flag to show all known configs

2019-08-10 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added inline comments.
navaneeth.suresh added a subscriber: yuja.

INLINE COMMENTS

> marmoute wrote in test-config.t:232
> the `(default: False)` should be `(default: no)` too.

that change was there in my patch one revision before. i was asked by @pulkit 
to modify it as of now. would you recommend writing `no` to `fm.data()` also? 
the `defaultvalue` was not in `pycompat.bytestr()` after @yuja's suggestion. it 
would be better if we consider that as a string and change the function 
accordingly if we want to modify it. otherwise, it should print  `no` and store 
`False`, print `False` on `hg showconfig --Tjson` in `defaultvalue`.

REPOSITORY
  rHG Mercurial

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

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

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


D6709: config: add --registered flag to show all known configs

2019-08-09 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16167.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16165=16167

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-completion.t
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -224,3 +224,773 @@
   > done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no (default: False)
+  annotate.ignoreblanklines=no (default: False)
+  annotate.ignorews=no (default: False)
+  annotate.ignorewsamount=no (default: False)
+  annotate.ignorewseol=no (default: False)
+  annotate.nobinary=no (default: False)
+  annotate.nodates=no (default: False)
+  annotate.noprefix=no (default: False)
+  annotate.showfunc=no (default: False)
+  annotate.unified=None
+  annotate.word-diff=no (default: False)
+  auth.cookiefile=None
+  bookmarks.pushing=[]
+  bundle.mainreporoot=$TESTTMP (default: )
+  censor.policy=abort
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no (default: False)
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.max-repo-cache=0
+  cmdserver.message-encodings=[]
+  cmdserver.track-log=[b'chgserver', b'cmdserver', b'repocache']
+  color.mode=auto
+  commands.commit.interactive.git=no (default: False)
+  commands.commit.interactive.ignoreblanklines=no (default: False)
+  commands.commit.interactive.ignorews=no (default: False)
+  commands.commit.interactive.ignorewsamount=no (default: False)
+  commands.commit.interactive.ignorewseol=no (default: False)
+  commands.commit.interactive.nobinary=no (default: False)
+  commands.commit.interactive.nodates=no (default: False)
+  commands.commit.interactive.noprefix=no (default: False)
+  commands.commit.interactive.showfunc=no (default: False)
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no (default: False)
+  commands.commit.post-status=no (default: False)
+  commands.grep.all-files=no (default: False)
+  commands.rebase.requiredest=no (default: False)
+  commands.resolve.confirm=no (default: False)
+  commands.resolve.explicit-re-merge=no (default: False)
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no (default: False)
+  commands.revert.interactive.ignoreblanklines=no (default: False)
+  commands.revert.interactive.ignorews=no (default: False)
+  commands.revert.interactive.ignorewsamount=no (default: False)
+  commands.revert.interactive.ignorewseol=no (default: False)
+  commands.revert.interactive.nobinary=no (default: False)
+  commands.revert.interactive.nodates=no (default: False)
+  commands.revert.interactive.noprefix=no (default: False)
+  commands.revert.interactive.showfunc=no (default: False)
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no (default: False)
+  commands.show.aliasprefix=[]
+  commands.status.relative=no (default: False)
+  commands.status.skipstates=[]
+  commands.status.terse=
+  commands.status.verbose=no (default: False)
+  commands.update.check=None
+  commands.update.requiredest=no (default: False)
+  convert.bzr.saverev=yes (default: True)
+  convert.cvsps.cache=yes (default: True)
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=[b'messagedifferent']
+  convert.git.extrakeys=[]
+  convert.git.findcopiesharder=no (default: False)
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes (default: True)
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no (default: False)
+  convert.hg.clonebranches=no (default: False)
+  convert.hg.ignoreerrors=no (default: False)
+  convert.hg.preserve-hash=no (default: False)
+  convert.hg.revs=None
+  convert.hg.saverev=no (default: False)
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes (default: True)
+  convert.ignoreancestorcheck=no (default: False)
+  convert.localtimezone=no (default: False)
+  convert.p4.startrev=0
+  convert.skiptags=no (default: False)
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes (default: True)
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  debug.dirstate.delaywrite=0
+  devel.all-warnings=yes (default: False)
+  devel.bundle.delta=
+  devel.bundle2.debug=no (default: False)
+  devel.cache-vfs=None
+  devel.check-locks=no (default: False)
+  devel.check-relroot=no (default: False)
+  devel.debug.copies=no (default: False)
+  devel.debug.extensions=no (default: False)
+  devel.debug.peer-request=no (default: False)
+  devel.default-date=0 0 

D6699: unshelve: abort on using --keep and --interactive together

2019-08-09 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16168.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6699?vs=16166=16168

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

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

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

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1456,3 +1456,8 @@
   record this change to 'bar2'?
   (enter ? for help) [Ynesfdaq?] y
   
+-- test for --interactive --keep
+  $ hg unshelve -i --keep
+  unshelving change 'default'
+  abort: --keep on interactive is not yet supported
+  [255]
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -967,6 +967,8 @@
 ui.status(_("unshelving change '%s'\n") % basename)
 else:
 basename = shelved[0]
+if interactive and opts.get('keep'):
+raise error.Abort(_('--keep on --interactive is not yet supported'))
 
 if not shelvedfile(repo, basename, patchextension).exists():
 raise error.Abort(_("shelved change '%s' not found") % basename)



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


D6699: unshelve: abort on using --keep and --interactive together

2019-08-09 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh edited the summary of this revision.
navaneeth.suresh retitled this revision from "tests: add test for unshelve 
--interactive --keep" to "unshelve: abort on using --keep and --interactive 
together".
navaneeth.suresh updated this revision to Diff 16166.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6699?vs=16145=16166

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

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

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

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1456,3 +1456,8 @@
   record this change to 'bar2'?
   (enter ? for help) [Ynesfdaq?] y
   
+-- test for --interactive --keep
+  $ hg unshelve -i --keep
+  unshelving change 'default'
+  abort: --keep on interactive is not yet supported
+  [255]
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -967,6 +967,8 @@
 ui.status(_("unshelving change '%s'\n") % basename)
 else:
 basename = shelved[0]
+if interactive and opts.get('keep'):
+raise error.Abort(_('--keep on interactive is not yet supported'))
 
 if not shelvedfile(repo, basename, patchextension).exists():
 raise error.Abort(_("shelved change '%s' not found") % basename)



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


D6709: config: add --registered flag to show all known configs

2019-08-08 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16165.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16164=16165

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-completion.t
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -224,3 +224,770 @@
   > done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=[]
+  bundle.mainreporoot=$TESTTMP (default: )
+  censor.policy=abort
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.max-repo-cache=0
+  cmdserver.message-encodings=[]
+  cmdserver.track-log=['chgserver', 'cmdserver', 'repocache']
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.grep.all-files=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=[]
+  commands.status.relative=no
+  commands.status.skipstates=[]
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=['messagedifferent']
+  convert.git.extrakeys=[]
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.ignoreancestorcheck=no
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  debug.dirstate.delaywrite=0
+  devel.all-warnings=yes (default: no)
+  devel.bundle.delta=
+  devel.bundle2.debug=no
+  devel.cache-vfs=None
+  devel.check-locks=no
+  devel.check-relroot=no
+  devel.debug.copies=no
+  devel.debug.extensions=no
+  devel.debug.peer-request=no
+  devel.default-date=0 0 (default: None)
+  devel.deprec-warn=no
+  devel.disableloaddefaultcerts=no
+  devel.legacy.exchange=[]
+  devel.servercafile=
+  devel.serverexactprotocol=
+  devel.serverrequirecert=no
+  devel.strip-obsmarkers=yes
+  devel.user.obsmarker=None
+  devel.warn-config=None
+  devel.warn-config-default=None
+  devel.warn-config-unknown=None
+  devel.warn-empty-changegroup=no
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=[]
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.chunkcachesize=None
+  format.dotencode=yes
+  format.generaldelta=no
+  format.internal-phase=no
+  format.manifestcachesize=None
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  

D6709: config: add --registered flag to show all known configs

2019-08-08 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.


  In D6709#98493 , @marmoute wrote:
  
  > In D6709#98479 , 
@navaneeth.suresh wrote:
  >
  >> @pulkit I couldn't figure out why the devel-warnings are coming. It's 
being shown for the following 
  >> items in `configitems.py`. IIUC, it should be visible when we are trying 
to read a config item which is
  >> not in the registered items.  But, we are iterating over registered items 
only.
  >
  > There are "generic" config option. So it does not hold the option "name", 
but a regexp to match valid entry.
  
  Fixed.
  
  >> @av6 If you have a strong opinion on replacing `True/False` with `yes/no`, 
I can do that.
  >
  > Not sure is @av6 has a strong opinion, but I do :-)
  
  Fixed this too. Sorry I was supposed to type @marmoute instead of @av6. My 
bad.

REPOSITORY
  rHG Mercurial

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

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

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


D6709: config: add --registered flag to show all known configs

2019-08-08 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16164.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16154=16164

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-completion.t
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -224,3 +224,770 @@
   > done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=no
+  annotate.ignoreblanklines=no
+  annotate.ignorews=no
+  annotate.ignorewsamount=no
+  annotate.ignorewseol=no
+  annotate.nobinary=no
+  annotate.nodates=no
+  annotate.noprefix=no
+  annotate.showfunc=no
+  annotate.unified=None
+  annotate.word-diff=no
+  auth.cookiefile=None
+  bookmarks.pushing=[]
+  bundle.mainreporoot=$TESTTMP (default: )
+  censor.policy=abort
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.max-repo-cache=0
+  cmdserver.message-encodings=[]
+  cmdserver.track-log=['chgserver', 'cmdserver', 'repocache']
+  color.mode=auto
+  commands.commit.interactive.git=no
+  commands.commit.interactive.ignoreblanklines=no
+  commands.commit.interactive.ignorews=no
+  commands.commit.interactive.ignorewsamount=no
+  commands.commit.interactive.ignorewseol=no
+  commands.commit.interactive.nobinary=no
+  commands.commit.interactive.nodates=no
+  commands.commit.interactive.noprefix=no
+  commands.commit.interactive.showfunc=no
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=no
+  commands.commit.post-status=no
+  commands.grep.all-files=no
+  commands.rebase.requiredest=no
+  commands.resolve.confirm=no
+  commands.resolve.explicit-re-merge=no
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=no
+  commands.revert.interactive.ignoreblanklines=no
+  commands.revert.interactive.ignorews=no
+  commands.revert.interactive.ignorewsamount=no
+  commands.revert.interactive.ignorewseol=no
+  commands.revert.interactive.nobinary=no
+  commands.revert.interactive.nodates=no
+  commands.revert.interactive.noprefix=no
+  commands.revert.interactive.showfunc=no
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=[]
+  commands.status.relative=no
+  commands.status.skipstates=[]
+  commands.status.terse=
+  commands.status.verbose=no
+  commands.update.check=None
+  commands.update.requiredest=no
+  convert.bzr.saverev=yes
+  convert.cvsps.cache=yes
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=['messagedifferent']
+  convert.git.extrakeys=[]
+  convert.git.findcopiesharder=no
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=yes
+  convert.git.similarity=50
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
+  convert.hg.revs=None
+  convert.hg.saverev=no
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=yes
+  convert.ignoreancestorcheck=no
+  convert.localtimezone=no
+  convert.p4.startrev=0
+  convert.skiptags=no
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=yes
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  debug.dirstate.delaywrite=0
+  devel.all-warnings=true (default: no)
+  devel.bundle.delta=
+  devel.bundle2.debug=no
+  devel.cache-vfs=None
+  devel.check-locks=no
+  devel.check-relroot=no
+  devel.debug.copies=no
+  devel.debug.extensions=no
+  devel.debug.peer-request=no
+  devel.default-date=0 0 (default: None)
+  devel.deprec-warn=no
+  devel.disableloaddefaultcerts=no
+  devel.legacy.exchange=[]
+  devel.servercafile=
+  devel.serverexactprotocol=
+  devel.serverrequirecert=no
+  devel.strip-obsmarkers=yes
+  devel.user.obsmarker=None
+  devel.warn-config=None
+  devel.warn-config-default=None
+  devel.warn-config-unknown=None
+  devel.warn-empty-changegroup=no
+  diff.git=no
+  diff.ignoreblanklines=no
+  diff.ignorews=no
+  diff.ignorewsamount=no
+  diff.ignorewseol=no
+  diff.nobinary=no
+  diff.nodates=no
+  diff.noprefix=no
+  diff.showfunc=no
+  diff.unified=None
+  diff.word-diff=no
+  email.bcc=None
+  email.cc=None
+  email.charsets=[]
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  email.to=None
+  format.bookmarks-in-store=no
+  format.chunkcachesize=None
+  format.dotencode=yes
+  format.generaldelta=no
+  format.internal-phase=no
+  format.manifestcachesize=None
+  format.obsstore-version=None
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  

D6709: config: add --registered flag to show all known configs

2019-08-08 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.


  @pulkit I couldn't figure out why the devel-warnings are coming. It's being 
shown for the following 
  items in `configitems.py`. IIUC, it should be visible when we are trying to 
read a config item which is
  not in the registered items.  But, we are iterating over registered items 
only.
  
coreconfigitem('help', br'hidden-command\..*',
default=False,
generic=True,
)
coreconfigitem('help', br'hidden-topic\..*',
default=False,
generic=True,
)
coreconfigitem('hostsecurity', '.*:fingerprints$',
default=list,
generic=True,
)
coreconfigitem('hostsecurity', '.*:verifycertsfile$',
default=None,
generic=True,
)
  
  Also, why would we want `walkregisteredconfig()` to return `section, name, 
value, defaultvalue` ?
  If we do that, then it would require modification in 
`ui.walkregisteredconfig()` and `commands.config()`.
  
  @av6 If you have a strong opinion on replacing `True/False` with `yes/no`, I 
can do that.

REPOSITORY
  rHG Mercurial

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

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

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


D6709: config: add --registered flag to show all known configs

2019-08-08 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16154.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16153=16154

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-completion.t
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -224,3 +224,824 @@
   > done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=False
+  annotate.ignoreblanklines=False
+  annotate.ignorews=False
+  annotate.ignorewsamount=False
+  annotate.ignorewseol=False
+  annotate.nobinary=False
+  annotate.nodates=False
+  annotate.noprefix=False
+  annotate.showfunc=False
+  annotate.unified=None
+  annotate.word-diff=False
+  auth.cookiefile=None
+  bookmarks.pushing=[]
+  bundle.mainreporoot=$TESTTMP (default: )
+  censor.policy=abort
+  chgserver.idletimeout=3600
+  chgserver.skiphash=False
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.max-repo-cache=0
+  cmdserver.message-encodings=[]
+  cmdserver.track-log=['chgserver', 'cmdserver', 'repocache']
+  color..*=None
+  color.mode=auto
+  commands.commit.interactive.git=False
+  commands.commit.interactive.ignoreblanklines=False
+  commands.commit.interactive.ignorews=False
+  commands.commit.interactive.ignorewsamount=False
+  commands.commit.interactive.ignorewseol=False
+  commands.commit.interactive.nobinary=False
+  commands.commit.interactive.nodates=False
+  commands.commit.interactive.noprefix=False
+  commands.commit.interactive.showfunc=False
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=False
+  commands.commit.post-status=False
+  commands.grep.all-files=False
+  commands.rebase.requiredest=False
+  commands.resolve.confirm=False
+  commands.resolve.explicit-re-merge=False
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=False
+  commands.revert.interactive.ignoreblanklines=False
+  commands.revert.interactive.ignorews=False
+  commands.revert.interactive.ignorewsamount=False
+  commands.revert.interactive.ignorewseol=False
+  commands.revert.interactive.nobinary=False
+  commands.revert.interactive.nodates=False
+  commands.revert.interactive.noprefix=False
+  commands.revert.interactive.showfunc=False
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=False
+  commands.show.aliasprefix=[]
+  commands.status.relative=False
+  commands.status.skipstates=[]
+  commands.status.terse=
+  commands.status.verbose=False
+  commands.update.check=None
+  commands.update.requiredest=False
+  committemplate..*=None
+  convert.bzr.saverev=True
+  convert.cvsps.cache=True
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=['messagedifferent']
+  convert.git.extrakeys=[]
+  convert.git.findcopiesharder=False
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=True
+  convert.git.similarity=50
+  convert.git.skipsubmodules=False
+  convert.hg.clonebranches=False
+  convert.hg.ignoreerrors=False
+  convert.hg.preserve-hash=False
+  convert.hg.revs=None
+  convert.hg.saverev=False
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=True
+  convert.ignoreancestorcheck=False
+  convert.localtimezone=False
+  convert.p4.startrev=0
+  convert.skiptags=False
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=True
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  debug.dirstate.delaywrite=0
+  defaults..*=None
+  devel.all-warnings=true (default: False)
+  devel.bundle.delta=
+  devel.bundle2.debug=False
+  devel.cache-vfs=None
+  devel.check-locks=False
+  devel.check-relroot=False
+  devel.debug.copies=False
+  devel.debug.extensions=False
+  devel.debug.peer-request=False
+  devel.default-date=0 0 (default: None)
+  devel.deprec-warn=False
+  devel.disableloaddefaultcerts=False
+  devel.legacy.exchange=[]
+  devel.servercafile=
+  devel.serverexactprotocol=
+  devel.serverrequirecert=False
+  devel.strip-obsmarkers=True
+  devel.user.obsmarker=None
+  devel.warn-config=None
+  devel.warn-config-default=None
+  devel.warn-config-unknown=None
+  devel.warn-empty-changegroup=False
+  diff.git=False
+  diff.ignoreblanklines=False
+  diff.ignorews=False
+  diff.ignorewsamount=False
+  diff.ignorewseol=False
+  diff.nobinary=False
+  diff.nodates=False
+  diff.noprefix=False
+  diff.showfunc=False
+  diff.unified=None
+  diff.word-diff=False
+  email.bcc=None
+  email.cc=None
+  email.charsets=[]
+  email.from=None
+  email.method=smtp
+  email.reply-to=None

D6709: config: add --registered flag to show all known configs

2019-08-08 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16153.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16119=16153

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-completion.t
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -224,3 +224,824 @@
   > done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --registered flag
+
+  $ hg showconfig --registered
+  annotate.git=False
+  annotate.ignoreblanklines=False
+  annotate.ignorews=False
+  annotate.ignorewsamount=False
+  annotate.ignorewseol=False
+  annotate.nobinary=False
+  annotate.nodates=False
+  annotate.noprefix=False
+  annotate.showfunc=False
+  annotate.unified=None
+  annotate.word-diff=False
+  auth.cookiefile=None
+  bookmarks.pushing=[]
+  bundle.mainreporoot=$TESTTMP (default=)
+  censor.policy=abort
+  chgserver.idletimeout=3600
+  chgserver.skiphash=False
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  cmdserver.max-repo-cache=0
+  cmdserver.message-encodings=[]
+  cmdserver.track-log=['chgserver', 'cmdserver', 'repocache']
+  color..*=None
+  color.mode=auto
+  commands.commit.interactive.git=False
+  commands.commit.interactive.ignoreblanklines=False
+  commands.commit.interactive.ignorews=False
+  commands.commit.interactive.ignorewsamount=False
+  commands.commit.interactive.ignorewseol=False
+  commands.commit.interactive.nobinary=False
+  commands.commit.interactive.nodates=False
+  commands.commit.interactive.noprefix=False
+  commands.commit.interactive.showfunc=False
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.word-diff=False
+  commands.commit.post-status=False
+  commands.grep.all-files=False
+  commands.rebase.requiredest=False
+  commands.resolve.confirm=False
+  commands.resolve.explicit-re-merge=False
+  commands.resolve.mark-check=none
+  commands.revert.interactive.git=False
+  commands.revert.interactive.ignoreblanklines=False
+  commands.revert.interactive.ignorews=False
+  commands.revert.interactive.ignorewsamount=False
+  commands.revert.interactive.ignorewseol=False
+  commands.revert.interactive.nobinary=False
+  commands.revert.interactive.nodates=False
+  commands.revert.interactive.noprefix=False
+  commands.revert.interactive.showfunc=False
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.word-diff=False
+  commands.show.aliasprefix=[]
+  commands.status.relative=False
+  commands.status.skipstates=[]
+  commands.status.terse=
+  commands.status.verbose=False
+  commands.update.check=None
+  commands.update.requiredest=False
+  committemplate..*=None
+  convert.bzr.saverev=True
+  convert.cvsps.cache=True
+  convert.cvsps.fuzz=60
+  convert.cvsps.logencoding=None
+  convert.cvsps.mergefrom=None
+  convert.cvsps.mergeto=None
+  convert.git.committeractions=['messagedifferent']
+  convert.git.extrakeys=[]
+  convert.git.findcopiesharder=False
+  convert.git.remoteprefix=remote
+  convert.git.renamelimit=400
+  convert.git.saverev=True
+  convert.git.similarity=50
+  convert.git.skipsubmodules=False
+  convert.hg.clonebranches=False
+  convert.hg.ignoreerrors=False
+  convert.hg.preserve-hash=False
+  convert.hg.revs=None
+  convert.hg.saverev=False
+  convert.hg.sourcename=None
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.usebranchnames=True
+  convert.ignoreancestorcheck=False
+  convert.localtimezone=False
+  convert.p4.startrev=0
+  convert.skiptags=False
+  convert.svn.branches=None
+  convert.svn.debugsvnlog=True
+  convert.svn.startrev=0
+  convert.svn.tags=None
+  convert.svn.trunk=None
+  debug.dirstate.delaywrite=0
+  defaults..*=None
+  devel.all-warnings=true (default=False)
+  devel.bundle.delta=
+  devel.bundle2.debug=False
+  devel.cache-vfs=None
+  devel.check-locks=False
+  devel.check-relroot=False
+  devel.debug.copies=False
+  devel.debug.extensions=False
+  devel.debug.peer-request=False
+  devel.default-date=0 0 (default=None)
+  devel.deprec-warn=False
+  devel.disableloaddefaultcerts=False
+  devel.legacy.exchange=[]
+  devel.servercafile=
+  devel.serverexactprotocol=
+  devel.serverrequirecert=False
+  devel.strip-obsmarkers=True
+  devel.user.obsmarker=None
+  devel.warn-config=None
+  devel.warn-config-default=None
+  devel.warn-config-unknown=None
+  devel.warn-empty-changegroup=False
+  diff.git=False
+  diff.ignoreblanklines=False
+  diff.ignorews=False
+  diff.ignorewsamount=False
+  diff.ignorewseol=False
+  diff.nobinary=False
+  diff.nodates=False
+  diff.noprefix=False
+  diff.showfunc=False
+  diff.unified=None
+  diff.word-diff=False
+  email.bcc=None
+  email.cc=None
+  email.charsets=[]
+  email.from=None
+  email.method=smtp
+  email.reply-to=None
+  

D6712: config: remove pycompat.bytestr() for defaultvalue

2019-08-07 Thread navaneeth.suresh (Navaneeth Suresh)
Closed by commit rHG049b2ac3252e: config: remove pycompat.bytestr() for 
defaultvalue (authored by navaneeth.suresh).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6712?vs=16148=16151

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

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

AFFECTED FILES
  mercurial/commands.py
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -70,7 +70,7 @@
   $ hg showconfig Section.KeY -Tjson
   [
{
-"defaultvalue": "None",
+"defaultvalue": null,
 "name": "Section.KeY",
 "source": "*.hgrc:*", (glob)
 "value": "Case Sensitive"
@@ -103,7 +103,7 @@
   $ hg config empty.source -Tjson
   [
{
-"defaultvalue": "None",
+"defaultvalue": null,
 "name": "empty.source",
 "source": "",
 "value": "value"
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1872,7 +1872,7 @@
 for section, name, value in ui.walkconfig(untrusted=untrusted):
 source = ui.configsource(section, name, untrusted)
 value = pycompat.bytestr(value)
-defaultvalue = pycompat.bytestr(ui.configdefault(section, name))
+defaultvalue = ui.configdefault(section, name)
 if fm.isplain():
 source = source or 'none'
 value = value.replace('\n', '\\n')



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


D6720: config: fix fm.data() handling of defaultvalue

2019-08-07 Thread navaneeth.suresh (Navaneeth Suresh)
Closed by commit rHG60789444acd6: config: fix fm.data() handling of 
defaultvalue (authored by navaneeth.suresh).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6720?vs=16150=16152

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

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

AFFECTED FILES
  mercurial/commands.py
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -57,11 +57,13 @@
   $ hg showconfig Section -Tjson
   [
{
+"defaultvalue": null,
 "name": "Section.KeY",
 "source": "*.hgrc:*", (glob)
 "value": "Case Sensitive"
},
{
+"defaultvalue": null,
 "name": "Section.key",
 "source": "*.hgrc:*", (glob)
 "value": "lower case"
@@ -77,8 +79,8 @@
}
   ]
   $ hg showconfig -Tjson | tail -7
-   },
{
+"defaultvalue": null,
 "name": "*", (glob)
 "source": "*", (glob)
 "value": "*" (glob)
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1882,10 +1882,11 @@
 fm.startitem()
 fm.condwrite(ui.debugflag, 'source', '%s: ', source)
 if uniquesel:
-fm.data(name=entryname, defaultvalue=defaultvalue)
+fm.data(name=entryname)
 fm.write('value', '%s\n', value)
 else:
 fm.write('name value', '%s=%s\n', entryname, value)
+fm.data(defaultvalue=defaultvalue)
 matched = True
 fm.end()
 if matched:



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


D6712: config: remove pycompat.bytestr() for defaultvalue

2019-08-07 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added a comment.


  In D6712#98424 , @pulkit wrote:
  
  > The `pycompat.bytestr()` was there for py3 compatibility, however removing 
it should be fine in this case. Can you make sure `test-config.t` passes with 
this patch on Python 3?
  
  Yes, `test-config.t` passes with this patch on py3.

REPOSITORY
  rHG Mercurial

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

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

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


D6720: config: fix fm.data() handling of defaultvalue

2019-08-07 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16150.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6720?vs=16149=16150

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

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

AFFECTED FILES
  mercurial/commands.py
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -57,11 +57,13 @@
   $ hg showconfig Section -Tjson
   [
{
+"defaultvalue": null,
 "name": "Section.KeY",
 "source": "*.hgrc:*", (glob)
 "value": "Case Sensitive"
},
{
+"defaultvalue": null,
 "name": "Section.key",
 "source": "*.hgrc:*", (glob)
 "value": "lower case"
@@ -77,8 +79,8 @@
}
   ]
   $ hg showconfig -Tjson | tail -7
-   },
{
+"defaultvalue": null,
 "name": "*", (glob)
 "source": "*", (glob)
 "value": "*" (glob)
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1882,10 +1882,11 @@
 fm.startitem()
 fm.condwrite(ui.debugflag, 'source', '%s: ', source)
 if uniquesel:
-fm.data(name=entryname, defaultvalue=defaultvalue)
+fm.data(name=entryname)
 fm.write('value', '%s\n', value)
 else:
 fm.write('name value', '%s=%s\n', entryname, value)
+fm.data(defaultvalue=defaultvalue)
 matched = True
 fm.end()
 if matched:



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


D6720: config: fix fm.data() handling of defaultvalue

2019-08-07 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added inline comments.

INLINE COMMENTS

> pulkit wrote in commands.py:1884
> A better fix will be to move `fm.data(name=entryname)` inside the if, i.e. 
> where it was before https://phab.mercurial-scm.org/D6704.
> 
> And add `fm.data(defaultvalue=...)` below the if-else which will also move 
> the `defaultvalue` to last in json output.

I did this but, couldn't see a difference in the test output.

REPOSITORY
  rHG Mercurial

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

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

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


D6720: config: fix defaultvalue template keyword (patch 2 of 2)

2019-08-07 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This is a follow-up patch to rHG51a2e3102db2 
. 
This moves
  `fm.data()` out of the if block in `commands.config()`.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/commands.py
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -57,11 +57,13 @@
   $ hg showconfig Section -Tjson
   [
{
+"defaultvalue": null,
 "name": "Section.KeY",
 "source": "*.hgrc:*", (glob)
 "value": "Case Sensitive"
},
{
+"defaultvalue": null,
 "name": "Section.key",
 "source": "*.hgrc:*", (glob)
 "value": "lower case"
@@ -77,8 +79,8 @@
}
   ]
   $ hg showconfig -Tjson | tail -7
-   },
{
+"defaultvalue": null,
 "name": "*", (glob)
 "source": "*", (glob)
 "value": "*" (glob)
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1881,8 +1881,8 @@
 continue
 fm.startitem()
 fm.condwrite(ui.debugflag, 'source', '%s: ', source)
+fm.data(name=entryname, defaultvalue=defaultvalue)
 if uniquesel:
-fm.data(name=entryname, defaultvalue=defaultvalue)
 fm.write('value', '%s\n', value)
 else:
 fm.write('name value', '%s=%s\n', entryname, value)



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


D6712: config: fix defaultvalue template keyword (patch 1 of 2)

2019-08-07 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh retitled this revision from "config: fix defaultvalue template 
keyword" to "config: fix defaultvalue template keyword (patch 1 of 2)".
navaneeth.suresh edited the summary of this revision.
navaneeth.suresh updated this revision to Diff 16148.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6712?vs=16144=16148

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

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

AFFECTED FILES
  mercurial/commands.py
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -70,7 +70,7 @@
   $ hg showconfig Section.KeY -Tjson
   [
{
-"defaultvalue": "None",
+"defaultvalue": null,
 "name": "Section.KeY",
 "source": "*.hgrc:*", (glob)
 "value": "Case Sensitive"
@@ -103,7 +103,7 @@
   $ hg config empty.source -Tjson
   [
{
-"defaultvalue": "None",
+"defaultvalue": null,
 "name": "empty.source",
 "source": "",
 "value": "value"
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1872,7 +1872,7 @@
 for section, name, value in ui.walkconfig(untrusted=untrusted):
 source = ui.configsource(section, name, untrusted)
 value = pycompat.bytestr(value)
-defaultvalue = pycompat.bytestr(ui.configdefault(section, name))
+defaultvalue = ui.configdefault(section, name)
 if fm.isplain():
 source = source or 'none'
 value = value.replace('\n', '\\n')



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


D6708: unshelve: clear shelvedstate and _finishunshelve() on partial unshelve

2019-08-06 Thread navaneeth.suresh (Navaneeth Suresh)
Closed by commit rHG6957f7b93e03: unshelve: clear shelvedstate and 
_finishunshelve() on partial unshelve (authored by navaneeth.suresh).
This revision was automatically updated to reflect the committed changes.

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D6708?vs=16146=16147#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6708?vs=16146=16147

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

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

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

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1239,6 +1239,7 @@
   > y
   > EOF
   unshelving change 'default'
+  temporarily committing pending changes (restore with 'hg unshelve --abort')
   rebasing shelved changes
   diff --git a/d b/d
   new file mode 100644
@@ -1250,6 +1251,10 @@
   record this change to 'd'?
   (enter ? for help) [Ynesfdaq?] y
   
+
+  $ hg status -v
+  A c
+  A d
   $ ls
   b
   c
@@ -1360,19 +1365,19 @@
 
 #if stripbased
   $ hg log -r 3:: -G
-  @  changeset:   5:506510493902
+  @  changeset:   5:f1d5f53e397b
   |  tag: tip
-  |  parent:  3:adfeba9a1ac4
+  |  parent:  3:e28fd7fa7938
   |  user:shelve@localhost
   |  date:Thu Jan 01 00:00:00 1970 +
   |  summary: changes to: add A to bars
   |
-  | @  changeset:   4:8b023952e29c
+  | @  changeset:   4:fe451a778c81
   |/   user:test
   |date:Thu Jan 01 00:00:00 1970 +
   |summary: add C to bars
   |
-  o  changeset:   3:adfeba9a1ac4
+  o  changeset:   3:e28fd7fa7938
   |  user:test
   ~  date:Thu Jan 01 00:00:00 1970 +
  summary: add A to bars
@@ -1413,13 +1418,13 @@
 
 #if stripbased
   $ hg log -r 3:: -G
-  @  changeset:   4:8b023952e29c
+  @  changeset:   4:fe451a778c81
   |  tag: tip
   |  user:test
   |  date:Thu Jan 01 00:00:00 1970 +
   |  summary: add C to bars
   |
-  o  changeset:   3:adfeba9a1ac4
+  o  changeset:   3:e28fd7fa7938
   |  user:test
   ~  date:Thu Jan 01 00:00:00 1970 +
  summary: add A to bars
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -1003,11 +1003,10 @@
 with ui.configoverride(overrides, 'unshelve'):
 mergefiles(ui, repo, pctx, shelvectx)
 restorebranch(ui, repo, branchtorestore)
+shelvedstate.clear(repo)
+_finishunshelve(repo, oldtiprev, tr, activebookmark)
 if not ispartialunshelve:
 _forgetunknownfiles(repo, shelvectx, addedbefore)
-
-shelvedstate.clear(repo)
-_finishunshelve(repo, oldtiprev, tr, activebookmark)
 unshelvecleanup(ui, repo, basename, opts)
 finally:
 if tr:



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


D6708: unshelve: clear shelvedstate and _finishunshelve() on partial unshelve

2019-08-06 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16146.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6708?vs=16141=16146

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

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

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

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1239,6 +1239,7 @@
   > y
   > EOF
   unshelving change 'default'
+  temporarily committing pending changes (restore with 'hg unshelve --abort')
   rebasing shelved changes
   diff --git a/d b/d
   new file mode 100644
@@ -1250,6 +1251,10 @@
   record this change to 'd'?
   (enter ? for help) [Ynesfdaq?] y
   
+
+  $ hg status -v
+  A c
+  A d
   $ ls
   b
   c
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -1002,11 +1002,10 @@
 with ui.configoverride(overrides, 'unshelve'):
 mergefiles(ui, repo, pctx, shelvectx)
 restorebranch(ui, repo, branchtorestore)
+shelvedstate.clear(repo)
+_finishunshelve(repo, oldtiprev, tr, activebookmark)
 if not ispartialunshelve:
 _forgetunknownfiles(repo, shelvectx, addedbefore)
-
-shelvedstate.clear(repo)
-_finishunshelve(repo, oldtiprev, tr, activebookmark)
 unshelvecleanup(ui, repo, basename, opts)
 finally:
 if tr:



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


D6699: tests: add test for unshelve --interactive --keep

2019-08-06 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16145.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6699?vs=16131=16145

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

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

AFFECTED FILES
  tests/test-shelve.t

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1451,3 +1451,33 @@
   record this change to 'bar2'?
   (enter ? for help) [Ynesfdaq?] y
   
+-- test for unshelve --interactive --keep
+  $ hg unshelve -i --keep < y
+  > y
+  > EOF
+  unshelving change 'default'
+  temporarily committing pending changes (restore with 'hg unshelve --abort')
+  rebasing shelved changes
+  diff --git a/foo b/foo
+  1 hunks, 1 lines changed
+  examine changes to 'foo'?
+  (enter ? for help) [Ynesfdaq?] y
+  
+  @@ -1,2 +1,3 @@
+   A
+   B
+  +C
+  record this change to 'foo'?
+  (enter ? for help) [Ynesfdaq?] y
+  
+  $ hg shelve --patch
+  default (*)*changes to: add B to foo (glob)
+  
+  diff --git a/foo b/foo
+  --- a/foo
+  +++ b/foo
+  @@ -1,2 +1,3 @@
+   A
+   B
+  +C



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


D6712: config: fix defaultvalue template keyword

2019-08-06 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16144.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6712?vs=16118=16144

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-config.t

CHANGE DETAILS

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -57,11 +57,13 @@
   $ hg showconfig Section -Tjson
   [
{
+"defaultvalue": null,
 "name": "Section.KeY",
 "source": "*.hgrc:*", (glob)
 "value": "Case Sensitive"
},
{
+"defaultvalue": null,
 "name": "Section.key",
 "source": "*.hgrc:*", (glob)
 "value": "lower case"
@@ -70,15 +72,15 @@
   $ hg showconfig Section.KeY -Tjson
   [
{
-"defaultvalue": "None",
+"defaultvalue": null,
 "name": "Section.KeY",
 "source": "*.hgrc:*", (glob)
 "value": "Case Sensitive"
}
   ]
   $ hg showconfig -Tjson | tail -7
-   },
{
+"defaultvalue": null,
 "name": "*", (glob)
 "source": "*", (glob)
 "value": "*" (glob)
@@ -103,7 +105,7 @@
   $ hg config empty.source -Tjson
   [
{
-"defaultvalue": "None",
+"defaultvalue": null,
 "name": "empty.source",
 "source": "",
 "value": "value"
@@ -170,15 +172,19 @@
 config affected by environment variables
 
   $ EDITOR=e1 VISUAL=e2 hg config --debug | grep 'ui\.editor'
+  config item requires an explicit default value: 'ui.editor'
   $VISUAL: ui.editor=e2
 
   $ VISUAL=e2 hg config --debug --config ui.editor=e3 | grep 'ui\.editor'
+  config item requires an explicit default value: 'ui.editor'
   --config: ui.editor=e3
 
   $ PAGER=p1 hg config --debug | grep 'pager\.pager'
+  config item requires an explicit default value: 'pager.pager'
   $PAGER: pager.pager=p1
 
   $ PAGER=p1 hg config --debug --config pager.pager=p2 | grep 'pager\.pager'
+  config item requires an explicit default value: 'pager.pager'
   --config: pager.pager=p2
 
 verify that aliases are evaluated as well
diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -792,7 +792,10 @@
 itemdefault = item.default()
 else:
 itemdefault = item.default
-return itemdefault
+if item.default is configitems.dynamicdefault:
+self.warn(_("config item requires an explicit default value: "
+"'%s.%s'\n" % (section, name)))
+return itemdefault
 
 def hasconfig(self, section, name, untrusted=False):
 return self._data(untrusted).hasitem(section, name)
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1876,7 +1876,7 @@
 for section, name, value in walkconfig:
 source = ui.configsource(section, name, untrusted)
 value = pycompat.bytestr(value)
-defaultvalue = pycompat.bytestr(ui.configdefault(section, name))
+defaultvalue = ui.configdefault(section, name)
 if fm.isplain():
 source = source or 'none'
 value = value.replace('\n', '\\n')
@@ -1885,8 +1885,8 @@
 continue
 fm.startitem()
 fm.condwrite(ui.debugflag, 'source', '%s: ', source)
+fm.data(name=entryname, defaultvalue=defaultvalue)
 if uniquesel:
-fm.data(name=entryname, defaultvalue=defaultvalue)
 fm.write('value', '%s\n', value)
 else:
 fm.write('name value', '%s=%s\n', entryname, value)



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


D6694: unshelve: delete shelvedstate after a successful unshelve --continue

2019-08-06 Thread navaneeth.suresh (Navaneeth Suresh)
Closed by commit rHG073cfff9aaef: unshelve: delete shelvedstate after a 
successful unshelve --continue (authored by navaneeth.suresh).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs 
Review".

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D6694?vs=16142=16143#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6694?vs=16142=16143

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

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

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

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1425,3 +1425,29 @@
  summary: add A to bars
   
 #endif
+
+  $ hg unshelve --continue
+  abort: no unshelve in progress
+  [255]
+
+  $ hg shelve --list
+  default-01  (*)* changes to: add A to bars (glob)
+  default (*)* changes to: add B to foo (glob)
+  $ hg unshelve -n default-01 -i < y
+  > y
+  > EOF
+  temporarily committing pending changes (restore with 'hg unshelve --abort')
+  rebasing shelved changes
+  diff --git a/bar2 b/bar2
+  1 hunks, 1 lines changed
+  examine changes to 'bar2'?
+  (enter ? for help) [Ynesfdaq?] y
+  
+  @@ -1,2 +1,3 @@
+   A
+  +B
+   C
+  record this change to 'bar2'?
+  (enter ? for help) [Ynesfdaq?] y
+  
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -750,8 +750,8 @@
 if not phases.supportinternal(repo):
 repair.strip(ui, repo, state.nodestoremove, backup=False,
  topic='shelve')
+shelvedstate.clear(repo)
 if not ispartialunshelve:
-shelvedstate.clear(repo)
 unshelvecleanup(ui, repo, state.name, opts)
 _restoreactivebookmark(repo, state.activebookmark)
 ui.status(_("unshelve of '%s' complete\n") % state.name)



To: navaneeth.suresh, #hg-reviewers, durin42, pulkit
Cc: durin42, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6694: unshelve: delete shelvedstate after a successful unshelve --continue

2019-08-06 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16142.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6694?vs=16133=16142

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

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

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

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1425,3 +1425,29 @@
  summary: add A to bars
   
 #endif
+
+  $ hg unshelve --continue
+  abort: no unshelve in progress
+  [255]
+
+  $ hg shelve --list
+  default-01  (*)*changes to: add A to bars (glob)
+  default (*)*changes to: add B to foo (glob)
+  $ hg unshelve -n default-01 -i < y
+  > y
+  > EOF
+  temporarily committing pending changes (restore with 'hg unshelve --abort')
+  rebasing shelved changes
+  diff --git a/bar2 b/bar2
+  1 hunks, 1 lines changed
+  examine changes to 'bar2'?
+  (enter ? for help) [Ynesfdaq?] y
+  
+  @@ -1,2 +1,3 @@
+   A
+  +B
+   C
+  record this change to 'bar2'?
+  (enter ? for help) [Ynesfdaq?] y
+  
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -750,8 +750,8 @@
 if not phases.supportinternal(repo):
 repair.strip(ui, repo, state.nodestoremove, backup=False,
  topic='shelve')
+shelvedstate.clear(repo)
 if not ispartialunshelve:
-shelvedstate.clear(repo)
 unshelvecleanup(ui, repo, state.name, opts)
 _restoreactivebookmark(repo, state.activebookmark)
 ui.status(_("unshelve of '%s' complete\n") % state.name)



To: navaneeth.suresh, #hg-reviewers, durin42, pulkit
Cc: durin42, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6694: unshelve: delete shelvedstate after a successful unshelve --continue

2019-08-06 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added inline comments.

INLINE COMMENTS

> pulkit wrote in test-shelve.t:1430
> the above sentence is confusing and maybe incorrect too.

okay, maybe i should remove it. doing that right away.

REPOSITORY
  rHG Mercurial

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

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

To: navaneeth.suresh, #hg-reviewers, durin42, pulkit
Cc: durin42, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6708: unshelve: clear shelvedstate and _finishunshelve() on partial unshelve

2019-08-06 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh added inline comments.

INLINE COMMENTS

> pulkit wrote in shelve.py:1008
> IIUC, we don't need `_forgetunknownfiles()` too in this if statement. Can you 
> add some related tests and see if we need this as a followup?

sure, will investigate on that.

REPOSITORY
  rHG Mercurial

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

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

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


D6708: unshelve: clear shelvedstate and _finishunshelve() on partial unshelve

2019-08-06 Thread navaneeth.suresh (Navaneeth Suresh)
navaneeth.suresh updated this revision to Diff 16141.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6708?vs=16112=16141

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

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

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

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1239,6 +1239,7 @@
   > y
   > EOF
   unshelving change 'default'
+  temporarily committing pending changes (restore with 'hg unshelve --abort')
   rebasing shelved changes
   diff --git a/d b/d
   new file mode 100644
@@ -1250,6 +1251,10 @@
   record this change to 'd'?
   (enter ? for help) [Ynesfdaq?] y
   
+
+  $ hg status -v
+  A c
+  A d
   $ ls
   b
   c
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -1002,11 +1002,10 @@
 with ui.configoverride(overrides, 'unshelve'):
 mergefiles(ui, repo, pctx, shelvectx)
 restorebranch(ui, repo, branchtorestore)
+shelvedstate.clear(repo)
+_finishunshelve(repo, oldtiprev, tr, activebookmark)
 if not ispartialunshelve:
 _forgetunknownfiles(repo, shelvectx, addedbefore)
-
-shelvedstate.clear(repo)
-_finishunshelve(repo, oldtiprev, tr, activebookmark)
 unshelvecleanup(ui, repo, basename, opts)
 finally:
 if tr:



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


D6686: unshelve: handle stripping changesets on interactive mode

2019-08-06 Thread navaneeth.suresh (Navaneeth Suresh)
Closed by commit rHG4814d993fe21: unshelve: handle stripping changesets on 
interactive mode (authored by navaneeth.suresh).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6686?vs=16108=16140

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

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

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

CHANGE DETAILS

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -1357,11 +1357,33 @@
   A
   B
   C
+
+#if stripbased
+  $ hg log -r 3:: -G
+  @  changeset:   5:506510493902
+  |  tag: tip
+  |  parent:  3:adfeba9a1ac4
+  |  user:shelve@localhost
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: changes to: add A to bars
+  |
+  | @  changeset:   4:8b023952e29c
+  |/   user:test
+  |date:Thu Jan 01 00:00:00 1970 +
+  |summary: add C to bars
+  |
+  o  changeset:   3:adfeba9a1ac4
+  |  user:test
+  ~  date:Thu Jan 01 00:00:00 1970 +
+ summary: add A to bars
+  
+#endif
+
   $ hg unshelve --continue < y
   > y
   > y
-  > y
+  > n
   > EOF
   diff --git a/bar1 b/bar1
   1 hunks, 1 lines changed
@@ -1385,6 +1407,21 @@
   +B
C
   record change 2/2 to 'bar2'?
-  (enter ? for help) [Ynesfdaq?] y
+  (enter ? for help) [Ynesfdaq?] n
   
   unshelve of 'default-01' complete
+
+#if stripbased
+  $ hg log -r 3:: -G
+  @  changeset:   4:8b023952e29c
+  |  tag: tip
+  |  user:test
+  |  date:Thu Jan 01 00:00:00 1970 +
+  |  summary: add C to bars
+  |
+  o  changeset:   3:adfeba9a1ac4
+  |  user:test
+  ~  date:Thu Jan 01 00:00:00 1970 +
+ summary: add A to bars
+  
+#endif
diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -747,10 +747,10 @@
 mergefiles(ui, repo, state.wctx, shelvectx)
 restorebranch(ui, repo, state.branchtorestore)
 
+if not phases.supportinternal(repo):
+repair.strip(ui, repo, state.nodestoremove, backup=False,
+ topic='shelve')
 if not ispartialunshelve:
-if not phases.supportinternal(repo):
-repair.strip(ui, repo, state.nodestoremove, backup=False,
-topic='shelve')
 shelvedstate.clear(repo)
 unshelvecleanup(ui, repo, state.name, opts)
 _restoreactivebookmark(repo, state.activebookmark)



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


  1   2   3   4   >