[Updated] [+- ] D11456: patchbomb: fix traceback on outgoing when not specifying revisions

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Mon Sep 20 15:30:18 UTC 2021


Alphare updated this revision to Diff 30328.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11456?vs=30327&id=30328

BRANCH
  stable

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

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

AFFECTED FILES
  hgext/patchbomb.py
  relnotes/next
  tests/test-patchbomb.t

CHANGE DETAILS

diff --git a/tests/test-patchbomb.t b/tests/test-patchbomb.t
--- a/tests/test-patchbomb.t
+++ b/tests/test-patchbomb.t
@@ -2626,6 +2626,45 @@
   o  0:8580ff50825a a
   
   $ hg phase --force --secret -r 10
+
+Test without revisions specified
+  $ hg email --date '1980-1-1 0:1' -n -o -t foo
+  comparing with $TESTTMP/t
+  From [test]: test
+  this patch series consists of 1 patches.
+  
+  Cc: 
+  
+  displaying [PATCH] d ...
+  MIME-Version: 1.0
+  Content-Type: text/plain; charset="us-ascii"
+  Content-Transfer-Encoding: 7bit
+  Subject: [PATCH] d
+  X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
+  X-Mercurial-Series-Index: 1
+  X-Mercurial-Series-Total: 1
+  Message-Id: <2f9fa9b998c5fe3ac2bd.315532860 at test-hostname>
+  X-Mercurial-Series-Id: <2f9fa9b998c5fe3ac2bd.315532860 at test-hostname>
+  User-Agent: Mercurial-patchbomb/* (glob)
+  Date: Tue, 01 Jan 1980 00:01:00 +0000
+  From: test
+  To: foo
+  
+  # HG changeset patch
+  # User test
+  # Date 4 0
+  #      Thu Jan 01 00:00:04 1970 +0000
+  # Branch test
+  # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
+  # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
+  d
+  
+  diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
+  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/d	Thu Jan 01 00:00:04 1970 +0000
+  @@ -0,0 +1,1 @@
+  +d
+  
   $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t -r 'rev(10) or rev(6)'
   comparing with ../t
   From [test]: test
diff --git a/relnotes/next b/relnotes/next
--- a/relnotes/next
+++ b/relnotes/next
@@ -18,6 +18,7 @@
  * `hg fix --working-dir` now correctly works when in an uncommitted merge state
  * `rhg` (Rust fast-path for `hg`) now supports the full config list syntax
  * `rhg` now parses some corner-cases for revsets correctly
+ * `hg email -o` now works again when not mentioning a revision
  * Lots of Windows fixes
  * Lots of miscellaneous other fixes
 
diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -533,7 +533,7 @@
 def _getoutgoing(repo, dest, revs):
     '''Return the revisions present locally but not in dest'''
     ui = repo.ui
-    paths = urlutil.get_push_paths(repo, ui, [dest])
+    paths = urlutil.get_push_paths(repo, ui, [dest] if dest else None)
     safe_paths = [urlutil.hidepassword(p.rawloc) for p in paths]
     ui.status(_(b'comparing with %s\n') % b','.join(safe_paths))
 



To: Alphare, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210920/70f0c9df/attachment-0002.html>


More information about the Mercurial-patches mailing list