예제 #1
0
def graph_primjer_s_imenovanim_granama_i_spajanjima_suprotne_strelice():
    graph = mod_graph.Graph(column=5)

    graph.add_branch(
        mod_graph.Branch(reverse_arrows=True, label='master',
                         nodes='abcdefgh'))

    graph.add_branch(
        mod_graph.Branch(reverse_arrows=True,
                         label='novi-feature',
                         row=2,
                         nodes='xyzqw',
                         branch_from=graph.find_node('b')))

    graph.add_branch(
        mod_graph.Branch(reverse_arrows=True,
                         label='ispravak-problema-x',
                         row=1,
                         nodes='1234',
                         branch_from=graph.find_node('g')))

    graph.add_arrow('z', 'd', color=GRAY)
    graph.add_arrow('g', 'q', color=GRAY)

    return graph
예제 #2
0
def graph_push_2_2_1():
    graph = mod_graph.Graph(column=4)

    master_branch = mod_graph.Branch(label='master', nodes='abcdefg')
    graph.add_branch(master_branch)

    origin_master_branch = mod_graph.Branch(label='origin/master',
                                            row=1,
                                            nodes='abcdexy')
    graph.add_branch(origin_master_branch)

    graph.add_branch(mod_graph.Branch(label='master', row=3, nodes='abcdefg'))

    brackets_column = 11

    graph.add_square_bracket(column=brackets_column,
                             row=0,
                             rows=2,
                             label='lokalni repozitorij')

    graph.add_square_bracket(column=brackets_column,
                             row=3,
                             rows=1,
                             label='udaljeni repozitorij')

    return graph
예제 #3
0
def graph_origin_master_2_4():
    graph = mod_graph.Graph(column=4)

    master_branch = mod_graph.Branch(label='master', nodes='abcdexyz')
    graph.add_branch(master_branch)

    origin_master_branch = mod_graph.Branch(label='origin/master',
                                            row=1,
                                            nodes='abcdefg')
    graph.add_branch(origin_master_branch)

    graph.add_branch(mod_graph.Branch(label='master', row=3, nodes='abcdefg'))

    brackets_column = 12

    graph.add_square_bracket(column=brackets_column,
                             row=0,
                             rows=2,
                             label='lokalni repozitorij')

    graph.add_square_bracket(column=brackets_column,
                             row=3,
                             rows=1,
                             label='udaljeni repozitorij')

    graph.add_arrow(origin_master_branch.find_node('g'),
                    master_branch.find_node('z'),
                    color=GRAY)

    return graph
예제 #4
0
def graph_remote_s_granama():
    graph = mod_graph.Graph(column=6)

    graph.add_branch(mod_graph.Branch(label='master', nodes='abcdefg'))
    graph.add_branch(
        mod_graph.Branch(label='karlin-repo/master', row=1, nodes='abcdefg'))
    graph.add_branch(
        mod_graph.Branch(label='bojanov-repo/master', row=2, nodes='abcdefg'))

    graph.add_branch(mod_graph.Branch(label='master', row=4, nodes='abcdefg'))

    graph.add_branch(mod_graph.Branch(label='master', row=6, nodes='abcdefg'))

    brackets_column = 13

    graph.add_square_bracket(column=brackets_column,
                             row=0,
                             rows=3,
                             label='lokalni repozitorij')
    graph.add_square_bracket(column=brackets_column,
                             row=4,
                             rows=1,
                             label='Karlin repozitorij')
    graph.add_square_bracket(column=brackets_column,
                             row=6,
                             rows=1,
                             label='Bojanov repozitorij')

    return graph
예제 #5
0
def graph_primjer_s_granama_i_spajanjima_3():
    graph = mod_graph.Graph()

    graph.add_branch(mod_graph.Branch(nodes='abcd'))

    graph.add_branch(
        mod_graph.Branch(row=1, nodes='xy', branch_from=graph.find_node('b')))

    return graph
