[Bug 5736] New: Not work log command with r option correctly

2017-11-07 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=5736

Bug ID: 5736
   Summary: Not work log command with r option correctly
   Product: Mercurial
   Version: 4.3.1
  Hardware: PC
OS: Windows
Status: UNCONFIRMED
  Severity: bug
  Priority: wish
 Component: Mercurial
  Assignee: bugzi...@mercurial-scm.org
  Reporter: kun...@forum8.co.jp
CC: mercurial-devel@mercurial-scm.org

Following is output of log command in my test repository

> hg log
changeset:   2:1575a0e445ec
tag: tip
user:kuniie
date:Wed Nov 08 15:11:37 2017 +0900
summary: 3rd commit

changeset:   1:ae52c76e2e80
user:kuniie
date:Wed Nov 08 15:11:09 2017 +0900
summary: 2nd commit

changeset:   0:b1b1db8d6924
user:kuniie
date:Wed Nov 08 15:10:46 2017 +0900
summary: Add file

Then, I want to check revision 1 to 2. I execute following command.

> hg log -r 1:2
changeset:   2:1575a0e445ec
tag: tip
user:kuniie
date:Wed Nov 08 15:11:37 2017 +0900
summary: 3rd commit

changeset:   1:ae52c76e2e80
user:kuniie
date:Wed Nov 08 15:11:09 2017 +0900
summary: 2nd commit

changeset:   0:b1b1db8d6924
user:kuniie
date:Wed Nov 08 15:10:46 2017 +0900
summary: Add file

Why revision 0:b1b1db8d6924 is displayed in above command. Correctly
0:b1b1db8d6924 is not outputted when I above command.

-- 
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


D1331: cat: test output path behvaior when target path does not exist

2017-11-07 Thread ryanmce (Ryan McElroy)
ryanmce created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  In the next patch, we will change the behavior of the cat command to create
  output file parent directories before attempting to write the output file.
  This patch documents the current unfortunate behavior.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-cat.t

CHANGE DETAILS

diff --git a/tests/test-cat.t b/tests/test-cat.t
--- a/tests/test-cat.t
+++ b/tests/test-cat.t
@@ -119,3 +119,14 @@
   $ PATTERN='t4' hg log -r '.' -T "{envvars % '{key} -> {value}\n'}" \
   > --config "experimental.exportableenviron=PATTERN"
   PATTERN -> t4
+
+Test behavior of output when directory structure does not already exist
+
+  $ mkdir foo
+  $ echo a > foo/a
+  $ hg add foo/a
+  $ hg commit -qm "add foo/a"
+  $ mkdir output
+  $ hg cat --output "output/%p" foo/a
+  abort: No such file or directory: output/foo/a
+  [255]



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


D1332: cmdutil: create dirs for templated cat file output

2017-11-07 Thread ryanmce (Ryan McElroy)
ryanmce created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Previously, the caller was responsible for creating the directory structure of
  files written out using a path template. This is onerous, especially if the
  exact filenames are not known upfront, but are being accessed via a matcher.
  
  This patch changes things so that hg will attempt to create the appropriate
  directories before writing the output file.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/cmdutil.py
  tests/test-cat.t

CHANGE DETAILS

diff --git a/tests/test-cat.t b/tests/test-cat.t
--- a/tests/test-cat.t
+++ b/tests/test-cat.t
@@ -126,7 +126,6 @@
   $ echo a > foo/a
   $ hg add foo/a
   $ hg commit -qm "add foo/a"
-  $ mkdir output
   $ hg cat --output "output/%p" foo/a
-  abort: No such file or directory: output/foo/a
-  [255]
+  $ cat output/foo/a
+  a
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -3029,6 +3029,11 @@
 if fntemplate:
 filename = makefilename(repo, fntemplate, ctx.node(),
 pathname=os.path.join(prefix, path))
