D5890: diffordiffstat: avoid looking up contexts twice

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

REVISION SUMMARY
  I'm not worried about performance; this is just simpler.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/logcmdutil.py

CHANGE DETAILS

diff --git a/mercurial/logcmdutil.py b/mercurial/logcmdutil.py
--- a/mercurial/logcmdutil.py
+++ b/mercurial/logcmdutil.py
@@ -58,6 +58,8 @@
changes=None, stat=False, fp=None, graphwidth=0,
prefix='', root='', listsubrepos=False, hunksfilterfn=None):
 '''show diff or diffstat.'''
+ctx1 = repo[node1]
+ctx2 = repo[node2]
 if root:
 relroot = pathutil.canonpath(repo.root, repo.getcwd(), root)
 else:
@@ -78,9 +80,8 @@
 if not ui.plain():
 width = ui.termwidth() - graphwidth
 
-chunks = repo[node2].diff(repo[node1], match, changes, opts=diffopts,
-  prefix=prefix, relroot=relroot,
-  hunksfilterfn=hunksfilterfn)
+chunks = ctx2.diff(ctx1, match, changes, opts=diffopts, prefix=prefix,
+   relroot=relroot, hunksfilterfn=hunksfilterfn)
 
 if fp is not None or ui.canwritewithoutlabels():
 out = fp or ui
@@ -105,8 +106,6 @@
 ui.write(chunk, label=label)
 
 if listsubrepos:
-ctx1 = repo[node1]
-ctx2 = repo[node2]
 for subpath, sub in scmutil.itersubrepos(ctx1, ctx2):
 tempnode2 = node2
 try:



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


D5889: context: replace repeated "self._repo.dirstate" by "ds" variable

2019-02-07 Thread martinvonz (Martin von Zweigbergk)
martinvonz 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/D5889

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1355,13 +1355,13 @@
 uipath = lambda f: ds.pathto(pathutil.join(prefix, f))
 rejected = []
 for f in files:
-if f not in self._repo.dirstate:
+if f not in ds:
 self._repo.ui.warn(_("%s not tracked!\n") % uipath(f))
 rejected.append(f)
-elif self._repo.dirstate[f] != 'a':
-self._repo.dirstate.remove(f)
+elif ds[f] != 'a':
+ds.remove(f)
 else:
-self._repo.dirstate.drop(f)
+ds.drop(f)
 return rejected
 
 def copy(self, source, dest):
@@ -1379,11 +1379,12 @@
% self._repo.dirstate.pathto(dest))
 else:
 with self._repo.wlock():
-if self._repo.dirstate[dest] in '?':
-self._repo.dirstate.add(dest)
-elif self._repo.dirstate[dest] in 'r':
-self._repo.dirstate.normallookup(dest)
-self._repo.dirstate.copy(source, dest)
+ds = self._repo.dirstate
+if ds[dest] in '?':
+ds.add(dest)
+elif ds[dest] in 'r':
+ds.normallookup(dest)
+ds.copy(source, dest)
 
 def match(self, pats=None, include=None, exclude=None, default='glob',
   listsubrepos=False, badfn=None):



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


D5888: context: delete unused undelete()

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

REVISION SUMMARY
  Maybe it's been unused since 
https://phab.mercurial-scm.org/rHGc8e2a5ea70629eae96cbd08264df46c1868ce4a5 (mq: 
avoid data loss upon
  qfold + qmv (issue3058), 2011-10-20), maybe not.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1364,19 +1364,6 @@
 self._repo.dirstate.drop(f)
 return rejected
 
-def undelete(self, list):
-pctxs = self.parents()
-with self._repo.wlock():
-ds = self._repo.dirstate
-for f in list:
-if self._repo.dirstate[f] != 'r':
-self._repo.ui.warn(_("%s not removed!\n") % ds.pathto(f))
-else:
-fctx = f in pctxs[0] and pctxs[0][f] or pctxs[1][f]
-t = fctx.data()
-self._repo.wwrite(f, t, fctx.flags())
-self._repo.dirstate.normal(f)
-
 def copy(self, source, dest):
 try:
 st = self._repo.wvfs.lstat(dest)



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


D5638: branchmap: encapsulate cache updating in the map itself

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


  In https://phab.mercurial-scm.org/D5638#86131, @pulkit wrote:
  
  > This looks good to me. @martinvonz do you have any concerns?
  
  
  Yes, looks good. Sorry, I thought this had already been queued.

REPOSITORY
  rHG Mercurial

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

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


[PATCH] py3: manually replace `None` with 'None' in ui.log() arguments

2019-02-07 Thread Matt Harbison
# HG changeset patch
# User Matt Harbison 
# Date 1549312475 18000
#  Mon Feb 04 15:34:35 2019 -0500
# Node ID b6bdc25edf05318a4571b4f34a741754f5052567
# Parent  a263b7d71105414c9a1234414747533ce904ba39
py3: manually replace `None` with 'None' in ui.log() arguments

Pushing to a real server with py3 (while fixing the digest authentication
issues) spit out this:

  Traceback (most recent call last):
  ...
  File "c:\users\jenkins\mercurial\mercurial\commands.py", line 4635, in push
opargs=opargs)
  File "c:\users\jenkins\mercurial\hgext\lfs\wrapper.py", line 340, in push
return orig(repo, remote, *args, **kwargs)
  File "c:\users\jenkins\mercurial\mercurial\exchange.py", line 566, in push
_pushbundle2(pushop)
  File "c:\users\jenkins\mercurial\mercurial\exchange.py", line 1138, in 
_pushbundle2
ret = partgen(pushop, bundler)
  File "c:\users\jenkins\mercurial\mercurial\exchange.py", line 909, in 
_pushb2ctx
if not _pushcheckoutgoing(pushop):
  File "c:\users\jenkins\mercurial\mercurial\exchange.py", line 804, in 
_pushcheckoutgoing
discovery.checkheads(pushop)
  File "c:\users\jenkins\mercurial\mercurial\discovery.py", line 341, in 
checkheads
headssum = _headssummary(pushop)
  File "c:\users\jenkins\mercurial\mercurial\discovery.py", line 244, in 
_headssummary
newmap.update(repo, (ctx.rev() for ctx in missingctx))
  File "c:\users\jenkins\mercurial\mercurial\branchmap.py", line 344, in update
repo.filtername, duration)
  File "c:\users\jenkins\mercurial\mercurial\ui.py", line 1813, in log
msg = msgfmt % msgargs
TypeError: %b requires a bytes-like object, or an object that implements 
__bytes__, not 'NoneType'

I don't think blackbox is at fault- we just need to have some loggers active.

Passing `repo.filtername or b''` at this branchmap call-site also fixed the
issue, but there are other places where `repo.filtername` is getting logged as
well.  This seems like the easiest fix.

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -1810,7 +1810,15 @@ class ui(object):
  if l.tracked(event)]
 if not activeloggers:
 return
-msg = msgfmt % msgargs
+
+def _filternone(x):
+return x is None and b'None' or x
+
+def _format(msgfmt, *msgargs):
+return msgfmt % msgargs
+
+msg = _format(msgfmt, *[_filternone(a) for a in msgargs])
+
 opts = pycompat.byteskwargs(opts)
 # guard against recursion from e.g. ui.debug()
 registeredloggers = self._loggers
diff --git a/tests/test-push-http.t b/tests/test-push-http.t
--- a/tests/test-push-http.t
+++ b/tests/test-push-http.t
@@ -413,7 +413,7 @@ Pushing via hgwebdir works
   $ echo commit > a
   $ hg commit -m 'local commit'
 
