[Bug 5907] New: Cryptic revlog error in rebase

2018-06-04 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=5907

Bug ID: 5907
   Summary: Cryptic revlog error in rebase
   Product: Mercurial
   Version: 4.6
  Hardware: All
OS: All
Status: UNCONFIRMED
  Severity: bug
  Priority: normal
 Component: rebase
  Assignee: bugzi...@mercurial-scm.org
  Reporter: matt_harbi...@yahoo.com
CC: mercurial-devel@mercurial-scm.org

I just pulled from hg-committed tonight, went to rebase the leftovers, and got
this with 4.6 and evolve 8.0:

$ hg rebase -b . -d tip --traceback
Traceback (most recent call last):
  File "mercurial\scmutil.pyo", line 160, in callcatch
  File "mercurial\dispatch.pyo", line 341, in _runcatchfunc
  File "mercurial\dispatch.pyo", line 971, in _dispatch
  File "mercurial\dispatch.pyo", line 727, in runcommand
  File "mercurial\dispatch.pyo", line 979, in _runcommand
  File "mercurial\dispatch.pyo", line 968, in 
  File "mercurial\util.pyo", line 1553, in check
  File "mercurial\util.pyo", line 1553, in check
  File "C:/Users/Matt/Projects/hg-evolve/hgext3rd\evolve\__init__.py", line
793, in warnobserrors
  File "mercurial\util.pyo", line 1553, in check
  File "mercurial\util.pyo", line 1553, in check
  File "hgext\mq.pyo", line 3599, in mqcommand
  File "mercurial\util.pyo", line 1553, in check
  File "hgext\rebase.pyo", line 830, in rebase
  File "hgext\rebase.pyo", line 904, in _origrebase
  File "hgext\rebase.pyo", line 420, in _performrebase
  File "hgext\rebase.pyo", line 322, in _handleskippingobsolete
  File "hgext\rebase.pyo", line 1818, in _computeobsoletenotrebased
  File "hgext\rebase.pyo", line 1818, in 
RevlogError: RevlogError
abort: RevlogError!

I assume that this would work if I used -r or -s instead of -b, since I've
never seen this before.  `hg verify` says everything is OK.  The full graph in
this range looks like this:

$ hg log -r 44426:44436 -G --hidden
o  changeset:   44436:36ba5dba372d
|  parent:  44426:16f93a3b8b05
|  user:Sushil khanchi 
|  date:Wed May 30 14:20:09 2018 +0530
|  summary: advanceboundary: add dryrun parameter
|
| @  changeset:   44435:918bcbf7e619
| |  user:Matt Harbison 
| |  date:Sun Jun 03 01:16:49 2018 -0400
| |  instability: orphan
| |  summary: xxx-terse: don't terse away explicit paths (issue5724)
| |
| x  changeset:   44434:dccb37649baa
| |  user:Matt Harbison 
| |  date:Sat Jun 02 22:18:12 2018 -0400
| |  obsolete:rewritten as 44439:51e420a7a41a by Yuya Nishihara

| |  summary: cmdutil: use internal separators when building the terse list
| |
| x  changeset:   44433:c19516ec1321
| |  parent:  44427:e134101a72df
| |  user:Matt Harbison 
| |  date:Sat Jun 02 13:44:44 2018 -0400
| |  obsolete:rewritten using evolve as 44438:79c54e7c0c52 by Yuya
Nishihara 
| |  summary: rebase: prioritize indicating an interrupted rebase over
update (issue5838)
| |
| | x  changeset:   44432:a46a6e858b2a
| |/   parent:  44427:e134101a72df
| |user:Matt Harbison 
| |date:Sat Jun 02 13:44:44 2018 -0400
| |obsolete:reworded using amend as 44433:c19516ec1321
| |summary: rebase: prioritize indicating an interrupted rebase over
update (issue5838)
| |
| | x  changeset:   44431:e90f0e4a2ecd
| |/   parent:  44427:e134101a72df
| |user:Matt Harbison 
| |date:Sat Jun 02 13:44:44 2018 -0400
| |obsolete:rewritten using amend as 44432:a46a6e858b2a
| |summary: rebase: prioritize indicating an interrupted rebase over
update (issue5838)
| |
| | x  changeset:   44430:b7b7fba3f038
| | |  user:Matt Harbison 
| | |  date:Sun Jun 03 01:16:49 2018 -0400
| | |  obsolete:rebased using evolve as 44435:918bcbf7e619
| | |  summary: xxx-terse: don't terse away explicit paths (issue5724)
| | |
| | x  changeset:   44429:8f334d8b909c
| | |  user:Matt Harbison 
| | |  date:Sat Jun 02 22:18:12 2018 -0400
| | |  obsolete:rebased using evolve as 44434:dccb37649baa
| | |  summary: cmdutil: use internal separators when building the terse
list
| | |
| | x  changeset:   44428:64c9e910deec
| |/   user:Matt Harbison 
| |date:Sat Jun 02 13:44:44 2018 -0400
| |obsolete:amended using uncommit as 44431:e90f0e4a2ecd
| |summary: rebase: prioritize indicating an interrupted rebase over
update (issue5838)
| |
| x  changeset:   44427:e134101a72df
|/   user:Matt Harbison 
|date:Sat Jun 02 13:25:45 2018 -0400
|obsolete:rewritten using amend as 44437:712d6f535fc9 by Yuya Nishihara

|summary: tests: demonstrate inconsistent messaging around interrupted
rebases
|
o  changeset:   44426:16f93a3b8b05
|  parent:  44420:22edd5321489
~  user:Sangeet Kumar Mishra 
   date:Wed May 30 17:37:17 2018 +0530
   summary: grep: enable passing wdir as a 

mercurial@38182: 5 new changesets (5 on stable)

2018-06-04 Thread Mercurial Commits
5 new changesets (5 on stable) in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/3790efb388ca
changeset:   38178:3790efb388ca
branch:  stable
parent:  38040:a3b4ccbec269
user:Matt Harbison 
date:Thu May 31 09:19:09 2018 -0400
summary: lfs: bypass wrapped functions when reposetup() hasn't been called 
(issue5902)

https://www.mercurial-scm.org/repo/hg/rev/6fb76897e066
changeset:   38179:6fb76897e066
branch:  stable
user:Matt Harbison 
date:Thu May 31 22:11:47 2018 -0400
summary: hghave: avoid a deadlock reading the child process's output

