ó
>ò[c           @  ss   d  Z  d d l m Z m Z d d l Z d d l m Z d d l m Z m	 Z	 e j
 d  Z d   Z d   Z d S(	   u   
Move packages between labels.
i˙˙˙˙(   t   unicode_literalst   print_functionN(   t   errors(   t   get_server_apit   parse_specsu   binstar.movec      	   C  sV  t  |  j |  j  } |  j } | j | j  } |  j rH |  j rH d n d } |  j j   } |  j j   } | | k r¨ t	 j
 d j | j   | d j |     n  | | k rĈ t	 j
 d   n  y2 | j | | j d | j d | j d | j Wn t k
 rn Xy2 | j | | j d | j d | j d | j Wn t k
 rQn Xd  S(	   Nu   labelu   channelu,   {} {} does not exist
	please choose from: {}u   , u-   --from-label and --to-label must be differentt   packaget   versiont   filename(   R   t   tokent   sitet   spect   list_channelst   usert
   from_labelt   to_labelt   lowerR   t	   UserErrort   formatt   titlet   joint   add_channelR   t   _versiont	   _basenamet	   Exceptiont   remove_channel(   t   argst   aserver_apiR
   t   channelst
   label_textR   R   (    (    s[   lib/python2.7/site-packages/anaconda_client-1.7.2-py2.7.egg/binstar_client/commands/move.pyt   main   s@    								c         C  s   |  j  d d d d t } | j d d d d t | j   } | j   } | j d d d	 d
 d | j d d d d
 d | j d t  d  S(   Nu   movet   helpu   Move packages between labelst   descriptionu   specul   Package - written as user/package/version[/filename] If filename is not given, move all files in the versiont   typeu   --from-labelu   Label to move packages fromt   defaultu   mainu
   --to-labelu   Label to move packages toR   (   t
   add_parsert   __doc__t   add_argumentR   t   add_mutually_exclusive_groupt   set_defaultsR   (   t
   subparserst   parsert   _fromt   _to(    (    s[   lib/python2.7/site-packages/anaconda_client-1.7.2-py2.7.egg/binstar_client/commands/move.pyR"   J   s&    	(   R#   t
   __future__R    R   t   loggingt   binstar_clientR   t   binstar_client.utilsR   R   t	   getLoggert   loggerR   R"   (    (    (    s[   lib/python2.7/site-packages/anaconda_client-1.7.2-py2.7.egg/binstar_client/commands/move.pyt   <module>   s   	8