Ejemplo n.º 1
0
 def current_branch(self, print_flag=True):
     """
     Lists the current branch.
     """
     branch_name = branch_current_hg()
     if print_flag:
         print "The current branch is: " + branch_name
     else:
         return branch_name
Ejemplo n.º 2
0
 def current_branch(self, print_flag=True):
     """
     Lists the current branch.
     """
     branch_name = branch_current_hg()
     if print_flag:
         print "The current branch is: " + branch_name
     else:
         return branch_name
Ejemplo n.º 3
0
    def status(self):
        print("Getting status of modified or unknown files:")
        self('status')
        print "\n---\n"
        if self.__name == "SAGE Library Source Code":
            b = branch_current_hg()
            if b == '': b='main'
	    elif b[-1] == '/':
	        b = b[:-1]
            print("Branch: %s"%b)
Ejemplo n.º 4
0
    def status(self):
        print("Getting status of modified or unknown files:")
        self('status')
        print "\n---\n"
        if self.__name == "SAGE Library Source Code":
            b = branch_current_hg()
            if b == '': b='main'
	    elif b[-1] == '/':
	        b = b[:-1]
            print("Branch: %s"%b)
Ejemplo n.º 5
0
SAGE_INCOMING_SERVER = os.getenv("SAGE_INCOMING_SERVER")
if SAGE_INCOMING_SERVER is None:
    try:
	SAGE_INCOMING_SERVER = os.environ['SAGE_HG_SERVER'].strip('/')
    except KeyError:
        #print "Falling back to a hard coded sage server in misc/hg.py"
        SAGE_INCOMING_SERVER = DEFAULT_SERVER

SAGE_OUTGOING_SERVER = os.getenv("SAGE_OUTGOING_SERVER")
if SAGE_OUTGOING_SERVER is None:
    SAGE_OUTGOING_SERVER = SAGE_INCOMING_SERVER

if (SAGE_INCOMING_SERVER == DEFAULT_SERVER):      ## Always uses the "main" branch on the default server.
    temp_in_branch_name = "main"
else:
    temp_in_branch_name = branch_current_hg()

if (SAGE_OUTGOING_SERVER == DEFAULT_SERVER):      ## Always uses the "main" branch on the default server.
    temp_out_branch_name = "main"
else:
    temp_out_branch_name = branch_current_hg()


if (SAGE_INCOMING_SERVER != DEFAULT_SERVER) or (SAGE_OUTGOING_SERVER != DEFAULT_SERVER):
    print "Non-default server settings detected:"
    print "    Incoming Server = " + SAGE_INCOMING_SERVER + ''.join(["  (default)"  \
                for i in range(1)  if (SAGE_INCOMING_SERVER == DEFAULT_SERVER)])
    print "    Outgoing Server = " + SAGE_OUTGOING_SERVER + ''.join(["  (default)"  \
                for i in range(1)  if (SAGE_OUTGOING_SERVER == DEFAULT_SERVER)])
    print
Ejemplo n.º 6
0
SAGE_INCOMING_SERVER = os.getenv("SAGE_INCOMING_SERVER")
if SAGE_INCOMING_SERVER is None:
    try:
	SAGE_INCOMING_SERVER = os.environ['SAGE_HG_SERVER'].strip('/')
    except KeyError:
        #print "Falling back to a hard coded sage server in misc/hg.py"
        SAGE_INCOMING_SERVER = DEFAULT_SERVER

SAGE_OUTGOING_SERVER = os.getenv("SAGE_OUTGOING_SERVER")
if SAGE_OUTGOING_SERVER is None:
    SAGE_OUTGOING_SERVER = SAGE_INCOMING_SERVER

if (SAGE_INCOMING_SERVER == DEFAULT_SERVER):      ## Always uses the "main" branch on the default server.
    temp_in_branch_name = "main"
else:
    temp_in_branch_name = branch_current_hg()

if (SAGE_OUTGOING_SERVER == DEFAULT_SERVER):      ## Always uses the "main" branch on the default server.
    temp_out_branch_name = "main"
else:
    temp_out_branch_name = branch_current_hg()


if (SAGE_INCOMING_SERVER != DEFAULT_SERVER) or (SAGE_OUTGOING_SERVER != DEFAULT_SERVER):
    print "Non-default server settings detected:"
    print "    Incoming Server = " + SAGE_INCOMING_SERVER + ''.join(["  (default)"  \
                for i in range(1)  if (SAGE_INCOMING_SERVER == DEFAULT_SERVER)])
    print "    Outgoing Server = " + SAGE_OUTGOING_SERVER + ''.join(["  (default)"  \
                for i in range(1)  if (SAGE_OUTGOING_SERVER == DEFAULT_SERVER)])
    print