D6655: continue: added support for graft

2019-07-19 Thread taapas1128 (Taapas Agrawal)
taapas1128 added inline comments.

INLINE COMMENTS

> martinvonz wrote in cmdutil.py:3482-3498
> It looks like pretty much this entire function is copies `commands.graft()` 
> and then all this code is left dead here (since `cont = True` above). I'd 
> prefer to de-queue this commit and let you clean this up and then submit a 
> new patch, but maybe other reviewers are less picky or stubborn than I am, so 
> I'll leave it queued until I hear from someone else.

@martinvonz That code is not dead but it takes care not to merge the first 
commit when continuing graft. `cont=True` is just the first iteration of the 
for loop at line `3455` after that it becomes `False`. Although it may seem 
like all the code has been copied from `commands.graft` but only that part is 
copied but only that part is imported that works when `--continue` flag is 
called. Regarding cleaning I do agree spliting code from `commands.graft()` 
would be nice. So have a look at D6659 .

REPOSITORY
  rHG Mercurial

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

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

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


D6655: continue: added support for graft

2019-07-19 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments.

INLINE COMMENTS

> cmdutil.py:3482-3498
> +if not cont:
> +# perform the graft merge with p1(rev) as 'ancestor'
> +overrides = {('ui', 'forcemerge'): opts.get('tool', '')}
> +base = ctx.p1()
> +with ui.configoverride(overrides, 'graft'):
> +stats = mergemod.graft(repo, ctx, base, ['local', 
> 'graft'])
> +# report any conflicts

It looks like pretty much this entire function is copies `commands.graft()` and 
then all this code is left dead here (since `cont = True` above). I'd prefer to 
de-queue this commit and let you clean this up and then submit a new patch, but 
maybe other reviewers are less picky or stubborn than I am, so I'll leave it 
queued until I hear from someone else.

REPOSITORY
  rHG Mercurial

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

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

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


D6655: continue: added support for graft

2019-07-19 Thread martinvonz (Martin von Zweigbergk)
martinvonz added a comment.


  In D6655#97447 , @taapas1128 
wrote:
  
  > @martinvonz I will send a patch doing that.

INLINE COMMENTS

> mharbison72 wrote in test-graft.t:1
> This has the same problem D6579  had 
> where there are 4 separate test cases, instead of 2 with sub cases.

I tried to fix that but the test fails if I do that.

REPOSITORY
  rHG Mercurial

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

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

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


D6661: lookup: don't use "00changelog.i@None" when lookup of prefix fails

2019-07-19 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision.
Herald added a reviewer: indygreg.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We were shadowing the "node" variable, so we always passed None to the
  LookupError instead of the node we meant to pass.
  
  (This showed up in py3 tests since py3 doesn't like to format None
  using "%s".)

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -1355,13 +1355,13 @@
 """Find the shortest unambiguous prefix that matches node."""
 def isvalid(prefix):
 try:
-node = self._partialmatch(prefix)
+matchednode = self._partialmatch(prefix)
 except error.AmbiguousPrefixLookupError:
 return False
 except error.WdirUnsupported:
 # single 'ff...' match
 return True
-if node is None:
+if matchednode is None:
 raise error.LookupError(node, self.indexfile, _('no node'))
 return True
 



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


D6655: continue: added support for graft

2019-07-19 Thread mharbison72 (Matt Harbison)
mharbison72 added inline comments.

INLINE COMMENTS

> test-graft.t:1
> -#testcases abortcommand abortflag
> +#testcases abortcommand abortflag continueflag continuecommand
>  

This has the same problem D6579  had 
where there are 4 separate test cases, instead of 2 with sub cases.

REPOSITORY
  rHG Mercurial

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

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

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


[PATCH evolve-ext] docs: add example for the `prune` command

2019-07-19 Thread Raphaël Gomès
# HG changeset patch
# User Raphaël Gomès 
# Date 1563546408 -7200
#  Fri Jul 19 16:26:48 2019 +0200
# Branch stable
# Node ID 7fc102507d369c4c8243eb4fc5c7fe21af96aca3
# Parent  124cf32dd207413d1fb2cb0dcaf39d70ba7551fd
# EXP-Topic documentation
docs: add example for the `prune` command

Giving at least one example helps clear up the syntax, especially since most
options will follow a very similar pattern.

diff -r 124cf32dd207 -r 7fc102507d36 hgext3rd/evolve/cmdrewrite.py
--- a/hgext3rd/evolve/cmdrewrite.py Fri Jul 19 17:40:45 2019 +0800
+++ b/hgext3rd/evolve/cmdrewrite.py Fri Jul 19 16:26:48 2019 +0200
@@ -998,6 +998,10 @@
 ``--pair`` option to pair the pruned precursor and successor changesets.
 This is commonly useful for resolving history divergence, or when someone
 else does edits history without obsolescence enabled.
+
+``hg prune A::B -s C::D --pair`` will mark all revisions in the A::B range
+as superseded by the revisions in C::D. Both revsets need to have the same
+number of changesets.
 """
 _checknotesize(ui, opts)
 revs = scmutil.revrange(repo, list(revs) + opts.get('rev'))
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6656: py3: another passing test

2019-07-19 Thread durin42 (Augie Fackler)
Closed by commit rHG513a97303bbc: py3: another passing test (authored by 
durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6656?vs=15970=15976

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

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

AFFECTED FILES
  contrib/python3-whitelist

CHANGE DETAILS

diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -130,6 +130,7 @@
 test-convert-tagsbranch-topology.t
 test-convert.t
 test-copies-in-changeset.t
+test-copies-unrelated.t
 test-copies.t
 test-copy-move-merge.t
 test-copy.t



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


D6657: cleanup: remove redundant import

2019-07-19 Thread durin42 (Augie Fackler)
Closed by commit rHG3acb3660a626: cleanup: remove redundant import (authored by 
durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6657?vs=15971=15975

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

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

AFFECTED FILES
  tests/test-bookmarks-corner-case.t

CHANGE DETAILS

diff --git a/tests/test-bookmarks-corner-case.t 
b/tests/test-bookmarks-corner-case.t
--- a/tests/test-bookmarks-corner-case.t
+++ b/tests/test-bookmarks-corner-case.t
@@ -119,7 +119,6 @@
   > import atexit
   > import os
   > import time
-  > import atexit
   > from mercurial import error, extensions, bookmarks
   > 
   > def wait(repo):



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