https://www.mercurial-scm.org/repo/hg/rev/6ae62d62c3f6
changeset:   38180:6ae62d62c3f6
branch:  stable
user:Matt Harbison 
date:Thu May 31 22:15:52 2018 -0400
summary: tests: adapt test-check-pylint to run on Windows

https://www.mercurial-scm.org/repo/hg/rev/712d6f535fc9
changeset:   38181:712d6f535fc9
branch:  stable
user:Matt Harbison 
date:Sat Jun 02 13:25:45 2018 -0400
summary: tests: demonstrate inconsistent messaging around interrupted 
rebases

https://www.mercurial-scm.org/repo/hg/rev/79c54e7c0c52
changeset:   38182:79c54e7c0c52
branch:  stable
tag: tip
user:Matt Harbison 
date:Sat Jun 02 13:44:44 2018 -0400
summary: rebase: prioritize indicating an interrupted rebase over update 
(issue5838)

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


D3556: run-tests: update the test case name format

2018-06-04 Thread lothiraldan (Boris Feld)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb865bba56db1: run-tests: update the test case name format 
(authored by lothiraldan, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3556?vs=8868=8972

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

AFFECTED FILES
  tests/run-tests.py
  tests/test-run-tests.t

CHANGE DETAILS

diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t
--- a/tests/test-run-tests.t
+++ b/tests/test-run-tests.t
@@ -1496,9 +1496,9 @@
  $ [ $V = C ]
#endif
   
-  ERROR: test-cases-abc.t (case B) output changed
+  ERROR: test-cases-abc.t#B output changed
   !.
-  Failed test-cases-abc.t (case B): output changed
+  Failed test-cases-abc.t#B: output changed
   # Ran 3 tests, 0 skipped, 1 failed.
   python hash seed: * (glob)
   [1]
@@ -1519,9 +1519,9 @@
  $ [ $V = C ]
#endif
   
-  ERROR: test-cases-abc.t (case B) output changed
+  ERROR: test-cases-abc.t#B output changed
   !.
-  Failed test-cases-abc.t (case B): output changed
+  Failed test-cases-abc.t#B: output changed
   # Ran 2 tests, 0 skipped, 1 failed.
   python hash seed: * (glob)
   [1]
@@ -1544,9 +1544,9 @@
  $ [ $V = C ]
#endif
   
-  ERROR: test-cases-abc.t (case B) output changed
+  ERROR: test-cases-abc.t#B output changed
   !.
-  Failed test-cases-abc.t (case B): output changed
+  Failed test-cases-abc.t#B: output changed
   # Ran 2 tests, 0 skipped, 1 failed.
   python hash seed: * (glob)
   [1]
@@ -1573,7 +1573,7 @@
 
 Support running a specific test case
 
-  $ rt "test-cases-abc.t (case B)"
+  $ rt "test-cases-abc.t#B"
   
   --- $TESTTMP/anothertests/cases/test-cases-abc.t
   +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err
@@ -1587,16 +1587,16 @@
  $ [ $V = C ]
#endif
   
-  ERROR: test-cases-abc.t (case B) output changed
+  ERROR: test-cases-abc.t#B output changed
   !
-  Failed test-cases-abc.t (case B): output changed
+  Failed test-cases-abc.t#B: output changed
   # Ran 1 tests, 0 skipped, 1 failed.
   python hash seed: * (glob)
   [1]
 
 Support running multiple test cases in the same file
 
-  $ rt "test-cases-abc.t (case B)" "test-cases-abc.t (case C)"
+  $ rt test-cases-abc.t#B test-cases-abc.t#C
   
   --- $TESTTMP/anothertests/cases/test-cases-abc.t
   +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err
@@ -1610,16 +1610,16 @@
  $ [ $V = C ]
#endif
   
-  ERROR: test-cases-abc.t (case B) output changed
+  ERROR: test-cases-abc.t#B output changed
   !.
-  Failed test-cases-abc.t (case B): output changed
+  Failed test-cases-abc.t#B: output changed
   # Ran 2 tests, 0 skipped, 1 failed.
   python hash seed: * (glob)
   [1]
 
 Support running invalid test cases
 
-  $ rt "test-cases-abc.t (case B)" "test-cases-abc.t (case D)"
+  $ rt test-cases-abc.t#B test-cases-abc.t#D
   
   --- $TESTTMP/anothertests/cases/test-cases-abc.t
   +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err
@@ -1633,9 +1633,9 @@
  $ [ $V = C ]
#endif
   
-  ERROR: test-cases-abc.t (case B) output changed
+  ERROR: test-cases-abc.t#B output changed
   !
-  Failed test-cases-abc.t (case B): output changed
+  Failed test-cases-abc.t#B: output changed
   # Ran 1 tests, 0 skipped, 1 failed.
   python hash seed: * (glob)
   [1]
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -120,7 +120,7 @@
 }
 
 class TestRunnerLexer(lexer.RegexLexer):
