Example #1
0
def resolve():
    if not hf.already_initialized():
        print "Please init a jet repo before calling other commands"
        return
    if not len(sys.argv) == 7:
        print "Please form resolve statements '$jet resolve <filename>'"
    file_to_resolve = os.path.join(os.getcwd() + '/' + sys.argv[2])
    result = hf.resolve_conflict(file_to_resolve)
    if result == -1:
        print "That file does not need resolving"
        return
    print "File has been resolved"
    if result > 0:
        print "You have %s conflicts left to resolve" % result
    else:
        print "All files resolved, remember to commit!"
Example #2
0
def resolve():
    if not hf.already_initialized():
        print "Please init a jet repo before calling other commands"
        return
    if not len(sys.argv) == 3:
        print "Please form resolve statements '$jet resolve <filename>'"
    file_to_resolve = os.path.join(os.getcwd() + '/' + sys.argv[2])
    result = hf.resolve_conflict(file_to_resolve)
    if result == -1:
        print "That file does not need resolving"
        return
    print "File has been resolved"
    if result > 0:
        print "You have %s conflicts left to resolve" % result
    else:
        print "All files resolved, remember to commit!"
Example #3
0
def resolve():
    if not hf.already_initialized():
        print ("Please init a jet repo before calling other commands")
        return
    if not len(sys.argv) == 3:
        print ("Please form resolve statements '$jet resolve <filename>'")
    # Allows the use of relative path names to mention files
    file_to_resolve = os.path.join(os.getcwd() + '/' + sys.argv[2])
    result = hf.resolve_conflict(file_to_resolve)
    if result == -1:
        print ("That file does not need resolving")
        return
    print ("File has been resolved")
    # If result is positive, it means there's more files left to resolve.
    if result > 0:
        print ("You have %s conflicts left to resolve" % result)
    else:
        print ("All files resolved, remember to commit!")
Example #4
0
def resolve():
    if not hf.already_initialized():
        print("Please init a jet repo before calling other commands")
        return
    if not len(sys.argv) == 3:
        print("Please form resolve statements '$jet resolve <filename>'")
    # Allows the use of relative path names to mention files
    file_to_resolve = os.path.join(os.getcwd() + '/' + sys.argv[2])
    result = hf.resolve_conflict(file_to_resolve)
    if result == -1:
        print("That file does not need resolving")
        return
    print("File has been resolved")
    # If result is positive, it means there's more files left to resolve.
    if result > 0:
        print("You have %s conflicts left to resolve" % result)
    else:
        print("All files resolved, remember to commit!")