Mercurial > hg-git
changeset 121:0c94e860a0ed
use octal numbers for modes.
author | Dmitriy Taychenachev <dimichxp@gmail.com> |
---|---|
date | Tue, 19 May 2009 21:58:06 +0900 |
parents | 35ad13185e60 |
children | 76a0e1ee7cf7 |
files | dulwich/repo.py git_handler.py |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/dulwich/repo.py Tue May 19 21:51:14 2009 +0900 +++ b/dulwich/repo.py Tue May 19 21:58:06 2009 +0900 @@ -427,7 +427,7 @@ cmode = None if basetree: for (bmode, bname, bsha) in basetree.entries(): - if bmode == 57344: # TODO : properly handle submodules + if bmode == 0160000: # TODO : properly handle submodules continue basefiles.add(bname) bobj = self.get_object(bsha) @@ -447,7 +447,7 @@ # handle removals if comptree: for (bmode, bname, bsha, ) in comptree.entries(): - if bmode == 57344: # TODO: hande submodles + if bmode == 0160000: # TODO: hande submodles continue if bname not in basefiles: bobj = self.get_object(bsha)
--- a/git_handler.py Tue May 19 21:51:14 2009 +0900 +++ b/git_handler.py Tue May 19 21:58:06 2009 +0900 @@ -389,7 +389,7 @@ changes = list() changes.append((tree, path)) for (mode, name, sha) in tree.entries(): - if mode == 57344: # TODO : properly handle submodules and document what 57344 means + if mode == 0160000: # TODO : properly handle submodules and document what 57344 means continue if sha in seen: continue @@ -484,9 +484,9 @@ def convert_git_int_mode(self, mode): # TODO : make these into constants convert = { - 33188: '', - 40960: 'l', - 33261: 'x'} + 0100644: '', + 0100755: 'x', + 0120000: 'l'} if mode in convert: return convert[mode] return ''