This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git checkout -b feature | |
Switched to a new branch 'feature' | |
$ tree .git | |
.git | |
├── branches | |
├── COMMIT_EDITMSG | |
├── config | |
├── HEAD | |
├── index | |
├── logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat .git/refs/heads/master | |
d561f82d45e267593220296ac3e956e47a98717f | |
$ cat .git/logs/HEAD | |
0000000000000000000000000000000000000000 d561f82d45e267593220296ac3e956e47a98717f Anita Kuno <[email protected]> 1361885197 -0500 commit (initial): adding my first file | |
$ cat .git/logs/refs/heads/master | |
0000000000000000000000000000000000000000 d561f82d45e267593220296ac3e956e47a98717f Anita Kuno <[email protected]> 1361885197 -0500 commit (initial): adding my first file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git commit -m 'adding my first file' | |
[master (root-commit) d561f82] adding my first file | |
1 file changed, 1 insertion(+) | |
create mode 100644 first_file.txt | |
$ tree .git | |
.git | |
├── branches | |
├── COMMIT_EDITMSG | |
├── config | |
├── HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git add first_file.txt | |
$ tree .git | |
.git | |
├── branches | |
├── config | |
├── HEAD | |
├── index | |
├── objects | |
│ ├── 44 | |
│ │ └── 10ed47ea8a5200397d85926fe7bbdd25d1408a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ tree .git | |
.git | |
├── branches | |
├── config | |
├── HEAD | |
├── objects | |
│ ├── info | |
│ └── pack | |
└── refs | |
├── heads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git init . | |
Initialized empty Git repository in /home/anita/work/openstack/git_sample/.git/ | |
$ tree .git | |
.git | |
├── branches | |
├── config | |
├── description | |
├── HEAD | |
├── hooks | |
│ ├── applypatch-msg.sample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<anteaya> just one question | |
<anteaya> That method will call GETorHEAD which in | |
<anteaya> do you think it would look better if it was GET or HEAD | |
<anteaya> rather that GETorHEAD as it is now? GETorHEAD looks like one message rather than two | |
* lloydde ([email protected]) has joined #openstack-101 | |
* torgomatic ([email protected]) has joined #openstack-101 | |
* dolphm ([email protected]) has joined #openstack-101 | |
<notmyname> anteaya: ok, pushed those fixes. also, GETorHEAD is correct (https://github.com/openstack/swift/blob/master/swift/proxy/controllers/obj.py#L328) | |
<notmyname> GETs and HEADs, per the HTTP spec, are the same except for the existence of a response body, so they are implemented in swift as the same function (rather than duplicating the code) | |
<anteaya> nice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python logging_example_01.py | |
CRITICAL:__main__:foo was called | |
Hello World! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python logging_example_04.py | |
CRITICAL:__main__:foo was called | |
DEBUG:__main__:this message output from debug | |
WARNING:__main__:this is a warning message | |
INFO:__main__:this is some information, hope it is helpful | |
ERROR:__main__:this is an error | |
Hello World! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
logging.basicConfig(level=logging.DEBUG) | |
LOG = logging.getLogger(__name__) | |
def foo(): | |
LOG.critical("foo was called") | |
LOG.debug("this message output from debug") | |
LOG.warning("this is a warning message") |