-testpattern = r'[\w-]+\.(t|py)( \(case [\w-]+\))?'
+testpattern = r'[\w-]+\.(t|py)(#[\w-]+)?'
 tokens = {
 'root': [
 (r'^Skipped', token.Generic.Skipped, 'skipped'),
@@ -1247,7 +1247,7 @@
 self._allcases = parsettestcases(path)
 super(TTest, self).__init__(path, *args, **kwds)
 if case:
-self.name = '%s (case %s)' % (self.name, _strpath(case))
+self.name = '%s#%s' % (self.name, _strpath(case))
 self.errpath = b'%s.%s.err' % (self.errpath[:-4], case)
 self._tmpname += b'-%s' % case
 self._have = {}
@@ -2646,7 +2646,7 @@
 expanded_args.append(arg)
 args = expanded_args
 
-testcasepattern = re.compile(r'([\w-]+\.t|py)( \(case ([\w-])+\))')
+testcasepattern = re.compile(r'([\w-]+\.t|py)(#([\w-])+)')
 tests = []
 for t in args:
 case = None



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


D3555: run-tests: add support for running specific test cases

2018-06-04 Thread lothiraldan (Boris Feld)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG507bdc40bb17: run-tests: add support for running specific 
test cases (authored by lothiraldan, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3555?vs=8867=8971

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

AFFECTED FILES
  tests/run-tests.py
  tests/test-run-tests.t

CHANGE DETAILS

diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t
--- a/tests/test-run-tests.t
+++ b/tests/test-run-tests.t
@@ -1571,7 +1571,77 @@
   ..
   # Ran 2 tests, 0 skipped, 0 failed.
 
+Support running a specific test case
+
+  $ rt "test-cases-abc.t (case B)"
+  
+  --- $TESTTMP/anothertests/cases/test-cases-abc.t
+  +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err
+  @@ -7,7 +7,7 @@
+ $ V=C
+   #endif
+ $ echo $V | sed 's/A/C/'
+  -  C
+  +  B
+   #if C
+ $ [ $V = C ]
+   #endif
+  
+  ERROR: test-cases-abc.t (case B) output changed
+  !
+  Failed test-cases-abc.t (case B): output changed
+  # Ran 1 tests, 0 skipped, 1 failed.
+  python hash seed: * (glob)
+  [1]
+
+Support running multiple test cases in the same file
+
+  $ rt "test-cases-abc.t (case B)" "test-cases-abc.t (case C)"
+  
+  --- $TESTTMP/anothertests/cases/test-cases-abc.t
+  +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err
+  @@ -7,7 +7,7 @@
+ $ V=C
+   #endif
+ $ echo $V | sed 's/A/C/'
+  -  C
+  +  B
+   #if C
+ $ [ $V = C ]
+   #endif
+  
+  ERROR: test-cases-abc.t (case B) output changed
+  !.
+  Failed test-cases-abc.t (case B): output changed
+  # Ran 2 tests, 0 skipped, 1 failed.
+  python hash seed: * (glob)
+  [1]
+
+Support running invalid test cases
+
+  $ rt "test-cases-abc.t (case B)" "test-cases-abc.t (case D)"
+  
+  --- $TESTTMP/anothertests/cases/test-cases-abc.t
+  +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err
+  @@ -7,7 +7,7 @@
+ $ V=C
+   #endif
+ $ echo $V | sed 's/A/C/'
+  -  C
+  +  B
+   #if C
+ $ [ $V = C ]
+   #endif
+  
+  ERROR: test-cases-abc.t (case B) output changed
+  !
+  Failed test-cases-abc.t (case B): output changed
+  # Ran 1 tests, 0 skipped, 1 failed.
+  python hash seed: * (glob)
+  [1]
+
 Test automatic pattern replacement
+==
 
   $ cat << EOF >> common-pattern.py
   > substitutions = [
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -2646,16 +2646,31 @@
 expanded_args.append(arg)
 args = expanded_args
 
+testcasepattern = re.compile(r'([\w-]+\.t|py)( \(case ([\w-])+\))')
 tests = []
 for t in args:
+case = None
+
 if not (os.path.basename(t).startswith(b'test-')
 and (t.endswith(b'.py') or t.endswith(b'.t'))):
-continue
+
+m = testcasepattern.match(t)
+if m is not None:
+t, _, case = m.groups()
+else:
+continue
+
 if t.endswith(b'.t'):
 # .t file may contain multiple test cases
 cases = sorted(parsettestcases(t))
 if cases:
-tests += [{'path': t, 'case': c} for c in sorted(cases)]
+if case is not None and case in cases:
+tests += [{'path': t, 'case': case}]
+elif case is not None and case not in cases:
+# Ignore invalid cases
+pass
+else:
+tests += [{'path': t, 'case': c} for c in 
sorted(cases)]
 else:
 tests.append({'path': t})
 else:



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


Re: [PATCH 6 of 6] templater: always map over a wrapped object

2018-06-04 Thread Augie Fackler
On Mon, Jun 04, 2018 at 10:10:13PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara 
> # Date 1524298891 -32400
> #  Sat Apr 21 17:21:31 2018 +0900
> # Node ID c2ef13743679487c1963e5e8eecdab2799213194
> # Parent  481042701ff874ba7b8c6af18e4ef71f87f35c65
> templater: always map over a wrapped object

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


D3684: shelve: merge in obsshelve changes implemented at facebook

2018-06-04 Thread durin42 (Augie Fackler)
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  test-obsshelve.t could be merged with test-shelve.t at some point, but
  for now I want the comprehensive coverage. Note that obsshelve in
  hg-experimental is a fork of shelve, so we're just merging things back
  together. The path to graduation from experimental for obsshelve is to
  have a better solution around hiding revisions without creating a ton
  of markers that'll get exchanged. We've spent a fair amount of time
  talking about what that should look like, but in the interim the
  experimental-branded obsshelve is a good thing we should have in core.
  
  As a follow-up I'd like to make obsshelve a case of test-shelve.t, but
  I thought this would be easier for the initial import.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/shelve.py
  tests/test-obsshelve.t

CHANGE DETAILS

diff --git a/tests/test-obsshelve.t b/tests/test-obsshelve.t
new file mode 100644
--- /dev/null
+++ b/tests/test-obsshelve.t
@@ -0,0 +1,1597 @@
+  $ PYTHONPATH=$TESTDIR/..:$PYTHONPATH
+  $ export PYTHONPATH
+
+  $ cat <> $HGRCPATH
+  > [extensions]
+  > mq =
+  > shelve=
+  > [defaults]
+  > diff = --nodates --git
+  > qnew = --date '0 0'
+  > [shelve]
+  > maxbackups = 2
+  > [experimental]
+  > evolution=createmarkers
+  > EOF
+
+Make sure obs-based shelve can be used with an empty repo
+  $ cd $TESTTMP
+  $ hg init obsrepo
+  $ cd obsrepo
+  $ cat <> .hg/hgrc
+  > [experimental]
+  > obsshelve=True
+  > EOF
+
+  $ mkdir a b
+  $ echo a > a/a
+  $ echo b > b/b
+  $ echo c > c
+  $ echo d > d
+  $ echo x > x
+  $ hg addremove -q
+  $ hg shelve
+  shelved as default
+  0 files updated, 0 files merged, 5 files removed, 0 files unresolved
+  $ hg shelve --list
+  default (*s ago)(changes in empty repository) (glob)
+  $ hg revert --all
+  $ hg unshelve
+  unshelving change 'default'
+  $ hg diff
+  diff --git a/a/a b/a/a
+  new file mode 100644
+  --- /dev/null
+  +++ b/a/a
+  @@ -0,0 +1,1 @@
+  +a
+  diff --git a/b/b b/b/b
+  new file mode 100644
+  --- /dev/null
+  +++ b/b/b
+  @@ -0,0 +1,1 @@
+  +b
+  diff --git a/c b/c
+  new file mode 100644
+  --- /dev/null
+  +++ b/c
+  @@ -0,0 +1,1 @@
+  +c
+  diff --git a/d b/d
+  new file mode 100644
+  --- /dev/null
+  +++ b/d
+  @@ -0,0 +1,1 @@
+  +d
+  diff --git a/x b/x
+  new file mode 100644
+  --- /dev/null
+  +++ b/x
+  @@ -0,0 +1,1 @@
+  +x
+  $ hg ci -qm "initial commit"
+  $ hg shelve
+  nothing changed
+  [1]
+
+Make sure shelve files were backed up
+  $ ls .hg/shelve-backup
+  default.oshelve
+  default.patch
+
+Create an mq patch - shelving should work fine with a patch applied
+  $ echo n > n
+  $ hg add n
+  $ hg commit n -m second
+  $ hg qnew second.patch
+
+Shelve a change that we will delete later
+  $ echo a >> a/a
+  $ hg shelve
+  shelved as default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+Set up some more complex changes to shelve
+  $ echo a >> a/a
+  $ hg mv b b.rename
+  moving b/b to b.rename/b (glob)
+  $ hg cp c c.copy
+  $ hg status -C
+  M a/a
+  A b.rename/b
+b/b
+  A c.copy
+c
+  R b/b
+
+The common case - no options or filenames
+  $ hg shelve
+  shelved as default-01
+  2 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ hg status -C
+
+Ensure that our shelved changes exist
+  $ hg shelve -l
+  default-01  (*)* changes to: [mq]: second.patch (glob)
+  default (*)* changes to: [mq]: second.patch (glob)
+  $ hg shelve -l -p default
+  default (*)* changes to: [mq]: second.patch (glob)
+  
+  diff --git a/a/a b/a/a
+  --- a/a/a
+  +++ b/a/a
+  @@ -1,1 +1,2 @@
+   a
+  +a
+
+  $ hg shelve --list --addremove
+  abort: options '--list' and '--addremove' may not be used together
+  [255]
+
+Delete our older shelved change
+  $ hg shelve -d default
+  $ hg qfinish -a -q
+
+Ensure shelve backups aren't overwritten
+  $ ls .hg/shelve-backup/
+  default-1.oshelve
+  default-1.patch
+  default.oshelve
+  default.patch
+
+Local edits should not prevent a shelved change from applying
+  $ printf "z\na\n" > a/a
+  $ hg unshelve --keep
+  unshelving change 'default-01'
+  temporarily committing pending changes (restore with 'hg unshelve --abort')
+  rebasing shelved changes
+  rebasing 5:32c69314e062 "changes to: [mq]: second.patch"
+  merging a/a
+
+  $ hg revert --all -q
+  $ rm a/a.orig b.rename/b c.copy
+
+Apply it and make sure our state is as expected
+(this also tests that same timestamp prevents backups from being
+removed, even though there are more than 'maxbackups' backups)
+  $ f -t .hg/shelve-backup/default.patch
+  .hg/shelve-backup/default.patch: file
+  $ touch -t 2101 .hg/shelve-backup/default.patch
+  $ f -t .hg/shelve-backup/default-1.patch
+  .hg/shelve-backup/default-1.patch: file
+  $ touch -t 2101 .hg/shelve-backup/default-1.patch
+
+  $ 

[Bug 5906] New: AttributeError: 'filelog' object has no attribute '_getsegmentforrevs' in hg debugrevlog

2018-06-04 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=5906

Bug ID: 5906
   Summary: AttributeError: 'filelog' object has no attribute
'_getsegmentforrevs' in hg debugrevlog
   Product: Mercurial
   Version: 4.6
  Hardware: PC
OS: Linux
Status: UNCONFIRMED
  Severity: bug
  Priority: wish
 Component: Mercurial
  Assignee: bugzi...@mercurial-scm.org
  Reporter: z...@zash.se
CC: mercurial-devel@mercurial-scm.org

Running `hg debugrevlog somefile` gives the following traceback:

hg$ hg debugrevlog hg
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.13 (default, Nov 24 2017, 17:33:09) [GCC 6.3.0 20170516]
** Mercurial Distributed SCM (version 4.6)
** Extensions loaded: evolve, extdiff, fix, githelp, histedit, journal, purge,
rebase, releasenotes, relink, schemes, shelve, show, strip, transplant
Traceback (most recent call last):
  File "/usr/bin/hg", line 41, in 
dispatch.run()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 90, in
run
status = (dispatch(req) or 0)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 210, in
dispatch
ret = _runcatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 351, in
_runcatch
return _callcatch(ui, _runcatchfunc)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 359, in
_callcatch
return scmutil.callcatch(ui, func)
  File "/usr/lib/python2.7/dist-packages/mercurial/scmutil.py", line 160, in
callcatch
return func()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 341, in
_runcatchfunc
return _dispatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 971, in
_dispatch
cmdpats, cmdoptions)
  File "/usr/lib/python2.7/dist-packages/hgext/journal.py", line 90, in
runcommand
return orig(lui, repo, cmd, fullargs, *args)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 727, in
runcommand
ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 979, in
_runcommand
return cmdfunc()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 968, in

d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1553, in
check
return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/debugcommands.py", line
2047, in debugrevlog
segment = r._getsegmentforrevs(rev, rev)[1]
AttributeError: 'filelog' object has no attribute '_getsegmentforrevs'

Bisect says:

The first bad revision is:
changeset:   37514:1541e1a8e87d
user:Gregory Szorc 
date:Fri Apr 06 22:39:58 2018 -0700
summary: filelog: wrap revlog instead of inheriting it (API)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D3678: graft: correct documentation about options can be reapplied

2018-06-04 Thread pulkit (Pulkit Goyal)
pulkit added a comment.


  In https://phab.mercurial-scm.org/D3678#57916, @yuja wrote:
  
  > >   > Does it mean --currentuser and --currentdate aren't saved in the 
state file?
  > >   
  > >   Yes, options that are saved in state file are --user and --date. And 
--no-commit is going to be added in this list.
  >
  > Thanks.
  >
  > @pulkit, I think --currentuser/--currentdate can be the user/date of the
  >  interrupted graft session begun. No need to save them separately.
  
  
  Yes, we don't store them separately: 
https://www.mercurial-scm.org/repo/hg-committed/file/tip/mercurial/commands.py#l2337
  
  About this change in help, I am going to drop this note completely in 
https://phab.mercurial-scm.org/D3667 once --continue reapplies all the previous 
flags.

REPOSITORY
  rHG Mercurial

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

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


[PATCH 5 of 6] templater: consistently join() string-like object per character (BC)

2018-06-04 Thread Yuya Nishihara
# HG changeset patch
# User Yuya Nishihara 
# Date 1524298511 -32400
#  Sat Apr 21 17:15:11 2018 +0900
# Node ID 481042701ff874ba7b8c6af18e4ef71f87f35c65
# Parent  15bb4fc7c5d6190351bb891e29f612e749d1e2e5
templater: consistently join() string-like object per character (BC)

The old behavior was copied from join() of a lazy generator string, which
was unified to the behavior of join() of a byte string by the previous patch.
This patch fixes the mappable type to do the same.

diff --git a/mercurial/templateutil.py b/mercurial/templateutil.py
--- a/mercurial/templateutil.py
+++ b/mercurial/templateutil.py
@@ -189,12 +189,8 @@ class mappable(wrapped):
 yield self.tomap()
 
 def join(self, context, mapping, sep):
-# TODO: just copies the old behavior where a value was a generator
-# yielding one item, but reconsider about it. join() over a string
-# has no consistent result because a string may be a bytes, or a
-# generator yielding an item, or a generator yielding multiple items.
-# Preserving all of the current behaviors wouldn't make any sense.
-return self.show(context, mapping)
+w = makewrapped(context, mapping, self._value)
+return w.join(context, mapping, sep)
 
 def show(self, context, mapping):
 # TODO: switch gen to (context, mapping) API?
diff --git a/tests/test-command-template.t b/tests/test-command-template.t
--- a/tests/test-command-template.t
+++ b/tests/test-command-template.t
@@ -3242,12 +3242,12 @@ Test new-style inline templating of non-
   $ hg log -R latesttag -l1 -T '{max(revset("0:9")) % "{rev}:{node|short}\n"}'
   9:fbc7cd862e9c
 
-Test manifest/get() can be join()-ed as before, though it's silly:
-
-  $ hg log -R latesttag -r tip -T '{join(manifest, "")}\n'
-  11:2bc6e9006ce2
-  $ hg log -R latesttag -r tip -T '{join(get(extras, "branch"), "")}\n'
-  default
+Test manifest/get() can be join()-ed as string, though it's silly:
+
+  $ hg log -R latesttag -r tip -T '{join(manifest, ".")}\n'
+  1.1.:.2.b.c.6.e.9.0.0.6.c.e.2
+  $ hg log -R latesttag -r tip -T '{join(get(extras, "branch"), ".")}\n'
+  d.e.f.a.u.l.t
 
 Test join() over string
 
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH 4 of 6] templater: always join() over a wrapped object (BC)

2018-06-04 Thread Yuya Nishihara
# HG changeset patch
# User Yuya Nishihara 
# Date 1524297621 -32400
#  Sat Apr 21 17:00:21 2018 +0900
# Node ID 15bb4fc7c5d6190351bb891e29f612e749d1e2e5
# Parent  530b24e26effdc6f4611e444d8f41c6bf88e706b
templater: always join() over a wrapped object (BC)

This is a behavior change in a sense that join() of a byte string is no
longer "implementation dependent." Before, if a byte string was backed by
a lazy generator, join() would concatenate each chunk with the specified
separator, which seems wrong. The new behavior is always join() each byte.

TypeError on join() over uniterable is also fixed.

diff --git a/mercurial/templatefuncs.py b/mercurial/templatefuncs.py
--- a/mercurial/templatefuncs.py
+++ b/mercurial/templatefuncs.py
@@ -36,6 +36,7 @@ from .utils import (
 )
 
 evalrawexp = templateutil.evalrawexp
+evalwrapped = templateutil.evalwrapped
 evalfuncarg = templateutil.evalfuncarg
 evalboolean = templateutil.evalboolean
 evaldate = templateutil.evaldate
@@ -327,17 +328,11 @@ def join(context, mapping, args):
 # i18n: "join" is a keyword
 raise error.ParseError(_("join expects one or two arguments"))
 
-joinset = evalrawexp(context, mapping, args[0])
+joinset = evalwrapped(context, mapping, args[0])
 joiner = " "
 if len(args) > 1:
 joiner = evalstring(context, mapping, args[1])
-if isinstance(joinset, templateutil.wrapped):
-return joinset.join(context, mapping, joiner)
-# TODO: rethink about join() of a byte string, which had no defined
-# behavior since a string may be either a bytes or a generator.
-# TODO: fix type error on join() of non-iterable
-joinset = templateutil.unwrapvalue(context, mapping, joinset)
-return templateutil.joinitems(pycompat.maybebytestr(joinset), joiner)
+return joinset.join(context, mapping, joiner)
 
 @templatefunc('label(label, expr)')
 def label(context, mapping, args):
diff --git a/tests/test-command-template.t b/tests/test-command-template.t
--- a/tests/test-command-template.t
+++ b/tests/test-command-template.t
@@ -3249,6 +3249,17 @@ Test manifest/get() can be join()-ed as 
   $ hg log -R latesttag -r tip -T '{join(get(extras, "branch"), "")}\n'
   default
 
+Test join() over string
+
+  $ hg log -R latesttag -r tip -T '{join(rev|stringify, ".")}\n'
+  1.1
+
+Test join() over uniterable
+
+  $ hg log -R latesttag -r tip -T '{join(rev, "")}\n'
+  hg: parse error: 11 is not iterable
+  [255]
+
 Test min/max of integers
 
   $ hg log -R latesttag -l1 -T '{min(revset("9:10"))}\n'
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH 6 of 6] templater: always map over a wrapped object

2018-06-04 Thread Yuya Nishihara
# HG changeset patch
# User Yuya Nishihara 
# Date 1524298891 -32400
#  Sat Apr 21 17:21:31 2018 +0900
# Node ID c2ef13743679487c1963e5e8eecdab2799213194
# Parent  481042701ff874ba7b8c6af18e4ef71f87f35c65
templater: always map over a wrapped object

_checkeditermaps() is no longer necessary as the hgweb issue was resolved.

diff --git a/mercurial/templateutil.py b/mercurial/templateutil.py
--- a/mercurial/templateutil.py
+++ b/mercurial/templateutil.py
@@ -643,20 +643,6 @@ def _formatfiltererror(arg, filt):
 return (_("template filter '%s' is not compatible with keyword '%s'")
 % (fn, sym))
 
-def _checkeditermaps(darg, d):
-try:
-for v in d:
-if not isinstance(v, dict):
-raise TypeError
-yield v
-except TypeError:
-sym = findsymbolicname(darg)
-if sym:
-raise error.ParseError(_("keyword '%s' is not iterable of 
mappings")
-   % sym)
-else:
-raise error.ParseError(_("%r is not iterable of mappings") % d)
-
 def _iteroverlaymaps(context, origmapping, newmappings):
 """Generate combined mappings from the original mapping and an iterable
 of partial mappings to override the original"""
@@ -665,23 +651,14 @@ def _iteroverlaymaps(context, origmappin
 lm['index'] = i
 yield lm
 
-def _applymap(context, mapping, diter, targ):
-for lm in _iteroverlaymaps(context, mapping, diter):
+def _applymap(context, mapping, d, targ):
+for lm in _iteroverlaymaps(context, mapping, d.itermaps(context)):
 yield evalrawexp(context, lm, targ)
 
 def runmap(context, mapping, data):
 darg, targ = data
-d = evalrawexp(context, mapping, darg)
-# TODO: a generator should be rejected because it is a thunk of lazy
-# string, but we can't because hgweb abuses generator as a keyword
-# that returns a list of dicts.
-# TODO: drop _checkeditermaps() and pass 'd' to mappedgenerator so it
-# can be restarted.
-if isinstance(d, wrapped):
-diter = d.itermaps(context)
-else:
-diter = _checkeditermaps(darg, d)
-return mappedgenerator(_applymap, args=(mapping, diter, targ))
+d = evalwrapped(context, mapping, darg)
+return mappedgenerator(_applymap, args=(mapping, d, targ))
 
 def runmember(context, mapping, data):
 darg, memb = data
diff --git a/tests/test-command-template.t b/tests/test-command-template.t
--- a/tests/test-command-template.t
+++ b/tests/test-command-template.t
@@ -3212,7 +3212,7 @@ Test new-style inline templating:
   
 
   $ hg log -R latesttag -r tip -T '{rev % "a"}\n'
-  hg: parse error: keyword 'rev' is not iterable of mappings
+  hg: parse error: 11 is not iterable of mappings
   [255]
   $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n'
   hg: parse error: None is not iterable of mappings
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH 3 of 6] templater: add wrapped types for pure non-list/dict values

2018-06-04 Thread Yuya Nishihara
# HG changeset patch
# User Yuya Nishihara 
# Date 1521557786 -32400
#  Tue Mar 20 23:56:26 2018 +0900
# Node ID 530b24e26effdc6f4611e444d8f41c6bf88e706b
# Parent  39d5832512a0495480068c761a9e081230aac737
templater: add wrapped types for pure non-list/dict values

These wrapper types will allow us to get rid of some isinstance() business.

A bytes object needs to support sequence-like operations (e.g. join(),
ifcontains(), etc.) That's why we have two wrapper classes.

Tests will be added later.

diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -32,6 +32,9 @@ None
 True, False, int, float
 can be stringified as such.
 
+wrappedbytes, wrappedvalue
+a wrapper for the above printable types.
+
 date tuple
 a (unixtime, offset) tuple, which produces no meaningful output by itself.
 
diff --git a/mercurial/templateutil.py b/mercurial/templateutil.py
--- a/mercurial/templateutil.py
+++ b/mercurial/templateutil.py
@@ -66,6 +66,44 @@ class wrapped(object):
 A returned value must be serializable by templaterfilters.json().
 """
 
+class wrappedbytes(wrapped):
+"""Wrapper for byte string"""
+
+def __init__(self, value):
+self._value = value
+
+def itermaps(self, context):
+raise error.ParseError(_('%r is not iterable of mappings')
+   % pycompat.bytestr(self._value))
+
+def join(self, context, mapping, sep):
+return joinitems(pycompat.iterbytestr(self._value), sep)
+
+def show(self, context, mapping):
+return self._value
+
+def tovalue(self, context, mapping):
+return self._value
+
+class wrappedvalue(wrapped):
+"""Generic wrapper for pure non-list/dict/bytes value"""
+
+def __init__(self, value):
+self._value = value
+
+def itermaps(self, context):
+raise error.ParseError(_('%r is not iterable of mappings')
+   % self._value)
+
+def join(self, context, mapping, sep):
+raise error.ParseError(_('%r is not iterable') % self._value)
+
+def show(self, context, mapping):
+return pycompat.bytestr(self._value)
+
+def tovalue(self, context, mapping):
+return self._value
+
 # stub for representing a date type; may be a real date type that can
 # provide a readable string value
 class date(object):
@@ -447,6 +485,20 @@ def evalrawexp(context, mapping, arg):
 func, data = arg
 return func(context, mapping, data)
 
+def evalwrapped(context, mapping, arg):
+"""Evaluate given argument to wrapped object"""
+thing = evalrawexp(context, mapping, arg)
+return makewrapped(context, mapping, thing)
+
+def makewrapped(context, mapping, thing):
+"""Lift object to a wrapped type"""
+if isinstance(thing, wrapped):
+return thing
+thing = _unthunk(context, mapping, thing)
+if isinstance(thing, bytes):
+return wrappedbytes(thing)
+return wrappedvalue(thing)
+
 def evalfuncarg(context, mapping, arg):
 """Evaluate given argument as value type"""
 return unwrapvalue(context, mapping, evalrawexp(context, mapping, arg))
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH 2 of 6] templater: unify unwrapvalue() with _unwrapvalue()

2018-06-04 Thread Yuya Nishihara
# HG changeset patch
# User Yuya Nishihara 
# Date 1522843574 -32400
#  Wed Apr 04 21:06:14 2018 +0900
# Node ID 39d5832512a0495480068c761a9e081230aac737
# Parent  8cb8d0883f5f839ff66462f718f895e0d107ac34
templater: unify unwrapvalue() with _unwrapvalue()

All weird generators got removed from the hgweb codebase. We still have
inconsistent behavior regarding join() of a byte string, which will be
addressed later.

diff --git a/mercurial/templatefuncs.py b/mercurial/templatefuncs.py
--- a/mercurial/templatefuncs.py
+++ b/mercurial/templatefuncs.py
@@ -333,8 +333,9 @@ def join(context, mapping, args):
 joiner = evalstring(context, mapping, args[1])
 if isinstance(joinset, templateutil.wrapped):
 return joinset.join(context, mapping, joiner)
-# TODO: perhaps a generator should be stringify()-ed here, but we can't
-# because hgweb abuses it as a keyword that returns a list of dicts.
+# TODO: rethink about join() of a byte string, which had no defined
+# behavior since a string may be either a bytes or a generator.
+# TODO: fix type error on join() of non-iterable
 joinset = templateutil.unwrapvalue(context, mapping, joinset)
 return templateutil.joinitems(pycompat.maybebytestr(joinset), joiner)
 
diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -26,9 +26,6 @@ generator
 values of any printable types, and  will be folded by ``stringify()``
 or ``flatten()``.
 
-BUG: hgweb overloads this type for mappings (i.e. some hgweb keywords
-returns a generator of dicts.)
-
 None
 sometimes represents an empty value, which can be stringified to ''.
 
diff --git a/mercurial/templateutil.py b/mercurial/templateutil.py
--- a/mercurial/templateutil.py
+++ b/mercurial/templateutil.py
@@ -285,12 +285,6 @@ def unwraphybrid(context, mapping, thing
 return thing
 return thing.show(context, mapping)
 
-def unwrapvalue(context, mapping, thing):
-"""Move the inner value object out of the wrapper"""
-if not isinstance(thing, wrapped):
-return thing
-return thing.tovalue(context, mapping)
-
 def wraphybridvalue(container, key, value):
 """Wrap an element of hybrid container to be mappable
 
@@ -455,12 +449,10 @@ def evalrawexp(context, mapping, arg):
 
 def evalfuncarg(context, mapping, arg):
 """Evaluate given argument as value type"""
-return _unwrapvalue(context, mapping, evalrawexp(context, mapping, arg))
+return unwrapvalue(context, mapping, evalrawexp(context, mapping, arg))
 
-# TODO: unify this with unwrapvalue() once the bug of templatefunc.join()
-# is fixed. we can't do that right now because join() has to take a generator
-# of byte strings as it is, not a lazy byte string.
-def _unwrapvalue(context, mapping, thing):
+def unwrapvalue(context, mapping, thing):
+"""Move the inner value object out of the wrapper"""
 if isinstance(thing, wrapped):
 return thing.tovalue(context, mapping)
 # evalrawexp() may return string, generator of strings or arbitrary object
@@ -492,7 +484,7 @@ def evaldate(context, mapping, arg, err=
 return unwrapdate(context, mapping, thing, err)
 
 def unwrapdate(context, mapping, thing, err=None):
-thing = _unwrapvalue(context, mapping, thing)
+thing = unwrapvalue(context, mapping, thing)
 try:
 return dateutil.parsedate(thing)
 except AttributeError:
@@ -507,7 +499,7 @@ def evalinteger(context, mapping, arg, e
 return unwrapinteger(context, mapping, thing, err)
 
 def unwrapinteger(context, mapping, thing, err=None):
-thing = _unwrapvalue(context, mapping, thing)
+thing = unwrapvalue(context, mapping, thing)
 try:
 return int(thing)
 except (TypeError, ValueError):
@@ -527,7 +519,7 @@ def evalstringliteral(context, mapping, 
 return stringify(context, mapping, thing)
 
 _unwrapfuncbytype = {
-None: _unwrapvalue,
+None: unwrapvalue,
 bytes: stringify,
 date: unwrapdate,
 int: unwrapinteger,
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH 1 of 6] templater: inline unwrapvalue()

2018-06-04 Thread Yuya Nishihara
# HG changeset patch
# User Yuya Nishihara 
# Date 1522843281 -32400
#  Wed Apr 04 21:01:21 2018 +0900
# Node ID 8cb8d0883f5f839ff66462f718f895e0d107ac34
# Parent  ee1f052b45efa0b35abc9b4f40b476bff10de772
templater: inline unwrapvalue()

The current unwrapvalue() will be superseded by _unwrapvalue().

Note that _unwrapvalue() can simply return thing.tovalue() if thing is a
wrapped object. That's because tovalue() is guaranteed to not return a
generator of strings.

diff --git a/mercurial/templateutil.py b/mercurial/templateutil.py
--- a/mercurial/templateutil.py
+++ b/mercurial/templateutil.py
@@ -461,7 +461,8 @@ def evalfuncarg(context, mapping, arg):
 # is fixed. we can't do that right now because join() has to take a generator
 # of byte strings as it is, not a lazy byte string.
 def _unwrapvalue(context, mapping, thing):
-thing = unwrapvalue(context, mapping, thing)
+if isinstance(thing, wrapped):
+return thing.tovalue(context, mapping)
 # evalrawexp() may return string, generator of strings or arbitrary object
 # such as date tuple, but filter does not want generator.
 return _unthunk(context, mapping, thing)
@@ -476,7 +477,8 @@ def evalboolean(context, mapping, arg):
 thing = stringutil.parsebool(data)
 else:
 thing = func(context, mapping, data)
-thing = unwrapvalue(context, mapping, thing)
+if isinstance(thing, wrapped):
+thing = thing.tovalue(context, mapping)
 if isinstance(thing, bool):
 return thing
 # other objects are evaluated as strings, which means 0 is True, but
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D3678: graft: correct documentation about options can be reapplied

2018-06-04 Thread yuja (Yuya Nishihara)
yuja added a subscriber: pulkit.
yuja added a comment.


  >   > Does it mean --currentuser and --currentdate aren't saved in the state 
file?
  >   
  >   Yes, options that are saved in state file are --user and --date. And 
--no-commit is going to be added in this list.
  
  Thanks.
  
  @pulkit, I think --currentuser/--currentdate can be the user/date of the
  interrupted graft session begun. No need to save them separately.

REPOSITORY
  rHG Mercurial

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

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


Re: D3678: graft: correct documentation about options can be reapplied

2018-06-04 Thread Yuya Nishihara
>   > Does it mean --currentuser and --currentdate aren't saved in the state 
> file?
>   
>   Yes, options that are saved in state file are --user and --date. And 
> --no-commit is going to be added in this list.

Thanks.

@pulkit, I think --currentuser/--currentdate can be the user/date of the
interrupted graft session begun. No need to save them separately.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D3678: graft: correct documentation about options can be reapplied

2018-06-04 Thread khanchi97 (Sushil khanchi)
khanchi97 added a comment.


  In https://phab.mercurial-scm.org/D3678#57907, @yuja wrote:
  
  > Queued per review, thanks.
  >
  > >   The -c/--continue option does not reapply earlier options, except
  > > 
  > > - for --force. +   for --force, --user and --date.
  >
  > Does it mean --currentuser and --currentdate aren't saved in the state file?
  
  
  Yes, options that are saved in state file are --user and --date. And 
--no-commit is going to be added in this list.

REPOSITORY
  rHG Mercurial

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

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


D3649: serve: add option print-url

2018-06-04 Thread av6 (Anton Shestakov)
av6 added a comment.


  In https://phab.mercurial-scm.org/D3649#57901, @nspanti-logilab wrote:
  
  > Could you describe tests that you would like?
  
  
  For example, some that check that url is correct and is printed on stdout and 
not stderr, maybe also that it is printed when --port is specified (unlike 
"listening at" line). Doesn't have to be a lot, just some usage of this new 
command line switch in the tests. For inspiration, there are examples in 
test-hgwebdir.t, lines 1414 and 1431.

REPOSITORY
  rHG Mercurial

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

To: nspanti-logilab, #hg-reviewers, durin42
Cc: KelvinTot, av6, yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D3678: graft: correct documentation about options can be reapplied

2018-06-04 Thread khanchi97 (Sushil khanchi)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGad50f0399e1e: graft: correct documentation about options 
can be reapplied (authored by khanchi97, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3678?vs=8952=8964

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

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
@@ -2164,7 +2164,7 @@
 .. note::
 
The -c/--continue option does not reapply earlier options, except
-   for --force.
+   for --force, --user and --date.
 
 .. container:: verbose
 



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


D3679: configitems: drop the deprecated alias for commands.update.check

2018-06-04 Thread pulkit (Pulkit Goyal)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGee1f052b45ef: configitems: drop the deprecated alias for 
commands.update.check (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3679?vs=8956=8965

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

AFFECTED FILES
  mercurial/configitems.py

CHANGE DETAILS

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -201,8 +201,6 @@
 )
 coreconfigitem('commands', 'update.check',
 default=None,
-# Deprecated, remove after 4.4 release
-alias=[('experimental', 'updatecheck')]
 )
 coreconfigitem('commands', 'update.requiredest',
 default=False,



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


D3678: graft: correct documentation about options can be reapplied

2018-06-04 Thread yuja (Yuya Nishihara)
yuja added a comment.


  Queued per review, thanks.
  
  >   The -c/--continue option does not reapply earlier options, except
  > 
  > - for --force. +   for --force, --user and --date.
  
  Does it mean --currentuser and --currentdate aren't saved in the state file?

REPOSITORY
  rHG Mercurial

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

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


Re: D3678: graft: correct documentation about options can be reapplied

2018-06-04 Thread Yuya Nishihara
Queued per review, thanks.

> The -c/--continue option does not reapply earlier options, except
> -   for --force.
> +   for --force, --user and --date.

Does it mean --currentuser and --currentdate aren't saved in the state file?
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: D3649: serve: add option print-url

2018-06-04 Thread Yuya Nishihara
(resend because I forgot to remove the Phab shit, sorry for the noise.)

>   > It's surprising that `hg serve --print-url` spawns a daemon process!
>   
>   If it does not launch a daemon process, the procress caller (`xdg-open`, 
> `midori`, `firefox`, etc.) waits the end of the stream to launch, so it waits 
> that the `hg serve` procress ends!

You can just run `hg serve -d --print-url`.

The option could be named as `--daemon-print-url` if we needed such big
red switch, but I don't think that makes sense.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D3649: serve: add option print-url

2018-06-04 Thread yuja (Yuya Nishihara)
yuja added a comment.


  (resend because I forgot to remove the Phab shit, sorry for the noise.)
  
  >   > It's surprising that `hg serve --print-url` spawns a daemon process!
  >   
  >   If it does not launch a daemon process, the procress caller (`xdg-open`, 
`midori`, `firefox`, etc.) waits the end of the stream to launch, so it waits 
that the `hg serve` procress ends!
  
  You can just run `hg serve -d --print-url`.
  
  The option could be named as `--daemon-print-url` if we needed such big
  red switch, but I don't think that makes sense.

REPOSITORY
  rHG Mercurial

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

To: nspanti-logilab, #hg-reviewers, durin42
Cc: KelvinTot, av6, yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: D3649: serve: add option print-url

2018-06-04 Thread Yuya Nishihara
On Mon, 4 Jun 2018 09:34:19 +, nspanti-logilab (Nicola Spanti) wrote:
>   > It's surprising that `hg serve --print-url` spawns a daemon process!
>   
>   If it does not launch a daemon process, the procress caller (`xdg-open`, 
> `midori`, `firefox`, etc.) waits the end of the stream to launch, so it waits 
> that the `hg serve` procress ends!

You can just run `hg serve -d --print-url`.

The option could be named as `--daemon-print-url` if we needed such big
red switch, but I don't think that makes sense.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH] cmdutil: use internal separators when building the terse list

2018-06-04 Thread Yuya Nishihara
On Sun, 03 Jun 2018 18:45:15 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison 
> # Date 1527992292 14400
> #  Sat Jun 02 22:18:12 2018 -0400
> # Node ID dccb37649baadaa2682c4ce15d908b0f372348a8
> # Parent  c19516ec13215f08d30dcb30765e64abf8ba4d69
> cmdutil: use internal separators when building the terse list

Queued. Thanks for cleaning up things.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH 1 of 2 V2 stable?] tests: demonstrate inconsistent messaging around interrupted rebases

2018-06-04 Thread Yuya Nishihara
On Sun, 03 Jun 2018 18:44:13 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison 
> # Date 1527960345 14400
> #  Sat Jun 02 13:25:45 2018 -0400
> # Node ID e134101a72dfe7fb4d6a90a35bfa2103f76d07c8
> # Parent  16f93a3b8b05aae9391f26a8b908bfa716456757
> tests: demonstrate inconsistent messaging around interrupted rebases

Queued, thanks.

> +New operations are blocked with the correct state message
> +
> +  $ find .hg -name '*state' -prune
> +  .hg/dirstate
> +  .hg/merge/state
> +  .hg/rebasestate
> +  .hg/undo.backup.dirstate
> +  .hg/undo.dirstate
> +  .hg/updatestate

The order is unstable. Added '| sort' in flight.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D3649: serve: add option print-url

2018-06-04 Thread nspanti-logilab (Nicola Spanti)
nspanti-logilab added a comment.


  In https://phab.mercurial-scm.org/D3649#57835, @yuja wrote:
  
  > It's surprising that `hg serve --print-url` spawns a daemon process!
  
  
  If it does not launch a daemon process, the procress caller (`xdg-open`, 
`midori`, `firefox`, etc.) waits the end of the stream to launch, so it waits 
that the `hg serve` procress ends!
  
  In https://phab.mercurial-scm.org/D3649#57838, @av6 wrote:
  
  > Merits another patch with some simple tests.
  
  
  Could you describe tests that you would like?
  
  @KelvinTot : Could you write in English or French, please?

REPOSITORY
  rHG Mercurial

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

To: nspanti-logilab, #hg-reviewers, durin42
Cc: KelvinTot, av6, yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel