ys7yoo / ThinkPython2

LaTeX source and supporting code for Think Python, 2nd edition, by Allen Downey.
Other
0 stars 0 forks source link

error during rebasing #1

Open ys7yoo opened 4 years ago

ys7yoo commented 4 years ago
(base) mini:ThinkPython2 yyoo$ git rebase upstream/master
First, rewinding head to replay your work on top of it...
적용하는 중: added compiled book
적용하는 중: keep old file
적용하는 중: added compiled book
인덱스 정보를 사용해 기본 트리를 다시 만듭니다...
베이스 패치 적용 및 3-방향 병합으로 대신합니다...
변경 사항 없음 -- 패치가 이미 적용되었습니다.
적용하는 중: apply renaming
인덱스 정보를 사용해 기본 트리를 다시 만듭니다...
A   code/Markov.py
베이스 패치 적용 및 3-방향 병합으로 대신합니다...
충돌 (이름바꾸기/삭제): code/Markov.py (위치 apply renaming) 삭제, 이름바꿈에서 code/markov2.py(으)로 (위치 HEAD). HEAD 버전의 code/markov2.py 트리에 남음.
error: 변경 사항에서 병합하는데 실패했습니다.
패치가 0004 apply renaming 위치에서 실패했습니다
힌트: 'git am --show-current-patch'를 사용하여 실패한 패치를 볼 수 있습니다
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
ys7yoo commented 4 years ago
git am --show-current-patch
commit 03c4683b9a8c5bea4fdd89f1b8c243477bd1c3f0
Author: YY <ys7yoo@gmail.com>
Date:   Wed Mar 7 05:41:19 2018 +0900

    apply renaming

diff --git a/code/Markov.py b/code/Markov.py
deleted file mode 100644
index 5a5344b..0000000
--- a/code/Markov.py
+++ /dev/null
@@ -1,102 +0,0 @@
-"""This module contains a code example related to
-
-Think Python, 2nd Edition
-by Allen Downey
-http://thinkpython2.com
-
-Copyright 2015 Allen Downey
-
-License: http://creativecommons.org/licenses/by/4.0/
-"""
-
-from __future__ import print_function, division
-
-
-import sys
-import random
-
-from markov import skip_gutenberg_header, shift
-
-
-class Markov:
-    """Encapsulates the statistical summary of a text."""
-
-    def __init__(self):
-        self.suffix_map = {}        # map from prefixes to a list of suffixes
-        self.prefix = ()            # current tuple of words
-
-    def process_file(self, filename, order=2):
-        """Reads a file and performs Markov analysis.
-
-        filename: string
-        order: integer number of words in the prefix
-
-        Returns: map from prefix to list of possible suffixes.
-        """
-        fp = open(filename)
-        skip_gutenberg_header(fp)
-
-        for line in fp:
-            for word in line.rstrip().split():
-                self.process_word(word, order)
-
-    def process_word(self, word, order=2):
-        """Processes each word.
-
-        word: string
-        order: integer
-
-        During the first few iterations, all we do is store up the words; 
-        after that we start adding entries to the dictionary.
-        """
-        if len(self.prefix) < order:
-            self.prefix += (word,)
-            return
-
-        try:
-            self.suffix_map[self.prefix].append(word)
-        except KeyError:
-            # if there is no entry for this prefix, make one
-            self.suffix_map[self.prefix] = [word]
-
-        self.prefix = shift(self.prefix, word)        
-
-    def random_text(self, n=100):
-        """Generates random wordsfrom the analyzed text.
-
-        Starts with a random prefix from the dictionary.
-
-        n: number of words to generate
-        """
-        # choose a random prefix (not weighted by frequency)
-        start = random.choice(list(self.suffix_map.keys()))
-
-        for i in range(n):
-            suffixes = self.suffix_map.get(start, None)
-            if suffixes == None:
-                # if the prefix isn't in map, we got to the end of the
-                # original text, so we have to start again.
-                self.random_text(n-i)
-                return
-
-            # choose a random suffix
-            word = random.choice(suffixes)
-            print(word, end=' ')
-            start = shift(start, word)
-
-
-def main(script, filename='emma.txt', n=100, order=2):
-    try:
-        n = int(n)
-        order = int(order)
-    except ValueError:
-        print('Usage: %d filename [# of words] [prefix length]' % script)
-    else: 
-        markov = Markov()
-        markov.process_file(filename, order)
-        markov.random_text(n)
-
-
-if __name__ == '__main__':
-    main(*sys.argv)
-
git rebase --skip
적용하는 중: keep old file
인덱스 정보를 사용해 기본 트리를 다시 만듭니다...
.git/rebase-apply/patch:61: trailing whitespace.
    During the first few iterations, all we do is store up the words; 
.git/rebase-apply/patch:87: trailing whitespace.

.git/rebase-apply/patch:119: trailing whitespace.
    else: 
warning: 3번 줄에서 공백 오류를 추가합니다.
베이스 패치 적용 및 3-방향 병합으로 대신합니다...
변경 사항 없음 -- 패치가 이미 적용되었습니다.
적용하는 중: compiled v2.2.23
ys7yoo commented 4 years ago
git fetch upstream
git rebase upstream/master
First, rewinding head to replay your work on top of it...
적용하는 중: added compiled book
적용하는 중: keep old file
적용하는 중: compiled v2.2.23
적용하는 중: added compiled book
인덱스 정보를 사용해 기본 트리를 다시 만듭니다...
베이스 패치 적용 및 3-방향 병합으로 대신합니다...
warning: Cannot merge binary files: book/book.pdf (HEAD vs. added compiled book)
CONFLICT (add/add): Merge conflict in book/book.pdf
자동 병합: book/book.pdf
error: 변경 사항에서 병합하는데 실패했습니다.
패치가 0004 added compiled book 위치에서 실패했습니다
힌트: 'git am --show-current-patch'를 사용하여 실패한 패치를 볼 수 있습니다
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
ys7yoo commented 4 years ago
git am --show-current-patch
commit 4fc7583456a2cb152e6eb5764b50202901086650
Author: YY <ys7yoo@gmail.com>
Date:   Tue Jan 23 17:03:17 2018 +0900

    added compiled book

diff --git a/book/book.pdf b/book/book.pdf
new file mode 100644
index 0000000..e31de82
Binary files /dev/null and b/book/book.pdf differ