+# attempt to create the directory if it does not already exist
+try:
+os.makedirs(os.path.dirname(filename))
+except OSError:
+pass
 with formatter.maybereopen(basefm, filename, opts) as fm:
 data = ctx[path].data()
 if opts.get('decode'):



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


mercurial@34996: 14 new changesets (10 on stable)

2017-11-07 Thread Mercurial Commits
14 new changesets (10 on stable) in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/80d7dbda9294
changeset:   34983:80d7dbda9294
branch:  stable
parent:  34965:f445b10dc7fb
user:Yuya Nishihara 
date:Fri Nov 03 19:17:25 2017 +0900
summary: tests: show symlink traversal across subrepo mount point (SEC)

https://www.mercurial-scm.org/repo/hg/rev/071cbeba4212
changeset:   34984:071cbeba4212
branch:  stable
user:Yuya Nishihara 
date:Fri Nov 03 20:12:50 2017 +0900
summary: subrepo: disallow symlink traversal across subrepo mount point 
(SEC)

https://www.mercurial-scm.org/repo/hg/rev/5e27afeddaee
changeset:   34985:5e27afeddaee
branch:  stable
user:Yuya Nishihara 
date:Sun Nov 05 21:22:07 2017 +0900
summary: subrepo: add config option to reject any subrepo operations (SEC)

https://www.mercurial-scm.org/repo/hg/rev/828cf35f1de6
changeset:   34986:828cf35f1de6
branch:  stable
user:Yuya Nishihara 
date:Sun Nov 05 21:48:58 2017 +0900
summary: subrepo: extend config option to disable subrepos by type (SEC)

https://www.mercurial-scm.org/repo/hg/rev/846942fd6d15
changeset:   34987:846942fd6d15
branch:  stable
user:Yuya Nishihara 
date:Sun Nov 05 21:51:42 2017 +0900
summary: subrepo: disable git and svn subrepos by default (BC) (SEC)

https://www.mercurial-scm.org/repo/hg/rev/bd725a71f274
changeset:   34988:bd725a71f274
branch:  stable
user:Augie Fackler 
date:Mon Nov 06 14:56:17 2017 -0500
summary: config: add some more documentation around why svn and git 
subrepos are off

https://www.mercurial-scm.org/repo/hg/rev/1a314176da9c
changeset:   34989:1a314176da9c
branch:  stable
user:Gregory Szorc 
date:Mon Nov 06 22:32:41 2017 -0800
summary: subrepo: use per-type config options to enable subrepos

https://www.mercurial-scm.org/repo/hg/rev/cabc840ffdee
changeset:   34990:cabc840ffdee
branch:  stable
tag: 4.4.1
parent:  34982:0f5521e56b77
parent:  34989:1a314176da9c
user:Augie Fackler 
date:Tue Nov 07 11:22:24 2017 -0500
summary: stable: merge with security patches

https://www.mercurial-scm.org/repo/hg/rev/29e6513856ee
changeset:   34991:29e6513856ee
parent:  34978:de1f045781e0
user:Yuya Nishihara 
date:Sat Oct 21 17:05:04 2017 +0900
summary: help: hide phaseidx template keyword

https://www.mercurial-scm.org/repo/hg/rev/e2fc6cec0eff
changeset:   34992:e2fc6cec0eff
user:Yuya Nishihara 
date:Sat Oct 21 17:31:13 2017 +0900
summary: templatekw: move loadkeyword() to bottom

https://www.mercurial-scm.org/repo/hg/rev/625d5ebce066
changeset:   34993:625d5ebce066
user:Yuya Nishihara 
date:Sat Oct 21 17:46:41 2017 +0900
summary: templatekw: add verbosity keyword to select template by 
-q/-v/--debug flag

https://www.mercurial-scm.org/repo/hg/rev/929bf8390056
changeset:   34994:929bf8390056
branch:  stable
parent:  34990:cabc840ffdee
user:Augie Fackler 
date:Tue Nov 07 13:15:34 2017 -0500
summary: Added tag 4.4.1 for changeset cabc840ffdee

