diff hgext/patchbomb.py @ 35674:e711906aa42c

patchbomb: use 'tiprev' when appropriate This is cleaner than the current 'len(repo) - 1' form.
author Boris Feld <boris.feld@octobus.net>
date Wed, 17 Jan 2018 13:01:38 +0100
parents 7906354cbc68
children 33ed8b511185
line wrap: on
line diff
--- a/hgext/patchbomb.py	Thu May 04 02:28:19 2017 +0200
+++ b/hgext/patchbomb.py	Wed Jan 17 13:01:38 2018 +0100
@@ -454,7 +454,7 @@
 
     revs = [r for r in revs if r >= 0]
     if not revs:
-        revs = [len(repo) - 1]
+        revs = [repo.changelog.tiprev()]
     revs = repo.revs('outgoing(%s) and ::%ld', dest or '', revs)
     if not revs:
         ui.status(_("no changes found\n"))