예제 #6
0
def graph_digresija_o_grafovima_1():
    graph = mod_graph.Graph(column=3)

    graph.add_branch(mod_graph.Branch(label='grana-1', nodes='abcdefghij'))

    graph.add_branch(mod_graph.Branch(label='grana-2', row=1,
                                      nodes='abcdeyzq'))

    return graph
예제 #7
0
def graph_primjer_s_granama_i_spajanjima_4():
    graph = mod_graph.Graph()

    graph.add_branch(mod_graph.Branch(nodes='abcd'))

    graph.add_branch(
        mod_graph.Branch(row=1, nodes='xyz', branch_from=graph.find_node('b')))

    graph.add_arrow('d', 'z', color=GRAY)

    return graph
예제 #8
0
def graph_git_merge_i_brisanje_grana_5():
    graph = mod_graph.Graph(column=4)

    graph.add_branch(mod_graph.Branch(label='master', nodes='abcxyzq'))

    graph.add_branch(
        mod_graph.Branch(label='eksperiment',
                         branch_from=graph.find_node('b'),
                         row=1,
                         nodes='defg'))

    return graph
예제 #9
0
def graph_git_merge_01():
    graph = mod_graph.Graph(column=6)

    graph.add_branch(mod_graph.Branch(label='master', color=BLUE, nodes='abc'))

    graph.add_branch(
        mod_graph.Branch(label='eksperimentalna-grana',
                         branch_from=graph.find_node('c'),
                         row=1,
                         nodes=[mod_graph.Node(' ', color=WHITE)]))

    return graph
예제 #10
0
def graph_ab_simic_1():
    graph = mod_graph.Graph(column=6)

    graph.add_branch(mod_graph.Branch(label='master', nodes='ab'))

    graph.add_branch(
        mod_graph.Branch(label='varijanta',
                         branch_from=graph.find_node('a'),
                         row=1,
                         nodes='c'))

    return graph
예제 #11
0
def graph_bez_fast_forward_rebase():
    graph = mod_graph.Graph(column=4)

    graph.add_branch(mod_graph.Branch(label='master', nodes='abcdef'))

    graph.add_branch(
        mod_graph.Branch(label='varijanta',
                         branch_from=graph.find_node('f'),
                         row=1,
                         nodes=['x\'', 'y\'', 'z\'']))

    return graph
예제 #12
0
def graph_fast_forward_3():
    graph = mod_graph.Graph(column=4)

    graph.add_branch(mod_graph.Branch(label='master', nodes='abcxyz'))

    graph.add_branch(
        mod_graph.Branch(label='varijanta',
                         branch_from=graph.find_node('c'),
                         row=1,
                         nodes='xyz'))

    return graph
예제 #13
0
def graph_digresija_o_grafovima_2():
    graph = mod_graph.Graph(column=3)

    graph.add_branch(mod_graph.Branch(label='grana-1', nodes='abcdefghij'))

    graph.add_branch(
        mod_graph.Branch(label='grana-2',
                         row=1,
                         branch_from=graph.get_branch(0).get_node(4),
                         nodes='yzq'))

    return graph
예제 #14
0
def graph_kreiranje_grane_4():
    graph = mod_graph.Graph(column=6)

    graph.add_branch(
        mod_graph.Branch(label='master', color=BLUE, nodes='abcxyz'))

    graph.add_branch(
        mod_graph.Branch(label='eksperimentalna-grana',
                         branch_from=graph.find_node('c'),
                         row=1,
                         nodes='defg'))

    return graph
