| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -92,7 +92,7 @@ def __del__(self): | |||
| 92 | 92 | os.kill(self.proc.pid, 2) # interrupt signal | |
| 93 | 93 | self.proc.wait() # ensure process goes away | |
| 94 | 94 | except OSError: | |
| 95 | - pass # ignore error when process already died | ||
| 95 | + pass # ignore error when process already died | ||
| 96 | 96 | except AttributeError: | |
| 97 | 97 | # try windows | |
| 98 | 98 | # for some reason, providing None for stdout/stderr still prints something. This is why | |
@@ -348,7 +348,7 @@ def execute(self, command, | |||
| 348 | 348 | stdin=istream, | |
| 349 | 349 | stderr=PIPE, | |
| 350 | 350 | stdout=PIPE, | |
| 351 | - close_fds=(os.name == 'posix'),# unsupported on linux | ||
| 351 | + close_fds=(os.name == 'posix'), # unsupported on linux | ||
| 352 | 352 | **subprocess_kwargs | |
| 353 | 353 | ) | |
| 354 | 354 | if as_process: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,7 +94,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): | |||
| 94 | 94 | before operating on it using the git command""" | |
| 95 | 95 | __slots__ = ("repo", "version", "entries", "_extension_data", "_file_path") | |
| 96 | 96 | _VERSION = 2 # latest version we support | |
| 97 | - S_IFGITLINK = S_IFGITLINK # a submodule | ||
| 97 | + S_IFGITLINK = S_IFGITLINK # a submodule | ||
| 98 | 98 | ||
| 99 | 99 | def __init__(self, repo, file_path=None): | |
| 100 | 100 | """Initialize this Index instance, optionally from the given ``file_path``. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -55,12 +55,12 @@ def _set_cache_(self, attr): | |||
| 55 | 55 | lines = ostream.read().splitlines() | |
| 56 | 56 | ||
| 57 | 57 | obj, hexsha = lines[0].split(" ") # object <hexsha> | |
| 58 | - type_token, type_name = lines[1].split(" ") # type <type_name> | ||
| 58 | + type_token, type_name = lines[1].split(" ") # type <type_name> | ||
| 59 | 59 | self.object = get_object_type_by_name(type_name)(self.repo, hex_to_bin(hexsha)) | |
| 60 | 60 | ||
| 61 | 61 | self.tag = lines[2][4:] # tag <tag name> | |
| 62 | 62 | ||
| 63 | - tagger_info = lines[3]# tagger <actor> <date> | ||
| 63 | + tagger_info = lines[3] # tagger <actor> <date> | ||
| 64 | 64 | self.tagger, self.tagged_date, self.tagger_tz_offset = parse_actor_and_date(tagger_info) | |
| 65 | 65 | ||
| 66 | 66 | # line 4 empty - it could mark the beginning of the next header | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1063,7 +1063,7 @@ def __cmp__(self, other): return cmp(self._main.items(), other) | |||
| 1063 | 1063 | ||
| 1064 | 1064 | def __contains__(self, item): return item in self._main.items() | |
| 1065 | 1065 | ||
| 1066 | - def __len__(self): return len(self._main._sequence) # easier :-) | ||
| 1066 | + def __len__(self): return len(self._main._sequence) # easier :-) | ||
| 1067 | 1067 | ||
| 1068 | 1068 | def __iter__(self): return self._main.iteritems() | |
| 1069 | 1069 | ||
@@ -1184,7 +1184,7 @@ def __cmp__(self, other): return cmp(self._main.values(), other) | |||
| 1184 | 1184 | ||
| 1185 | 1185 | def __contains__(self, item): return item in self._main.values() | |
| 1186 | 1186 | ||
| 1187 | - def __len__(self): return len(self._main._sequence) # easier :-) | ||
| 1187 | + def __len__(self): return len(self._main._sequence) # easier :-) | ||
| 1188 | 1188 | ||
| 1189 | 1189 | def __iter__(self): return self._main.itervalues() | |
| 1190 | 1190 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -403,7 +403,7 @@ def delete(cls, repo, path): | |||
| 403 | 403 | try: | |
| 404 | 404 | reader = open(pack_file_path, 'rb') | |
| 405 | 405 | except (OSError, IOError): | |
| 406 | - pass # it didnt exist at all | ||
| 406 | + pass # it didnt exist at all | ||
| 407 | 407 | else: | |
| 408 | 408 | new_lines = list() | |
| 409 | 409 | made_change = False | |
@@ -553,7 +553,7 @@ def _iter_items(cls, repo, common_path=None): | |||
| 553 | 553 | # walk loose refs | |
| 554 | 554 | # Currently we do not follow links | |
| 555 | 555 | for root, dirs, files in os.walk(join_path_native(repo.git_dir, common_path)): | |
| 556 | - if 'refs/' not in root: # skip non-refs subfolders | ||
| 556 | + if 'refs/' not in root: # skip non-refs subfolders | ||
| 557 | 557 | refs_id = [d for d in dirs if d == 'refs'] | |
| 558 | 558 | if refs_id: | |
| 559 | 559 | dirs[0:] = ['refs'] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -186,7 +186,7 @@ def rev_parse(repo, rev): | |||
| 186 | 186 | ||
| 187 | 187 | # handle type | |
| 188 | 188 | if output_type == 'commit': | |
| 189 | - pass # default | ||
| 189 | + pass # default | ||
| 190 | 190 | elif output_type == 'tree': | |
| 191 | 191 | try: | |
| 192 | 192 | obj = to_commit(obj).tree | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -73,7 +73,7 @@ def test_bake(self): | |||
| 73 | 73 | commit = self.rorepo.commit('2454ae89983a4496a445ce347d7a41c0bb0ea7ae') | |
| 74 | 74 | # commits have no dict | |
| 75 | 75 | self.failUnlessRaises(AttributeError, setattr, commit, 'someattr', 1) | |
| 76 | - commit.author # bake | ||
| 76 | + commit.author # bake | ||
| 77 | 77 | ||
| 78 | 78 | assert_equal("Sebastian Thiel", commit.author.name) | |
| 79 | 79 | assert_equal("byronimo@gmail.com", commit.author.email) | |
@@ -251,7 +251,7 @@ def test_serialization_unicode_support(self): | |||
| 251 | 251 | # Verify its serialization and deserialization | |
| 252 | 252 | cmt = self.rorepo.commit('0.1.6') | |
| 253 | 253 | assert isinstance(cmt.message, unicode) # it automatically decodes it as such | |
| 254 | - assert isinstance(cmt.author.name, unicode) # same here | ||
| 254 | + assert isinstance(cmt.author.name, unicode) # same here | ||
| 255 | 255 | ||
| 256 | 256 | cmt.message = "üäêèß".decode("utf-8") | |
| 257 | 257 | assert len(cmt.message) == 5 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -168,7 +168,7 @@ def test_head_reset(self, rw_repo): | |||
| 168 | 168 | cur_head = rw_repo.head | |
| 169 | 169 | old_head_commit = cur_head.commit | |
| 170 | 170 | new_head_commit = cur_head.ref.commit.parents[0] | |
| 171 | - cur_head.reset(new_head_commit, index=True) # index only | ||
| 171 | + cur_head.reset(new_head_commit, index=True) # index only | ||
| 172 | 172 | assert cur_head.reference.commit == new_head_commit | |
| 173 | 173 | ||
| 174 | 174 | self.failUnlessRaises(ValueError, cur_head.reset, new_head_commit, index=False, working_tree=True) | |
@@ -185,7 +185,7 @@ def test_head_reset(self, rw_repo): | |||
| 185 | 185 | ||
| 186 | 186 | # we can do a mixed reset, and then checkout from the index though | |
| 187 | 187 | cur_head.reset(new_head_commit) | |
| 188 | - rw_repo.index.checkout(["lib"], force=True)# | ||
| 188 | + rw_repo.index.checkout(["lib"], force=True) | ||
| 189 | 189 | ||
| 190 | 190 | # now that we have a write write repo, change the HEAD reference - its | |
| 191 | 191 | # like git-reset --soft | |
@@ -413,7 +413,7 @@ def test_head_reset(self, rw_repo): | |||
| 413 | 413 | far_away_head.commit = ref.commit | |
| 414 | 414 | ref.rename(ex_ref_path) | |
| 415 | 415 | assert ref.path == ex_ref_path and ref.object == orig_obj | |
| 416 | - assert ref.rename(ref.path).path == ex_ref_path # rename to same name | ||
| 416 | + assert ref.rename(ref.path).path == ex_ref_path # rename to same name | ||
| 417 | 417 | ||
| 418 | 418 | # create symbolic refs | |
| 419 | 419 | symref_path = "symrefs/sym" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -338,7 +338,7 @@ def _do_base_tests(self, rwrepo): | |||
| 338 | 338 | assert nsm.move(sm.path) is nsm | |
| 339 | 339 | ||
| 340 | 340 | # rename a module | |
| 341 | - nmp = join_path_native("new", "module", "dir") + "/" # new module path | ||
| 341 | + nmp = join_path_native("new", "module", "dir") + "/" # new module path | ||
| 342 | 342 | pmp = nsm.path | |
| 343 | 343 | abspmp = nsm.abspath | |
| 344 | 344 | assert nsm.move(nmp) is nsm | |
@@ -447,7 +447,7 @@ def test_root_module(self, rwrepo): | |||
| 447 | 447 | sm.move(fp, module=False) # leave it at the old location | |
| 448 | 448 | ||
| 449 | 449 | assert not sm.module_exists() | |
| 450 | - cpathchange = rwrepo.index.commit("changed sm path") # finally we can commit | ||
| 450 | + cpathchange = rwrepo.index.commit("changed sm path") # finally we can commit | ||
| 451 | 451 | ||
| 452 | 452 | # update puts the module into place | |
| 453 | 453 | rm.update(recursive=False, progress=prog) | |
@@ -549,7 +549,7 @@ def test_root_module(self, rwrepo): | |||
| 549 | 549 | # ================= | |
| 550 | 550 | # finally we recursively update a module, just to run the code at least once | |
| 551 | 551 | # remove the module so that it has more work | |
| 552 | - assert len(nsm.children()) >= 1 # could include smmap | ||
| 552 | + assert len(nsm.children()) >= 1 # could include smmap | ||
| 553 | 553 | assert nsm.exists() and nsm.module_exists() and len(nsm.children()) >= 1 | |
| 554 | 554 | # assure we pull locally only | |
| 555 | 555 | nsmc = nsm.children()[0] | |
| Back | FazBrowse Home | New Git URL |
0 commit comments