https://www.mercurial-scm.org/repo/hg/rev/4cc910cd81d0
changeset:   34995:4cc910cd81d0
branch:  stable
user:Augie Fackler 
date:Tue Nov 07 13:15:35 2017 -0500
summary: Added signature for changeset cabc840ffdee

https://www.mercurial-scm.org/repo/hg/rev/602c168c0207
changeset:   34996:602c168c0207
bookmark:@
tag: tip
parent:  34993:625d5ebce066
parent:  34995:4cc910cd81d0
user:Augie Fackler 
date:Tue Nov 07 13:18:49 2017 -0500
summary: merge with stable

-- 
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


D1329: bundle: allow bundlerepo to support alternative manifest implementations

2017-11-07 Thread durham (Durham Goode)
durham created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  With our treemanifest logic, the manifests are no longer transported as part 
of
  the changegroup and are no longer stored in a revlog. This means the
  self.manifestlog line in bundlerepo.filestart no longer calls
  _constructmanifest, and therefore does not consume the manifest portion of the
  changegroup, which means filestart is not populated and we result in an 
infinite
  loop.
  
  The fix is to make filestart aware that self.manifestlog might not consume the
  changegroup part, and consume it manually if necessary.
  
  There's currently no way to test this in core, but our treemanifest extension
  has tests to cover this.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/bundlerepo.py

CHANGE DETAILS

diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -352,14 +352,31 @@
 self.filestart = self.bundle.tell()
 return m
 
+def _consumemanifest(self):
+"""Consumes the manifest portion of the bundle, setting filestart so 
the
+file portion can be read."""
+self.bundle.seek(self.manstart)
+self.bundle.manifestheader()
+for delta in self.bundle.deltaiter():
+pass
+self.filestart = self.bundle.tell()
+
 @localrepo.unfilteredpropertycache
 def manstart(self):
 self.changelog
 return self.manstart
 
 @localrepo.unfilteredpropertycache
 def filestart(self):
 self.manifestlog
+
+# If filestart was not set by self.manifestlog, that means the
+# manifestlog implementation did not consume the manifests from the
+# changegroup (ex: it might be consuming trees from a separate bundle2
+# part instead). So we need to manually consume it.
+if 'filestart' not in self.__dict__:
+self._consumemanifest()
+
 return self.filestart
 
 def url(self):



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


Re: Storage format for remotenames.

2017-11-07 Thread Durham Goode
I wish we had some easily reusable serializer/deserializer instead of 
having to reinvent these every time.  What's our reasoning for not using 
json? I forget. If there are some weird characters, like control 
characters or something, that break json, I'd say we just use json and 
prevent users from creating bookmarks and paths with those names.


Otherwise we could move the paths to a separate section and format the 
file something like:


[paths]
1=ssh://blahblah.com//blahblah
2=ssh://blahblah.com//blahblah
3=ssh://blahblah.com//blahblah

[bookmarks]
HASH 2 book/mark/name
HASH 1 book2/foo/bar

[branches]
HASH 1
HASH 3

On 11/6/17 4:34 AM, Pulkit Goyal wrote:

Hey,

I am working on porting functionalities from hgremotenames extension
to core. The hgremotenames extensions pull the information about
remote branches and remote bookmarks and store them to provide a
better workflow.

The current storage format which hgremotenames has is having a file
`.hg/remotenames` in which each line is of the format `node nametype
name`, where
  - `node` refers to node where the remotename was last seen
  -  `nametype` refers whether it's a bookmark or branch
  - `name` consists of name of the remote and name of the remote bookmark/branch

At sprint, Ryan suggested to split the file according to bookmark and
branches so that we can read and write more easily which makes sense.

While working on the patches, I found out that if the name of the
remote contains a '/', then the current storage format is not good and
we can fail to parse things correctly.