예제 #15
0
def graph_remote_s_granama_2():
    graph = mod_graph.Graph(column=6)

    graph.add_branch(mod_graph.Branch(label='master', nodes='abcdefg'))
    karlin_master_lokalni = mod_graph.Branch(label='karlin-repo/master',
                                             row=1,
                                             nodes='abcdefg')
    graph.add_branch(karlin_master_lokalni)
    graph.add_branch(
        mod_graph.Branch(branch_from=karlin_master_lokalni.get_node(3),
                         row=2,
                         nodes='xyz',
                         label='karlin-repo/varijanta-1'))

    bojanov_master_lokalni = mod_graph.Branch(label='bojanov-repo/master',
                                              row=3,
                                              nodes='abcdefg')
    graph.add_branch(bojanov_master_lokalni)
    graph.add_branch(
        mod_graph.Branch(branch_from=bojanov_master_lokalni.get_node(2),
                         row=4,
                         nodes='qwe',
                         label='bojanov-repo/test'))

    karlin_master = mod_graph.Branch(label='master', row=6, nodes='abcdefg')
    graph.add_branch(karlin_master)
    graph.add_branch(
        mod_graph.Branch(branch_from=karlin_master.get_node(3),
                         row=7,
                         nodes='xyz',
                         label='varijanta-1'))

    bojanov_master = mod_graph.Branch(label='master', row=9, nodes='abcdefg')
    graph.add_branch(bojanov_master)
    graph.add_branch(
        mod_graph.Branch(branch_from=bojanov_master.get_node(2),
                         row=10,
                         nodes='qwe',
                         label='test'))

    brackets_column = 13

    graph.add_square_bracket(column=brackets_column,
                             row=0,
                             rows=5,
                             label='lokalni repozitorij')
    graph.add_square_bracket(column=brackets_column,
                             row=6,
                             rows=2,
                             label='Karlin repozitorij')
    graph.add_square_bracket(column=brackets_column,
                             row=9,
                             rows=2,
                             label='Bojanov repozitorij')

    return graph
예제 #16
0
def graph_ab_simic_2():
    graph = mod_graph.Graph(column=6)

    graph.add_branch(mod_graph.Branch(label='master', nodes='abd'))

    graph.add_branch(
        mod_graph.Branch(label='varijanta',
                         branch_from=graph.find_node('a'),
                         row=1,
                         nodes='c'))

    graph.add_arrow('c', 'd', color=GRAY)

    return graph
예제 #17
0
def graph_fast_forward_2():
    graph = mod_graph.Graph(column=4)

    graph.add_branch(mod_graph.Branch(label='master', nodes='abc---d'))

    graph.add_branch(
        mod_graph.Branch(label='varijanta',
                         branch_from=graph.find_node('c'),
                         row=1,
                         nodes='xyz'))

    graph.add_arrow('z', 'd', color=GRAY)

    return graph
예제 #18
0
def graph_primjer_s_klijentom():
    graph = mod_graph.Graph()

    graph.add_branch(
        mod_graph.Branch(
            nodes=['0.1', '0.2', '...', '0.8', '0.9', '1.0', '1.1']))

    graph.add_branch(
        mod_graph.Branch(branch_from=graph.find_node('1.0'),
                         color=GRAY,
                         row=1,
                         nodes=['1.1\'', '1.2\'']))

    return graph
예제 #19
0
def graph_izrazi_s_referencama_2():
    graph = mod_graph.Graph(column=3)

    graph.add_branch(mod_graph.Branch(nodes='abcdefgh', label='master'))

    graph.add_branch(
        mod_graph.Branch(row=1,
                         nodes='xyzq',
                         label='test',
                         branch_from=graph.find_node('b')))

    graph.add_arrow('d', 'z', color=GRAY)
    graph.add_arrow('q', 'g', color=GRAY)

    return graph
예제 #20
0
def graph_git_merge_2():
    graph = mod_graph.Graph(column=6)

    graph.add_branch(
        mod_graph.Branch(label='master', color=BLUE, nodes='abcxyzqh'))

    graph.add_branch(
        mod_graph.Branch(label='eksperimentalna-grana',
                         branch_from=graph.find_node('c'),
                         row=1,
                         nodes='defg'))

    graph.add_arrow('g', 'h', color=GRAY)

    return graph
예제 #21
0
def graph_kreiranje_grane_2_1():
    graph = mod_graph.Graph(column=6)

    graph.add_branch(
        mod_graph.Branch(
            label='master',
            nodes=['a', 'b', 'c',
                   mod_graph.Node(label='', color=WHITE)]))

    graph.add_branch(
        mod_graph.Branch(label='eksperimentalna-grana',
                         branch_from=graph.find_node('c'),
                         row=1,
                         nodes='d'))

    return graph
