git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org
Subject: [StGit PATCH 2/2] Use the builtin set() instead of sets.Set()
Date: Mon, 03 Sep 2007 23:48:51 +0200	[thread overview]
Message-ID: <20070903214851.18057.89136.stgit@yoghurt> (raw)
In-Reply-To: <20070903214545.18057.79301.stgit@yoghurt>

We can do that now that we're guaranteed to have Python 2.4 or later.

Signed-off-by: Karl Hasselström <kha@treskal.com>

---

 stgit/git.py |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)


diff --git a/stgit/git.py b/stgit/git.py
index 8857209..4b4c626 100644
--- a/stgit/git.py
+++ b/stgit/git.py
@@ -26,7 +26,6 @@ from stgit.utils import *
 from stgit.out import *
 from stgit.run import *
 from stgit.config import config
-from sets import Set
 
 # git exception class
 class GitException(Exception):
@@ -959,10 +958,9 @@ def __remotes_from_dir(dir):
 def remotes_list():
     """Return the list of remotes in the repository
     """
-
-    return Set(__remotes_from_config()) | \
-           Set(__remotes_from_dir('remotes')) | \
-           Set(__remotes_from_dir('branches'))
+    return (set(__remotes_from_config())
+            | set(__remotes_from_dir('remotes'))
+            | set(__remotes_from_dir('branches')))
 
 def remotes_local_branches(remote):
     """Returns the list of local branches fetched from given remote

      parent reply	other threads:[~2007-09-03 21:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-26 20:33 [StGIT PATCH 0/4] Clean up subprocess calling Karl Hasselström
2007-08-26 20:33 ` [StGIT PATCH 1/4] Refactor output handling to break circular dependency Karl Hasselström
2007-08-26 20:33 ` [StGIT PATCH 2/4] Refactor subprocess creation Karl Hasselström
2007-08-26 20:33 ` [StGIT PATCH 3/4] Assert that the argument to Run is a sequence of strings Karl Hasselström
2007-08-26 20:33 ` [StGIT PATCH 4/4] Add optional logging of subprocess execution Karl Hasselström
2007-08-29 10:50   ` Catalin Marinas
2007-08-29 11:11     ` Karl Hasselström
2007-08-29 17:16       ` Karl Hasselström
2007-09-03  8:34         ` Catalin Marinas
2007-09-03  8:36       ` Catalin Marinas
2007-09-03  9:04         ` Karl Hasselström
2007-09-03 21:48         ` [StGit PATCH 0/2] Break Python 2.3 compatibility Karl Hasselström
2007-09-03 21:48           ` [StGit PATCH 1/2] Use subprocess.Popen to call git executables Karl Hasselström
2007-09-03 21:48           ` Karl Hasselström [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070903214851.18057.89136.stgit@yoghurt \
    --to=kha@treskal.com \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).