Do you guys have any better ideas on how we can store remotenames?

Pulkit


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


mercurial@34982: 15 new changesets (4 on stable)

2017-11-07 Thread Mercurial Commits
15 new changesets (4 on stable) in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/3649c3f2cd90
changeset:   34968:3649c3f2cd90
user:Denis Laxalde 
date:Fri Nov 03 14:47:37 2017 +0100
summary: revert: do not reverse hunks in interactive when REV is not parent 
(issue5096)

https://www.mercurial-scm.org/repo/hg/rev/d600bda4a3e1
changeset:   34969:d600bda4a3e1
user:Matthieu Laneuville 
date:Thu Oct 19 23:13:57 2017 +0900
summary: run-tests: allow automatic test discovery when providing folder as 
argument

https://www.mercurial-scm.org/repo/hg/rev/3e549546a6e9
changeset:   34970:3e549546a6e9
user:Pulkit Goyal <7895pul...@gmail.com>
date:Sun Oct 22 23:51:57 2017 +0530
summary: py3: handle keyword arguments in hgext/amend.py

https://www.mercurial-scm.org/repo/hg/rev/38637dd39cfd
changeset:   34971:38637dd39cfd
user:Pulkit Goyal <7895pul...@gmail.com>
date:Sun Oct 22 23:52:22 2017 +0530
summary: py3: handle keyword arguments in hgext/automv.py

https://www.mercurial-scm.org/repo/hg/rev/375577785f49
changeset:   34972:375577785f49
user:Pulkit Goyal <7895pul...@gmail.com>
date:Sun Oct 22 23:52:47 2017 +0530
summary: py3: handle keyword arguments in hgext/blackbox.py

https://www.mercurial-scm.org/repo/hg/rev/11a372d80496
changeset:   34973:11a372d80496
user:Pulkit Goyal <7895pul...@gmail.com>
date:Sun Oct 22 23:53:10 2017 +0530
summary: py3: handle keyword arguments in hgext/children.py

https://www.mercurial-scm.org/repo/hg/rev/26ed66ab1e72
changeset:   34974:26ed66ab1e72
user:Pulkit Goyal <7895pul...@gmail.com>
date:Mon Oct 23 00:01:16 2017 +0530
summary: py3: handle keyword arguments in hgext/churn.py

https://www.mercurial-scm.org/repo/hg/rev/901a18b03e00
changeset:   34975:901a18b03e00
user:Pulkit Goyal <7895pul...@gmail.com>
date:Mon Oct 23 00:01:45 2017 +0530
summary: py3: handle keyword arguments in hgext/commitextras.py

https://www.mercurial-scm.org/repo/hg/rev/a8bc191fee5a
changeset:   34976:a8bc191fee5a
user:Pulkit Goyal <7895pul...@gmail.com>
date:Mon Oct 23 00:02:07 2017 +0530
summary: py3: handle keyword arguments in hgext/extdiff.py

https://www.mercurial-scm.org/repo/hg/rev/a56bf5591918
changeset:   34977:a56bf5591918
user:Pulkit Goyal <7895pul...@gmail.com>
date:Mon Oct 23 00:02:28 2017 +0530
summary: py3: handle keyword arguments in hgext/fetch.py

https://www.mercurial-scm.org/repo/hg/rev/de1f045781e0
changeset:   34978:de1f045781e0
bookmark:@
user:Pulkit Goyal <7895pul...@gmail.com>
date:Mon Oct 23 00:02:46 2017 +0530
summary: py3: handle keyword arguments in hgext/gpg.py

https://www.mercurial-scm.org/repo/hg/rev/b64ea7fb9599
changeset:   34979:b64ea7fb9599
branch:  stable
parent:  34965:f445b10dc7fb
user:Matt Harbison 
date:Thu Nov 02 23:55:09 2017 -0400
summary: share: handle --relative shares to a different drive letter 
gracefully

