Patchwork [2,of,3,V2] rebase: pass in a regular set to _setrebasesetvisibility()

login
register
mail settings
Submitter via Mercurial-devel
Date March 11, 2017, 7:28 a.m.
Message ID <c946c7aa259ca97d5ca8.1489217333@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/19095/
State Accepted
Headers show

Comments

via Mercurial-devel - March 11, 2017, 7:28 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1489215991 28800
#      Fri Mar 10 23:06:31 2017 -0800
# Node ID c946c7aa259ca97d5ca88238df0bb6e61d6b6313
# Parent  caaa335929a21db85735f6f12fc1c6a3c81f5e86
rebase: pass in a regular set to _setrebasesetvisibility()

Trivial refactoring to simplify the next patch.

Patch

diff -r caaa335929a2 -r c946c7aa259c hgext/rebase.py
--- a/hgext/rebase.py	Wed Feb 01 09:18:44 2017 -0800
+++ b/hgext/rebase.py	Fri Mar 10 23:06:31 2017 -0800
@@ -250,7 +250,7 @@ 
         repo.ui.debug('computed skipped revs: %s\n' %
                         (' '.join(str(r) for r in sorted(skipped)) or None))
         repo.ui.debug('rebase status resumed\n')
-        _setrebasesetvisibility(repo, state.keys())
+        _setrebasesetvisibility(repo, set(state.keys()))
 
         self.originalwd = originalwd
         self.target = target
@@ -1203,7 +1203,7 @@ 
     dest: context
     rebaseset: set of rev
     '''
-    _setrebasesetvisibility(repo, rebaseset)
+    _setrebasesetvisibility(repo, set(rebaseset))
 
     # This check isn't strictly necessary, since mq detects commits over an
     # applied patch. But it prevents messing up the working directory when
@@ -1389,7 +1389,6 @@ 
     This is used by another function to prevent rebased revision to because
     hidden (see issue4504)"""
     repo = repo.unfiltered()
-    revs = set(revs)
     repo._rebaseset = revs
     # invalidate cache if visibility changes
     hiddens = repo.filteredrevcache.get('visible', set())