mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
* get-branches: Check that the team has branches before downloading.
This commit is contained in:
parent
eab57aec28
commit
4a493b0c7a
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,7 +1,10 @@
|
||||
ubuntu-dev-tools (0.37ubuntu1) intrepid; urgency=low
|
||||
|
||||
[ Jonathan Patrick Davies ]
|
||||
* get-branches: Open the teams code page before making a new directory.
|
||||
* get-branches:
|
||||
- Open the teams code page before making a new directory.
|
||||
- Now check team option before anything else.
|
||||
- Check that the team has branches before downloading.
|
||||
* doc/get-branches.1: Created.
|
||||
* hugdaylist: Improved argument and error handling.
|
||||
* pull-lp-source:
|
||||
@ -16,7 +19,6 @@ ubuntu-dev-tools (0.37ubuntu1) intrepid; urgency=low
|
||||
* requestsync: Use the functions in the common.py file above to authenticate
|
||||
with Launchpad.
|
||||
* debian/control: Changed XS-Python-Version to >= 2.5.
|
||||
* get-branches: Now check team option before anything else.
|
||||
|
||||
[ Siegfried-Angel Gevatter Pujals ]
|
||||
* Add the GNU General Public License header to all scripts.
|
||||
|
18
get-branches
18
get-branches
@ -118,12 +118,6 @@ def main():
|
||||
print >> sys.stderr, "Perhaps invalid team name?"
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
os.makedirs(team)
|
||||
except:
|
||||
pass
|
||||
os.chdir(team)
|
||||
|
||||
branch_list_page = sock.read()
|
||||
sock.close()
|
||||
|
||||
@ -132,6 +126,18 @@ def main():
|
||||
|
||||
print "Downloading all branches for the team '%s'. This may take some " \
|
||||
"time." % team
|
||||
|
||||
# Check the team actually has branches.
|
||||
if len(branch_page_urls) == 0:
|
||||
print "The team '%s' does not have any branches on Launchpad." % team
|
||||
os.rmdir(team)
|
||||
sys.exit(0)
|
||||
|
||||
try:
|
||||
os.makedirs(team)
|
||||
except:
|
||||
pass
|
||||
os.chdir(team)
|
||||
|
||||
for url in branch_page_urls:
|
||||
sock = urllib2.urlopen("https://code.launchpad.net/%s" % url)
|
||||
|
Loading…
x
Reference in New Issue
Block a user