# HG changeset patch # User Dmitriy Taychenachev # Date 1242737886 -32400 # Node ID 0c94e860a0edf810802fb9575022dc0b3e1182a9 # Parent 35ad13185e60b8f96384d457910ab01d8fff0acf use octal numbers for modes. diff -r 35ad13185e60 -r 0c94e860a0ed dulwich/repo.py --- 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) diff -r 35ad13185e60 -r 0c94e860a0ed git_handler.py --- 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 ''