-  $ hg push
+  $ hg push --config extensions.blackbox= --config 'blackbox.track=*'
   pushing to http://localhost:$HGPORT/hgwebdir
   searching for changes
   remote: adding changesets
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5638: branchmap: encapsulate cache updating in the map itself

2019-02-07 Thread pulkit (Pulkit Goyal)
pulkit added a comment.


  This looks good to me. @martinvonz do you have any concerns?

REPOSITORY
  rHG Mercurial

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

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


D5877: tests: fix regression tests failing on CentOS 7

2019-02-07 Thread Phabricator
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf2f538725d07: tests: fix regression tests failing on CentOS 
7 (authored by Mathias De Mare mathias.de_m...@nokia.com, committed by 
).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5877?vs=13886=13901

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

AFFECTED FILES
  tests/test-clonebundles.t
  tests/test-http-proxy.t
  tests/test-lfs-serve-access.t

CHANGE DETAILS

diff --git a/tests/test-lfs-serve-access.t b/tests/test-lfs-serve-access.t
--- a/tests/test-lfs-serve-access.t
+++ b/tests/test-lfs-serve-access.t
@@ -84,6 +84,7 @@
   $ hg -R httpclone update default --config 
lfs.url=http://localhost:$HGPORT2/missing
   abort: LFS error: *onnection *refused*! (glob) (?)
   abort: LFS error: $EADDRNOTAVAIL$! (glob) (?)
+  abort: LFS error: No route to host! (?)
   (the "lfs.url" config may be used to override 
http://localhost:$HGPORT2/missing)
   [255]
 
diff --git a/tests/test-http-proxy.t b/tests/test-http-proxy.t
--- a/tests/test-http-proxy.t
+++ b/tests/test-http-proxy.t
@@ -90,7 +90,7 @@
 misconfigured hosts)
 
   $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True 
http://localhost:$HGPORT/ f
-  abort: error: (Connection refused|Protocol not supported|.* actively refused 
it|\$EADDRNOTAVAIL\$) (re)
+  abort: error: (Connection refused|Protocol not supported|.* actively refused 
it|\$EADDRNOTAVAIL\$|No route to host) (re)
   [255]
 
 do not use the proxy if it is in the no list
diff --git a/tests/test-clonebundles.t b/tests/test-clonebundles.t
--- a/tests/test-clonebundles.t
+++ b/tests/test-clonebundles.t
@@ -64,7 +64,7 @@
   $ echo "http://localhost:$HGPORT1/bundle.hg; > 
server/.hg/clonebundles.manifest
   $ hg clone http://localhost:$HGPORT server-not-runner
   applying clone bundle from http://localhost:$HGPORT1/bundle.hg
-  error fetching bundle: (.* refused.*|Protocol not supported|(.* 
)?\$EADDRNOTAVAIL\$) (re)
+  error fetching bundle: (.* refused.*|Protocol not supported|(.* 
)?\$EADDRNOTAVAIL\$|.* No route to host) (re)
   abort: error applying bundle
   (if this error persists, consider contacting the server operator or disable 
clone bundles via "--config ui.clonebundles=false")
   [255]



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


D5876: packaging: modify rc detection to work with X.Yrc instead of X.Y-rc