예제 #22
0
def graph_linearni_model():
    graph = mod_graph.Graph()

    graph.add_branch(
        mod_graph.Branch(nodes=[
            'a', 'b', 'c', 'd', 'e', '1.0', 'f', 'g', 'h', 'i', '2.0', '...'
        ]))

    return graph
예제 #23
0
def graph_bez_fast_forward_rebase_2():
    graph = mod_graph.Graph(column=4)

    graph.add_branch(
        mod_graph.Branch(
            label='master',
            nodes=['a', 'b', 'c', 'd', 'e', 'f', 'x\'', 'y\'', 'z\'']))

    return graph
예제 #24
0
def graph_primjer_s_dugotrajnom_granom():
    graph = mod_graph.Graph()

    graph.add_branch(mod_graph.Branch(nodes='abcdefghijklmnopq'))

    graph.add_branch(
        mod_graph.Branch(row=1,
                         nodes='1234567890xyz',
                         branch_from=graph.find_node('b')))

    graph.add_arrow('e', '4', color=GRAY)
    graph.add_arrow('h', '7', color=GRAY)
    graph.add_arrow('i', '8', color=GRAY)
    graph.add_arrow('l', 'x', color=GRAY)
    graph.add_arrow('n', 'z', color=GRAY)
    graph.add_arrow('z', 'p', color=RED)

    return graph
예제 #25
0
def graph_linearni_bez_zadnjeg_cvora_1():
    graph = mod_graph.Graph()

    graph.add_branch(
        mod_graph.Branch(
            nodes=['a', 'b', 'c',
                   mod_graph.Node(label=' ', color=WHITE)]))

    return graph
예제 #26
0
def graph_linearni_sa_zadnjim_cvorom():
    graph = mod_graph.Graph()

    graph.add_branch(
        mod_graph.Branch(
            nodes=['a', 'b', 'c',
                   mod_graph.Node(label='d', color=BLUE)]))

    return graph
예제 #27
0
def graph_kreiranje_grane_1():
    graph = mod_graph.Graph()

    graph.add_branch(
        mod_graph.Branch(
            nodes=['a', 'b', 'c',
                   mod_graph.Node(label='', color=WHITE)]))

    return graph
예제 #28
0
def graph_linearni_model_za_revert_2_revertano():
    graph = mod_graph.Graph()

    graph.add_branch(
        mod_graph.Branch(nodes=[
            'a', 'b', 'c', 'd', 'e',
            mod_graph.Node(label='f', color=RED), 'g', 'h', 'i', 'j'
        ]))

    return graph
예제 #29
0
def graph_amend():
    graph = mod_graph.Graph(column=3)

    graph.add_branch(
        mod_graph.Branch(label='master',
                         row=0,
                         nodes=('a', 'b', 'c', 'd', 'e', 'f\'')))
    graph.add_branch(mod_graph.Branch(label='master', row=2, nodes='abcdef'))

    graph.add_square_bracket(column=9,
                             row=2,
                             rows=1,
                             label='Originalno stanje')
    graph.add_square_bracket(column=9,
                             row=0,
                             rows=1,
                             label='Nakon commit --amend')

    return graph
예제 #30
0
def graph_fast_forward_4():
    graph = mod_graph.Graph(column=4)

    graph.add_branch(mod_graph.Branch(label='master', nodes='abcdef'))

    graph.add_branch(
        mod_graph.Branch(label='varijanta',
                         branch_from=graph.find_node('c'),
                         color=GRAY,
                         row=1,
                         nodes='xyz'))

    graph.add_branch(
        mod_graph.Branch(label='varijanta',
                         branch_from=graph.find_node('f'),
                         color=BLUE,
                         row=1,
                         nodes=['x\'', 'y\'', 'z\'']))

    return graph