https://www.mercurial-scm.org/repo/hg/rev/705d0f2bb677
changeset:   34980:705d0f2bb677
branch:  stable
user:Matt Harbison 
date:Fri Nov 03 22:22:50 2017 -0400
summary: pathutil: add doctests for canonpath()

https://www.mercurial-scm.org/repo/hg/rev/527655a049ee
changeset:   34981:527655a049ee
branch:  stable
user:Matt Harbison 
date:Sat Nov 04 23:39:54 2017 -0400
summary: morestatus: don't crash with different drive letters for repo.root 
and CWD

https://www.mercurial-scm.org/repo/hg/rev/0f5521e56b77
changeset:   34982:0f5521e56b77
branch:  stable
tag: tip
user:Gregory Szorc 
date:Mon Nov 06 10:33:40 2017 -0800
summary: share: move config item declarations into core

-- 
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


Re: [PATCH 3 of 3] templatekw: add verbosity keyword to select template by -q/-v/--debug flag

2017-11-07 Thread Augie Fackler
On Thu, Nov 02, 2017 at 10:33:26PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara 
> # Date 1508575601 -32400
> #  Sat Oct 21 17:46:41 2017 +0900
> # Node ID 946badd65a139cbb50150f23471db136a42d7814
> # Parent  369af8fed661bef2b0b061f2eac4c932d4f753ae
> templatekw: add verbosity keyword to select template by -q/-v/--debug flag

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


[Bug 5735] New: test-run-tests.t test failure

2017-11-07 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=5735

Bug ID: 5735
   Summary: test-run-tests.t test failure
   Product: Mercurial
   Version: 4.4
  Hardware: All
OS: NetBSD
Status: UNCONFIRMED
  Severity: bug
  Priority: wish
 Component: Mercurial
  Assignee: bugzi...@mercurial-scm.org
  Reporter: t...@giga.or.at
CC: mercurial-devel@mercurial-scm.org

With 4.4 there is a new test failure when running the test suite on
NetBSD-8.99.5/amd64:


--- /scratch/devel/py-mercurial/work/mercurial-4.4/tests/test-run-tests.t
+++ /scratch/devel/py-mercurial/work/mercurial-4.4/tests/test-run-tests.t.err
@@ -613,6 +613,16 @@

   --- $TESTTMP/test-failure*.t (glob)
   +++ $TESTTMP/test-failure*.t.err (glob)
+  @@ -1,5 +1,5 @@
+ $ echo babar
+  -  rataxes
+  +  babar
+   This is a noop statement so that
+   this test is still more bytes than success.
+   pad pad pad pad
+
+  --- $TESTTMP/test-failure.t
+  +++ $TESTTMP/test-failure.t.err
   @@ -1,5 +1,5 @@
  $ echo babar
   -  rataxes

ERROR: test-run-tests.t output changed

-- 
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


Re: [PATCH STABLE] share: move config item declarations into core

2017-11-07 Thread Yuya Nishihara
On Mon, 06 Nov 2017 10:41:01 -0800, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc 
> # Date 1509993220 28800
> #  Mon Nov 06 10:33:40 2017 -0800
> # Branch stable
> # Node ID 0f6f27367dae401905a789f4e7fa1d672304b24a
> # Parent  f445b10dc7fb3495d24d1c22b0996148864c77f7
> share: move config item declarations into core

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


Re: [PATCH STABLE] morestatus: don't crash with different drive letters for repo.root and CWD

2017-11-07 Thread Yuya Nishihara
On Sun, 05 Nov 2017 23:52:11 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison 
> # Date 1509853194 14400
> #  Sat Nov 04 23:39:54 2017 -0400
> # Branch stable
> # Node ID 0e660095ea2df1f90b38bdb3942519e15d71a412
> # Parent  b64ea7fb95990ef0178bb7b5441088ee582a6483
> morestatus: don't crash with different drive letters for repo.root and CWD

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