2019-02-07 Thread Phabricator
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8f0e8b179842: packaging: modify rc detection to work with 
X.Yrc instead of X.Y-rc (authored by Mathias De Mare 
mathias.de_m...@nokia.com, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5876?vs=13885=13900

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

AFFECTED FILES
  contrib/packaging/packagelib.sh

CHANGE DETAILS

diff --git a/contrib/packaging/packagelib.sh b/contrib/packaging/packagelib.sh
--- a/contrib/packaging/packagelib.sh
+++ b/contrib/packaging/packagelib.sh
@@ -28,9 +28,9 @@
 distance=''
 node=''
 fi
-if echo $hgversion | grep -- '-' > /dev/null 2>&1; then
-version=`echo $hgversion | cut -d- -f1`
-type=`echo $hgversion | cut -d- -f2`
+if echo $hgversion | grep -E -- '[0-9]\.[0-9](\.[0-9])?rc' > /dev/null 
2>&1; then
+version=`echo $hgversion | cut -d'r' -f1`
+type="rc`echo $hgversion | cut -d'c' -f2-`"
 else
 version=$hgversion
 type=''



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


D5792: uncommit: added interactive mode(issue6062)

2019-02-07 Thread taapas1128 (Taapas Agrawal)
taapas1128 added a comment.


  @pulkit I have added some inline comments . So what do you suggest one way 
can be merging this and I will send a follow up for integrating `-n` to `hg 
uncommit`and then amending the tests. The other way is I should send a request 
for `-n` flag and then make all these changes again as a follow up pr for that 
request.

INLINE COMMENTS

> test-uncommit-interactive.t:135
> +
> +  $ hg amend --extract -n "note on amend --extract" -i< +  > y

`hg amend --extract` uses `-n` flag here so it cant be completed with `hg 
uncommit` alone `-n` integration will be necessary. Also `hg obslog` is the 
same test so without this it can also not be replaced.

> test-uncommit-interactive.t:208
> +
> +  $ hg uncommit -n "testing uncommit on dirty wdir" -i< +  > y

Same problem here.

REPOSITORY
  rHG Mercurial

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

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


D5813: revset: add expect to check the size of a set

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


  @yuja I've updated the revision with the suggested changes.

REPOSITORY
  rHG Mercurial

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

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


[PATCH] convert: handle exec bit removal while converting to svn

2019-02-07 Thread Nikita Slyusarev
# HG changeset patch
# User Nikita Slyusarev 
# Date 1549565330 -10800
#  Thu Feb 07 21:48:50 2019 +0300
# Node ID afd7bd1378b43b306567245ac0e394c4432e944d
# Parent  286eeed148932d53eab7193c8e5deda39f9131f9
convert: handle exec bit removal while converting to svn

Subversion `putcommit` method checks original file's executablity to decide
if executable property should be removed from svn. It is checked right after
writing file contents.

Content writing is implemented using `vfs.write` and vfs seems to remove exec
bit, at least in some cases. This leads to executability checks being
ineffective. If cset contains only this ignored exec bit removal, conversion
stops with an error, because it fails to to compose svn commit properly.

This fix moves exec bit checking so that it's performed before dumping file
contents.

Added test to check executable bit removal.

diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py
--- a/hgext/convert/subversion.py
+++ b/hgext/convert/subversion.py
@@ -1206,10 +1206,18 @@
 os.unlink(filename)
 except OSError:
 pass
+
+if self.is_exec:
+# We need to check executability of the file before the change,
+# because `vfs.write` is able to reset exec bit.
+wasexec = False
+if os.path.exists(self.wjoin(filename)):
+wasexec = self.is_exec(self.wjoin(filename))
+
 self.wopener.write(filename, data)
 
 if self.is_exec:
-if self.is_exec(self.wjoin(filename)):
+if wasexec:
 if 'x' not in flags:
 self.delexec.append(filename)
 else:
diff --git a/tests/test-convert-svn-sink.t b/tests/test-convert-svn-sink.t
--- a/tests/test-convert-svn-sink.t
+++ b/tests/test-convert-svn-sink.t
@@ -466,3 +466,42 @@
   msg: Add file a
A /a
   $ rm -rf a a-hg a-hg-wc
+
+#if execbit
+
+Executable bit removal
+
+  $ hg init a
+
+  $ echo a > a/exec
+  $ chmod +x a/exec
+  $ hg --cwd a ci -d '1 0' -A -m 'create executable'
+  adding exec
+  $ chmod -x a/exec
+  $ hg --cwd a ci -d '2 0' -A -m 'remove executable bit'
+
+  $ hg convert -d svn a
+  assuming destination a-hg
+  initializing svn repository 'a-hg'
+  initializing svn working copy 'a-hg-wc'
+  scanning source...
+  sorting...
+  converting...
+  1 create executable
+  0 remove executable bit
+  $ svnupanddisplay a-hg-wc 0
+   2 2 test .
+   2 2 test exec
+  revision: 2
+  author: test
+  msg: remove executable bit
+   M /exec
+  revision: 1
+  author: test
+  msg: create executable
+   A /exec
+  $ test ! -x a-hg-wc/exec
+
+  $ rm -rf a a-hg a-hg-wc
+
+#endif
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5813: revset: add expect to check the size of a set

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

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5813?vs=13851=13899

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

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

CHANGE DETAILS

diff --git a/tests/test-revset.t b/tests/test-revset.t
--- a/tests/test-revset.t
+++ b/tests/test-revset.t
@@ -2950,3 +2950,45 @@
   * set:
   
   0
+
+abort if the revset doesn't expect given size
+  $ log 'expectsize()'
+  hg: parse error: invalid set of arguments
+  [255]
+  $ log 'expectsize(0:2, a)'
+  hg: parse error: expectsize requires a size range or a positive integer
+  [255]
+  $ log 'expectsize(0:2, 3)'
+  0
+  1
+  2
+
+  $ log 'expectsize(2:0, 3)'
+  2
+  1
+  0
+  $ log 'expectsize(0:1, 1)'
+  abort: revset size mismatch. expected 1, got 2!
+  [255]
+  $ log 'expectsize(0:4, -1)'
+  hg: parse error: negative size
+  [255]
+  $ log 'expectsize(0:2, 2:4)'
+  0
+  1
+  2
+  $ log 'expectsize(0:1, 3:5)'
+  abort: revset size mismatch. expected between 3 and 5, got 2!
+  [255]
+  $ log 'expectsize(0:1, -1:2)'
+  hg: parse error: negative size
+  [255]
+  $ log 'expectsize(0:1, 1:-2)'
+  hg: parse error: negative size
+  [255]
+  $ log 'expectsize(0:2, a:4)'
+  hg: parse error: size range bounds must be integers
+  [255]
+  $ log 'expectsize(0:2, 2:b)'
+  hg: parse error: size range bounds must be integers
+  [255]
diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -815,6 +815,45 @@
 contentdivergent = obsmod.getrevs(repo, 'contentdivergent')
 return subset & contentdivergent
 
+@predicate('expectsize(set[, size])', safe=True, takeorder=True)
+def expectrevsetsize(repo, subset, x, order):
+"""Abort if the revset doesn't expect given size"""
+args = getargsdict(x, 'expect', 'set size')
+size = args.get('size')
+if size is not None:
+minsize, maxsize = getintrange(size,
+   _('expectsize requires a size range'
+   ' or a positive integer'),
+   _('size range bounds must be integers'))
+if minsize < 0 or maxsize < 0:
+raise error.ParseError(_('negative size'))
+if minsize != maxsize:
+size = (minsize, maxsize)
+else:
+size = minsize
+if size is None or 'set' not in args:
+raise error.ParseError(_('invalid set of arguments'))
+rev = getset(repo, fullreposet(repo), args['set'], order=order)
+if isinstance(size, tuple):
+if len(rev) < minsize or len(rev) > maxsize:
+raise error.RepoLookupError(
+_('revset size mismatch.'
+' expected between %d and %d, got %d') % (minsize,
+  maxsize,
+  len(rev)))
+if isinstance(size, int):
+if len(rev) != size:
+raise error.RepoLookupError(
+_('revset size mismatch.'
+' expected %d, got %d') % (size, len(rev)))
+# filter rev by subset. since we'll probably want to get an ordered
+# result from expectsize(), we'll have to conditionalize the
+# filtering direction
+if order == followorder:
+return subset & rev
+else:
+return rev & subset
+
 @predicate('extdata(source)', safe=False, weight=100)
 def extdata(repo, subset, x):
 """Changesets in the specified extdata source. (EXPERIMENTAL)"""



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


D5887: subrepo: adjust subrepo prefix before calling subrepo.archive() (API)

2019-02-07 Thread martinvonz (Martin von Zweigbergk)
martinvonz 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/D5887

AFFECTED FILES
  hgext/largefiles/overrides.py
  mercurial/archival.py
  mercurial/subrepo.py

CHANGE DETAILS

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -343,8 +343,8 @@
 flags = self.fileflags(name)
 mode = 'x' in flags and 0o755 or 0o644
 symlink = 'l' in flags
-archiver.addfile(prefix + self._path + '/' + name,
- mode, symlink, self.filedata(name, decode))
+archiver.addfile(prefix + name, mode, symlink,
+ self.filedata(name, decode))
 progress.increment()
 progress.complete()
 return total
@@ -576,7 +576,8 @@
 for subpath in ctx.substate:
 s = subrepo(ctx, subpath, True)
 submatch = matchmod.subdirmatcher(subpath, match)
-total += s.archive(archiver, prefix + self._path + '/', submatch,
+subprefix = prefix + subpath + '/'
+total += s.archive(archiver, subprefix, submatch,
decode)
 return total
 
@@ -1673,8 +1674,7 @@
 data = info.linkname
 else:
 data = tar.extractfile(info).read()
-archiver.addfile(prefix + self._path + '/' + bname,
- info.mode, info.issym(), data)
+archiver.addfile(prefix + bname, info.mode, info.issym(), data)
 total += 1
 progress.increment()
 progress.complete()
diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -340,7 +340,8 @@
 for subpath in sorted(ctx.substate):
 sub = ctx.workingsub(subpath)
 submatch = matchmod.subdirmatcher(subpath, match)
-total += sub.archive(archiver, prefix, submatch, decode)
+subprefix = prefix + subpath + '/'
+total += sub.archive(archiver, subprefix, submatch, decode)
 
 if total == 0:
 raise error.Abort(_('no files match the archive pattern'))
diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -998,8 +998,9 @@
 for subpath in sorted(ctx.substate):
 sub = ctx.workingsub(subpath)
 submatch = matchmod.subdirmatcher(subpath, match)
+subprefix = prefix + subpath + '/'
 sub._repo.lfstatus = True
-sub.archive(archiver, prefix, submatch)
+sub.archive(archiver, subprefix, submatch)
 
 archiver.done()
 
@@ -1025,7 +1026,7 @@
 if decode:
 data = repo._repo.wwritedata(name, data)
 
-archiver.addfile(prefix + repo._path + '/' + name, mode, islink, data)
+archiver.addfile(prefix + name, mode, islink, data)
 
 for f in ctx:
 ff = ctx.flags(f)
@@ -1051,8 +1052,9 @@
 for subpath in sorted(ctx.substate):
 sub = ctx.workingsub(subpath)
 submatch = matchmod.subdirmatcher(subpath, match)
+subprefix = prefix + subpath + '/'
 sub._repo.lfstatus = True
-sub.archive(archiver, prefix + repo._path + '/', submatch, decode)
+sub.archive(archiver, subprefix, submatch, decode)
 
 # If a largefile is modified, the change is not reflected in its
 # standin until a commit. cmdutil.bailifchanged() raises an exception



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


D5886: subrepo: adjust subrepo prefix before calling subrepo.diff() (API)

2019-02-07 Thread martinvonz (Martin von Zweigbergk)
martinvonz 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/D5886

AFFECTED FILES
  mercurial/logcmdutil.py
  mercurial/subrepo.py

CHANGE DETAILS

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -11,7 +11,6 @@
 import errno
 import hashlib
 import os
-import posixpath
 import re
 import stat
 import subprocess
@@ -556,10 +555,9 @@
 # in hex format
 if node2 is not None:
 node2 = node.bin(node2)
-logcmdutil.diffordiffstat(ui, self._repo, diffopts,
-  node1, node2, match,
-  prefix=posixpath.join(prefix, 
self._path),
-  listsubrepos=True, **opts)
+logcmdutil.diffordiffstat(ui, self._repo, diffopts, node1, node2,
+  match, prefix=prefix, listsubrepos=True,
+  **opts)
 except error.RepoLookupError as inst:
 self.ui.warn(_('warning: error "%s" in subrepository "%s"\n')
   % (inst, subrelpath(self)))
@@ -1779,14 +1777,12 @@
 # for Git, this also implies '-p'
 cmd.append('-U%d' % diffopts.context)
 
-gitprefix = self.wvfs.reljoin(prefix, self._path)
-
 if diffopts.noprefix:
-cmd.extend(['--src-prefix=%s/' % gitprefix,
-'--dst-prefix=%s/' % gitprefix])
+cmd.extend(['--src-prefix=%s/' % prefix,
+'--dst-prefix=%s/' % prefix])
 else:
-cmd.extend(['--src-prefix=a/%s/' % gitprefix,
-'--dst-prefix=b/%s/' % gitprefix])
+cmd.extend(['--src-prefix=a/%s/' % prefix,
+'--dst-prefix=b/%s/' % prefix])
 
 if diffopts.ignorews:
 cmd.append('--ignore-all-space')
diff --git a/mercurial/logcmdutil.py b/mercurial/logcmdutil.py
--- a/mercurial/logcmdutil.py
+++ b/mercurial/logcmdutil.py
@@ -118,8 +118,9 @@
 # subpath. The best we can do is to ignore it.
 tempnode2 = None
 submatch = matchmod.subdirmatcher(subpath, match)
+subprefix = repo.wvfs.reljoin(prefix, subpath)
 sub.diff(ui, diffopts, tempnode2, submatch, changes=changes,
- stat=stat, fp=fp, prefix=prefix)
+ stat=stat, fp=fp, prefix=subprefix)
 
 class changesetdiffer(object):
 """Generate diff of changeset with pre-configured filtering functions"""



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


D5884: subrepo: adjust subrepo prefix before calling subrepo.add() (API)

2019-02-07 Thread martinvonz (Martin von Zweigbergk)
martinvonz 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/D5884

AFFECTED FILES
  mercurial/cmdutil.py
  mercurial/subrepo.py

CHANGE DETAILS

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -518,9 +518,7 @@
 
 @annotatesubrepoerror
 def add(self, ui, match, prefix, explicitonly, **opts):
-return cmdutil.add(ui, self._repo, match,
-   self.wvfs.reljoin(prefix, self._path),
-   explicitonly, **opts)
+return cmdutil.add(ui, self._repo, match, prefix, explicitonly, **opts)
 
 @annotatesubrepoerror
 def addremove(self, m, prefix, opts):
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2059,10 +2059,11 @@
 sub = wctx.sub(subpath)
 try:
 submatch = matchmod.subdirmatcher(subpath, match)
+subprefix = repo.wvfs.reljoin(prefix, subpath)
 if opts.get(r'subrepos'):
-bad.extend(sub.add(ui, submatch, prefix, False, **opts))
+bad.extend(sub.add(ui, submatch, subprefix, False, **opts))
 else:
-bad.extend(sub.add(ui, submatch, prefix, True, **opts))
+bad.extend(sub.add(ui, submatch, subprefix, True, **opts))
 except error.LookupError:
 ui.status(_("skipping missing subrepository: %s\n")
% join(subpath))



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


D5885: subrepo: adjust subrepo prefix before calling subrepo.addremove() (API)

2019-02-07 Thread martinvonz (Martin von Zweigbergk)
martinvonz 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/D5885

AFFECTED FILES
  mercurial/scmutil.py
  mercurial/subrepo.py

CHANGE DETAILS

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -527,8 +527,7 @@
 # be used to process sibling subrepos however.
 opts = copy.copy(opts)
 opts['subrepos'] = True
-return scmutil.addremove(self._repo, m,
- self.wvfs.reljoin(prefix, self._path), opts)
+return scmutil.addremove(self._repo, m, prefix, opts)
 
 @annotatesubrepoerror
 def cat(self, match, fm, fntemplate, prefix, **opts):
diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1047,8 +1047,9 @@
 submatch = matchmod.subdirmatcher(subpath, m)
 if opts.get('subrepos') or m.exact(subpath) or any(submatch.files()):
 sub = wctx.sub(subpath)
+subprefix = repo.wvfs.reljoin(prefix, subpath)
 try:
-if sub.addremove(submatch, prefix, opts):
+if sub.addremove(submatch, subprefix, opts):
 ret = 1
 except error.LookupError:
 repo.ui.status(_("skipping missing subrepository: %s\n")



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


D5882: subrepo: adjust subrepo prefix before calling subrepo.removefiles() (API)

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

REVISION SUMMARY
  That's what we do with the matcher so it seems more consistent.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/cmdutil.py
  mercurial/subrepo.py

CHANGE DETAILS

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -847,8 +847,7 @@
 @annotatesubrepoerror
 def removefiles(self, matcher, prefix, after, force, subrepos,
 dryrun, warnings):
-return cmdutil.remove(self.ui, self._repo, matcher,
-  self.wvfs.reljoin(prefix, self._path),
+return cmdutil.remove(self.ui, self._repo, matcher, prefix,
   after, force, subrepos, dryrun)
 
 @annotatesubrepoerror
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2208,11 +2208,12 @@
unit=_('subrepos'))
 for subpath in subs:
 submatch = matchmod.subdirmatcher(subpath, m)
+subprefix = repo.wvfs.reljoin(prefix, subpath)
 if subrepos or m.exact(subpath) or any(submatch.files()):
 progress.increment()
 sub = wctx.sub(subpath)
 try:
-if sub.removefiles(submatch, prefix, after, force, subrepos,
+if sub.removefiles(submatch, subprefix, after, force, subrepos,
dryrun, warnings):
 ret = 1
 except error.LookupError:



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


D5881: subrepo: avoid calculating subrepo prefix twice for cat() (API)

2019-02-07 Thread martinvonz (Martin von Zweigbergk)
martinvonz 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/D5881

AFFECTED FILES
  mercurial/cmdutil.py

CHANGE DETAILS

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2361,14 +2361,12 @@
 sub = ctx.sub(subpath)
 try:
 submatch = matchmod.subdirmatcher(subpath, matcher)
-
-if not sub.cat(submatch, basefm, fntemplate,
-   os.path.join(prefix, sub._path),
+subprefix = os.path.join(prefix, sub._path)
+if not sub.cat(submatch, basefm, fntemplate, subprefix,
**pycompat.strkwargs(opts)):
 err = 0
 except error.RepoLookupError:
-ui.status(_("skipping missing subrepository: %s\n")
-   % os.path.join(prefix, subpath))
+ui.status(_("skipping missing subrepository: %s\n") % subprefix)
 
 return err
 



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


[PATCH] convert: handle empty intial commits while converting to svn

2019-02-07 Thread Nikita Slyusarev
# HG changeset patch
# User Nikita Slyusarev 
# Date 1549555074 -10800
#  Thu Feb 07 18:57:54 2019 +0300
# Node ID bde6d4eed3104a49c9d4558907d1af4af8718ba1
# Parent  67e622ade4155d89270ec7ce6928f5645317a5c1
convert: handle empty intial commits while converting to svn

Svn commit generation code skips empty commits, returning the parent.
Skipping the root commit must return None instead.

Added test to check skipping of empty commits.

diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py
--- a/hgext/convert/subversion.py
+++ b/hgext/convert/subversion.py
@@ -1324,8 +1324,8 @@
 try:
 rev = self.commit_re.search(output).group(1)
 except AttributeError:
-if parents and not files:
-return parents[0]
+if not files:
+return parents[0] if parents else None
 self.ui.warn(_('unexpected svn output:\n'))
 self.ui.warn(output)
 raise error.Abort(_('unable to cope with svn output'))
diff --git a/tests/test-convert-svn-sink.t b/tests/test-convert-svn-sink.t
--- a/tests/test-convert-svn-sink.t
+++ b/tests/test-convert-svn-sink.t
@@ -466,3 +466,46 @@
   msg: Add file a
A /a
   $ rm -rf a a-hg a-hg-wc
+
+Skipping empty commits
+
+  $ hg init a
+
+  $ hg --cwd a --config ui.allowemptycommit=True ci -d '1 0' -m 'Initial empty 
commit'
+
+  $ echo a > a/a
+  $ hg --cwd a ci -d '0 0' -A -m 'Some change'
+  adding a
+  $ hg --cwd a --config ui.allowemptycommit=True ci -d '2 0' -m 'Empty commit 
1'
+  $ hg --cwd a --config ui.allowemptycommit=True ci -d '3 0' -m 'Empty commit 
2'
+  $ echo b > a/b
+  $ hg --cwd a ci -d '0 0' -A -m 'Another change'
+  adding b
+
+  $ hg convert -d svn a
+  assuming destination a-hg
+  initializing svn repository 'a-hg'
+  initializing svn working copy 'a-hg-wc'
+  scanning source...
+  sorting...
+  converting...
+  4 Initial empty commit
+  3 Some change
+  2 Empty commit 1
+  1 Empty commit 2
+  0 Another change
+
+  $ svnupanddisplay a-hg-wc 0
+   2 1 test a
+   2 2 test .
+   2 2 test b
+  revision: 2
+  author: test
+  msg: Another change
+   A /b
+  revision: 1
+  author: test
+  msg: Some change
+   A /a
+
+  $ rm -rf a a-hg a-hg-wc
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


mercurial@41598: 16 new changesets (1 on stable)

2019-02-07 Thread Mercurial Commits
16 new changesets (1 on stable) in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/87a6e3c953e0
changeset:   41583:87a6e3c953e0
branch:  stable
parent:  41460:8b2892d5a9f2
user:Matt Harbison 
date:Tue Feb 05 20:50:54 2019 -0500
summary: subrepo: avoid false unsafe path detection on Windows

https://www.mercurial-scm.org/repo/hg/rev/a4cd77a425a3
changeset:   41584:a4cd77a425a3
parent:  41582:7b2580e0dbbd
user:Ludovic Chabant 
date:Sat Feb 02 21:58:49 2019 -0800
summary: extdiff: support tools that can be run simultaneously

https://www.mercurial-scm.org/repo/hg/rev/549af2fa089f
changeset:   41585:549af2fa089f
user:Matt Harbison 
date:Tue Feb 05 09:37:23 2019 -0500
summary: tests: extract the http server authentication extension to a 
single module

https://www.mercurial-scm.org/repo/hg/rev/7855a949b7c2
changeset:   41586:7855a949b7c2
user:Matt Harbison 
date:Tue Feb 05 13:30:48 2019 -0500
summary: run-tests: allow spaces in the --view tool

https://www.mercurial-scm.org/repo/hg/rev/ccaa52865fac
changeset:   41587:ccaa52865fac
user:Matt Harbison 
date:Tue Feb 05 13:32:39 2019 -0500
summary: tests: add code to handle HTTP digests on the server side

https://www.mercurial-scm.org/repo/hg/rev/765a608c2108
changeset:   41588:765a608c2108
user:Matt Harbison 
date:Tue Feb 05 16:16:14 2019 -0500
summary: wsgiheaders: make sure __repr__() returns a string

https://www.mercurial-scm.org/repo/hg/rev/46432c04f010
changeset:   41589:46432c04f010
user:Matt Harbison 
date:Tue Feb 05 16:47:19 2019 -0500
summary: tests: enable HTTP digest testing

https://www.mercurial-scm.org/repo/hg/rev/349c8879becd
changeset:   41590:349c8879becd
user:Matt Harbison 
date:Tue Feb 05 17:02:40 2019 -0500
summary: py3: ensure the HTTP password manager returns strings, not bytes

https://www.mercurial-scm.org/repo/hg/rev/4d4842445afc
changeset:   41591:4d4842445afc
user:Martin von Zweigbergk 
date:Wed Feb 06 14:57:08 2019 -0800
summary: revert: always show relative path to .orig backup

https://www.mercurial-scm.org/repo/hg/rev/e67a85e0f19e
changeset:   41592:e67a85e0f19e
user:Martin von Zweigbergk 
date:Wed Feb 06 15:26:53 2019 -0800
summary: mq: always show relative path to .orig backup

https://www.mercurial-scm.org/repo/hg/rev/59025c9b3540
changeset:   41593:59025c9b3540
user:Martin von Zweigbergk 
date:Wed Feb 06 15:35:25 2019 -0800
summary: subrepo: always show relative path to .orig backup

https://www.mercurial-scm.org/repo/hg/rev/7e09ffb3170d
changeset:   41594:7e09ffb3170d
user:Martin von Zweigbergk 
date:Mon Feb 04 09:21:40 2019 -0800
summary: tests: demonstrate broken unshelve when backing up untracked file

https://www.mercurial-scm.org/repo/hg/rev/8785188d1915
changeset:   41595:8785188d1915
user:Martin von Zweigbergk 
date:Mon Feb 04 20:46:33 2019 -0800
summary: scmutil: introduce a new backuppath() to replace origpath()

https://www.mercurial-scm.org/repo/hg/rev/630af04d4ae4
changeset:   41596:630af04d4ae4
user:Martin von Zweigbergk 
date:Mon Feb 04 20:49:45 2019 -0800
summary: shelve: fix broken backup of conflicting untracked file

https://www.mercurial-scm.org/repo/hg/rev/9e545c9a4dfe
changeset:   41597:9e545c9a4dfe
user:Martin von Zweigbergk 
date:Tue Feb 05 11:14:07 2019 -0800
summary: revert: migrate to scmutil.backuppath()

https://www.mercurial-scm.org/repo/hg/rev/e89e78a725ee
changeset:   41598:e89e78a725ee
bookmark:@
tag: tip
user:Martin von Zweigbergk 
date:Mon Feb 04 21:00:58 2019 -0800
summary: largefiles: migrate to scmutil.backuppath()

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


D5792: uncommit: added interactive mode(issue6062)

2019-02-07 Thread pulkit (Pulkit Goyal)
pulkit added a comment.


  In https://phab.mercurial-scm.org/D5792#85236, @taapas1128 wrote:
  
  > @pulkit I was able to import the tests and make them compatible with 
`hg-stable` . Some tests which include commands like `hg obslog` , `hg amend 
--extract` , and `hg uncommit -n` which are not part of `hg-stable` but 
`evolve` are not running else all tests are now running smoothly .
  
  
  `hg amend --extract` is just another name for `hg uncommit`.
  You can move `--note` flag to core uncommit as a part of different patch.
  Related to obslog, you can do `hg log -r . -r precursor(.)` or `hg diff -r . 
-r precursor(.)` but I don't think that will be sufficient.

REPOSITORY
  rHG Mercurial

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

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


D5880: fsmonitor: rename new verbose config knob

2019-02-07 Thread lothiraldan (Boris Feld)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG286eeed14893: fsmonitor: rename new verbose config knob 
(authored by lothiraldan, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D5880?vs=13890=13891#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5880?vs=13890=13891

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

AFFECTED FILES
  hgext/fsmonitor/__init__.py

CHANGE DETAILS

diff --git a/hgext/fsmonitor/__init__.py b/hgext/fsmonitor/__init__.py
--- a/hgext/fsmonitor/__init__.py
+++ b/hgext/fsmonitor/__init__.py
@@ -161,7 +161,7 @@
 configitem('fsmonitor', 'blacklistusers',
 default=list,
 )
-configitem('hgwatchman', 'verbose',
+configitem('fsmonitor', 'verbose',
 default=True,
 )
 configitem('experimental', 'fsmonitor.transaction_notify',
@@ -175,13 +175,13 @@
 def _handleunavailable(ui, state, ex):
 """Exception handler for Watchman interaction exceptions"""
 if isinstance(ex, watchmanclient.Unavailable):
-# experimental config: hgwatchman.verbose
-if ex.warn and ui.configbool('hgwatchman', 'verbose'):
+# experimental config: fsmonitor.verbose
+if ex.warn and ui.configbool('fsmonitor', 'verbose'):
 ui.warn(str(ex) + '\n')
 if ex.invalidate:
 state.invalidate()
-# experimental config: hgwatchman.verbose
-if ui.configbool('hgwatchman','verbose'):
+# experimental config: fsmonitor.verbose
+if ui.configbool('fsmonitor', 'verbose'):
 ui.log('fsmonitor', 'Watchman unavailable: %s\n', ex.msg)
 else:
 ui.log('fsmonitor', 'Watchman exception: %s\n', ex)



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


D5880: fsmonitor: rename new verbose config knob

2019-02-07 Thread pulkit (Pulkit Goyal)
pulkit added a comment.


  I am unable to find any docs for this config option, can you add them as a 
follow-up?

REPOSITORY
  rHG Mercurial

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

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


D5880: fsmonitor: rename new verbose config knob

2019-02-07 Thread pulkit (Pulkit Goyal)
pulkit accepted this revision.
pulkit added inline comments.

INLINE COMMENTS

> __init__.py:178
>  if isinstance(ex, watchmanclient.Unavailable):
>  # experimental config: hgwatchman.verbose
> +if ex.warn and ui.configbool('fsmonitor', 'verbose'):

will change this one also in flight.

REPOSITORY
  rHG Mercurial

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

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


D5880: fsmonitor: rename new verbose config knob

2019-02-07 Thread lothiraldan (Boris Feld)
lothiraldan added a comment.


  Nice catch, sorry for the hasty phabsend

REPOSITORY
  rHG Mercurial

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

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


D5880: fsmonitor: rename new verbose config knob

2019-02-07 Thread lothiraldan (Boris Feld)
lothiraldan updated this revision to Diff 13890.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5880?vs=13889=13890

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

AFFECTED FILES
  hgext/fsmonitor/__init__.py

CHANGE DETAILS

diff --git a/hgext/fsmonitor/__init__.py b/hgext/fsmonitor/__init__.py
--- a/hgext/fsmonitor/__init__.py
+++ b/hgext/fsmonitor/__init__.py
@@ -161,7 +161,7 @@
 configitem('fsmonitor', 'blacklistusers',
 default=list,
 )
-configitem('hgwatchman', 'verbose',
+configitem('fsmonitor', 'verbose',
 default=True,
 )
 configitem('experimental', 'fsmonitor.transaction_notify',
@@ -176,12 +176,12 @@
 """Exception handler for Watchman interaction exceptions"""
 if isinstance(ex, watchmanclient.Unavailable):
 # experimental config: hgwatchman.verbose
-if ex.warn and ui.configbool('hgwatchman', 'verbose'):
+if ex.warn and ui.configbool('fsmonitor', 'verbose'):
 ui.warn(str(ex) + '\n')
 if ex.invalidate:
 state.invalidate()
-# experimental config: hgwatchman.verbose
-if ui.configbool('hgwatchman','verbose'):
+# experimental config: fsmonitor.verbose
+if ui.configbool('fsmonitor', 'verbose'):
 ui.log('fsmonitor', 'Watchman unavailable: %s\n', ex.msg)
 else:
 ui.log('fsmonitor', 'Watchman exception: %s\n', ex)



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


D5490: commit: remove ignore whitespace option on --interactive (issue6042)

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


  https://phab.mercurial-scm.org/rHG66399f2e92aac38855caab69a4c0acafead90c91 
solves this issue, many thanks @spectral. Closing this.

REPOSITORY
  rHG Mercurial

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

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


[Bug 6074] New: ✨ :sparkles: Support for emojis in commit messages

2019-02-07 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=6074

Bug ID: 6074
   Summary: ✨ :sparkles: Support for emojis in commit messages
   Product: Mercurial
   Version: 4.8.1
  Hardware: PC
OS: Linux
Status: UNCONFIRMED
  Severity: feature
  Priority: wish
 Component: hgweb
  Assignee: bugzi...@mercurial-scm.org
  Reporter: arthur.l...@logilab.fr
CC: mercurial-devel@mercurial-scm.org

emoji in commit messages should not be reserved to git ! mercurial can do them
too ! and hgweb could display them too ! 

https://gitmoji.carloscuesta.me/ for reference ✨

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


D5880: fsmonitor: rename new verbose config knob

2019-02-07 Thread pulkit (Pulkit Goyal)
pulkit added a comment.


  Looks like you missed updating the users of this config.

REPOSITORY
  rHG Mercurial

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

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


D5880: fsmonitor: rename new verbose config knob

2019-02-07 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The config knob was introduced in this release cycle under the old extension
  name, rename it before it is part of a release.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/fsmonitor/__init__.py

CHANGE DETAILS

diff --git a/hgext/fsmonitor/__init__.py b/hgext/fsmonitor/__init__.py
--- a/hgext/fsmonitor/__init__.py
+++ b/hgext/fsmonitor/__init__.py
@@ -161,7 +161,7 @@
 configitem('fsmonitor', 'blacklistusers',
 default=list,
 )
-configitem('hgwatchman', 'verbose',
+configitem('fsmonitor', 'verbose',
 default=True,
 )
 configitem('experimental', 'fsmonitor.transaction_notify',



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


D5855: mq: migrate to scmutil.backuppath()

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


  In https://phab.mercurial-scm.org/D5855#86040, @martinvonz wrote:
  
  > In https://phab.mercurial-scm.org/D5855#86020, @yuja wrote:
  >
  > > > - absorig = scmutil.origpath(self.ui, repo, absf) +
absorig = scmutil.backuppath(self.ui, repo, f) self.ui.note(_('saving current 
version of %s as %s\n') %
  > > > - (f, os.path.relpath(absorig))) + (f, 
os.path.relpath(absorig, start=repo.root)))
  > >
  > > Why printing a repo-relative path instead of cwd-relative one?
  >
  >
  > Oops, not intended. Feel free to fix it. Otherwise I'll do that in about 
two hours.
  
  
  Fixed in the hg-committed repo.

REPOSITORY
  rHG Mercurial

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

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


D5855: mq: migrate to scmutil.backuppath()

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


  In https://phab.mercurial-scm.org/D5855#86020, @yuja wrote:
  
  > > - absorig = scmutil.origpath(self.ui, repo, absf) +
absorig = scmutil.backuppath(self.ui, repo, f) self.ui.note(_('saving current 
version of %s as %s\n') %
  > > - (f, os.path.relpath(absorig))) + (f, 
os.path.relpath(absorig, start=repo.root)))
  >
  > Why printing a repo-relative path instead of cwd-relative one?
  
  
  Oops, not intended. Feel free to fix it. Otherwise I'll do that in about two 
hours.

REPOSITORY
  rHG Mercurial

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

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


D5878: py3: make sure __repr__ returns str

2019-02-07 Thread pulkit (Pulkit Goyal)
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  No test fails but I found it while debugging test-commit-interactive-curses.t
  failure.
  
  1. skip-blame because just r'' prefix

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/patch.py

CHANGE DETAILS

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -364,7 +364,7 @@
 return self._ispatchinga(afile) and self._ispatchingb(bfile)
 
 def __repr__(self):
-return "" % (self.op, self.path)
+return r"" % (self.op, self.path)
 
 def readgitpatch(lr):
 """extract git-style metadata about patches from """



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


mercurial@41582: 18 new changesets

2019-02-07 Thread Mercurial Commits
18 new changesets in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/bf7fb97aecf1
changeset:   41565:bf7fb97aecf1
user:Martijn Pieters 
date:Mon Jan 21 16:04:48 2019 +
summary: branchmap: make branchcache responsible for reading

https://www.mercurial-scm.org/repo/hg/rev/eb7ce452e0fb
changeset:   41566:eb7ce452e0fb
user:Martijn Pieters 
date:Mon Jan 21 16:37:23 2019 +
summary: branchmap: updating triggers a write

https://www.mercurial-scm.org/repo/hg/rev/c795c462b1d6
changeset:   41567:c795c462b1d6
user:Martijn Pieters 
date:Mon Jan 21 17:41:59 2019 +
summary: branchmap: add some clarifications and clean up flow

https://www.mercurial-scm.org/repo/hg/rev/641c8b66a825
changeset:   41568:641c8b66a825
user:Martin von Zweigbergk 
date:Sun Feb 03 22:49:28 2019 -0800
summary: largefiles: drop "rel" prefix from filename variables

https://www.mercurial-scm.org/repo/hg/rev/ef2295651351
changeset:   41569:ef2295651351
user:Martin von Zweigbergk 
date:Mon Feb 04 21:21:55 2019 -0800
summary: merge: don't unnecessarily calculate backup path

https://www.mercurial-scm.org/repo/hg/rev/1f2714052d7e
changeset:   41570:1f2714052d7e
user:Martin von Zweigbergk 
date:Mon Feb 04 21:23:44 2019 -0800
summary: merge: don't unnecessarily calculate absolute path

https://www.mercurial-scm.org/repo/hg/rev/f9ad1b65d3c3
changeset:   41571:f9ad1b65d3c3
user:Pulkit Goyal 
date:Tue Feb 05 21:17:46 2019 +0300
summary: py3: add 1 new passing test found by buildbot

https://www.mercurial-scm.org/repo/hg/rev/9b4a142a2035
changeset:   41572:9b4a142a2035
user:Pulkit Goyal 
date:Tue Feb 05 21:29:55 2019 +0300
summary: py3: use '%d' for integers instead of '%s'

https://www.mercurial-scm.org/repo/hg/rev/83d62df28ab6
changeset:   41573:83d62df28ab6
user:Pulkit Goyal 
date:Tue Feb 05 21:30:30 2019 +0300
summary: py3: add some b'' prefixes in hgext/convert/monotone.py

https://www.mercurial-scm.org/repo/hg/rev/b436059c1cca
changeset:   41574:b436059c1cca
user:Pulkit Goyal 
date:Tue Feb 05 21:31:33 2019 +0300
summary: py3: use pycompat.bytestr() on extra values because it can be int

https://www.mercurial-scm.org/repo/hg/rev/aec185af621e
changeset:   41575:aec185af621e
user:Martin von Zweigbergk 
date:Fri Feb 01 22:28:55 2019 -0800
summary: config: introduce a new value for ui.relative-paths getting old 
behavior

https://www.mercurial-scm.org/repo/hg/rev/15f63ac122ea
changeset:   41576:15f63ac122ea
user:Martin von Zweigbergk 
date:Tue Jan 29 15:49:20 2019 -0800
summary: files: respect ui.relative-paths

https://www.mercurial-scm.org/repo/hg/rev/5f827e9ce870
changeset:   41577:5f827e9ce870
user:Martin von Zweigbergk 
date:Fri Feb 01 22:52:09 2019 -0800
summary: status: if ui.relative-paths=no, don't use relative paths even 
with patterns

https://www.mercurial-scm.org/repo/hg/rev/8d1dc380b026
changeset:   41578:8d1dc380b026
user:Martin von Zweigbergk 
date:Tue Feb 05 14:15:34 2019 -0800
summary: largefiles: use wrappedfunction() for matchandpats() override in 
overridelog()

https://www.mercurial-scm.org/repo/hg/rev/028bb170e74d
changeset:   41579:028bb170e74d
user:Martin von Zweigbergk 
date:Tue Feb 05 14:29:37 2019 -0800
summary: largefiles: use wrappedfunction() for util.copyfile() override

https://www.mercurial-scm.org/repo/hg/rev/9f11759fc5f5
changeset:   41580:9f11759fc5f5
user:Martin von Zweigbergk 
date:Tue Feb 05 14:42:13 2019 -0800
summary: largefiles: use wrappedfunction() for match() override in 
overridecopy()

https://www.mercurial-scm.org/repo/hg/rev/d9fd2f74d683
changeset:   41581:d9fd2f74d683
user:Martin von Zweigbergk 
date:Tue Feb 05 14:25:11 2019 -0800
summary: largefiles: use wrappedfunction() for "normal files match" in 
overridecopy()

https://www.mercurial-scm.org/repo/hg/rev/7b2580e0dbbd
changeset:   41582:7b2580e0dbbd
bookmark:@
tag: tip
user:Martin von Zweigbergk 
date:Tue Feb 05 11:17:11 2019 -0800
summary: largefiles: use wrappedfunction() in overriderevert()

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


D5490: commit: remove ignore whitespace option on --interactive (issue6042)

2019-02-07 Thread yuja (Yuya Nishihara)
yuja added a comment.


  >   @spectral @yuja Can I close this?
  
  Probably yes.

REPOSITORY
  rHG Mercurial

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

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


Re: D5490: commit: remove ignore whitespace option on --interactive (issue6042)

2019-02-07 Thread Yuya Nishihara
>   @spectral @yuja Can I close this?

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


D5855: mq: migrate to scmutil.backuppath()

2019-02-07 Thread yuja (Yuya Nishihara)
yuja added a comment.


  > - absorig = scmutil.origpath(self.ui, repo, absf) +absorig 
= scmutil.backuppath(self.ui, repo, f) self.ui.note(_('saving current version 
of %s as %s\n') %
  > - (f, os.path.relpath(absorig))) + (f, 
os.path.relpath(absorig, start=repo.root)))
  
  Why printing a repo-relative path instead of cwd-relative one?

REPOSITORY
  rHG Mercurial

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

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


Re: D5855: mq: migrate to scmutil.backuppath()

2019-02-07 Thread Yuya Nishihara
> -absorig = scmutil.origpath(self.ui, repo, absf)
> +absorig = scmutil.backuppath(self.ui, repo, f)
>  self.ui.note(_('saving current version of %s as %s\n') %
> - (f, os.path.relpath(absorig)))
> + (f, os.path.relpath(absorig, start=repo.root)))

Why printing a repo-relative path instead of cwd-relative one?
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH 1 of 2] lfs: disable all authentication except Basic for HTTP(S) connections

2019-02-07 Thread Yuya Nishihara
On Wed, 06 Feb 2019 23:49:49 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison 
> # Date 1549510249 18000
> #  Wed Feb 06 22:30:49 2019 -0500
> # Node ID 847900c2b99e6659cc50353ddab4f980905675c4
> # Parent  349c8879becd13143db74894490299b56524d1e1
> lfs: disable all authentication except Basic for HTTP(S) connections

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


Re: [PATCH STABLE] subrepo: avoid false unsafe path detection on Windows

2019-02-07 Thread Yuya Nishihara
On Wed, 06 Feb 2019 23:16:43 -0500, Matt Harbison wrote:
> On Wed, 06 Feb 2019 06:54:02 -0500, Yuya Nishihara  wrote:
> > On Tue, 05 Feb 2019 21:04:00 -0500, Matt Harbison wrote:
> >> # HG changeset patch
> >> # User Matt Harbison 
> >> # Date 1549417854 18000
> >> #  Tue Feb 05 20:50:54 2019 -0500
> >> # Branch stable
> >> # Node ID 0e18c6ec895542394c0ad18c380bf3bbd4ba4d9b
> >> # Parent  8b2892d5a9f2c06c998c977015a9ad3e3a3c9b5f
> >> subrepo: avoid false unsafe path detection on Windows
> >>
> >> diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
> >> --- a/mercurial/subrepo.py
> >> +++ b/mercurial/subrepo.py
> >> @@ -405,7 +405,7 @@ class hgsubrepo(abstractsubrepo):
> >>  super(hgsubrepo, self).__init__(ctx, path)
> >>  self._state = state
> >>  r = ctx.repo()
> >> -root = r.wjoin(path)
> >> +root = os.path.realpath(r.wjoin(path))
> >
> > Can we do r.wjoin(util.localpath(path)) instead? Even though symlinks and
> > ".."s should be checked before, I want to avoid path resolution here for
> > extra safety.
> 
> Early indications are yes.  If the rest of the tests pass, I'll resend.
> I'm not real sure what the reason for avoiding path resolution is, so feel
> free to add commentary to the patch if you queue it.

This is a sanity check for bad subrepo paths, so I think it's better
to not trust that the given path is valid.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH V2 STABLE] subrepo: avoid false unsafe path detection on Windows

2019-02-07 Thread Yuya Nishihara
On Thu, 07 Feb 2019 00:03:53 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison 
> # Date 1549417854 18000
> #  Tue Feb 05 20:50:54 2019 -0500
> # Branch stable
> # Node ID 75d70ffee2f9fb710f58d5552b319514ece459f9
> # Parent  8b2892d5a9f2c06c998c977015a9ad3e3a3c9b5f
> subrepo: avoid false unsafe path detection on Windows

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


D5877: tests: fix regression tests failing on CentOS 7

2019-02-07 Thread Mathias De Maré
Mathiasdm 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/D5877

AFFECTED FILES
  tests/test-clonebundles.t
  tests/test-http-proxy.t
  tests/test-lfs-serve-access.t

CHANGE DETAILS

diff --git a/tests/test-lfs-serve-access.t b/tests/test-lfs-serve-access.t
--- a/tests/test-lfs-serve-access.t
+++ b/tests/test-lfs-serve-access.t
@@ -84,6 +84,7 @@
   $ hg -R httpclone update default --config 
lfs.url=http://localhost:$HGPORT2/missing
   abort: LFS error: *onnection *refused*! (glob) (?)
   abort: LFS error: $EADDRNOTAVAIL$! (glob) (?)
+  abort: LFS error: No route to host! (?)
   (the "lfs.url" config may be used to override 
http://localhost:$HGPORT2/missing)
   [255]
 
diff --git a/tests/test-http-proxy.t b/tests/test-http-proxy.t
--- a/tests/test-http-proxy.t
+++ b/tests/test-http-proxy.t
@@ -90,7 +90,7 @@
 misconfigured hosts)
 
   $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True 
http://localhost:$HGPORT/ f
-  abort: error: (Connection refused|Protocol not supported|.* actively refused 
it|\$EADDRNOTAVAIL\$) (re)
+  abort: error: (Connection refused|Protocol not supported|.* actively refused 
it|\$EADDRNOTAVAIL\$|No route to host) (re)
   [255]
 
 do not use the proxy if it is in the no list
diff --git a/tests/test-clonebundles.t b/tests/test-clonebundles.t
--- a/tests/test-clonebundles.t
+++ b/tests/test-clonebundles.t
@@ -64,7 +64,7 @@
   $ echo "http://localhost:$HGPORT1/bundle.hg; > 
server/.hg/clonebundles.manifest
   $ hg clone http://localhost:$HGPORT server-not-runner
   applying clone bundle from http://localhost:$HGPORT1/bundle.hg
-  error fetching bundle: (.* refused.*|Protocol not supported|(.* 
)?\$EADDRNOTAVAIL\$) (re)
+  error fetching bundle: (.* refused.*|Protocol not supported|(.* 
)?\$EADDRNOTAVAIL\$|.* No route to host) (re)
   abort: error applying bundle
   (if this error persists, consider contacting the server operator or disable 
clone bundles via "--config ui.clonebundles=false")
   [255]



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


D5876: packaging: modify rc detection to work with X.Yrc instead of X.Y-rc

2019-02-07 Thread Mathias De Maré
Mathiasdm created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  rc detection on CentOS failed without this change,
  resulting in upgrades from 4.9rc to 4.9 not working
  (4.9rc was considered more recent than 4.9).

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  contrib/packaging/packagelib.sh

CHANGE DETAILS

diff --git a/contrib/packaging/packagelib.sh b/contrib/packaging/packagelib.sh
--- a/contrib/packaging/packagelib.sh
+++ b/contrib/packaging/packagelib.sh
@@ -28,9 +28,9 @@
 distance=''
 node=''
 fi
-if echo $hgversion | grep -- '-' > /dev/null 2>&1; then
-version=`echo $hgversion | cut -d- -f1`
-type=`echo $hgversion | cut -d- -f2`
+if echo $hgversion | grep -E -- '[0-9]\.[0-9](\.[0-9])?rc' > /dev/null 
2>&1; then
+version=`echo $hgversion | cut -d'r' -f1`
+type="rc`echo $hgversion | cut -d'c' -f2-`"
 else
 version=$hgversion
 type=''



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


Re: rc naming convention

2019-02-07 Thread Mathias De Maré
On Wed, Feb 6, 2019 at 5:08 PM Augie Fackler  wrote:

>
>
> > On Feb 6, 2019, at 04:47, Mathias De Maré 
> wrote:
> >
> > Hello all,
> >
> > The CentOS RPMs think 4.9rc0 is more recent than 4.9 (which is somewhat
> annoying).
> > I noticed there is some code in contrib/packaging/packagelib.sh to
> handle this, but it stopped working when the naming convention was changed
> from “-rc” to “rc”, in the 4.6rc0 timeframe.
> >
> > Is there a reason for this change?
>
> Because 4.9rcN is a valid version string for pip, but 4.9-rc is not.
>
> > Additionally, what’s the preferred action? Should I modify
> contrib/packaging/packagelib.sh to support “rc”, or would it be better to
> go back to the “-rc” naming convention?
>
> We won't be going back, because we need pip to do the right thing.
>
Thanks for clarifying, I'll try to fix packagelib.sh to match this.

>
> >
> > Greetings,
> > Mathias
> >
> > (sending again from my Gmail address, as my mail from @nokia.com
> doesn't appear to arrive)
> > ___
> > Mercurial-devel mailing list
> > Mercurial-devel@mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
>
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel