/* Generated by Pyrex 0.9.8.5 on Thu Nov 25 16:59:25 2010 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "structmember.h"
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)	PyInt_AsLong(o)
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
#endif
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
#include <math.h>
#include "python-compat.h"
#include "_dirstate_helpers_pyx.h"
#include "stdlib.h"
#include "sys/stat.h"
#include "string.h"


typedef struct {PyObject **p; int i; char *s; long n;} __Pyx_StringTabEntry; /*proto*/

static PyObject *__pyx_m;
static PyObject *__pyx_b;
static int __pyx_lineno;
static char *__pyx_filename;
static char **__pyx_f;

static char __pyx_mdoc[] = "Helper functions for DirState.\n\nThis is the python implementation for DirState functions.\n";

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static PyObject *__Pyx_GetItemInt(PyObject *o, Py_ssize_t i); /*proto*/

static int __Pyx_SetItemInt(PyObject *o, Py_ssize_t i, PyObject *v); /*proto*/

static PyObject *__Pyx_UnpackItem(PyObject *); /*proto*/
static int __Pyx_EndUnpack(PyObject *); /*proto*/

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/

static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/

static void __Pyx_AddTraceback(char *funcname); /*proto*/

/* Declarations from bzrlib._dirstate_helpers_pyx */


/* Declarations from implementation of bzrlib._dirstate_helpers_pyx */

struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader {
  PyObject_HEAD
  struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *__pyx_vtab;
  PyObject *state;
  PyObject *text;
  char *text_cstr;
  int text_size;
  char *end_cstr;
  char *cur_cstr;
  char *next;
};

struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC {
  PyObject_HEAD
  struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_vtab;
  int doing_consistency_expansion;
  PyObject *old_dirname_to_file_id;
  PyObject *new_dirname_to_file_id;
  PyObject *last_source_parent;
  PyObject *last_target_parent;
  int include_unchanged;
  int partial;
  PyObject *use_filesystem_for_exec;
  PyObject *utf8_decode;
  PyObject *searched_specific_files;
  PyObject *searched_exact_paths;
  PyObject *search_specific_files;
  PyObject *search_specific_file_parents;
  PyObject *state;
  PyObject *current_root;
  PyObject *current_root_unicode;
  PyObject *root_entries;
  int root_entries_pos;
  int root_entries_len;
  PyObject *root_abspath;
  int source_index;
  int target_index;
  int want_unversioned;
  PyObject *tree;
  PyObject *dir_iterator;
  int block_index;
  PyObject *current_block;
  int current_block_pos;
  PyObject *current_block_list;
  PyObject *current_dir_info;
  PyObject *current_dir_list;
  PyObject *_pending_consistent_entries;
  int path_index;
  PyObject *root_dir_info;
  PyObject *bisect_left;
  PyObject *pathjoin;
  PyObject *fstat;
  PyObject *seen_ids;
  PyObject *sha_file;
};


struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader {
  char *(*get_next)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *,int *);
  PyObject *(*get_next_str)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *);
  int (*_init)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *);
  PyObject *(*_get_entry)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *,int,void **,int *);
};
static struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *__pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_Reader;


struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC {
  PyObject *(*_process_entry)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *,PyObject *,PyObject *);
  int (*_gather_result_for_consistency)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *,PyObject *);
  int (*_update_current_block)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *);
  PyObject *(*_iter_next)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *);
  PyObject *(*_maybe_tree_ref)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *,PyObject *);
  PyObject *(*_loop_one_block)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *);
  PyObject *(*_next_consistent_entries)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *);
  PyObject *(*_path_info)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *,PyObject *,PyObject *);
};
static struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC;

static PyTypeObject *__pyx_ptype_6bzrlib_21_dirstate_helpers_pyx_Reader = 0;
static PyTypeObject *__pyx_ptype_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC = 0;
static int __pyx_v_6bzrlib_21_dirstate_helpers_pyx_ERROR_PATH_NOT_FOUND;
static int __pyx_v_6bzrlib_21_dirstate_helpers_pyx_ERROR_DIRECTORY;
static PyObject *__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_absent;
static PyObject *__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_file;
static PyObject *__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_directory;
static PyObject *__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_symlink;
static PyObject *__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_relocated;
static PyObject *__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_tree_reference;
static void *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__my_memrchr(void *,int,size_t); /*proto*/
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_safe_string_from_size(char *,Py_ssize_t); /*proto*/
static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__is_aligned(void *); /*proto*/
static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_by_dirs(char *,int,char *,int); /*proto*/
static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock_intern(char *,int,char *,int); /*proto*/
static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx_minikind_from_mode(int); /*proto*/
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__pack_stat(PyObject *); /*proto*/
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__update_entry(PyObject *,PyObject *,PyObject *,PyObject *); /*proto*/
static char __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_from_string(PyObject *); /*proto*/
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_to_kind(char); /*proto*/
static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(char); /*proto*/

static char __pyx_k1[] = "Must be a single character string, not %s";
static char __pyx_k2[] = "tried to create a string with an invalid size: %d";
static char __pyx_k3[] = "'path1' must be a plain string, not %s: %r";
static char __pyx_k4[] = "'path2' must be a plain string, not %s: %r";
static char __pyx_k5[] = "";
static char __pyx_k6[] = "you must pass a python list for 'paths' not: %s %r";
static char __pyx_k7[] = "you must pass a string for 'path' not: %s %r";
static char __pyx_k8[] = "you must pass a python list for 'dirblocks' not: %s %r";
static char __pyx_k9[] = "you must pass a string for dirname not: %s %r";
static char __pyx_k10[] = "get_next() called when cur_str is NULL";
static char __pyx_k11[] = "get_next() called when there are no chars left";
static char __pyx_k12[] = "errors";
static char __pyx_k13[] = "DirstateCorrupt";
static char __pyx_k14[] = "failed to find trailing NULL (\\0). Trailing garbage: %r";
static char __pyx_k15[] = "First character should be null not: %s";
static char __pyx_k16[] = "Bad parse, we expected to end on \\n, not: %d %s: %s";
static char __pyx_k17[] = "_num_present_parents";
static char __pyx_k18[] = "_num_entries";
static char __pyx_k19[] = "_dirblocks";
static char __pyx_k20[] = "We read the wrong number of entries. We expected to read %s, but read %s";
static char __pyx_k21[] = "_split_root_dirblock_into_contents";
static char __pyx_k22[] = "_state_file";
static char __pyx_k23[] = "seek";
static char __pyx_k24[] = "_end_of_header";
static char __pyx_k25[] = "read";
static char __pyx_k26[] = "_parse_dirblocks";
static char __pyx_k27[] = "DirState";
static char __pyx_k28[] = "IN_MEMORY_UNMODIFIED";
static char __pyx_k29[] = "_dirblock_state";
static char __pyx_k30[] = "st_size";
static char __pyx_k31[] = "st_mtime";
static char __pyx_k32[] = "st_ctime";
static char __pyx_k33[] = "st_dev";
static char __pyx_k34[] = "st_ino";
static char __pyx_k35[] = "st_mode";
static char __pyx_k36[] = "_encode";
static char __pyx_k37[] = "_is_executable";
static char __pyx_k38[] = "_cutoff_time";
static char __pyx_k39[] = "_sha_cutoff_time";
static char __pyx_k40[] = "a";
static char __pyx_k41[] = "_sha1_file";
static char __pyx_k42[] = "f";
static char __pyx_k43[] = "NULLSTAT";
static char __pyx_k44[] = "d";
static char __pyx_k45[] = "_get_block_entry_index";
static char __pyx_k46[] = "_ensure_block";
static char __pyx_k47[] = "pathjoin";
static char __pyx_k48[] = "_read_link";
static char __pyx_k49[] = "l";
static char __pyx_k50[] = "IN_MEMORY_MODIFIED";
static char __pyx_k51[] = "set";
static char __pyx_k52[] = "__ne__";
static char __pyx_k53[] = "cache_utf8";
static char __pyx_k54[] = "_utf8_decode";
static char __pyx_k55[] = "bisect";
static char __pyx_k56[] = "bisect_left";
static char __pyx_k57[] = "osutils";
static char __pyx_k58[] = "os";
static char __pyx_k59[] = "fstat";
static char __pyx_k60[] = "sha_file";
static char __pyx_k61[] = "BzrError";
static char __pyx_k62[] = "unsupported target index";
static char __pyx_k63[] = "NULL_PARENT_DETAILS";
static char __pyx_k64[] = "Unsupported target index %d";
static char __pyx_k65[] = "is_inside_any";
static char __pyx_k66[] = "add";
static char __pyx_k67[] = "path";
static char __pyx_k68[] = "split";
static char __pyx_k69[] = "_get_entry";
static char __pyx_k70[] = "path_utf8";
static char __pyx_k71[] = "CorruptDirstate";
static char __pyx_k72[] = "_filename";
static char __pyx_k73[] = "entry '%s/%s' is considered renamed from %r but source does not exist\nentry: %s";
static char __pyx_k74[] = "directory";
static char __pyx_k75[] = "file";
static char __pyx_k76[] = "_sha1_provider";
static char __pyx_k77[] = "stat_and_sha1";
static char __pyx_k78[] = "_observed_sha1";
static char __pyx_k79[] = "symlink";
static char __pyx_k80[] = "tree-reference";
static char __pyx_k81[] = "BadFileKindError";
static char __pyx_k82[] = "Could not find target parent in wt: %s\nparent of: %s";
static char __pyx_k83[] = "We could not find the parent entry in index %d for the entry: %s";
static char __pyx_k84[] = "don't know how to compare source_minikind=%r, target_minikind=%r";
static char __pyx_k85[] = "update";
static char __pyx_k86[] = "parent_directories";
static char __pyx_k87[] = "encode";
static char __pyx_k88[] = "utf8";
static char __pyx_k89[] = "is_inside";
static char __pyx_k90[] = "pop";
static char __pyx_k91[] = "_entries_for_path";
static char __pyx_k92[] = "decode";
static char __pyx_k93[] = "abspath";
static char __pyx_k94[] = "lstat";
static char __pyx_k95[] = "file_kind_from_stat_mode";
static char __pyx_k96[] = "_directory_is_tree_reference";
static char __pyx_k97[] = "errno";
static char __pyx_k98[] = "ENOENT";
static char __pyx_k99[] = "stat";
static char __pyx_k100[] = "S_ISREG";
static char __pyx_k101[] = "S_IEXEC";
static char __pyx_k102[] = "splitpath";
static char __pyx_k103[] = "_walkdirs_utf8";
static char __pyx_k104[] = "prefix";
static char __pyx_k105[] = "next";
static char __pyx_k106[] = ".bzr";
static char __pyx_k107[] = "ENOTDIR";
static char __pyx_k108[] = "EINVAL";
static char __pyx_k109[] = "sys";
static char __pyx_k110[] = "platform";
static char __pyx_k111[] = "win32";
static char __pyx_k112[] = "winerror";
static char __pyx_k113[] = "AttributeError";
static char __pyx_k114[] = "_find_block_index_from_key";
static char __pyx_k115[] = "cmp";
static char __pyx_k116[] = "BadFilenameEncoding";
static char __pyx_k117[] = "_fs_enc";
static char __pyx_k118[] = "result is not None: %r";
static char __pyx_k119[] = "ar";
static char __pyx_k120[] = "append";
static char __pyx_k121[] = "Missing entry for specific path parent %r, %r";
static char __pyx_k122[] = "Got entry<->path mismatch for specific path %r entry %r path_info %r ";
static char __pyx_k123[] = "r";
static char __pyx_k124[] = "rsplit";
static char __pyx_k125[] = "/";
static char __pyx_k126[] = "binascii";
static char __pyx_k127[] = "bzrlib";
static char __pyx_k128[] = "bzrlib.dirstate";
static char __pyx_k129[] = "bzrlib.osutils";
static char __pyx_k130[] = "b2a_base64";
static char __pyx_k131[] = "struct";
static char __pyx_k132[] = "pack";
static char __pyx_k133[] = "absent";
static char __pyx_k134[] = "relocated";

static PyObject *__pyx_n_AttributeError;
static PyObject *__pyx_n_BadFileKindError;
static PyObject *__pyx_n_BadFilenameEncoding;
static PyObject *__pyx_n_BzrError;
static PyObject *__pyx_n_CorruptDirstate;
static PyObject *__pyx_n_DirState;
static PyObject *__pyx_n_DirstateCorrupt;
static PyObject *__pyx_n_EINVAL;
static PyObject *__pyx_n_ENOENT;
static PyObject *__pyx_n_ENOTDIR;
static PyObject *__pyx_n_IN_MEMORY_MODIFIED;
static PyObject *__pyx_n_IN_MEMORY_UNMODIFIED;
static PyObject *__pyx_n_NULLSTAT;
static PyObject *__pyx_n_NULL_PARENT_DETAILS;
static PyObject *__pyx_n_S_IEXEC;
static PyObject *__pyx_n_S_ISREG;
static PyObject *__pyx_n___ne__;
static PyObject *__pyx_n__cutoff_time;
static PyObject *__pyx_n__dirblock_state;
static PyObject *__pyx_n__dirblocks;
static PyObject *__pyx_n__directory_is_tree_reference;
static PyObject *__pyx_n__encode;
static PyObject *__pyx_n__end_of_header;
static PyObject *__pyx_n__ensure_block;
static PyObject *__pyx_n__entries_for_path;
static PyObject *__pyx_n__filename;
static PyObject *__pyx_n__find_block_index_from_key;
static PyObject *__pyx_n__fs_enc;
static PyObject *__pyx_n__get_block_entry_index;
static PyObject *__pyx_n__get_entry;
static PyObject *__pyx_n__is_executable;
static PyObject *__pyx_n__num_entries;
static PyObject *__pyx_n__num_present_parents;
static PyObject *__pyx_n__observed_sha1;
static PyObject *__pyx_n__parse_dirblocks;
static PyObject *__pyx_n__read_link;
static PyObject *__pyx_n__sha1_file;
static PyObject *__pyx_n__sha1_provider;
static PyObject *__pyx_n__sha_cutoff_time;
static PyObject *__pyx_n__state_file;
static PyObject *__pyx_n__utf8_decode;
static PyObject *__pyx_n__walkdirs_utf8;
static PyObject *__pyx_n_a;
static PyObject *__pyx_n_absent;
static PyObject *__pyx_n_abspath;
static PyObject *__pyx_n_add;
static PyObject *__pyx_n_append;
static PyObject *__pyx_n_ar;
static PyObject *__pyx_n_b2a_base64;
static PyObject *__pyx_n_binascii;
static PyObject *__pyx_n_bisect;
static PyObject *__pyx_n_bisect_left;
static PyObject *__pyx_n_bzrlib;
static PyObject *__pyx_n_cache_utf8;
static PyObject *__pyx_n_cmp;
static PyObject *__pyx_n_d;
static PyObject *__pyx_n_decode;
static PyObject *__pyx_n_directory;
static PyObject *__pyx_n_encode;
static PyObject *__pyx_n_errno;
static PyObject *__pyx_n_errors;
static PyObject *__pyx_n_f;
static PyObject *__pyx_n_file;
static PyObject *__pyx_n_file_kind_from_stat_mode;
static PyObject *__pyx_n_fstat;
static PyObject *__pyx_n_is_inside;
static PyObject *__pyx_n_is_inside_any;
static PyObject *__pyx_n_l;
static PyObject *__pyx_n_lstat;
static PyObject *__pyx_n_next;
static PyObject *__pyx_n_os;
static PyObject *__pyx_n_osutils;
static PyObject *__pyx_n_pack;
static PyObject *__pyx_n_parent_directories;
static PyObject *__pyx_n_path;
static PyObject *__pyx_n_path_utf8;
static PyObject *__pyx_n_pathjoin;
static PyObject *__pyx_n_platform;
static PyObject *__pyx_n_pop;
static PyObject *__pyx_n_prefix;
static PyObject *__pyx_n_r;
static PyObject *__pyx_n_read;
static PyObject *__pyx_n_relocated;
static PyObject *__pyx_n_rsplit;
static PyObject *__pyx_n_seek;
static PyObject *__pyx_n_set;
static PyObject *__pyx_n_sha_file;
static PyObject *__pyx_n_split;
static PyObject *__pyx_n_splitpath;
static PyObject *__pyx_n_st_ctime;
static PyObject *__pyx_n_st_dev;
static PyObject *__pyx_n_st_ino;
static PyObject *__pyx_n_st_mode;
static PyObject *__pyx_n_st_mtime;
static PyObject *__pyx_n_st_size;
static PyObject *__pyx_n_stat;
static PyObject *__pyx_n_stat_and_sha1;
static PyObject *__pyx_n_struct;
static PyObject *__pyx_n_symlink;
static PyObject *__pyx_n_sys;
static PyObject *__pyx_n_update;
static PyObject *__pyx_n_utf8;
static PyObject *__pyx_n_win32;
static PyObject *__pyx_n_winerror;

static PyObject *__pyx_k1p;
static PyObject *__pyx_k2p;
static PyObject *__pyx_k3p;
static PyObject *__pyx_k4p;
static PyObject *__pyx_k6p;
static PyObject *__pyx_k7p;
static PyObject *__pyx_k8p;
static PyObject *__pyx_k9p;
static PyObject *__pyx_k10p;
static PyObject *__pyx_k11p;
static PyObject *__pyx_k14p;
static PyObject *__pyx_k15p;
static PyObject *__pyx_k16p;
static PyObject *__pyx_k5p;
static PyObject *__pyx_k20p;
static PyObject *__pyx_k21p;
static PyObject *__pyx_k62p;
static PyObject *__pyx_k64p;
static PyObject *__pyx_k73p;
static PyObject *__pyx_k80p;
static PyObject *__pyx_k82p;
static PyObject *__pyx_k83p;
static PyObject *__pyx_k84p;
static PyObject *__pyx_k106p;
static PyObject *__pyx_k118p;
static PyObject *__pyx_k121p;
static PyObject *__pyx_k122p;
static PyObject *__pyx_k125p;
static PyObject *__pyx_k128p;
static PyObject *__pyx_k129p;

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_AttributeError, 1, __pyx_k113, sizeof(__pyx_k113)},
  {&__pyx_n_BadFileKindError, 1, __pyx_k81, sizeof(__pyx_k81)},
  {&__pyx_n_BadFilenameEncoding, 1, __pyx_k116, sizeof(__pyx_k116)},
  {&__pyx_n_BzrError, 1, __pyx_k61, sizeof(__pyx_k61)},
  {&__pyx_n_CorruptDirstate, 1, __pyx_k71, sizeof(__pyx_k71)},
  {&__pyx_n_DirState, 1, __pyx_k27, sizeof(__pyx_k27)},
  {&__pyx_n_DirstateCorrupt, 1, __pyx_k13, sizeof(__pyx_k13)},
  {&__pyx_n_EINVAL, 1, __pyx_k108, sizeof(__pyx_k108)},
  {&__pyx_n_ENOENT, 1, __pyx_k98, sizeof(__pyx_k98)},
  {&__pyx_n_ENOTDIR, 1, __pyx_k107, sizeof(__pyx_k107)},
  {&__pyx_n_IN_MEMORY_MODIFIED, 1, __pyx_k50, sizeof(__pyx_k50)},
  {&__pyx_n_IN_MEMORY_UNMODIFIED, 1, __pyx_k28, sizeof(__pyx_k28)},
  {&__pyx_n_NULLSTAT, 1, __pyx_k43, sizeof(__pyx_k43)},
  {&__pyx_n_NULL_PARENT_DETAILS, 1, __pyx_k63, sizeof(__pyx_k63)},
  {&__pyx_n_S_IEXEC, 1, __pyx_k101, sizeof(__pyx_k101)},
  {&__pyx_n_S_ISREG, 1, __pyx_k100, sizeof(__pyx_k100)},
  {&__pyx_n___ne__, 1, __pyx_k52, sizeof(__pyx_k52)},
  {&__pyx_n__cutoff_time, 1, __pyx_k38, sizeof(__pyx_k38)},
  {&__pyx_n__dirblock_state, 1, __pyx_k29, sizeof(__pyx_k29)},
  {&__pyx_n__dirblocks, 1, __pyx_k19, sizeof(__pyx_k19)},
  {&__pyx_n__directory_is_tree_reference, 1, __pyx_k96, sizeof(__pyx_k96)},
  {&__pyx_n__encode, 1, __pyx_k36, sizeof(__pyx_k36)},
  {&__pyx_n__end_of_header, 1, __pyx_k24, sizeof(__pyx_k24)},
  {&__pyx_n__ensure_block, 1, __pyx_k46, sizeof(__pyx_k46)},
  {&__pyx_n__entries_for_path, 1, __pyx_k91, sizeof(__pyx_k91)},
  {&__pyx_n__filename, 1, __pyx_k72, sizeof(__pyx_k72)},
  {&__pyx_n__find_block_index_from_key, 1, __pyx_k114, sizeof(__pyx_k114)},
  {&__pyx_n__fs_enc, 1, __pyx_k117, sizeof(__pyx_k117)},
  {&__pyx_n__get_block_entry_index, 1, __pyx_k45, sizeof(__pyx_k45)},
  {&__pyx_n__get_entry, 1, __pyx_k69, sizeof(__pyx_k69)},
  {&__pyx_n__is_executable, 1, __pyx_k37, sizeof(__pyx_k37)},
  {&__pyx_n__num_entries, 1, __pyx_k18, sizeof(__pyx_k18)},
  {&__pyx_n__num_present_parents, 1, __pyx_k17, sizeof(__pyx_k17)},
  {&__pyx_n__observed_sha1, 1, __pyx_k78, sizeof(__pyx_k78)},
  {&__pyx_n__parse_dirblocks, 1, __pyx_k26, sizeof(__pyx_k26)},
  {&__pyx_n__read_link, 1, __pyx_k48, sizeof(__pyx_k48)},
  {&__pyx_n__sha1_file, 1, __pyx_k41, sizeof(__pyx_k41)},
  {&__pyx_n__sha1_provider, 1, __pyx_k76, sizeof(__pyx_k76)},
  {&__pyx_n__sha_cutoff_time, 1, __pyx_k39, sizeof(__pyx_k39)},
  {&__pyx_n__state_file, 1, __pyx_k22, sizeof(__pyx_k22)},
  {&__pyx_n__utf8_decode, 1, __pyx_k54, sizeof(__pyx_k54)},
  {&__pyx_n__walkdirs_utf8, 1, __pyx_k103, sizeof(__pyx_k103)},
  {&__pyx_n_a, 1, __pyx_k40, sizeof(__pyx_k40)},
  {&__pyx_n_absent, 1, __pyx_k133, sizeof(__pyx_k133)},
  {&__pyx_n_abspath, 1, __pyx_k93, sizeof(__pyx_k93)},
  {&__pyx_n_add, 1, __pyx_k66, sizeof(__pyx_k66)},
  {&__pyx_n_append, 1, __pyx_k120, sizeof(__pyx_k120)},
  {&__pyx_n_ar, 1, __pyx_k119, sizeof(__pyx_k119)},
  {&__pyx_n_b2a_base64, 1, __pyx_k130, sizeof(__pyx_k130)},
  {&__pyx_n_binascii, 1, __pyx_k126, sizeof(__pyx_k126)},
  {&__pyx_n_bisect, 1, __pyx_k55, sizeof(__pyx_k55)},
  {&__pyx_n_bisect_left, 1, __pyx_k56, sizeof(__pyx_k56)},
  {&__pyx_n_bzrlib, 1, __pyx_k127, sizeof(__pyx_k127)},
  {&__pyx_n_cache_utf8, 1, __pyx_k53, sizeof(__pyx_k53)},
  {&__pyx_n_cmp, 1, __pyx_k115, sizeof(__pyx_k115)},
  {&__pyx_n_d, 1, __pyx_k44, sizeof(__pyx_k44)},
  {&__pyx_n_decode, 1, __pyx_k92, sizeof(__pyx_k92)},
  {&__pyx_n_directory, 1, __pyx_k74, sizeof(__pyx_k74)},
  {&__pyx_n_encode, 1, __pyx_k87, sizeof(__pyx_k87)},
  {&__pyx_n_errno, 1, __pyx_k97, sizeof(__pyx_k97)},
  {&__pyx_n_errors, 1, __pyx_k12, sizeof(__pyx_k12)},
  {&__pyx_n_f, 1, __pyx_k42, sizeof(__pyx_k42)},
  {&__pyx_n_file, 1, __pyx_k75, sizeof(__pyx_k75)},
  {&__pyx_n_file_kind_from_stat_mode, 1, __pyx_k95, sizeof(__pyx_k95)},
  {&__pyx_n_fstat, 1, __pyx_k59, sizeof(__pyx_k59)},
  {&__pyx_n_is_inside, 1, __pyx_k89, sizeof(__pyx_k89)},
  {&__pyx_n_is_inside_any, 1, __pyx_k65, sizeof(__pyx_k65)},
  {&__pyx_n_l, 1, __pyx_k49, sizeof(__pyx_k49)},
  {&__pyx_n_lstat, 1, __pyx_k94, sizeof(__pyx_k94)},
  {&__pyx_n_next, 1, __pyx_k105, sizeof(__pyx_k105)},
  {&__pyx_n_os, 1, __pyx_k58, sizeof(__pyx_k58)},
  {&__pyx_n_osutils, 1, __pyx_k57, sizeof(__pyx_k57)},
  {&__pyx_n_pack, 1, __pyx_k132, sizeof(__pyx_k132)},
  {&__pyx_n_parent_directories, 1, __pyx_k86, sizeof(__pyx_k86)},
  {&__pyx_n_path, 1, __pyx_k67, sizeof(__pyx_k67)},
  {&__pyx_n_path_utf8, 1, __pyx_k70, sizeof(__pyx_k70)},
  {&__pyx_n_pathjoin, 1, __pyx_k47, sizeof(__pyx_k47)},
  {&__pyx_n_platform, 1, __pyx_k110, sizeof(__pyx_k110)},
  {&__pyx_n_pop, 1, __pyx_k90, sizeof(__pyx_k90)},
  {&__pyx_n_prefix, 1, __pyx_k104, sizeof(__pyx_k104)},
  {&__pyx_n_r, 1, __pyx_k123, sizeof(__pyx_k123)},
  {&__pyx_n_read, 1, __pyx_k25, sizeof(__pyx_k25)},
  {&__pyx_n_relocated, 1, __pyx_k134, sizeof(__pyx_k134)},
  {&__pyx_n_rsplit, 1, __pyx_k124, sizeof(__pyx_k124)},
  {&__pyx_n_seek, 1, __pyx_k23, sizeof(__pyx_k23)},
  {&__pyx_n_set, 1, __pyx_k51, sizeof(__pyx_k51)},
  {&__pyx_n_sha_file, 1, __pyx_k60, sizeof(__pyx_k60)},
  {&__pyx_n_split, 1, __pyx_k68, sizeof(__pyx_k68)},
  {&__pyx_n_splitpath, 1, __pyx_k102, sizeof(__pyx_k102)},
  {&__pyx_n_st_ctime, 1, __pyx_k32, sizeof(__pyx_k32)},
  {&__pyx_n_st_dev, 1, __pyx_k33, sizeof(__pyx_k33)},
  {&__pyx_n_st_ino, 1, __pyx_k34, sizeof(__pyx_k34)},
  {&__pyx_n_st_mode, 1, __pyx_k35, sizeof(__pyx_k35)},
  {&__pyx_n_st_mtime, 1, __pyx_k31, sizeof(__pyx_k31)},
  {&__pyx_n_st_size, 1, __pyx_k30, sizeof(__pyx_k30)},
  {&__pyx_n_stat, 1, __pyx_k99, sizeof(__pyx_k99)},
  {&__pyx_n_stat_and_sha1, 1, __pyx_k77, sizeof(__pyx_k77)},
  {&__pyx_n_struct, 1, __pyx_k131, sizeof(__pyx_k131)},
  {&__pyx_n_symlink, 1, __pyx_k79, sizeof(__pyx_k79)},
  {&__pyx_n_sys, 1, __pyx_k109, sizeof(__pyx_k109)},
  {&__pyx_n_update, 1, __pyx_k85, sizeof(__pyx_k85)},
  {&__pyx_n_utf8, 1, __pyx_k88, sizeof(__pyx_k88)},
  {&__pyx_n_win32, 1, __pyx_k111, sizeof(__pyx_k111)},
  {&__pyx_n_winerror, 1, __pyx_k112, sizeof(__pyx_k112)},
  {&__pyx_k1p, 0, __pyx_k1, sizeof(__pyx_k1)},
  {&__pyx_k2p, 0, __pyx_k2, sizeof(__pyx_k2)},
  {&__pyx_k3p, 0, __pyx_k3, sizeof(__pyx_k3)},
  {&__pyx_k4p, 0, __pyx_k4, sizeof(__pyx_k4)},
  {&__pyx_k5p, 0, __pyx_k5, sizeof(__pyx_k5)},
  {&__pyx_k6p, 0, __pyx_k6, sizeof(__pyx_k6)},
  {&__pyx_k7p, 0, __pyx_k7, sizeof(__pyx_k7)},
  {&__pyx_k8p, 0, __pyx_k8, sizeof(__pyx_k8)},
  {&__pyx_k9p, 0, __pyx_k9, sizeof(__pyx_k9)},
  {&__pyx_k10p, 0, __pyx_k10, sizeof(__pyx_k10)},
  {&__pyx_k11p, 0, __pyx_k11, sizeof(__pyx_k11)},
  {&__pyx_k14p, 0, __pyx_k14, sizeof(__pyx_k14)},
  {&__pyx_k15p, 0, __pyx_k15, sizeof(__pyx_k15)},
  {&__pyx_k16p, 0, __pyx_k16, sizeof(__pyx_k16)},
  {&__pyx_k20p, 0, __pyx_k20, sizeof(__pyx_k20)},
  {&__pyx_k21p, 0, __pyx_k21, sizeof(__pyx_k21)},
  {&__pyx_k62p, 0, __pyx_k62, sizeof(__pyx_k62)},
  {&__pyx_k64p, 0, __pyx_k64, sizeof(__pyx_k64)},
  {&__pyx_k73p, 0, __pyx_k73, sizeof(__pyx_k73)},
  {&__pyx_k80p, 0, __pyx_k80, sizeof(__pyx_k80)},
  {&__pyx_k82p, 0, __pyx_k82, sizeof(__pyx_k82)},
  {&__pyx_k83p, 0, __pyx_k83, sizeof(__pyx_k83)},
  {&__pyx_k84p, 0, __pyx_k84, sizeof(__pyx_k84)},
  {&__pyx_k106p, 0, __pyx_k106, sizeof(__pyx_k106)},
  {&__pyx_k118p, 0, __pyx_k118, sizeof(__pyx_k118)},
  {&__pyx_k121p, 0, __pyx_k121, sizeof(__pyx_k121)},
  {&__pyx_k122p, 0, __pyx_k122, sizeof(__pyx_k122)},
  {&__pyx_k125p, 0, __pyx_k125, sizeof(__pyx_k125)},
  {&__pyx_k128p, 0, __pyx_k128, sizeof(__pyx_k128)},
  {&__pyx_k129p, 0, __pyx_k129, sizeof(__pyx_k129)},
  {0, 0, 0, 0}
};

static PyObject *__pyx_d1;
static PyObject *__pyx_d2;
static PyObject *__pyx_d3;


/* Implementation of bzrlib._dirstate_helpers_pyx */

static void *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__my_memrchr(void *__pyx_v_s,int __pyx_v_c,size_t __pyx_v_n) {
  char *__pyx_v_pos;
  char *__pyx_v_start;
  void *__pyx_r;
  int __pyx_1;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":127 */
  __pyx_v_start = ((char *)__pyx_v_s);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":128 */
  __pyx_v_pos = ((__pyx_v_start + __pyx_v_n) - 1);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":129 */
  while (1) {
    __pyx_1 = (__pyx_v_pos >= __pyx_v_start);
    if (!__pyx_1) break;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":130 */
    __pyx_1 = ((__pyx_v_pos[0]) == __pyx_v_c);
    if (__pyx_1) {
      __pyx_r = __pyx_v_pos;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":132 */
    __pyx_v_pos = (__pyx_v_pos - 1);
  }

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":133 */
  __pyx_r = NULL;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__py_memrchr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx__py_memrchr[] = "Just to expose _my_memrchr for testing.\n\n    :param s: The Python string to search\n    :param c: The character to search for\n    :return: The offset to the last instance of \'c\' in s\n    ";
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__py_memrchr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_s = 0;
  PyObject *__pyx_v_c = 0;
  void *__pyx_v__s;
  void *__pyx_v_found;
  int __pyx_v_length;
  char *__pyx_v__c;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  int __pyx_3;
  static char *__pyx_argnames[] = {"s","c",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_s, &__pyx_v_c)) return 0;
  Py_INCREF(__pyx_v_s);
  Py_INCREF(__pyx_v_c);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":148 */
  __pyx_v__s = PyString_AsString(__pyx_v_s);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":149 */
  __pyx_v_length = PyString_Size(__pyx_v_s);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":151 */
  __pyx_v__c = PyString_AsString(__pyx_v_c);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":152 */
  #ifndef PYREX_WITHOUT_ASSERTIONS
  if (!(PyString_Size(__pyx_v_c) == 1)) {
    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;}
    Py_INCREF(__pyx_v_c);
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_c);
    __pyx_2 = PyNumber_Remainder(__pyx_k1p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    PyErr_SetObject(PyExc_AssertionError, __pyx_2);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; goto __pyx_L1;}
  }
  #endif

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":154 */
  __pyx_v_found = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__my_memrchr(__pyx_v__s,(__pyx_v__c[0]),__pyx_v_length);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":155 */
  __pyx_3 = (__pyx_v_found == NULL);
  if (__pyx_3) {
    Py_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":157 */
  __pyx_1 = PyInt_FromLong((((char *)__pyx_v_found) - ((char *)__pyx_v__s))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._py_memrchr");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_s);
  Py_DECREF(__pyx_v_c);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_safe_string_from_size(char *__pyx_v_s,Py_ssize_t __pyx_v_size) {
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":161 */
  __pyx_1 = (__pyx_v_size < 0);
  if (__pyx_1) {
    __pyx_2 = PyInt_FromSsize_t(__pyx_v_size); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;}
    __pyx_3 = PyNumber_Remainder(__pyx_k2p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    __pyx_3 = 0;
    __pyx_3 = PyObject_CallObject(PyExc_AssertionError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":165 */
  __pyx_2 = PyString_FromStringAndSize(__pyx_v_s,__pyx_v_size); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.safe_string_from_size");
  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__is_aligned(void *__pyx_v_ptr) {
  int __pyx_r;
  __pyx_r = ((((intptr_t)__pyx_v_ptr) & ((sizeof(int)) - 1)) == 0);
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_by_dirs(char *__pyx_v_path1,int __pyx_v_size1,char *__pyx_v_path2,int __pyx_v_size2) {
  unsigned char *__pyx_v_cur1;
  unsigned char *__pyx_v_cur2;
  unsigned char *__pyx_v_end1;
  unsigned char *__pyx_v_end2;
  int *__pyx_v_cur_int1;
  int *__pyx_v_cur_int2;
  int *__pyx_v_end_int1;
  int *__pyx_v_end_int2;
  int __pyx_r;
  int __pyx_1;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":186 */
  __pyx_1 = (__pyx_v_path1 == __pyx_v_path2);
  if (__pyx_1) {
    __pyx_1 = (__pyx_v_size1 == __pyx_v_size2);
  }
  if (__pyx_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":189 */
  __pyx_v_end1 = (((unsigned char *)__pyx_v_path1) + __pyx_v_size1);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":190 */
  __pyx_v_end2 = (((unsigned char *)__pyx_v_path2) + __pyx_v_size2);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":197 */
  __pyx_1 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__is_aligned(__pyx_v_path1);
  if (__pyx_1) {
    __pyx_1 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__is_aligned(__pyx_v_path2);
  }
  if (__pyx_1) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":198 */
    __pyx_v_cur_int1 = ((int *)__pyx_v_path1);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":199 */
    __pyx_v_cur_int2 = ((int *)__pyx_v_path2);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":200 */
    __pyx_v_end_int1 = ((int *)((__pyx_v_path1 + __pyx_v_size1) - (__pyx_v_size1 % (sizeof(int)))));

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":201 */
    __pyx_v_end_int2 = ((int *)((__pyx_v_path2 + __pyx_v_size2) - (__pyx_v_size2 % (sizeof(int)))));

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":203 */
    while (1) {
      __pyx_1 = (__pyx_v_cur_int1 < __pyx_v_end_int1);
      if (__pyx_1) {
        __pyx_1 = (__pyx_v_cur_int2 < __pyx_v_end_int2);
      }
      if (!__pyx_1) break;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":204 */
      __pyx_1 = ((__pyx_v_cur_int1[0]) != (__pyx_v_cur_int2[0]));
      if (__pyx_1) {
        goto __pyx_L5;
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":206 */
      __pyx_v_cur_int1 = (__pyx_v_cur_int1 + 1);

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":207 */
      __pyx_v_cur_int2 = (__pyx_v_cur_int2 + 1);
    }
    __pyx_L5:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":209 */
    __pyx_v_cur1 = ((unsigned char *)__pyx_v_cur_int1);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":210 */
    __pyx_v_cur2 = ((unsigned char *)__pyx_v_cur_int2);
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":212 */
    __pyx_v_cur1 = ((unsigned char *)__pyx_v_path1);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":213 */
    __pyx_v_cur2 = ((unsigned char *)__pyx_v_path2);
  }
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":215 */
  while (1) {
    __pyx_1 = (__pyx_v_cur1 < __pyx_v_end1);
    if (__pyx_1) {
      __pyx_1 = (__pyx_v_cur2 < __pyx_v_end2);
    }
    if (!__pyx_1) break;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":216 */
    __pyx_1 = ((__pyx_v_cur1[0]) == (__pyx_v_cur2[0]));
    if (__pyx_1) {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":218 */
      __pyx_v_cur1 = (__pyx_v_cur1 + 1);

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":219 */
      __pyx_v_cur2 = (__pyx_v_cur2 + 1);

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":220 */
      goto __pyx_L7;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":222 */
    __pyx_1 = ((__pyx_v_cur1[0]) == '/');
    if (__pyx_1) {
      __pyx_r = (-1);
      goto __pyx_L0;
      goto __pyx_L10;
    }
    __pyx_1 = ((__pyx_v_cur2[0]) == '/');
    if (__pyx_1) {
      __pyx_r = 1;
      goto __pyx_L0;
      goto __pyx_L10;
    }
    __pyx_1 = ((__pyx_v_cur1[0]) < (__pyx_v_cur2[0]));
    if (__pyx_1) {
      __pyx_r = (-1);
      goto __pyx_L0;
      goto __pyx_L10;
    }
    /*else*/ {
      __pyx_r = 1;
      goto __pyx_L0;
    }
    __pyx_L10:;
    __pyx_L7:;
  }

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":232 */
  __pyx_1 = (__pyx_v_cur1 < __pyx_v_end1);
  if (__pyx_1) {
    __pyx_r = 1;
    goto __pyx_L0;
    goto __pyx_L11;
  }
  __pyx_L11:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":234 */
  __pyx_1 = (__pyx_v_cur2 < __pyx_v_end2);
  if (__pyx_1) {
    __pyx_r = (-1);
    goto __pyx_L0;
    goto __pyx_L12;
  }
  __pyx_L12:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":237 */
  __pyx_r = 0;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_cmp_by_dirs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_cmp_by_dirs[] = "Compare two paths directory by directory.\n\n    This is equivalent to doing::\n\n       cmp(path1.split(\'/\'), path2.split(\'/\'))\n\n    The idea is that you should compare path components separately. This\n    differs from plain ``cmp(path1, path2)`` for paths like ``\'a-b\'`` and\n    ``a/b``. \"a-b\" comes after \"a\" but would come before \"a/b\" lexically.\n\n    :param path1: first path\n    :param path2: second path\n    :return: negative number if ``path1`` comes first,\n        0 if paths are equal,\n        and positive number if ``path2`` sorts first\n    ";
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_cmp_by_dirs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path1 = 0;
  PyObject *__pyx_v_path2 = 0;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  static char *__pyx_argnames[] = {"path1","path2",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_path1, &__pyx_v_path2)) return 0;
  Py_INCREF(__pyx_v_path1);
  Py_INCREF(__pyx_v_path2);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":257 */
  __pyx_1 = (!PyString_CheckExact(__pyx_v_path1));
  if (__pyx_1) {
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
    Py_INCREF(__pyx_v_path1);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path1);
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    Py_INCREF(__pyx_v_path1);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_path1);
    __pyx_3 = 0;
    __pyx_3 = PyNumber_Remainder(__pyx_k3p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    __pyx_3 = 0;
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":260 */
  __pyx_1 = (!PyString_CheckExact(__pyx_v_path2));
  if (__pyx_1) {
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;}
    Py_INCREF(__pyx_v_path2);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path2);
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    Py_INCREF(__pyx_v_path2);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_path2);
    __pyx_3 = 0;
    __pyx_3 = PyNumber_Remainder(__pyx_k4p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    __pyx_3 = 0;
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":263 */
  __pyx_2 = PyInt_FromLong(__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_by_dirs(PyString_AsString(__pyx_v_path1),PyString_Size(__pyx_v_path1),PyString_AsString(__pyx_v_path2),PyString_Size(__pyx_v_path2))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.cmp_by_dirs");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_path1);
  Py_DECREF(__pyx_v_path2);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock[] = "Compare two paths based on what directory they are in.\n\n    This generates a sort order, such that all children of a directory are\n    sorted together, and grandchildren are in the same order as the\n    children appear. But all grandchildren come after all children.\n\n    In other words, all entries in a directory are sorted together, and\n    directorys are sorted in cmp_by_dirs order.\n\n    :param path1: first path\n    :param path2: the second path\n    :return: negative number if ``path1`` comes first,\n        0 if paths are equal\n        and a positive number if ``path2`` sorts first\n    ";
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path1 = 0;
  PyObject *__pyx_v_path2 = 0;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  static char *__pyx_argnames[] = {"path1","path2",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_path1, &__pyx_v_path2)) return 0;
  Py_INCREF(__pyx_v_path1);
  Py_INCREF(__pyx_v_path2);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":285 */
  __pyx_1 = (!PyString_CheckExact(__pyx_v_path1));
  if (__pyx_1) {
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
    Py_INCREF(__pyx_v_path1);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path1);
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    Py_INCREF(__pyx_v_path1);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_path1);
    __pyx_3 = 0;
    __pyx_3 = PyNumber_Remainder(__pyx_k3p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    __pyx_3 = 0;
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":288 */
  __pyx_1 = (!PyString_CheckExact(__pyx_v_path2));
  if (__pyx_1) {
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
    Py_INCREF(__pyx_v_path2);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path2);
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    Py_INCREF(__pyx_v_path2);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_path2);
    __pyx_3 = 0;
    __pyx_3 = PyNumber_Remainder(__pyx_k4p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    __pyx_3 = 0;
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":291 */
  __pyx_2 = PyInt_FromLong(__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock_intern(PyString_AsString(__pyx_v_path1),PyString_Size(__pyx_v_path1),PyString_AsString(__pyx_v_path2),PyString_Size(__pyx_v_path2))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._cmp_path_by_dirblock");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_path1);
  Py_DECREF(__pyx_v_path2);
  return __pyx_r;
}

static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock_intern(char *__pyx_v_path1,int __pyx_v_path1_len,char *__pyx_v_path2,int __pyx_v_path2_len) {
  char *__pyx_v_dirname1;
  int __pyx_v_dirname1_len;
  char *__pyx_v_dirname2;
  int __pyx_v_dirname2_len;
  char *__pyx_v_basename1;
  int __pyx_v_basename1_len;
  char *__pyx_v_basename2;
  int __pyx_v_basename2_len;
  int __pyx_v_cur_len;
  int __pyx_v_cmp_val;
  int __pyx_r;
  int __pyx_1;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":314 */
  __pyx_1 = (__pyx_v_path1_len == 0);
  if (__pyx_1) {
    __pyx_1 = (__pyx_v_path2_len == 0);
  }
  if (__pyx_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":317 */
  __pyx_1 = (__pyx_v_path1 == __pyx_v_path2);
  if (__pyx_1) {
    __pyx_1 = (__pyx_v_path1_len == __pyx_v_path2_len);
  }
  if (__pyx_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":320 */
  __pyx_1 = (__pyx_v_path1_len == 0);
  if (__pyx_1) {
    __pyx_r = (-1);
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":323 */
  __pyx_1 = (__pyx_v_path2_len == 0);
  if (__pyx_1) {
    __pyx_r = 1;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":326 */
  __pyx_v_basename1 = ((char *)__pyx_f_6bzrlib_21_dirstate_helpers_pyx__my_memrchr(__pyx_v_path1,'/',__pyx_v_path1_len));

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":328 */
  __pyx_1 = (__pyx_v_basename1 == NULL);
  if (__pyx_1) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":329 */
    __pyx_v_basename1 = __pyx_v_path1;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":330 */
    __pyx_v_basename1_len = __pyx_v_path1_len;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":331 */
    __pyx_v_dirname1 = __pyx_k5;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":332 */
    __pyx_v_dirname1_len = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":334 */
    __pyx_v_dirname1 = __pyx_v_path1;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":335 */
    __pyx_v_dirname1_len = (__pyx_v_basename1 - __pyx_v_path1);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":336 */
    __pyx_v_basename1 = (__pyx_v_basename1 + 1);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":337 */
    __pyx_v_basename1_len = ((__pyx_v_path1_len - __pyx_v_dirname1_len) - 1);
  }
  __pyx_L6:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":339 */
  __pyx_v_basename2 = ((char *)__pyx_f_6bzrlib_21_dirstate_helpers_pyx__my_memrchr(__pyx_v_path2,'/',__pyx_v_path2_len));

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":341 */
  __pyx_1 = (__pyx_v_basename2 == NULL);
  if (__pyx_1) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":342 */
    __pyx_v_basename2 = __pyx_v_path2;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":343 */
    __pyx_v_basename2_len = __pyx_v_path2_len;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":344 */
    __pyx_v_dirname2 = __pyx_k5;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":345 */
    __pyx_v_dirname2_len = 0;
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":347 */
    __pyx_v_dirname2 = __pyx_v_path2;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":348 */
    __pyx_v_dirname2_len = (__pyx_v_basename2 - __pyx_v_path2);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":349 */
    __pyx_v_basename2 = (__pyx_v_basename2 + 1);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":350 */
    __pyx_v_basename2_len = ((__pyx_v_path2_len - __pyx_v_dirname2_len) - 1);
  }
  __pyx_L7:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":352 */
  __pyx_v_cmp_val = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_by_dirs(__pyx_v_dirname1,__pyx_v_dirname1_len,__pyx_v_dirname2,__pyx_v_dirname2_len);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":354 */
  __pyx_1 = (__pyx_v_cmp_val != 0);
  if (__pyx_1) {
    __pyx_r = __pyx_v_cmp_val;
    goto __pyx_L0;
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":357 */
  __pyx_v_cur_len = __pyx_v_basename1_len;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":358 */
  __pyx_1 = (__pyx_v_basename2_len < __pyx_v_basename1_len);
  if (__pyx_1) {
    __pyx_v_cur_len = __pyx_v_basename2_len;
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":361 */
  __pyx_v_cmp_val = memcmp(__pyx_v_basename1,__pyx_v_basename2,__pyx_v_cur_len);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":362 */
  __pyx_1 = (__pyx_v_cmp_val != 0);
  if (__pyx_1) {
    __pyx_r = __pyx_v_cmp_val;
    goto __pyx_L0;
    goto __pyx_L10;
  }
  __pyx_L10:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":364 */
  __pyx_1 = (__pyx_v_basename1_len == __pyx_v_basename2_len);
  if (__pyx_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L11;
  }
  __pyx_L11:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":366 */
  __pyx_1 = (__pyx_v_basename1_len < __pyx_v_basename2_len);
  if (__pyx_1) {
    __pyx_r = (-1);
    goto __pyx_L0;
    goto __pyx_L12;
  }
  __pyx_L12:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":368 */
  __pyx_r = 1;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__bisect_path_left(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx__bisect_path_left[] = "Return the index where to insert path into paths.\n\n    This uses a path-wise comparison so we get::\n        a\n        a-b\n        a=b\n        a/b\n    Rather than::\n        a\n        a-b\n        a/b\n        a=b\n    :param paths: A list of paths to search through\n    :param path: A single path to insert\n    :return: An offset where \'path\' can be inserted.\n    :seealso: bisect.bisect_left\n    ";
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__bisect_path_left(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_paths = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_v__lo;
  int __pyx_v__hi;
  int __pyx_v__mid;
  char *__pyx_v_path_cstr;
  int __pyx_v_path_size;
  char *__pyx_v_cur_cstr;
  int __pyx_v_cur_size;
  void *__pyx_v_cur;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  Py_ssize_t __pyx_4;
  static char *__pyx_argnames[] = {"paths","path",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_paths, &__pyx_v_path)) return 0;
  Py_INCREF(__pyx_v_paths);
  Py_INCREF(__pyx_v_path);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":398 */
  __pyx_1 = (!PyList_CheckExact(__pyx_v_paths));
  if (__pyx_1) {
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
    Py_INCREF(__pyx_v_paths);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_paths);
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    Py_INCREF(__pyx_v_paths);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_paths);
    __pyx_3 = 0;
    __pyx_3 = PyNumber_Remainder(__pyx_k6p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    __pyx_3 = 0;
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":401 */
  __pyx_1 = (!PyString_CheckExact(__pyx_v_path));
  if (__pyx_1) {
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; goto __pyx_L1;}
    Py_INCREF(__pyx_v_path);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path);
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    Py_INCREF(__pyx_v_path);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_path);
    __pyx_3 = 0;
    __pyx_3 = PyNumber_Remainder(__pyx_k7p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    __pyx_3 = 0;
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":405 */
  __pyx_4 = PyObject_Length(__pyx_v_paths); if (__pyx_4 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; goto __pyx_L1;}
  __pyx_v__hi = __pyx_4;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":406 */
  __pyx_v__lo = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":408 */
  __pyx_v_path_cstr = PyString_AsString(__pyx_v_path);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":409 */
  __pyx_v_path_size = PyString_Size(__pyx_v_path);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":411 */
  while (1) {
    __pyx_1 = (__pyx_v__lo < __pyx_v__hi);
    if (!__pyx_1) break;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":412 */
    __pyx_v__mid = ((__pyx_v__lo + __pyx_v__hi) / 2);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":413 */
    __pyx_v_cur = PyList_GET_ITEM(__pyx_v_paths,__pyx_v__mid);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":414 */
    __pyx_v_cur_cstr = PyString_AS_STRING(__pyx_v_cur);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":415 */
    __pyx_v_cur_size = PyString_GET_SIZE(__pyx_v_cur);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":416 */
    __pyx_1 = (__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock_intern(__pyx_v_cur_cstr,__pyx_v_cur_size,__pyx_v_path_cstr,__pyx_v_path_size) < 0);
    if (__pyx_1) {
      __pyx_v__lo = (__pyx_v__mid + 1);
      goto __pyx_L6;
    }
    /*else*/ {
      __pyx_v__hi = __pyx_v__mid;
    }
    __pyx_L6:;
  }

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":421 */
  __pyx_2 = PyInt_FromLong(__pyx_v__lo); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._bisect_path_left");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_paths);
  Py_DECREF(__pyx_v_path);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__bisect_path_right(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx__bisect_path_right[] = "Return the index where to insert path into paths.\n\n    This uses a path-wise comparison so we get::\n        a\n        a-b\n        a=b\n        a/b\n    Rather than::\n        a\n        a-b\n        a/b\n        a=b\n    :param paths: A list of paths to search through\n    :param path: A single path to insert\n    :return: An offset where \'path\' can be inserted.\n    :seealso: bisect.bisect_right\n    ";
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__bisect_path_right(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_paths = 0;
  PyObject *__pyx_v_path = 0;
  int __pyx_v__lo;
  int __pyx_v__hi;
  int __pyx_v__mid;
  char *__pyx_v_path_cstr;
  int __pyx_v_path_size;
  char *__pyx_v_cur_cstr;
  int __pyx_v_cur_size;
  void *__pyx_v_cur;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  Py_ssize_t __pyx_4;
  static char *__pyx_argnames[] = {"paths","path",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_paths, &__pyx_v_path)) return 0;
  Py_INCREF(__pyx_v_paths);
  Py_INCREF(__pyx_v_path);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":451 */
  __pyx_1 = (!PyList_CheckExact(__pyx_v_paths));
  if (__pyx_1) {
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; goto __pyx_L1;}
    Py_INCREF(__pyx_v_paths);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_paths);
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    Py_INCREF(__pyx_v_paths);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_paths);
    __pyx_3 = 0;
    __pyx_3 = PyNumber_Remainder(__pyx_k6p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    __pyx_3 = 0;
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":454 */
  __pyx_1 = (!PyString_CheckExact(__pyx_v_path));
  if (__pyx_1) {
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;}
    Py_INCREF(__pyx_v_path);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path);
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    Py_INCREF(__pyx_v_path);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_path);
    __pyx_3 = 0;
    __pyx_3 = PyNumber_Remainder(__pyx_k7p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    __pyx_3 = 0;
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":458 */
  __pyx_4 = PyObject_Length(__pyx_v_paths); if (__pyx_4 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; goto __pyx_L1;}
  __pyx_v__hi = __pyx_4;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":459 */
  __pyx_v__lo = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":461 */
  __pyx_v_path_cstr = PyString_AsString(__pyx_v_path);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":462 */
  __pyx_v_path_size = PyString_Size(__pyx_v_path);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":464 */
  while (1) {
    __pyx_1 = (__pyx_v__lo < __pyx_v__hi);
    if (!__pyx_1) break;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":465 */
    __pyx_v__mid = ((__pyx_v__lo + __pyx_v__hi) / 2);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":466 */
    __pyx_v_cur = PyList_GET_ITEM(__pyx_v_paths,__pyx_v__mid);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":467 */
    __pyx_v_cur_cstr = PyString_AS_STRING(__pyx_v_cur);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":468 */
    __pyx_v_cur_size = PyString_GET_SIZE(__pyx_v_cur);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":469 */
    __pyx_1 = (__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock_intern(__pyx_v_path_cstr,__pyx_v_path_size,__pyx_v_cur_cstr,__pyx_v_cur_size) < 0);
    if (__pyx_1) {
      __pyx_v__hi = __pyx_v__mid;
      goto __pyx_L6;
    }
    /*else*/ {
      __pyx_v__lo = (__pyx_v__mid + 1);
    }
    __pyx_L6:;
  }

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":474 */
  __pyx_2 = PyInt_FromLong(__pyx_v__lo); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._bisect_path_right");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_paths);
  Py_DECREF(__pyx_v_path);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_bisect_dirblock(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_bisect_dirblock[] = "Return the index where to insert dirname into the dirblocks.\n\n    The return value idx is such that all directories blocks in dirblock[:idx]\n    have names < dirname, and all blocks in dirblock[idx:] have names >=\n    dirname.\n\n    Optional args lo (default 0) and hi (default len(dirblocks)) bound the\n    slice of a to be searched.\n    ";
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_bisect_dirblock(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dirblocks = 0;
  PyObject *__pyx_v_dirname = 0;
  PyObject *__pyx_v_lo = 0;
  PyObject *__pyx_v_hi = 0;
  PyObject *__pyx_v_cache = 0;
  int __pyx_v__lo;
  int __pyx_v__hi;
  int __pyx_v__mid;
  char *__pyx_v_dirname_cstr;
  int __pyx_v_dirname_size;
  char *__pyx_v_cur_cstr;
  int __pyx_v_cur_size;
  void *__pyx_v_cur;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  Py_ssize_t __pyx_4;
  static char *__pyx_argnames[] = {"dirblocks","dirname","lo","hi","cache",0};
  __pyx_v_lo = __pyx_d1;
  __pyx_v_hi = __pyx_d2;
  __pyx_v_cache = __pyx_d3;
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|OOO", __pyx_argnames, &__pyx_v_dirblocks, &__pyx_v_dirname, &__pyx_v_lo, &__pyx_v_hi, &__pyx_v_cache)) return 0;
  Py_INCREF(__pyx_v_dirblocks);
  Py_INCREF(__pyx_v_dirname);
  Py_INCREF(__pyx_v_lo);
  Py_INCREF(__pyx_v_hi);
  Py_INCREF(__pyx_v_cache);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":496 */
  __pyx_1 = (!PyList_CheckExact(__pyx_v_dirblocks));
  if (__pyx_1) {
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;}
    Py_INCREF(__pyx_v_dirblocks);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_dirblocks);
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    Py_INCREF(__pyx_v_dirblocks);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_dirblocks);
    __pyx_3 = 0;
    __pyx_3 = PyNumber_Remainder(__pyx_k8p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    __pyx_3 = 0;
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":499 */
  __pyx_1 = (!PyString_CheckExact(__pyx_v_dirname));
  if (__pyx_1) {
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; goto __pyx_L1;}
    Py_INCREF(__pyx_v_dirname);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_dirname);
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    Py_INCREF(__pyx_v_dirname);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_dirname);
    __pyx_3 = 0;
    __pyx_3 = PyNumber_Remainder(__pyx_k9p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
    __pyx_3 = 0;
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":502 */
  __pyx_1 = __pyx_v_hi == Py_None;
  if (__pyx_1) {
    __pyx_4 = PyObject_Length(__pyx_v_dirblocks); if (__pyx_4 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; goto __pyx_L1;}
    __pyx_v__hi = __pyx_4;
    goto __pyx_L4;
  }
  /*else*/ {
    __pyx_1 = PyInt_AsLong(__pyx_v_hi); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; goto __pyx_L1;}
    __pyx_v__hi = __pyx_1;
  }
  __pyx_L4:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":507 */
  __pyx_1 = PyInt_AsLong(__pyx_v_lo); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; goto __pyx_L1;}
  __pyx_v__lo = __pyx_1;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":508 */
  __pyx_v_dirname_cstr = PyString_AsString(__pyx_v_dirname);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":509 */
  __pyx_v_dirname_size = PyString_Size(__pyx_v_dirname);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":511 */
  while (1) {
    __pyx_1 = (__pyx_v__lo < __pyx_v__hi);
    if (!__pyx_1) break;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":512 */
    __pyx_v__mid = ((__pyx_v__lo + __pyx_v__hi) / 2);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":515 */
    __pyx_v_cur = PyTuple_GET_ITEM(PyList_GET_ITEM(__pyx_v_dirblocks,__pyx_v__mid),0);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":517 */
    __pyx_v_cur_cstr = PyString_AS_STRING(__pyx_v_cur);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":518 */
    __pyx_v_cur_size = PyString_GET_SIZE(__pyx_v_cur);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":519 */
    __pyx_1 = (__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_by_dirs(__pyx_v_cur_cstr,__pyx_v_cur_size,__pyx_v_dirname_cstr,__pyx_v_dirname_size) < 0);
    if (__pyx_1) {
      __pyx_v__lo = (__pyx_v__mid + 1);
      goto __pyx_L7;
    }
    /*else*/ {
      __pyx_v__hi = __pyx_v__mid;
    }
    __pyx_L7:;
  }

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":523 */
  __pyx_2 = PyInt_FromLong(__pyx_v__lo); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.bisect_dirblock");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_dirblocks);
  Py_DECREF(__pyx_v_dirname);
  Py_DECREF(__pyx_v_lo);
  Py_DECREF(__pyx_v_hi);
  Py_DECREF(__pyx_v_cache);
  return __pyx_r;
}

static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_text = 0;
  PyObject *__pyx_v_state = 0;
  int __pyx_r;
  static char *__pyx_argnames[] = {"text","state",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_text, &__pyx_v_state)) return -1;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_text);
  Py_INCREF(__pyx_v_state);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":539 */
  Py_INCREF(__pyx_v_state);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state = __pyx_v_state;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":540 */
  Py_INCREF(__pyx_v_text);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text = __pyx_v_text;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":541 */
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text_cstr = PyString_AsString(__pyx_v_text);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":542 */
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text_size = PyString_Size(__pyx_v_text);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":543 */
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->end_cstr = (((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text_cstr + ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text_size);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":544 */
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->cur_cstr = ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text_cstr;

  __pyx_r = 0;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_text);
  Py_DECREF(__pyx_v_state);
  return __pyx_r;
}

static char *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader_get_next(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *__pyx_v_self,int *__pyx_v_size) {
  char *__pyx_v_next;
  Py_ssize_t __pyx_v_extra_len;
  char *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":551 */
  __pyx_1 = (__pyx_v_self->cur_cstr == NULL);
  if (__pyx_1) {
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;}
    Py_INCREF(__pyx_k10p);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k10p);
    __pyx_3 = PyObject_CallObject(PyExc_AssertionError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_1 = (__pyx_v_self->cur_cstr >= __pyx_v_self->end_cstr);
  if (__pyx_1) {
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; goto __pyx_L1;}
    Py_INCREF(__pyx_k11p);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k11p);
    __pyx_3 = PyObject_CallObject(PyExc_AssertionError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":556 */
  __pyx_v_next = __pyx_v_self->cur_cstr;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":557 */
  __pyx_v_self->cur_cstr = ((char *)memchr(__pyx_v_next,'\0',(__pyx_v_self->end_cstr - __pyx_v_next)));

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":558 */
  __pyx_1 = (__pyx_v_self->cur_cstr == NULL);
  if (__pyx_1) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":559 */
    __pyx_v_extra_len = (__pyx_v_self->end_cstr - __pyx_v_next);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":560 */
    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_errors); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; goto __pyx_L1;}
    __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_DirstateCorrupt); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx_safe_string_from_size(__pyx_v_next,__pyx_v_extra_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; goto __pyx_L1;}
    __pyx_4 = PyNumber_Remainder(__pyx_k14p, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; goto __pyx_L1;}
    Py_INCREF(__pyx_v_self->state);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self->state);
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4);
    __pyx_4 = 0;
    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_4, 0, 0);
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; goto __pyx_L1;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":564 */
  (__pyx_v_size[0]) = (__pyx_v_self->cur_cstr - __pyx_v_next);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":565 */
  __pyx_v_self->cur_cstr = (__pyx_v_self->cur_cstr + 1);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":566 */
  __pyx_r = __pyx_v_next;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.Reader.get_next");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader_get_next_str(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *__pyx_v_self) {
  int __pyx_v_size;
  char *__pyx_v_next;
  PyObject *__pyx_r;
  char *__pyx_1;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":572 */
  __pyx_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next(__pyx_v_self,(&__pyx_v_size)); if (__pyx_1 == NULL) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; goto __pyx_L1;}
  __pyx_v_next = __pyx_1;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":573 */
  __pyx_2 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx_safe_string_from_size(__pyx_v_next,__pyx_v_size); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; goto __pyx_L1;}
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.Reader.get_next_str");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader__init(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *__pyx_v_self) {
  char *__pyx_v_first;
  int __pyx_v_size;
  int __pyx_r;
  char *__pyx_1;
  int __pyx_2;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":586 */
  __pyx_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next(__pyx_v_self,(&__pyx_v_size)); if (__pyx_1 == NULL) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; goto __pyx_L1;}
  __pyx_v_first = __pyx_1;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":587 */
  __pyx_2 = ((__pyx_v_first[0]) != '\0');
  if (__pyx_2) {
    __pyx_2 = (__pyx_v_size == 0);
  }
  if (__pyx_2) {
    __pyx_3 = PyString_FromString(__pyx_v_first); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; goto __pyx_L1;}
    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
    __pyx_3 = 0;
    __pyx_3 = PyNumber_Remainder(__pyx_k15p, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
    __pyx_3 = 0;
    __pyx_3 = PyObject_CallObject(PyExc_AssertionError, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; goto __pyx_L1;}
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":590 */
  __pyx_r = 0;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.Reader._init");
  __pyx_r = (-1);
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader__get_entry(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *__pyx_v_self,int __pyx_v_num_trees,void **__pyx_v_p_current_dirname,int *__pyx_v_new_block) {
  PyObject *__pyx_v_path_name_file_id_key;
  char *__pyx_v_entry_size_cstr;
  unsigned long __pyx_v_entry_size;
  char *__pyx_v_executable_cstr;
  int __pyx_v_is_executable;
  char *__pyx_v_dirname_cstr;
  char *__pyx_v_trailing;
  int __pyx_v_cur_size;
  int __pyx_v_i;
  PyObject *__pyx_v_minikind;
  PyObject *__pyx_v_fingerprint;
  PyObject *__pyx_v_info;
  PyObject *__pyx_v_dirname;
  PyObject *__pyx_v_trees;
  PyObject *__pyx_v_ret;
  PyObject *__pyx_r;
  char *__pyx_1;
  int __pyx_2;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_path_name_file_id_key = Py_None; Py_INCREF(Py_None);
  __pyx_v_minikind = Py_None; Py_INCREF(Py_None);
  __pyx_v_fingerprint = Py_None; Py_INCREF(Py_None);
  __pyx_v_info = Py_None; Py_INCREF(Py_None);
  __pyx_v_dirname = Py_None; Py_INCREF(Py_None);
  __pyx_v_trees = Py_None; Py_INCREF(Py_None);
  __pyx_v_ret = Py_None; Py_INCREF(Py_None);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":627 */
  __pyx_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next(__pyx_v_self,(&__pyx_v_cur_size)); if (__pyx_1 == NULL) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; goto __pyx_L1;}
  __pyx_v_dirname_cstr = __pyx_1;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":635 */
  __pyx_2 = (__pyx_v_cur_size != PyString_GET_SIZE((__pyx_v_p_current_dirname[0])));
  if (!__pyx_2) {
    __pyx_2 = (strncmp(__pyx_v_dirname_cstr,PyString_AS_STRING((__pyx_v_p_current_dirname[0])),(__pyx_v_cur_size + 1)) != 0);
  }
  if (__pyx_2) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":644 */
    __pyx_3 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx_safe_string_from_size(__pyx_v_dirname_cstr,__pyx_v_cur_size); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; goto __pyx_L1;}
    Py_DECREF(__pyx_v_dirname);
    __pyx_v_dirname = __pyx_3;
    __pyx_3 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":645 */
    (__pyx_v_p_current_dirname[0]) = ((void *)__pyx_v_dirname);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":646 */
    (__pyx_v_new_block[0]) = 1;
    goto __pyx_L2;
  }
  /*else*/ {
    (__pyx_v_new_block[0]) = 0;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":653 */
  __pyx_3 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; goto __pyx_L1;}
  __pyx_4 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; goto __pyx_L1;}
  __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; goto __pyx_L1;}
  Py_INCREF(((PyObject *)(__pyx_v_p_current_dirname[0])));
  PyTuple_SET_ITEM(__pyx_5, 0, ((PyObject *)(__pyx_v_p_current_dirname[0])));
  PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3);
  PyTuple_SET_ITEM(__pyx_5, 2, __pyx_4);
  __pyx_3 = 0;
  __pyx_4 = 0;
  Py_DECREF(__pyx_v_path_name_file_id_key);
  __pyx_v_path_name_file_id_key = __pyx_5;
  __pyx_5 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":671 */
  __pyx_3 = PyList_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; goto __pyx_L1;}
  Py_DECREF(__pyx_v_trees);
  __pyx_v_trees = __pyx_3;
  __pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":672 */
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_num_trees; ++__pyx_v_i) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":673 */
    __pyx_4 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; goto __pyx_L1;}
    Py_DECREF(__pyx_v_minikind);
    __pyx_v_minikind = __pyx_4;
    __pyx_4 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":674 */
    __pyx_5 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;}
    Py_DECREF(__pyx_v_fingerprint);
    __pyx_v_fingerprint = __pyx_5;
    __pyx_5 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":675 */
    __pyx_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next(__pyx_v_self,(&__pyx_v_cur_size)); if (__pyx_1 == NULL) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; goto __pyx_L1;}
    __pyx_v_entry_size_cstr = __pyx_1;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":676 */
    __pyx_v_entry_size = strtoul(__pyx_v_entry_size_cstr,NULL,10);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":677 */
    __pyx_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next(__pyx_v_self,(&__pyx_v_cur_size)); if (__pyx_1 == NULL) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; goto __pyx_L1;}
    __pyx_v_executable_cstr = __pyx_1;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":678 */
    __pyx_v_is_executable = ((__pyx_v_executable_cstr[0]) == 'y');

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":679 */
    __pyx_3 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; goto __pyx_L1;}
    Py_DECREF(__pyx_v_info);
    __pyx_v_info = __pyx_3;
    __pyx_3 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":680 */
    __pyx_4 = PyLong_FromUnsignedLong(__pyx_v_entry_size); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; goto __pyx_L1;}
    __pyx_5 = PyInt_FromLong(__pyx_v_is_executable); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;}
    Py_INCREF(__pyx_v_minikind);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_minikind);
    Py_INCREF(__pyx_v_fingerprint);
    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_fingerprint);
    PyTuple_SET_ITEM(__pyx_3, 2, __pyx_4);
    PyTuple_SET_ITEM(__pyx_3, 3, __pyx_5);
    Py_INCREF(__pyx_v_info);
    PyTuple_SET_ITEM(__pyx_3, 4, __pyx_v_info);
    __pyx_4 = 0;
    __pyx_5 = 0;
    __pyx_2 = PyList_Append(__pyx_v_trees,__pyx_3); if (__pyx_2 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
  }

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":689 */
  __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; goto __pyx_L1;}
  Py_INCREF(__pyx_v_path_name_file_id_key);
  PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_path_name_file_id_key);
  Py_INCREF(__pyx_v_trees);
  PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_trees);
  Py_DECREF(__pyx_v_ret);
  __pyx_v_ret = __pyx_4;
  __pyx_4 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":693 */
  __pyx_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next(__pyx_v_self,(&__pyx_v_cur_size)); if (__pyx_1 == NULL) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; goto __pyx_L1;}
  __pyx_v_trailing = __pyx_1;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":694 */
  __pyx_2 = (__pyx_v_cur_size != 1);
  if (!__pyx_2) {
    __pyx_2 = ((__pyx_v_trailing[0]) != '\n');
  }
  if (__pyx_2) {
    __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_errors); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; goto __pyx_L1;}
    __pyx_3 = PyObject_GetAttr(__pyx_5, __pyx_n_DirstateCorrupt); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_4 = PyInt_FromLong(__pyx_v_cur_size); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; goto __pyx_L1;}
    __pyx_5 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx_safe_string_from_size(__pyx_v_trailing,__pyx_v_cur_size); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; goto __pyx_L1;}
    __pyx_6 = PyTuple_New(3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_6, 0, __pyx_4);
    PyTuple_SET_ITEM(__pyx_6, 1, __pyx_5);
    Py_INCREF(__pyx_v_ret);
    PyTuple_SET_ITEM(__pyx_6, 2, __pyx_v_ret);
    __pyx_4 = 0;
    __pyx_5 = 0;
    __pyx_4 = PyNumber_Remainder(__pyx_k16p, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; goto __pyx_L1;}
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; goto __pyx_L1;}
    Py_INCREF(__pyx_v_self->state);
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_self->state);
    PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4);
    __pyx_4 = 0;
    __pyx_6 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __Pyx_Raise(__pyx_6, 0, 0);
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; goto __pyx_L1;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":699 */
  Py_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.Reader._get_entry");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_path_name_file_id_key);
  Py_DECREF(__pyx_v_minikind);
  Py_DECREF(__pyx_v_fingerprint);
  Py_DECREF(__pyx_v_info);
  Py_DECREF(__pyx_v_dirname);
  Py_DECREF(__pyx_v_trees);
  Py_DECREF(__pyx_v_ret);
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader__parse_dirblocks(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_6Reader__parse_dirblocks[] = "Parse all dirblocks in the state file.";
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader__parse_dirblocks(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_num_trees;
  PyObject *__pyx_v_current_block;
  PyObject *__pyx_v_entry;
  void *__pyx_v_current_dirname;
  int __pyx_v_new_block;
  int __pyx_v_expected_entry_count;
  int __pyx_v_entry_count;
  PyObject *__pyx_v_dirblocks;
  PyObject *__pyx_v_obj;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  PyObject *__pyx_5 = 0;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_current_block = Py_None; Py_INCREF(Py_None);
  __pyx_v_entry = Py_None; Py_INCREF(Py_None);
  __pyx_v_dirblocks = Py_None; Py_INCREF(Py_None);
  __pyx_v_obj = Py_None; Py_INCREF(Py_None);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":711 */
  __pyx_1 = PyObject_GetAttr(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state, __pyx_n__num_present_parents); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;}
  __pyx_3 = PyNumber_Add(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_v_num_trees = __pyx_4;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":712 */
  __pyx_2 = PyObject_GetAttr(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state, __pyx_n__num_entries); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;}
  __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_v_expected_entry_count = __pyx_4;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":715 */
  __pyx_4 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->__pyx_vtab)->_init(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)); if (__pyx_4 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; goto __pyx_L1;}

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":717 */
  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; goto __pyx_L1;}
  Py_DECREF(__pyx_v_current_block);
  __pyx_v_current_block = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":718 */
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; goto __pyx_L1;}
  Py_INCREF(__pyx_k5p);
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k5p);
  Py_INCREF(__pyx_v_current_block);
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_current_block);
  __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; goto __pyx_L1;}
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; goto __pyx_L1;}
  Py_INCREF(__pyx_k5p);
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k5p);
  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_2);
  __pyx_2 = 0;
  __pyx_2 = PyList_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; goto __pyx_L1;}
  PyList_SET_ITEM(__pyx_2, 0, __pyx_3);
  PyList_SET_ITEM(__pyx_2, 1, __pyx_1);
  __pyx_3 = 0;
  __pyx_1 = 0;
  Py_DECREF(__pyx_v_dirblocks);
  __pyx_v_dirblocks = __pyx_2;
  __pyx_2 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":719 */
  if (PyObject_SetAttr(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state, __pyx_n__dirblocks, __pyx_v_dirblocks) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; goto __pyx_L1;}

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":720 */
  Py_INCREF(__pyx_k5p);
  Py_DECREF(__pyx_v_obj);
  __pyx_v_obj = __pyx_k5p;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":721 */
  __pyx_v_current_dirname = ((void *)__pyx_v_obj);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":722 */
  __pyx_v_new_block = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":723 */
  __pyx_v_entry_count = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":732 */
  while (1) {
    __pyx_4 = (((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->cur_cstr < ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->end_cstr);
    if (!__pyx_4) break;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":733 */
    __pyx_3 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->__pyx_vtab)->_get_entry(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self),__pyx_v_num_trees,(&__pyx_v_current_dirname),(&__pyx_v_new_block)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; goto __pyx_L1;}
    Py_DECREF(__pyx_v_entry);
    __pyx_v_entry = __pyx_3;
    __pyx_3 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":734 */
    __pyx_4 = __pyx_v_new_block;
    if (__pyx_4) {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":736 */
      __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; goto __pyx_L1;}
      Py_DECREF(__pyx_v_current_block);
      __pyx_v_current_block = __pyx_1;
      __pyx_1 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":737 */
      __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; goto __pyx_L1;}
      Py_INCREF(((PyObject *)__pyx_v_current_dirname));
      PyTuple_SET_ITEM(__pyx_2, 0, ((PyObject *)__pyx_v_current_dirname));
      Py_INCREF(__pyx_v_current_block);
      PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_current_block);
      __pyx_4 = PyList_Append(__pyx_v_dirblocks,__pyx_2); if (__pyx_4 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":739 */
    __pyx_4 = PyList_Append(__pyx_v_current_block,__pyx_v_entry); if (__pyx_4 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; goto __pyx_L1;}

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":740 */
    __pyx_v_entry_count = (__pyx_v_entry_count + 1);
  }

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":741 */
  __pyx_4 = (__pyx_v_entry_count != __pyx_v_expected_entry_count);
  if (__pyx_4) {
    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_errors); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;}
    __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_DirstateCorrupt); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_2 = PyInt_FromLong(__pyx_v_expected_entry_count); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; goto __pyx_L1;}
    __pyx_3 = PyInt_FromLong(__pyx_v_entry_count); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; goto __pyx_L1;}
    __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2);
    PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3);
    __pyx_2 = 0;
    __pyx_3 = 0;
    __pyx_2 = PyNumber_Remainder(__pyx_k20p, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;}
    Py_INCREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state);
    PyTuple_SET_ITEM(__pyx_3, 0, ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state);
    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
    __pyx_2 = 0;
    __pyx_5 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __Pyx_Raise(__pyx_5, 0, 0);
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; goto __pyx_L1;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":746 */
  __pyx_2 = PyObject_GetAttr(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state, __pyx_k21p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; goto __pyx_L1;}
  __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.Reader._parse_dirblocks");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_current_block);
  Py_DECREF(__pyx_v_entry);
  Py_DECREF(__pyx_v_dirblocks);
  Py_DECREF(__pyx_v_obj);
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__read_dirblocks(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx__read_dirblocks[] = "Read in the dirblocks for the given DirState object.\n\n    This is tightly bound to the DirState internal representation. It should be\n    thought of as a member function, which is only separated out so that we can\n    re-write it in pyrex.\n\n    :param state: A DirState object.\n    :return: None\n    :postcondition: The dirblocks will be loaded into the appropriate fields in\n        the DirState object.\n    ";
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__read_dirblocks(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v_text;
  PyObject *__pyx_v_reader;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  static char *__pyx_argnames[] = {"state",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_state)) return 0;
  Py_INCREF(__pyx_v_state);
  __pyx_v_text = Py_None; Py_INCREF(Py_None);
  __pyx_v_reader = Py_None; Py_INCREF(Py_None);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":761 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_state, __pyx_n__state_file); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_seek); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyObject_GetAttr(__pyx_v_state, __pyx_n__end_of_header); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
  __pyx_1 = 0;
  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":762 */
  __pyx_2 = PyObject_GetAttr(__pyx_v_state, __pyx_n__state_file); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; goto __pyx_L1;}
  __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_read); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_1 = PyObject_CallObject(__pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_v_text);
  __pyx_v_text = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":765 */
  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; goto __pyx_L1;}
  Py_INCREF(__pyx_v_text);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_text);
  Py_INCREF(__pyx_v_state);
  PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_state);
  __pyx_3 = PyObject_CallObject(((PyObject *)__pyx_ptype_6bzrlib_21_dirstate_helpers_pyx_Reader), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_v_reader);
  __pyx_v_reader = __pyx_3;
  __pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":767 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_reader, __pyx_n__parse_dirblocks); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":768 */
  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_DirState); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;}
  __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_IN_MEMORY_UNMODIFIED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  if (PyObject_SetAttr(__pyx_v_state, __pyx_n__dirblock_state, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._read_dirblocks");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_text);
  Py_DECREF(__pyx_v_reader);
  Py_DECREF(__pyx_v_state);
  return __pyx_r;
}

static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx_minikind_from_mode(int __pyx_v_mode) {
  int __pyx_r;
  int __pyx_1;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":773 */
  __pyx_1 = S_ISREG(__pyx_v_mode);
  if (__pyx_1) {
    __pyx_r = 'f';
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":775 */
  __pyx_1 = S_ISDIR(__pyx_v_mode);
  if (__pyx_1) {
    __pyx_r = 'd';
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":777 */
  __pyx_1 = S_ISLNK(__pyx_v_mode);
  if (__pyx_1) {
    __pyx_r = 'l';
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":779 */
  __pyx_r = 0;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__pack_stat(PyObject *__pyx_v_stat_value) {
  char __pyx_v_result[(6 * 4)];
  int *__pyx_v_aliased;
  PyObject *__pyx_v_packed;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  unsigned long __pyx_2;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  Py_INCREF(__pyx_v_stat_value);
  __pyx_v_packed = Py_None; Py_INCREF(Py_None);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":794 */
  __pyx_v_aliased = ((int *)__pyx_v_result);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":795 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; goto __pyx_L1;}
  __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  (__pyx_v_aliased[0]) = htonl(__pyx_2);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":796 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_mtime); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
  __pyx_1 = 0;
  __pyx_1 = PyObject_CallObject(((PyObject *)(&PyInt_Type)), __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  (__pyx_v_aliased[1]) = htonl(__pyx_2);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":797 */
  __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_ctime); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; goto __pyx_L1;}
  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
  __pyx_3 = 0;
  __pyx_3 = PyObject_CallObject(((PyObject *)(&PyInt_Type)), __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  (__pyx_v_aliased[2]) = htonl(__pyx_2);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":798 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_dev); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; goto __pyx_L1;}
  __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  (__pyx_v_aliased[3]) = htonl(__pyx_2);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":799 */
  __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_ino); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; goto __pyx_L1;}
  __pyx_1 = PyInt_FromLong(0xFFFFFFFF); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; goto __pyx_L1;}
  __pyx_4 = PyNumber_And(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  (__pyx_v_aliased[4]) = htonl(__pyx_2);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":800 */
  __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_mode); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; goto __pyx_L1;}
  __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  (__pyx_v_aliased[5]) = htonl(__pyx_2);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":801 */
  __pyx_1 = PyString_FromStringAndSize(__pyx_v_result,(6 * 4)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; goto __pyx_L1;}
  Py_DECREF(__pyx_v_packed);
  __pyx_v_packed = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":802 */
  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__encode); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; goto __pyx_L1;}
  Py_INCREF(__pyx_v_packed);
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_packed);
  __pyx_1 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_4 = PySequence_GetSlice(__pyx_1, 0, (-1)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_r = __pyx_4;
  __pyx_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._pack_stat");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_packed);
  Py_DECREF(__pyx_v_stat_value);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_update_entry(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_update_entry[] = "Update the entry based on what is actually on disk.\n\n    This function only calculates the sha if it needs to - if the entry is\n    uncachable, or clearly different to the first parent\'s entry, no sha\n    is calculated, and None is returned.\n\n    :param entry: This is the dirblock entry for the file in question.\n    :param abspath: The path on disk for this file.\n    :param stat_value: (optional) if we already have done a stat on the\n        file, re-use it.\n    :return: None, or The sha1 hexdigest of the file (40 bytes) or link\n        target of a symlink.\n    ";
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_update_entry(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_entry = 0;
  PyObject *__pyx_v_abspath = 0;
  PyObject *__pyx_v_stat_value = 0;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  static char *__pyx_argnames[] = {"self","entry","abspath","stat_value",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOO", __pyx_argnames, &__pyx_v_self, &__pyx_v_entry, &__pyx_v_abspath, &__pyx_v_stat_value)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_entry);
  Py_INCREF(__pyx_v_abspath);
  Py_INCREF(__pyx_v_stat_value);
  __pyx_1 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__update_entry(__pyx_v_self,__pyx_v_entry,__pyx_v_abspath,__pyx_v_stat_value); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.update_entry");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_entry);
  Py_DECREF(__pyx_v_abspath);
  Py_DECREF(__pyx_v_stat_value);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__update_entry(PyObject *__pyx_v_self,PyObject *__pyx_v_entry,PyObject *__pyx_v_abspath,PyObject *__pyx_v_stat_value) {
  int __pyx_v_minikind;
  int __pyx_v_saved_minikind;
  void *__pyx_v_details;
  PyObject *__pyx_v_packed_stat;
  PyObject *__pyx_v_saved_link_or_sha1;
  PyObject *__pyx_v_saved_file_size;
  PyObject *__pyx_v_saved_executable;
  PyObject *__pyx_v_saved_packed_stat;
  PyObject *__pyx_v_link_or_sha1;
  PyObject *__pyx_v_executable;
  PyObject *__pyx_v_block_index;
  PyObject *__pyx_v_entry_index;
  PyObject *__pyx_v_dir_present;
  PyObject *__pyx_v_file_present;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  int __pyx_2;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  Py_ssize_t __pyx_5;
  PyObject *__pyx_6 = 0;
  PyObject *__pyx_7 = 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_entry);
  Py_INCREF(__pyx_v_abspath);
  Py_INCREF(__pyx_v_stat_value);
  __pyx_v_packed_stat = Py_None; Py_INCREF(Py_None);
  __pyx_v_saved_link_or_sha1 = Py_None; Py_INCREF(Py_None);
  __pyx_v_saved_file_size = Py_None; Py_INCREF(Py_None);
  __pyx_v_saved_executable = Py_None; Py_INCREF(Py_None);
  __pyx_v_saved_packed_stat = Py_None; Py_INCREF(Py_None);
  __pyx_v_link_or_sha1 = Py_None; Py_INCREF(Py_None);
  __pyx_v_executable = Py_None; Py_INCREF(Py_None);
  __pyx_v_block_index = Py_None; Py_INCREF(Py_None);
  __pyx_v_entry_index = Py_None; Py_INCREF(Py_None);
  __pyx_v_dir_present = Py_None; Py_INCREF(Py_None);
  __pyx_v_file_present = Py_None; Py_INCREF(Py_None);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":840 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_mode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;}
  __pyx_2 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_v_minikind = __pyx_f_6bzrlib_21_dirstate_helpers_pyx_minikind_from_mode(__pyx_2);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":841 */
  __pyx_2 = (0 == __pyx_v_minikind);
  if (__pyx_2) {
    Py_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":843 */
  __pyx_1 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__pack_stat(__pyx_v_stat_value); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;}
  Py_DECREF(__pyx_v_packed_stat);
  __pyx_v_packed_stat = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":844 */
  __pyx_v_details = PyList_GET_ITEM(PyTuple_GET_ITEM(((void *)__pyx_v_entry),1),0);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":845 */
  __pyx_v_saved_minikind = (PyString_AsString(((PyObject *)PyTuple_GET_ITEM(__pyx_v_details,0)))[0]);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":846 */
  __pyx_2 = (__pyx_v_minikind == 'd');
  if (__pyx_2) {
    __pyx_2 = (__pyx_v_saved_minikind == 't');
  }
  if (__pyx_2) {
    __pyx_v_minikind = 't';
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":848 */
  __pyx_1 = PyTuple_GET_ITEM(__pyx_v_details,1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;}
  Py_DECREF(__pyx_v_saved_link_or_sha1);
  __pyx_v_saved_link_or_sha1 = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":849 */
  __pyx_1 = PyTuple_GET_ITEM(__pyx_v_details,2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; goto __pyx_L1;}
  Py_DECREF(__pyx_v_saved_file_size);
  __pyx_v_saved_file_size = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":850 */
  __pyx_1 = PyTuple_GET_ITEM(__pyx_v_details,3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; goto __pyx_L1;}
  Py_DECREF(__pyx_v_saved_executable);
  __pyx_v_saved_executable = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":851 */
  __pyx_1 = PyTuple_GET_ITEM(__pyx_v_details,4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; goto __pyx_L1;}
  Py_DECREF(__pyx_v_saved_packed_stat);
  __pyx_v_saved_packed_stat = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":853 */
  Py_INCREF(__pyx_v_saved_link_or_sha1);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":854 */
  Py_INCREF(__pyx_v_saved_file_size);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":855 */
  Py_INCREF(__pyx_v_saved_executable);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":856 */
  Py_INCREF(__pyx_v_saved_packed_stat);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":860 */
  __pyx_2 = (__pyx_v_minikind == __pyx_v_saved_minikind);
  if (__pyx_2) {
    if (PyObject_Cmp(__pyx_v_packed_stat, __pyx_v_saved_packed_stat, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; goto __pyx_L1;}
    __pyx_2 = __pyx_2 == 0;
  }
  if (__pyx_2) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":864 */
    __pyx_2 = (__pyx_v_minikind == 'd');
    if (__pyx_2) {
      Py_INCREF(Py_None);
      __pyx_r = Py_None;
      goto __pyx_L0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":868 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; goto __pyx_L1;}
    if (PyObject_Cmp(__pyx_v_saved_file_size, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; goto __pyx_L1;}
    __pyx_2 = __pyx_2 == 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    if (__pyx_2) {
      Py_INCREF(__pyx_v_saved_link_or_sha1);
      __pyx_r = __pyx_v_saved_link_or_sha1;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":873 */
  Py_INCREF(Py_None);
  Py_DECREF(__pyx_v_link_or_sha1);
  __pyx_v_link_or_sha1 = Py_None;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":874 */
  __pyx_2 = (__pyx_v_minikind == 'f');
  if (__pyx_2) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":875 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__is_executable); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; goto __pyx_L1;}
    __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_mode); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; goto __pyx_L1;}
    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
    Py_INCREF(__pyx_v_saved_executable);
    PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_saved_executable);
    __pyx_3 = 0;
    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_v_executable);
    __pyx_v_executable = __pyx_3;
    __pyx_3 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":877 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__cutoff_time); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; goto __pyx_L1;}
    __pyx_2 = __pyx_1 == Py_None;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    if (__pyx_2) {
      __pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__sha_cutoff_time); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; goto __pyx_L1;}
      __pyx_3 = PyObject_CallObject(__pyx_4, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":879 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_mtime); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; goto __pyx_L1;}
    __pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__cutoff_time); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; goto __pyx_L1;}
    if (PyObject_Cmp(__pyx_1, __pyx_4, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; goto __pyx_L1;}
    __pyx_2 = __pyx_2 < 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    if (__pyx_2) {
      __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_ctime); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; goto __pyx_L1;}
      __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__cutoff_time); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; goto __pyx_L1;}
      if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; goto __pyx_L1;}
      __pyx_2 = __pyx_2 < 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      if (__pyx_2) {
        __pyx_4 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}
        __pyx_5 = PyObject_Length(__pyx_4); if (__pyx_5 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;}
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        __pyx_2 = (__pyx_5 > 1);
        if (__pyx_2) {
          __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; goto __pyx_L1;}
          __pyx_1 = __Pyx_GetItemInt(__pyx_3, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; goto __pyx_L1;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          __pyx_4 = __Pyx_GetItemInt(__pyx_1, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; goto __pyx_L1;}
          Py_DECREF(__pyx_1); __pyx_1 = 0;
          if (PyObject_Cmp(__pyx_4, __pyx_n_a, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; goto __pyx_L1;}
          __pyx_2 = __pyx_2 != 0;
          Py_DECREF(__pyx_4); __pyx_4 = 0;
        }
      }
    }
    if (__pyx_2) {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":886 */
      __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n__sha1_file); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;}
      __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;}
      Py_INCREF(__pyx_v_abspath);
      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_abspath);
      __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_v_link_or_sha1);
      __pyx_v_link_or_sha1 = __pyx_4;
      __pyx_4 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":887 */
      __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_size); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}
      __pyx_1 = PyTuple_New(5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}
      Py_INCREF(__pyx_n_f);
      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_f);
      Py_INCREF(__pyx_v_link_or_sha1);
      PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_link_or_sha1);
      PyTuple_SET_ITEM(__pyx_1, 2, __pyx_3);
      Py_INCREF(__pyx_v_executable);
      PyTuple_SET_ITEM(__pyx_1, 3, __pyx_v_executable);
      Py_INCREF(__pyx_v_packed_stat);
      PyTuple_SET_ITEM(__pyx_1, 4, __pyx_v_packed_stat);
      __pyx_3 = 0;
      __pyx_4 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}
      if (__Pyx_SetItemInt(__pyx_4, 0, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      goto __pyx_L9;
    }
    /*else*/ {
      __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_size); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; goto __pyx_L1;}
      __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_DirState); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; goto __pyx_L1;}
      __pyx_4 = PyObject_GetAttr(__pyx_1, __pyx_n_NULLSTAT); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      __pyx_1 = PyTuple_New(5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; goto __pyx_L1;}
      Py_INCREF(__pyx_n_f);
      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_f);
      Py_INCREF(__pyx_k5p);
      PyTuple_SET_ITEM(__pyx_1, 1, __pyx_k5p);
      PyTuple_SET_ITEM(__pyx_1, 2, __pyx_3);
      Py_INCREF(__pyx_v_executable);
      PyTuple_SET_ITEM(__pyx_1, 3, __pyx_v_executable);
      PyTuple_SET_ITEM(__pyx_1, 4, __pyx_4);
      __pyx_3 = 0;
      __pyx_4 = 0;
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; goto __pyx_L1;}
      if (__Pyx_SetItemInt(__pyx_3, 0, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_1); __pyx_1 = 0;
    }
    __pyx_L9:;
    goto __pyx_L7;
  }
  __pyx_2 = (__pyx_v_minikind == 'd');
  if (__pyx_2) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":893 */
    Py_INCREF(Py_None);
    Py_DECREF(__pyx_v_link_or_sha1);
    __pyx_v_link_or_sha1 = Py_None;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":894 */
    __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;}
    __pyx_1 = PyTuple_New(5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;}
    Py_INCREF(__pyx_n_d);
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_d);
    Py_INCREF(__pyx_k5p);
    PyTuple_SET_ITEM(__pyx_1, 1, __pyx_k5p);
    PyTuple_SET_ITEM(__pyx_1, 2, __pyx_4);
    Py_INCREF(Py_False);
    PyTuple_SET_ITEM(__pyx_1, 3, Py_False);
    Py_INCREF(__pyx_v_packed_stat);
    PyTuple_SET_ITEM(__pyx_1, 4, __pyx_v_packed_stat);
    __pyx_4 = 0;
    __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;}
    if (__Pyx_SetItemInt(__pyx_3, 0, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":895 */
    __pyx_2 = (__pyx_v_saved_minikind != 'd');
    if (__pyx_2) {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":900 */
      __pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__get_block_entry_index); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
      __pyx_3 = __Pyx_GetItemInt(__pyx_1, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
      __pyx_6 = __Pyx_GetItemInt(__pyx_1, 1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
      __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_7, 0, __pyx_3);
      PyTuple_SET_ITEM(__pyx_7, 1, __pyx_6);
      PyTuple_SET_ITEM(__pyx_7, 2, __pyx_1);
      __pyx_3 = 0;
      __pyx_6 = 0;
      __pyx_1 = 0;
      __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_7); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      __pyx_6 = PyObject_GetIter(__pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_1 = __Pyx_UnpackItem(__pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;}
      Py_DECREF(__pyx_v_block_index);
      __pyx_v_block_index = __pyx_1;
      __pyx_1 = 0;
      __pyx_4 = __Pyx_UnpackItem(__pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;}
      Py_DECREF(__pyx_v_entry_index);
      __pyx_v_entry_index = __pyx_4;
      __pyx_4 = 0;
      __pyx_7 = __Pyx_UnpackItem(__pyx_6); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;}
      Py_DECREF(__pyx_v_dir_present);
      __pyx_v_dir_present = __pyx_7;
      __pyx_7 = 0;
      __pyx_3 = __Pyx_UnpackItem(__pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;}
      Py_DECREF(__pyx_v_file_present);
      __pyx_v_file_present = __pyx_3;
      __pyx_3 = 0;
      if (__Pyx_EndUnpack(__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;}
      Py_DECREF(__pyx_6); __pyx_6 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":901 */
      __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__ensure_block); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; goto __pyx_L1;}
      __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_pathjoin); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
      __pyx_3 = __Pyx_GetItemInt(__pyx_7, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      __pyx_6 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
      __pyx_7 = __Pyx_GetItemInt(__pyx_6, 1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
      Py_DECREF(__pyx_6); __pyx_6 = 0;
      __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_6, 0, __pyx_3);
      PyTuple_SET_ITEM(__pyx_6, 1, __pyx_7);
      __pyx_3 = 0;
      __pyx_7 = 0;
      __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_6); __pyx_6 = 0;
      __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; goto __pyx_L1;}
      Py_INCREF(__pyx_v_block_index);
      PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_block_index);
      Py_INCREF(__pyx_v_entry_index);
      PyTuple_SET_ITEM(__pyx_7, 1, __pyx_v_entry_index);
      PyTuple_SET_ITEM(__pyx_7, 2, __pyx_3);
      __pyx_3 = 0;
      __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_7); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      goto __pyx_L10;
    }
    __pyx_L10:;
    goto __pyx_L7;
  }
  __pyx_2 = (__pyx_v_minikind == 'l');
  if (__pyx_2) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":904 */
    __pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n__read_link); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;}
    Py_INCREF(__pyx_v_abspath);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_abspath);
    Py_INCREF(__pyx_v_saved_link_or_sha1);
    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_saved_link_or_sha1);
    __pyx_1 = PyObject_CallObject(__pyx_6, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;}
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_v_link_or_sha1);
    __pyx_v_link_or_sha1 = __pyx_1;
    __pyx_1 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":905 */
    __pyx_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n__cutoff_time); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; goto __pyx_L1;}
    __pyx_2 = __pyx_7 == Py_None;
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    if (__pyx_2) {
      __pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__sha_cutoff_time); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; goto __pyx_L1;}
      __pyx_6 = PyObject_CallObject(__pyx_4, 0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_6); __pyx_6 = 0;
      goto __pyx_L11;
    }
    __pyx_L11:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":907 */
    __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_mtime); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; goto __pyx_L1;}
    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__cutoff_time); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; goto __pyx_L1;}
    if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; goto __pyx_L1;}
    __pyx_2 = __pyx_2 < 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    if (__pyx_2) {
      __pyx_7 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_ctime); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; goto __pyx_L1;}
      __pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__cutoff_time); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; goto __pyx_L1;}
      if (PyObject_Cmp(__pyx_7, __pyx_4, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; goto __pyx_L1;}
      __pyx_2 = __pyx_2 < 0;
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
    }
    if (__pyx_2) {
      __pyx_6 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_size); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; goto __pyx_L1;}
      __pyx_3 = PyTuple_New(5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; goto __pyx_L1;}
      Py_INCREF(__pyx_n_l);
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_l);
      Py_INCREF(__pyx_v_link_or_sha1);
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_link_or_sha1);
      PyTuple_SET_ITEM(__pyx_3, 2, __pyx_6);
      Py_INCREF(Py_False);
      PyTuple_SET_ITEM(__pyx_3, 3, Py_False);
      Py_INCREF(__pyx_v_packed_stat);
      PyTuple_SET_ITEM(__pyx_3, 4, __pyx_v_packed_stat);
      __pyx_6 = 0;
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; goto __pyx_L1;}
      if (__Pyx_SetItemInt(__pyx_1, 0, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      goto __pyx_L12;
    }
    /*else*/ {
      __pyx_7 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_size); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;}
      __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_DirState); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; goto __pyx_L1;}
      __pyx_6 = PyObject_GetAttr(__pyx_4, __pyx_n_NULLSTAT); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      __pyx_3 = PyTuple_New(5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;}
      Py_INCREF(__pyx_n_l);
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_l);
      Py_INCREF(__pyx_k5p);
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_k5p);
      PyTuple_SET_ITEM(__pyx_3, 2, __pyx_7);
      Py_INCREF(Py_False);
      PyTuple_SET_ITEM(__pyx_3, 3, Py_False);
      PyTuple_SET_ITEM(__pyx_3, 4, __pyx_6);
      __pyx_7 = 0;
      __pyx_6 = 0;
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;}
      if (__Pyx_SetItemInt(__pyx_1, 0, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
    }
    __pyx_L12:;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":914 */
  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_DirState); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; goto __pyx_L1;}
  __pyx_7 = PyObject_GetAttr(__pyx_4, __pyx_n_IN_MEMORY_MODIFIED); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; goto __pyx_L1;}
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n__dirblock_state, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; goto __pyx_L1;}
  Py_DECREF(__pyx_7); __pyx_7 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":915 */
  Py_INCREF(__pyx_v_link_or_sha1);
  __pyx_r = __pyx_v_link_or_sha1;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_6);
  Py_XDECREF(__pyx_7);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._update_entry");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_packed_stat);
  Py_DECREF(__pyx_v_saved_link_or_sha1);
  Py_DECREF(__pyx_v_saved_file_size);
  Py_DECREF(__pyx_v_saved_executable);
  Py_DECREF(__pyx_v_saved_packed_stat);
  Py_DECREF(__pyx_v_link_or_sha1);
  Py_DECREF(__pyx_v_executable);
  Py_DECREF(__pyx_v_block_index);
  Py_DECREF(__pyx_v_entry_index);
  Py_DECREF(__pyx_v_dir_present);
  Py_DECREF(__pyx_v_file_present);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_entry);
  Py_DECREF(__pyx_v_abspath);
  Py_DECREF(__pyx_v_stat_value);
  return __pyx_r;
}

static char __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_from_string(PyObject *__pyx_v_string) {
  char __pyx_r;
  Py_INCREF(__pyx_v_string);
  __pyx_r = (PyString_AsString(__pyx_v_string)[0]);
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_string);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_to_kind(char __pyx_v_minikind) {
  char __pyx_v__minikind[1];
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":941 */
  __pyx_1 = (__pyx_v_minikind == 'f');
  if (__pyx_1) {
    Py_INCREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_file);
    __pyx_r = __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_file;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_1 = (__pyx_v_minikind == 'd');
  if (__pyx_1) {
    Py_INCREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_directory);
    __pyx_r = __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_directory;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_1 = (__pyx_v_minikind == 'a');
  if (__pyx_1) {
    Py_INCREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_absent);
    __pyx_r = __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_absent;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_1 = (__pyx_v_minikind == 'r');
  if (__pyx_1) {
    Py_INCREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_relocated);
    __pyx_r = __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_relocated;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_1 = (__pyx_v_minikind == 'l');
  if (__pyx_1) {
    Py_INCREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_symlink);
    __pyx_r = __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_symlink;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_1 = (__pyx_v_minikind == 't');
  if (__pyx_1) {
    Py_INCREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_tree_reference);
    __pyx_r = __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_tree_reference;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":953 */
  (__pyx_v__minikind[0]) = __pyx_v_minikind;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":954 */
  __pyx_2 = PyString_FromStringAndSize(__pyx_v__minikind,1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
  __pyx_2 = 0;
  __pyx_2 = PyObject_CallObject(PyExc_KeyError, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __Pyx_Raise(__pyx_2, 0, 0);
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; goto __pyx_L1;}

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._minikind_to_kind");
  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(char __pyx_v_minikind) {
  int __pyx_r;
  int __pyx_1;
  __pyx_1 = (__pyx_v_minikind == 'f');
  if (!__pyx_1) {
    __pyx_1 = (__pyx_v_minikind == 'd');
    if (!__pyx_1) {
      __pyx_1 = (__pyx_v_minikind == 'l');
      if (!__pyx_1) {
        __pyx_1 = (__pyx_v_minikind == 't');
      }
    }
  }
  __pyx_r = __pyx_1;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_include_unchanged = 0;
  PyObject *__pyx_v_use_filesystem_for_exec = 0;
  PyObject *__pyx_v_search_specific_files = 0;
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v_source_index = 0;
  PyObject *__pyx_v_target_index = 0;
  PyObject *__pyx_v_want_unversioned = 0;
  PyObject *__pyx_v_tree = 0;
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  static char *__pyx_argnames[] = {"include_unchanged","use_filesystem_for_exec","search_specific_files","state","source_index","target_index","want_unversioned","tree",0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOOOOOOO", __pyx_argnames, &__pyx_v_include_unchanged, &__pyx_v_use_filesystem_for_exec, &__pyx_v_search_specific_files, &__pyx_v_state, &__pyx_v_source_index, &__pyx_v_target_index, &__pyx_v_want_unversioned, &__pyx_v_tree)) return -1;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_include_unchanged);
  Py_INCREF(__pyx_v_use_filesystem_for_exec);
  Py_INCREF(__pyx_v_search_specific_files);
  Py_INCREF(__pyx_v_state);
  Py_INCREF(__pyx_v_source_index);
  Py_INCREF(__pyx_v_target_index);
  Py_INCREF(__pyx_v_want_unversioned);
  Py_INCREF(__pyx_v_tree);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1012 */
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->doing_consistency_expansion = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1013 */
  __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; goto __pyx_L1;}
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->old_dirname_to_file_id);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->old_dirname_to_file_id = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1014 */
  __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; goto __pyx_L1;}
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->new_dirname_to_file_id);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->new_dirname_to_file_id = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1016 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_set); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; goto __pyx_L1;}
  __pyx_2 = PyList_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; goto __pyx_L1;}
  Py_INCREF(__pyx_k5p);
  PyList_SET_ITEM(__pyx_2, 0, __pyx_k5p);
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
  __pyx_2 = 0;
  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n___ne__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; goto __pyx_L1;}
  Py_INCREF(__pyx_v_search_specific_files);
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_search_specific_files);
  __pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->partial = __pyx_4;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1019 */
  __pyx_1 = PyList_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; goto __pyx_L1;}
  Py_INCREF(Py_None);
  PyList_SET_ITEM(__pyx_1, 0, Py_None);
  Py_INCREF(Py_None);
  PyList_SET_ITEM(__pyx_1, 1, Py_None);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->last_source_parent);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->last_source_parent = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1020 */
  __pyx_3 = PyList_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; goto __pyx_L1;}
  Py_INCREF(Py_None);
  PyList_SET_ITEM(__pyx_3, 0, Py_None);
  Py_INCREF(Py_None);
  PyList_SET_ITEM(__pyx_3, 1, Py_None);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->last_target_parent);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->last_target_parent = __pyx_3;
  __pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1021 */
  __pyx_4 = __pyx_v_include_unchanged == Py_None;
  if (__pyx_4) {
    __pyx_4 = PyInt_AsLong(Py_False); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; goto __pyx_L1;}
    ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->include_unchanged = __pyx_4;
    goto __pyx_L2;
  }
  /*else*/ {
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; goto __pyx_L1;}
    Py_INCREF(__pyx_v_include_unchanged);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_include_unchanged);
    __pyx_1 = PyObject_CallObject(((PyObject *)(&PyInt_Type)), __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_4 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->include_unchanged = __pyx_4;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1025 */
  Py_INCREF(__pyx_v_use_filesystem_for_exec);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->use_filesystem_for_exec);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->use_filesystem_for_exec = __pyx_v_use_filesystem_for_exec;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1026 */
  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_cache_utf8); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n__utf8_decode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->utf8_decode);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->utf8_decode = __pyx_2;
  __pyx_2 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1031 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_set); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; goto __pyx_L1;}
  __pyx_3 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->searched_specific_files);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->searched_specific_files = __pyx_3;
  __pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1034 */
  __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_set); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; goto __pyx_L1;}
  __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->searched_exact_paths);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->searched_exact_paths = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1035 */
  Py_INCREF(__pyx_v_search_specific_files);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->search_specific_files);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->search_specific_files = __pyx_v_search_specific_files;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1038 */
  __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_set); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; goto __pyx_L1;}
  __pyx_2 = PyObject_CallObject(__pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->search_specific_file_parents);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->search_specific_file_parents = __pyx_2;
  __pyx_2 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1040 */
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_set); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; goto __pyx_L1;}
  __pyx_3 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->seen_ids);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->seen_ids = __pyx_3;
  __pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1041 */
  Py_INCREF(__pyx_v_state);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->state);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->state = __pyx_v_state;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1042 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_root);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_root = Py_None;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1043 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_root_unicode);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_root_unicode = Py_None;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1044 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_entries);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_entries = Py_None;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1045 */
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_entries_pos = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1046 */
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_entries_len = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1047 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_abspath);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_abspath = Py_None;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1048 */
  __pyx_4 = __pyx_v_source_index == Py_None;
  if (__pyx_4) {
    ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->source_index = (-1);
    goto __pyx_L3;
  }
  /*else*/ {
    __pyx_4 = PyInt_AsLong(__pyx_v_source_index); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; goto __pyx_L1;}
    ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->source_index = __pyx_4;
  }
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1052 */
  __pyx_4 = PyInt_AsLong(__pyx_v_target_index); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; goto __pyx_L1;}
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->target_index = __pyx_4;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1053 */
  __pyx_4 = PyInt_AsLong(__pyx_v_want_unversioned); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; goto __pyx_L1;}
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->want_unversioned = __pyx_4;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1054 */
  Py_INCREF(__pyx_v_tree);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->tree);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->tree = __pyx_v_tree;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1055 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->dir_iterator);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->dir_iterator = Py_None;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1056 */
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->block_index = (-1);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1057 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_block);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_block = Py_None;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1058 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_block_list);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_block_list = Py_None;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1059 */
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_block_pos = (-1);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1060 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_dir_info);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_dir_info = Py_None;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1061 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_dir_list);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_dir_list = Py_None;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1062 */
  __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; goto __pyx_L1;}
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->_pending_consistent_entries);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->_pending_consistent_entries = __pyx_2;
  __pyx_2 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1063 */
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->path_index = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1064 */
  Py_INCREF(Py_None);
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_dir_info);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_dir_info = Py_None;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1065 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bisect); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; goto __pyx_L1;}
  __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_bisect_left); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->bisect_left);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->bisect_left = __pyx_3;
  __pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1066 */
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; goto __pyx_L1;}
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_pathjoin); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->pathjoin);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->pathjoin = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1067 */
  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_fstat); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->fstat);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->fstat = __pyx_2;
  __pyx_2 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1068 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; goto __pyx_L1;}
  __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_sha_file); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->sha_file);
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->sha_file = __pyx_3;
  __pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1069 */
  __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_v_target_index, __pyx_2, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; goto __pyx_L1;}
  __pyx_4 = __pyx_4 != 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  if (__pyx_4) {
    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_errors); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; goto __pyx_L1;}
    __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_BzrError); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; goto __pyx_L1;}
    Py_INCREF(__pyx_k62p);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k62p);
    __pyx_1 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __Pyx_Raise(__pyx_1, 0, 0);
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; goto __pyx_L1;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC.__init__");
  __pyx_r = -1;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_include_unchanged);
  Py_DECREF(__pyx_v_use_filesystem_for_exec);
  Py_DECREF(__pyx_v_search_specific_files);
  Py_DECREF(__pyx_v_state);
  Py_DECREF(__pyx_v_source_index);
  Py_DECREF(__pyx_v_target_index);
  Py_DECREF(__pyx_v_want_unversioned);
  Py_DECREF(__pyx_v_tree);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__process_entry(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self,PyObject *__pyx_v_entry,PyObject *__pyx_v_path_info) {
  char __pyx_v_target_minikind;
  char __pyx_v_source_minikind;
  PyObject *__pyx_v_file_id;
  int __pyx_v_content_change;
  PyObject *__pyx_v_details_list;
  PyObject *__pyx_v_source_details;
  PyObject *__pyx_v_target_details;
  PyObject *__pyx_v_link_or_sha1;
  PyObject *__pyx_v_old_dirname;
  PyObject *__pyx_v_old_basename;
  PyObject *__pyx_v_old_path;
  PyObject *__pyx_v_path;
  PyObject *__pyx_v_old_entry;
  PyObject *__pyx_v_target_kind;
  PyObject *__pyx_v_target_exec;
  PyObject *__pyx_v_statvalue;
  PyObject *__pyx_v_source_parent_id;
  PyObject *__pyx_v__;
  PyObject *__pyx_v_source_parent_entry;
  PyObject *__pyx_v_new_dirname;
  PyObject *__pyx_v_target_parent_id;
  PyObject *__pyx_v_target_parent_entry;
  PyObject *__pyx_v_source_exec;
  PyObject *__pyx_v_changed;
  PyObject *__pyx_v_old_path_u;
  PyObject *__pyx_v_path_u;
  PyObject *__pyx_v_source_kind;
  PyObject *__pyx_v_parent_entry;
  PyObject *__pyx_v_parent_id;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  int __pyx_2;
  PyObject *__pyx_3 = 0;
  char __pyx_4;
  PyObject *__pyx_5 = 0;
  int __pyx_6;
  PyObject *__pyx_7 = 0;
  PyObject *__pyx_8 = 0;
  PyObject *__pyx_9 = 0;
  PyObject *__pyx_10 = 0;
  PyObject *__pyx_11 = 0;
  PyObject *__pyx_12 = 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_entry);
  Py_INCREF(__pyx_v_path_info);
  __pyx_v_file_id = Py_None; Py_INCREF(Py_None);
  __pyx_v_details_list = Py_None; Py_INCREF(Py_None);
  __pyx_v_source_details = Py_None; Py_INCREF(Py_None);
  __pyx_v_target_details = Py_None; Py_INCREF(Py_None);
  __pyx_v_link_or_sha1 = Py_None; Py_INCREF(Py_None);
  __pyx_v_old_dirname = Py_None; Py_INCREF(Py_None);
  __pyx_v_old_basename = Py_None; Py_INCREF(Py_None);
  __pyx_v_old_path = Py_None; Py_INCREF(Py_None);
  __pyx_v_path = Py_None; Py_INCREF(Py_None);
  __pyx_v_old_entry = Py_None; Py_INCREF(Py_None);
  __pyx_v_target_kind = Py_None; Py_INCREF(Py_None);
  __pyx_v_target_exec = Py_None; Py_INCREF(Py_None);
  __pyx_v_statvalue = Py_None; Py_INCREF(Py_None);
  __pyx_v_source_parent_id = Py_None; Py_INCREF(Py_None);
  __pyx_v__ = Py_None; Py_INCREF(Py_None);
  __pyx_v_source_parent_entry = Py_None; Py_INCREF(Py_None);
  __pyx_v_new_dirname = Py_None; Py_INCREF(Py_None);
  __pyx_v_target_parent_id = Py_None; Py_INCREF(Py_None);
  __pyx_v_target_parent_entry = Py_None; Py_INCREF(Py_None);
  __pyx_v_source_exec = Py_None; Py_INCREF(Py_None);
  __pyx_v_changed = Py_None; Py_INCREF(Py_None);
  __pyx_v_old_path_u = Py_None; Py_INCREF(Py_None);
  __pyx_v_path_u = Py_None; Py_INCREF(Py_None);
  __pyx_v_source_kind = Py_None; Py_INCREF(Py_None);
  __pyx_v_parent_entry = Py_None; Py_INCREF(Py_None);
  __pyx_v_parent_id = Py_None; Py_INCREF(Py_None);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1095 */
  Py_INCREF(Py_None);
  Py_DECREF(__pyx_v_file_id);
  __pyx_v_file_id = Py_None;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1096 */
  __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; goto __pyx_L1;}
  Py_DECREF(__pyx_v_details_list);
  __pyx_v_details_list = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1097 */
  __pyx_2 = ((-1) == __pyx_v_self->source_index);
  if (__pyx_2) {
    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_DirState); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;}
    __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_NULL_PARENT_DETAILS); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_v_source_details);
    __pyx_v_source_details = __pyx_3;
    __pyx_3 = 0;
    goto __pyx_L2;
  }
  /*else*/ {
    __pyx_1 = __Pyx_GetItemInt(__pyx_v_details_list, __pyx_v_self->source_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; goto __pyx_L1;}
    Py_DECREF(__pyx_v_source_details);
    __pyx_v_source_details = __pyx_1;
    __pyx_1 = 0;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1101 */
  __pyx_3 = __Pyx_GetItemInt(__pyx_v_details_list, __pyx_v_self->target_index); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; goto __pyx_L1;}
  Py_DECREF(__pyx_v_target_details);
  __pyx_v_target_details = __pyx_3;
  __pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1102 */
  __pyx_1 = __Pyx_GetItemInt(__pyx_v_target_details, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; goto __pyx_L1;}
  __pyx_4 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_from_string(__pyx_1); if (__pyx_4 == (-1) && PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_v_target_minikind = __pyx_4;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1103 */
  __pyx_2 = __pyx_v_path_info != Py_None;
  if (__pyx_2) {
    __pyx_2 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_target_minikind);
  }
  if (__pyx_2) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1104 */
    __pyx_2 = (__pyx_v_self->target_index != 0);
    if (__pyx_2) {
      __pyx_3 = PyInt_FromLong(__pyx_v_self->target_index); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; goto __pyx_L1;}
      __pyx_1 = PyNumber_Remainder(__pyx_k64p, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
      __pyx_1 = 0;
      __pyx_1 = PyObject_CallObject(PyExc_AssertionError, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __Pyx_Raise(__pyx_1, 0, 0);
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; goto __pyx_L1;}
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1107 */
    __pyx_3 = __Pyx_GetItemInt(__pyx_v_path_info, 4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; goto __pyx_L1;}
    __pyx_1 = __Pyx_GetItemInt(__pyx_v_path_info, 3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; goto __pyx_L1;}
    __pyx_5 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__update_entry(__pyx_v_self->state,__pyx_v_entry,__pyx_3,__pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_v_link_or_sha1);
    __pyx_v_link_or_sha1 = __pyx_5;
    __pyx_5 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1109 */
    __pyx_3 = __Pyx_GetItemInt(__pyx_v_details_list, __pyx_v_self->target_index); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; goto __pyx_L1;}
    Py_DECREF(__pyx_v_target_details);
    __pyx_v_target_details = __pyx_3;
    __pyx_3 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1110 */
    __pyx_1 = __Pyx_GetItemInt(__pyx_v_target_details, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; goto __pyx_L1;}
    __pyx_4 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_from_string(__pyx_1); if (__pyx_4 == (-1) && PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_v_target_minikind = __pyx_4;
    goto __pyx_L3;
  }
  /*else*/ {
    Py_INCREF(Py_None);
    Py_DECREF(__pyx_v_link_or_sha1);
    __pyx_v_link_or_sha1 = Py_None;
  }
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1115 */
  __pyx_5 = __Pyx_GetItemInt(__pyx_v_source_details, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; goto __pyx_L1;}
  __pyx_4 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_from_string(__pyx_5); if (__pyx_4 == (-1) && PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; goto __pyx_L1;}
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  __pyx_v_source_minikind = __pyx_4;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1116 */
  __pyx_2 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_source_minikind);
  if (!__pyx_2) {
    __pyx_2 = (__pyx_v_source_minikind == 'r');
  }
  if (__pyx_2) {
    __pyx_2 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_target_minikind);
  }
  if (__pyx_2) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1123 */
    __pyx_2 = (__pyx_v_source_minikind != 'r');
    if (__pyx_2) {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1124 */
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; goto __pyx_L1;}
      __pyx_1 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_v_old_dirname);
      __pyx_v_old_dirname = __pyx_1;
      __pyx_1 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1125 */
      __pyx_5 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; goto __pyx_L1;}
      __pyx_3 = __Pyx_GetItemInt(__pyx_5, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      Py_DECREF(__pyx_v_old_basename);
      __pyx_v_old_basename = __pyx_3;
      __pyx_3 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1126 */
      Py_INCREF(Py_None);
      Py_DECREF(__pyx_v_old_path);
      __pyx_v_old_path = Py_None;
      Py_INCREF(Py_None);
      Py_DECREF(__pyx_v_path);
      __pyx_v_path = Py_None;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1130 */
      __pyx_2 = (!__pyx_v_self->doing_consistency_expansion);
      if (__pyx_2) {
        __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; goto __pyx_L1;}
        __pyx_5 = PyObject_GetAttr(__pyx_1, __pyx_n_is_inside_any); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        __pyx_3 = __Pyx_GetItemInt(__pyx_v_source_details, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; goto __pyx_L1;}
        __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; goto __pyx_L1;}
        Py_INCREF(__pyx_v_self->searched_specific_files);
        PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_self->searched_specific_files);
        PyTuple_SET_ITEM(__pyx_1, 1, __pyx_3);
        __pyx_3 = 0;
        __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        __pyx_6 = PyObject_IsTrue(__pyx_3); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        __pyx_2 = (!__pyx_6);
      }
      if (__pyx_2) {
        __pyx_5 = PyObject_GetAttr(__pyx_v_self->search_specific_files, __pyx_n_add); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;}
        __pyx_1 = __Pyx_GetItemInt(__pyx_v_source_details, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;}
        __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;}
        PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
        __pyx_1 = 0;
        __pyx_1 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1138 */
      __pyx_5 = __Pyx_GetItemInt(__pyx_v_source_details, 1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; goto __pyx_L1;}
      Py_DECREF(__pyx_v_old_path);
      __pyx_v_old_path = __pyx_5;
      __pyx_5 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1139 */
      __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; goto __pyx_L1;}
      __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_path); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_5 = PyObject_GetAttr(__pyx_1, __pyx_n_split); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; goto __pyx_L1;}
      Py_INCREF(__pyx_v_old_path);
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_old_path);
      __pyx_1 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_5 = PyObject_GetIter(__pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      __pyx_3 = __Pyx_UnpackItem(__pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; goto __pyx_L1;}
      Py_DECREF(__pyx_v_old_dirname);
      __pyx_v_old_dirname = __pyx_3;
      __pyx_3 = 0;
      __pyx_1 = __Pyx_UnpackItem(__pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; goto __pyx_L1;}
      Py_DECREF(__pyx_v_old_basename);
      __pyx_v_old_basename = __pyx_1;
      __pyx_1 = 0;
      if (__Pyx_EndUnpack(__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1140 */
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; goto __pyx_L1;}
      __pyx_1 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_5 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; goto __pyx_L1;}
      __pyx_3 = __Pyx_GetItemInt(__pyx_5, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_5, 0, __pyx_1);
      PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3);
      __pyx_1 = 0;
      __pyx_3 = 0;
      __pyx_1 = PyObject_CallObject(__pyx_v_self->pathjoin, __pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1140; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      Py_DECREF(__pyx_v_path);
      __pyx_v_path = __pyx_1;
      __pyx_1 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1141 */
      __pyx_3 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__get_entry); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; goto __pyx_L1;}
      __pyx_5 = PyInt_FromLong(__pyx_v_self->source_index); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; goto __pyx_L1;}
      __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_5);
      __pyx_5 = 0;
      __pyx_5 = PyDict_New(); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; goto __pyx_L1;}
      if (PyDict_SetItem(__pyx_5, __pyx_n_path_utf8, __pyx_v_old_path) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; goto __pyx_L1;}
      __pyx_7 = PyEval_CallObjectWithKeywords(__pyx_3, __pyx_1, __pyx_5); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1141; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      Py_DECREF(__pyx_v_old_entry);
      __pyx_v_old_entry = __pyx_7;
      __pyx_7 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1145 */
      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_3, 0, Py_None);
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_3, 1, Py_None);
      if (PyObject_Cmp(__pyx_v_old_entry, __pyx_3, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1145; goto __pyx_L1;}
      __pyx_6 = __pyx_6 == 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      if (__pyx_6) {
        __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_errors); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;}
        __pyx_5 = PyObject_GetAttr(__pyx_1, __pyx_n_CorruptDirstate); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        __pyx_7 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__filename); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;}
        __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;}
        __pyx_1 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;}
        __pyx_8 = __Pyx_GetItemInt(__pyx_3, 1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        __pyx_3 = PyTuple_New(4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;}
        PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
        PyTuple_SET_ITEM(__pyx_3, 1, __pyx_8);
        Py_INCREF(__pyx_v_old_path);
        PyTuple_SET_ITEM(__pyx_3, 2, __pyx_v_old_path);
        Py_INCREF(__pyx_v_entry);
        PyTuple_SET_ITEM(__pyx_3, 3, __pyx_v_entry);
        __pyx_1 = 0;
        __pyx_8 = 0;
        __pyx_1 = PyNumber_Remainder(__pyx_k73p, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;}
        PyTuple_SET_ITEM(__pyx_8, 0, __pyx_7);
        PyTuple_SET_ITEM(__pyx_8, 1, __pyx_1);
        __pyx_7 = 0;
        __pyx_1 = 0;
        __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_8); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        Py_DECREF(__pyx_8); __pyx_8 = 0;
        __Pyx_Raise(__pyx_3, 0, 0);
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1146; goto __pyx_L1;}
        goto __pyx_L8;
      }
      __pyx_L8:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1150 */
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_old_entry, 1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; goto __pyx_L1;}
      __pyx_1 = __Pyx_GetItemInt(__pyx_7, __pyx_v_self->source_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; goto __pyx_L1;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      Py_DECREF(__pyx_v_source_details);
      __pyx_v_source_details = __pyx_1;
      __pyx_1 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1151 */
      __pyx_5 = __Pyx_GetItemInt(__pyx_v_source_details, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; goto __pyx_L1;}
      __pyx_4 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_from_string(__pyx_5); if (__pyx_4 == (-1) && PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_v_source_minikind = __pyx_4;
    }
    __pyx_L6:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1152 */
    __pyx_2 = __pyx_v_path_info == Py_None;
    if (__pyx_2) {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1154 */
      __pyx_v_content_change = 1;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1155 */
      Py_INCREF(Py_None);
      Py_DECREF(__pyx_v_target_kind);
      __pyx_v_target_kind = Py_None;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1156 */
      Py_INCREF(Py_False);
      Py_DECREF(__pyx_v_target_exec);
      __pyx_v_target_exec = Py_False;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1159 */
      __pyx_8 = __Pyx_GetItemInt(__pyx_v_path_info, 2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1159; goto __pyx_L1;}
      Py_DECREF(__pyx_v_target_kind);
      __pyx_v_target_kind = __pyx_8;
      __pyx_8 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1160 */
      if (PyObject_Cmp(__pyx_v_target_kind, __pyx_n_directory, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; goto __pyx_L1;}
      __pyx_6 = __pyx_6 == 0;
      if (__pyx_6) {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1161 */
        __pyx_2 = __pyx_v_path == Py_None;
        if (__pyx_2) {
          __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; goto __pyx_L1;}
          Py_INCREF(__pyx_v_old_dirname);
          PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_old_dirname);
          Py_INCREF(__pyx_v_old_basename);
          PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_old_basename);
          __pyx_7 = PyObject_CallObject(__pyx_v_self->pathjoin, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; goto __pyx_L1;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          Py_INCREF(__pyx_7);
          Py_DECREF(__pyx_v_old_path);
          __pyx_v_old_path = __pyx_7;
          Py_INCREF(__pyx_7);
          Py_DECREF(__pyx_v_path);
          __pyx_v_path = __pyx_7;
          Py_DECREF(__pyx_7); __pyx_7 = 0;
          goto __pyx_L11;
        }
        __pyx_L11:;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1163 */
        __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; goto __pyx_L1;}
        __pyx_5 = __Pyx_GetItemInt(__pyx_1, 2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        Py_DECREF(__pyx_v_file_id);
        __pyx_v_file_id = __pyx_5;
        __pyx_5 = 0;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1164 */
        if (PyObject_SetItem(__pyx_v_self->new_dirname_to_file_id, __pyx_v_path, __pyx_v_file_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; goto __pyx_L1;}

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1165 */
        __pyx_6 = (__pyx_v_source_minikind != 'd');
        if (__pyx_6) {
          __pyx_v_content_change = 1;
          goto __pyx_L12;
        }
        /*else*/ {
          __pyx_v_content_change = 0;
        }
        __pyx_L12:;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1170 */
        Py_INCREF(Py_False);
        Py_DECREF(__pyx_v_target_exec);
        __pyx_v_target_exec = Py_False;
        goto __pyx_L10;
      }
      if (PyObject_Cmp(__pyx_v_target_kind, __pyx_n_file, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; goto __pyx_L1;}
      __pyx_2 = __pyx_2 == 0;
      if (__pyx_2) {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1172 */
        __pyx_6 = (__pyx_v_source_minikind != 'f');
        if (__pyx_6) {
          __pyx_v_content_change = 1;
          goto __pyx_L13;
        }
        /*else*/ {

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1178 */
          __pyx_2 = __pyx_v_link_or_sha1 == Py_None;
          if (__pyx_2) {

            /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1181 */
            __pyx_8 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__sha1_provider); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;}
            __pyx_3 = PyObject_GetAttr(__pyx_8, __pyx_n_stat_and_sha1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;}
            Py_DECREF(__pyx_8); __pyx_8 = 0;
            __pyx_7 = __Pyx_GetItemInt(__pyx_v_path_info, 4); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; goto __pyx_L1;}
            __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;}
            PyTuple_SET_ITEM(__pyx_1, 0, __pyx_7);
            __pyx_7 = 0;
            __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; goto __pyx_L1;}
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            Py_DECREF(__pyx_1); __pyx_1 = 0;
            __pyx_8 = PyObject_GetIter(__pyx_5); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; goto __pyx_L1;}
            Py_DECREF(__pyx_5); __pyx_5 = 0;
            __pyx_7 = __Pyx_UnpackItem(__pyx_8); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; goto __pyx_L1;}
            Py_DECREF(__pyx_v_statvalue);
            __pyx_v_statvalue = __pyx_7;
            __pyx_7 = 0;
            __pyx_3 = __Pyx_UnpackItem(__pyx_8); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; goto __pyx_L1;}
            Py_DECREF(__pyx_v_link_or_sha1);
            __pyx_v_link_or_sha1 = __pyx_3;
            __pyx_3 = 0;
            if (__Pyx_EndUnpack(__pyx_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; goto __pyx_L1;}
            Py_DECREF(__pyx_8); __pyx_8 = 0;

            /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1183 */
            __pyx_1 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__observed_sha1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;}
            __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;}
            Py_INCREF(__pyx_v_entry);
            PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_entry);
            Py_INCREF(__pyx_v_link_or_sha1);
            PyTuple_SET_ITEM(__pyx_5, 1, __pyx_v_link_or_sha1);
            Py_INCREF(__pyx_v_statvalue);
            PyTuple_SET_ITEM(__pyx_5, 2, __pyx_v_statvalue);
            __pyx_7 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;}
            Py_DECREF(__pyx_1); __pyx_1 = 0;
            Py_DECREF(__pyx_5); __pyx_5 = 0;
            Py_DECREF(__pyx_7); __pyx_7 = 0;
            goto __pyx_L14;
          }
          __pyx_L14:;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1185 */
          __pyx_3 = __Pyx_GetItemInt(__pyx_v_source_details, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; goto __pyx_L1;}
          if (PyObject_Cmp(__pyx_v_link_or_sha1, __pyx_3, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; goto __pyx_L1;}
          __pyx_6 = __pyx_6 != 0;
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          __pyx_v_content_change = __pyx_6;
        }
        __pyx_L13:;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1187 */
        __pyx_2 = PyObject_IsTrue(__pyx_v_self->use_filesystem_for_exec); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; goto __pyx_L1;}
        if (__pyx_2) {
          __pyx_8 = PyInt_FromLong(S_IXUSR); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; goto __pyx_L1;}
          __pyx_1 = __Pyx_GetItemInt(__pyx_v_path_info, 3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; goto __pyx_L1;}
          __pyx_5 = PyObject_GetAttr(__pyx_1, __pyx_n_st_mode); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; goto __pyx_L1;}
          Py_DECREF(__pyx_1); __pyx_1 = 0;
          __pyx_7 = PyNumber_And(__pyx_8, __pyx_5); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; goto __pyx_L1;}
          Py_DECREF(__pyx_8); __pyx_8 = 0;
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          __pyx_6 = PyObject_IsTrue(__pyx_7); if (__pyx_6 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; goto __pyx_L1;}
          Py_DECREF(__pyx_7); __pyx_7 = 0;
          __pyx_3 = PyInt_FromLong(__pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; goto __pyx_L1;}
          Py_DECREF(__pyx_v_target_exec);
          __pyx_v_target_exec = __pyx_3;
          __pyx_3 = 0;
          goto __pyx_L15;
        }
        /*else*/ {
          __pyx_1 = __Pyx_GetItemInt(__pyx_v_target_details, 3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; goto __pyx_L1;}
          Py_DECREF(__pyx_v_target_exec);
          __pyx_v_target_exec = __pyx_1;
          __pyx_1 = 0;
        }
        __pyx_L15:;
        goto __pyx_L10;
      }
      if (PyObject_Cmp(__pyx_v_target_kind, __pyx_n_symlink, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; goto __pyx_L1;}
      __pyx_2 = __pyx_2 == 0;
      if (__pyx_2) {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1194 */
        __pyx_6 = (__pyx_v_source_minikind != 'l');
        if (__pyx_6) {
          __pyx_v_content_change = 1;
          goto __pyx_L16;
        }
        /*else*/ {
          __pyx_8 = __Pyx_GetItemInt(__pyx_v_source_details, 1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;}
          if (PyObject_Cmp(__pyx_v_link_or_sha1, __pyx_8, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;}
          __pyx_2 = __pyx_2 != 0;
          Py_DECREF(__pyx_8); __pyx_8 = 0;
          __pyx_v_content_change = __pyx_2;
        }
        __pyx_L16:;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1198 */
        Py_INCREF(Py_False);
        Py_DECREF(__pyx_v_target_exec);
        __pyx_v_target_exec = Py_False;
        goto __pyx_L10;
      }
      if (PyObject_Cmp(__pyx_v_target_kind, __pyx_k80p, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; goto __pyx_L1;}
      __pyx_6 = __pyx_6 == 0;
      if (__pyx_6) {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1200 */
        __pyx_2 = (__pyx_v_source_minikind != 't');
        if (__pyx_2) {
          __pyx_v_content_change = 1;
          goto __pyx_L17;
        }
        /*else*/ {
          __pyx_v_content_change = 0;
        }
        __pyx_L17:;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1204 */
        Py_INCREF(Py_False);
        Py_DECREF(__pyx_v_target_exec);
        __pyx_v_target_exec = Py_False;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1206 */
        __pyx_6 = __pyx_v_path == Py_None;
        if (__pyx_6) {
          __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; goto __pyx_L1;}
          Py_INCREF(__pyx_v_old_dirname);
          PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_old_dirname);
          Py_INCREF(__pyx_v_old_basename);
          PyTuple_SET_ITEM(__pyx_5, 1, __pyx_v_old_basename);
          __pyx_7 = PyObject_CallObject(__pyx_v_self->pathjoin, __pyx_5); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1207; goto __pyx_L1;}
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          Py_DECREF(__pyx_v_path);
          __pyx_v_path = __pyx_7;
          __pyx_7 = 0;
          goto __pyx_L18;
        }
        __pyx_L18:;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1208 */
        __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_errors); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; goto __pyx_L1;}
        __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_BadFileKindError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        __pyx_8 = __Pyx_GetItemInt(__pyx_v_path_info, 2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; goto __pyx_L1;}
        __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; goto __pyx_L1;}
        Py_INCREF(__pyx_v_path);
        PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_path);
        PyTuple_SET_ITEM(__pyx_5, 1, __pyx_8);
        __pyx_8 = 0;
        __pyx_7 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        __Pyx_Raise(__pyx_7, 0, 0);
        Py_DECREF(__pyx_7); __pyx_7 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; goto __pyx_L1;}
      }
      __pyx_L10:;
    }
    __pyx_L9:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1209 */
    __pyx_2 = (__pyx_v_source_minikind == 'd');
    if (__pyx_2) {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1210 */
      __pyx_6 = __pyx_v_path == Py_None;
      if (__pyx_6) {
        __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; goto __pyx_L1;}
        Py_INCREF(__pyx_v_old_dirname);
        PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_old_dirname);
        Py_INCREF(__pyx_v_old_basename);
        PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_old_basename);
        __pyx_8 = PyObject_CallObject(__pyx_v_self->pathjoin, __pyx_3); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_INCREF(__pyx_8);
        Py_DECREF(__pyx_v_old_path);
        __pyx_v_old_path = __pyx_8;
        Py_INCREF(__pyx_8);
        Py_DECREF(__pyx_v_path);
        __pyx_v_path = __pyx_8;
        Py_DECREF(__pyx_8); __pyx_8 = 0;
        goto __pyx_L20;
      }
      __pyx_L20:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1212 */
      __pyx_2 = __pyx_v_file_id == Py_None;
      if (__pyx_2) {
        __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;}
        __pyx_5 = __Pyx_GetItemInt(__pyx_1, 2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        Py_DECREF(__pyx_v_file_id);
        __pyx_v_file_id = __pyx_5;
        __pyx_5 = 0;
        goto __pyx_L21;
      }
      __pyx_L21:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1214 */
      if (PyObject_SetItem(__pyx_v_self->old_dirname_to_file_id, __pyx_v_old_path, __pyx_v_file_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; goto __pyx_L1;}
      goto __pyx_L19;
    }
    __pyx_L19:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1216 */
    __pyx_7 = __pyx_v_old_basename;
    Py_INCREF(__pyx_7);
    __pyx_6 = PyObject_IsTrue(__pyx_7); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;}
    if (__pyx_6) {
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_self->last_source_parent, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;}
      if (PyObject_Cmp(__pyx_v_old_dirname, __pyx_3, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;}
      __pyx_2 = __pyx_2 == 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_7 = PyInt_FromLong(__pyx_2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;}
    }
    __pyx_6 = PyObject_IsTrue(__pyx_7); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; goto __pyx_L1;}
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    if (__pyx_6) {
      __pyx_8 = __Pyx_GetItemInt(__pyx_v_self->last_source_parent, 1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; goto __pyx_L1;}
      Py_DECREF(__pyx_v_source_parent_id);
      __pyx_v_source_parent_id = __pyx_8;
      __pyx_8 = 0;
      goto __pyx_L22;
    }
    /*else*/ {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1220 */
      /*try:*/ {
        __pyx_1 = PyObject_GetItem(__pyx_v_self->old_dirname_to_file_id, __pyx_v_old_dirname); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1221; goto __pyx_L23;}
        Py_DECREF(__pyx_v_source_parent_id);
        __pyx_v_source_parent_id = __pyx_1;
        __pyx_1 = 0;
      }
      goto __pyx_L24;
      __pyx_L23:;
      Py_XDECREF(__pyx_5); __pyx_5 = 0;
      Py_XDECREF(__pyx_3); __pyx_3 = 0;
      Py_XDECREF(__pyx_7); __pyx_7 = 0;
      Py_XDECREF(__pyx_8); __pyx_8 = 0;
      Py_XDECREF(__pyx_1); __pyx_1 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1222 */
      __pyx_2 = PyErr_ExceptionMatches(PyExc_KeyError);
      if (__pyx_2) {
        __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._process_entry");
        if (__Pyx_GetException(&__pyx_5, &__pyx_3, &__pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;}
        Py_INCREF(__pyx_3);
        Py_DECREF(__pyx_v__);
        __pyx_v__ = __pyx_3;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1223 */
        __pyx_8 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__get_entry); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; goto __pyx_L1;}
        __pyx_1 = PyInt_FromLong(__pyx_v_self->source_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; goto __pyx_L1;}
        __pyx_9 = PyTuple_New(1); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; goto __pyx_L1;}
        PyTuple_SET_ITEM(__pyx_9, 0, __pyx_1);
        __pyx_1 = 0;
        __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; goto __pyx_L1;}
        if (PyDict_SetItem(__pyx_1, __pyx_n_path_utf8, __pyx_v_old_dirname) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; goto __pyx_L1;}
        __pyx_10 = PyEval_CallObjectWithKeywords(__pyx_8, __pyx_9, __pyx_1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; goto __pyx_L1;}
        Py_DECREF(__pyx_8); __pyx_8 = 0;
        Py_DECREF(__pyx_9); __pyx_9 = 0;
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        Py_DECREF(__pyx_v_source_parent_entry);
        __pyx_v_source_parent_entry = __pyx_10;
        __pyx_10 = 0;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1225 */
        __pyx_8 = __Pyx_GetItemInt(__pyx_v_source_parent_entry, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;}
        __pyx_9 = __Pyx_GetItemInt(__pyx_8, 2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;}
        Py_DECREF(__pyx_8); __pyx_8 = 0;
        Py_DECREF(__pyx_v_source_parent_id);
        __pyx_v_source_parent_id = __pyx_9;
        __pyx_9 = 0;
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_7); __pyx_7 = 0;
        goto __pyx_L24;
      }
      goto __pyx_L1;
      __pyx_L24:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1226 */
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; goto __pyx_L1;}
      __pyx_10 = __Pyx_GetItemInt(__pyx_1, 2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      if (PyObject_Cmp(__pyx_v_source_parent_id, __pyx_10, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; goto __pyx_L1;}
      __pyx_6 = __pyx_6 == 0;
      Py_DECREF(__pyx_10); __pyx_10 = 0;
      if (__pyx_6) {
        Py_INCREF(Py_None);
        Py_DECREF(__pyx_v_source_parent_id);
        __pyx_v_source_parent_id = Py_None;
        goto __pyx_L25;
      }
      /*else*/ {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1230 */
        if (__Pyx_SetItemInt(__pyx_v_self->last_source_parent, 0, __pyx_v_old_dirname) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; goto __pyx_L1;}

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1231 */
        if (__Pyx_SetItemInt(__pyx_v_self->last_source_parent, 1, __pyx_v_source_parent_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1231; goto __pyx_L1;}
      }
      __pyx_L25:;
    }
    __pyx_L22:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1232 */
    __pyx_8 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; goto __pyx_L1;}
    __pyx_9 = __Pyx_GetItemInt(__pyx_8, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1232; goto __pyx_L1;}
    Py_DECREF(__pyx_8); __pyx_8 = 0;
    Py_DECREF(__pyx_v_new_dirname);
    __pyx_v_new_dirname = __pyx_9;
    __pyx_9 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1233 */
    __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}
    __pyx_5 = __Pyx_GetItemInt(__pyx_3, 1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_2 = PyObject_IsTrue(__pyx_5); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}
    if (__pyx_2) {
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_self->last_target_parent, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}
      if (PyObject_Cmp(__pyx_v_new_dirname, __pyx_7, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}
      __pyx_6 = __pyx_6 == 0;
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      __pyx_5 = PyInt_FromLong(__pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}
    }
    __pyx_2 = PyObject_IsTrue(__pyx_5); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    if (__pyx_2) {
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_self->last_target_parent, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1235; goto __pyx_L1;}
      Py_DECREF(__pyx_v_target_parent_id);
      __pyx_v_target_parent_id = __pyx_1;
      __pyx_1 = 0;
      goto __pyx_L26;
    }
    /*else*/ {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1237 */
      /*try:*/ {
        __pyx_10 = PyObject_GetItem(__pyx_v_self->new_dirname_to_file_id, __pyx_v_new_dirname); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; goto __pyx_L27;}
        Py_DECREF(__pyx_v_target_parent_id);
        __pyx_v_target_parent_id = __pyx_10;
        __pyx_10 = 0;
      }
      goto __pyx_L28;
      __pyx_L27:;
      Py_XDECREF(__pyx_8); __pyx_8 = 0;
      Py_XDECREF(__pyx_9); __pyx_9 = 0;
      Py_XDECREF(__pyx_3); __pyx_3 = 0;
      Py_XDECREF(__pyx_7); __pyx_7 = 0;
      Py_XDECREF(__pyx_5); __pyx_5 = 0;
      Py_XDECREF(__pyx_1); __pyx_1 = 0;
      Py_XDECREF(__pyx_10); __pyx_10 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1239 */
      __pyx_6 = PyErr_ExceptionMatches(PyExc_KeyError);
      if (__pyx_6) {
        __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._process_entry");
        if (__Pyx_GetException(&__pyx_8, &__pyx_9, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; goto __pyx_L1;}
        Py_INCREF(__pyx_9);
        Py_DECREF(__pyx_v__);
        __pyx_v__ = __pyx_9;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1242 */
        __pyx_7 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__get_entry); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; goto __pyx_L1;}
        __pyx_5 = PyInt_FromLong(__pyx_v_self->target_index); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; goto __pyx_L1;}
        __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; goto __pyx_L1;}
        PyTuple_SET_ITEM(__pyx_1, 0, __pyx_5);
        __pyx_5 = 0;
        __pyx_10 = PyDict_New(); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; goto __pyx_L1;}
        if (PyDict_SetItem(__pyx_10, __pyx_n_path_utf8, __pyx_v_new_dirname) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; goto __pyx_L1;}
        __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_7, __pyx_1, __pyx_10); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; goto __pyx_L1;}
        Py_DECREF(__pyx_7); __pyx_7 = 0;
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        Py_DECREF(__pyx_10); __pyx_10 = 0;
        Py_DECREF(__pyx_v_target_parent_entry);
        __pyx_v_target_parent_entry = __pyx_5;
        __pyx_5 = 0;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1244 */
        __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
        Py_INCREF(Py_None);
        PyTuple_SET_ITEM(__pyx_7, 0, Py_None);
        Py_INCREF(Py_None);
        PyTuple_SET_ITEM(__pyx_7, 1, Py_None);
        if (PyObject_Cmp(__pyx_v_target_parent_entry, __pyx_7, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
        __pyx_2 = __pyx_2 == 0;
        Py_DECREF(__pyx_7); __pyx_7 = 0;
        if (__pyx_2) {
          __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; goto __pyx_L1;}
          Py_INCREF(__pyx_v_new_dirname);
          PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_new_dirname);
          Py_INCREF(__pyx_v_entry);
          PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_entry);
          __pyx_10 = PyNumber_Remainder(__pyx_k82p, __pyx_1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; goto __pyx_L1;}
          Py_DECREF(__pyx_1); __pyx_1 = 0;
          __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; goto __pyx_L1;}
          PyTuple_SET_ITEM(__pyx_5, 0, __pyx_10);
          __pyx_10 = 0;
          __pyx_7 = PyObject_CallObject(PyExc_AssertionError, __pyx_5); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; goto __pyx_L1;}
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          __Pyx_Raise(__pyx_7, 0, 0);
          Py_DECREF(__pyx_7); __pyx_7 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; goto __pyx_L1;}
          goto __pyx_L29;
        }
        __pyx_L29:;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1248 */
        __pyx_1 = __Pyx_GetItemInt(__pyx_v_target_parent_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; goto __pyx_L1;}
        __pyx_10 = __Pyx_GetItemInt(__pyx_1, 2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        Py_DECREF(__pyx_v_target_parent_id);
        __pyx_v_target_parent_id = __pyx_10;
        __pyx_10 = 0;
        Py_DECREF(__pyx_8); __pyx_8 = 0;
        Py_DECREF(__pyx_9); __pyx_9 = 0;
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        goto __pyx_L28;
      }
      goto __pyx_L1;
      __pyx_L28:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1249 */
      __pyx_5 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; goto __pyx_L1;}
      __pyx_7 = __Pyx_GetItemInt(__pyx_5, 2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      if (PyObject_Cmp(__pyx_v_target_parent_id, __pyx_7, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1249; goto __pyx_L1;}
      __pyx_6 = __pyx_6 == 0;
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      if (__pyx_6) {
        Py_INCREF(Py_None);
        Py_DECREF(__pyx_v_target_parent_id);
        __pyx_v_target_parent_id = Py_None;
        goto __pyx_L30;
      }
      /*else*/ {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1253 */
        if (__Pyx_SetItemInt(__pyx_v_self->last_target_parent, 0, __pyx_v_new_dirname) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; goto __pyx_L1;}

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1254 */
        if (__Pyx_SetItemInt(__pyx_v_self->last_target_parent, 1, __pyx_v_target_parent_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; goto __pyx_L1;}
      }
      __pyx_L30:;
    }
    __pyx_L26:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1256 */
    __pyx_1 = __Pyx_GetItemInt(__pyx_v_source_details, 3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1256; goto __pyx_L1;}
    Py_DECREF(__pyx_v_source_exec);
    __pyx_v_source_exec = __pyx_1;
    __pyx_1 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1258 */
    __pyx_2 = __pyx_v_content_change;
    if (!__pyx_2) {
      if (PyObject_Cmp(__pyx_v_source_parent_id, __pyx_v_target_parent_id, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; goto __pyx_L1;}
      __pyx_2 = __pyx_2 != 0;
      if (!__pyx_2) {
        __pyx_10 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1259; goto __pyx_L1;}
        __pyx_8 = __Pyx_GetItemInt(__pyx_10, 1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1259; goto __pyx_L1;}
        Py_DECREF(__pyx_10); __pyx_10 = 0;
        if (PyObject_Cmp(__pyx_v_old_basename, __pyx_8, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1259; goto __pyx_L1;}
        __pyx_2 = __pyx_2 != 0;
        Py_DECREF(__pyx_8); __pyx_8 = 0;
        if (!__pyx_2) {
          if (PyObject_Cmp(__pyx_v_source_exec, __pyx_v_target_exec, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; goto __pyx_L1;}
          __pyx_2 = __pyx_2 != 0;
        }
      }
    }
    __pyx_9 = PyInt_FromLong(__pyx_2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1258; goto __pyx_L1;}
    Py_DECREF(__pyx_v_changed);
    __pyx_v_changed = __pyx_9;
    __pyx_9 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1262 */
    __pyx_2 = PyObject_IsTrue(__pyx_v_changed); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; goto __pyx_L1;}
    __pyx_6 = (!__pyx_2);
    if (__pyx_6) {
      __pyx_6 = (!__pyx_v_self->include_unchanged);
    }
    if (__pyx_6) {
      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_3, 0, Py_None);
      Py_INCREF(Py_False);
      PyTuple_SET_ITEM(__pyx_3, 1, Py_False);
      __pyx_r = __pyx_3;
      __pyx_3 = 0;
      goto __pyx_L0;
      goto __pyx_L31;
    }
    /*else*/ {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1265 */
      __pyx_2 = __pyx_v_old_path == Py_None;
      if (__pyx_2) {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1266 */
        __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; goto __pyx_L1;}
        Py_INCREF(__pyx_v_old_dirname);
        PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_old_dirname);
        Py_INCREF(__pyx_v_old_basename);
        PyTuple_SET_ITEM(__pyx_5, 1, __pyx_v_old_basename);
        __pyx_7 = PyObject_CallObject(__pyx_v_self->pathjoin, __pyx_5); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        Py_DECREF(__pyx_v_path);
        __pyx_v_path = __pyx_7;
        __pyx_7 = 0;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1267 */
        Py_INCREF(__pyx_v_path);
        Py_DECREF(__pyx_v_old_path);
        __pyx_v_old_path = __pyx_v_path;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1268 */
        __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; goto __pyx_L1;}
        Py_INCREF(__pyx_v_old_path);
        PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_old_path);
        __pyx_10 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        __pyx_8 = __Pyx_GetItemInt(__pyx_10, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; goto __pyx_L1;}
        Py_DECREF(__pyx_10); __pyx_10 = 0;
        Py_DECREF(__pyx_v_old_path_u);
        __pyx_v_old_path_u = __pyx_8;
        __pyx_8 = 0;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1269 */
        Py_INCREF(__pyx_v_old_path_u);
        Py_DECREF(__pyx_v_path_u);
        __pyx_v_path_u = __pyx_v_old_path_u;
        goto __pyx_L32;
      }
      /*else*/ {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1271 */
        __pyx_9 = PyTuple_New(1); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;}
        Py_INCREF(__pyx_v_old_path);
        PyTuple_SET_ITEM(__pyx_9, 0, __pyx_v_old_path);
        __pyx_3 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_9); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;}
        Py_DECREF(__pyx_9); __pyx_9 = 0;
        __pyx_5 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_v_old_path_u);
        __pyx_v_old_path_u = __pyx_5;
        __pyx_5 = 0;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1272 */
        if (PyObject_Cmp(__pyx_v_old_path, __pyx_v_path, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; goto __pyx_L1;}
        __pyx_6 = __pyx_6 == 0;
        if (__pyx_6) {
          Py_INCREF(__pyx_v_old_path_u);
          Py_DECREF(__pyx_v_path_u);
          __pyx_v_path_u = __pyx_v_old_path_u;
          goto __pyx_L33;
        }
        /*else*/ {
          __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; goto __pyx_L1;}
          Py_INCREF(__pyx_v_path);
          PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_path);
          __pyx_1 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_7); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; goto __pyx_L1;}
          Py_DECREF(__pyx_7); __pyx_7 = 0;
          __pyx_10 = __Pyx_GetItemInt(__pyx_1, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; goto __pyx_L1;}
          Py_DECREF(__pyx_1); __pyx_1 = 0;
          Py_DECREF(__pyx_v_path_u);
          __pyx_v_path_u = __pyx_10;
          __pyx_10 = 0;
        }
        __pyx_L33:;
      }
      __pyx_L32:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1276 */
      __pyx_8 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_to_kind(__pyx_v_source_minikind); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; goto __pyx_L1;}
      Py_DECREF(__pyx_v_source_kind);
      __pyx_v_source_kind = __pyx_8;
      __pyx_8 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1277 */
      __pyx_9 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; goto __pyx_L1;}
      __pyx_3 = __Pyx_GetItemInt(__pyx_9, 2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; goto __pyx_L1;}
      Py_DECREF(__pyx_9); __pyx_9 = 0;
      __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; goto __pyx_L1;}
      Py_INCREF(__pyx_v_old_path_u);
      PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_old_path_u);
      Py_INCREF(__pyx_v_path_u);
      PyTuple_SET_ITEM(__pyx_5, 1, __pyx_v_path_u);
      __pyx_7 = PyInt_FromLong(__pyx_v_content_change); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; goto __pyx_L1;}
      __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; goto __pyx_L1;}
      Py_INCREF(Py_True);
      PyTuple_SET_ITEM(__pyx_1, 0, Py_True);
      Py_INCREF(Py_True);
      PyTuple_SET_ITEM(__pyx_1, 1, Py_True);
      __pyx_10 = PyTuple_New(2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; goto __pyx_L1;}
      Py_INCREF(__pyx_v_source_parent_id);
      PyTuple_SET_ITEM(__pyx_10, 0, __pyx_v_source_parent_id);
      Py_INCREF(__pyx_v_target_parent_id);
      PyTuple_SET_ITEM(__pyx_10, 1, __pyx_v_target_parent_id);
      __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;}
      Py_INCREF(__pyx_v_old_basename);
      PyTuple_SET_ITEM(__pyx_8, 0, __pyx_v_old_basename);
      __pyx_9 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_8); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;}
      Py_DECREF(__pyx_8); __pyx_8 = 0;
      __pyx_8 = __Pyx_GetItemInt(__pyx_9, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;}
      Py_DECREF(__pyx_9); __pyx_9 = 0;
      __pyx_9 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;}
      __pyx_11 = __Pyx_GetItemInt(__pyx_9, 1); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;}
      Py_DECREF(__pyx_9); __pyx_9 = 0;
      __pyx_9 = PyTuple_New(1); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_9, 0, __pyx_11);
      __pyx_11 = 0;
      __pyx_11 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_9); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;}
      Py_DECREF(__pyx_9); __pyx_9 = 0;
      __pyx_9 = __Pyx_GetItemInt(__pyx_11, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;}
      Py_DECREF(__pyx_11); __pyx_11 = 0;
      __pyx_11 = PyTuple_New(2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1282; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_11, 0, __pyx_8);
      PyTuple_SET_ITEM(__pyx_11, 1, __pyx_9);
      __pyx_8 = 0;
      __pyx_9 = 0;
      __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1283; goto __pyx_L1;}
      Py_INCREF(__pyx_v_source_kind);
      PyTuple_SET_ITEM(__pyx_8, 0, __pyx_v_source_kind);
      Py_INCREF(__pyx_v_target_kind);
      PyTuple_SET_ITEM(__pyx_8, 1, __pyx_v_target_kind);
      __pyx_9 = PyTuple_New(2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;}
      Py_INCREF(__pyx_v_source_exec);
      PyTuple_SET_ITEM(__pyx_9, 0, __pyx_v_source_exec);
      Py_INCREF(__pyx_v_target_exec);
      PyTuple_SET_ITEM(__pyx_9, 1, __pyx_v_target_exec);
      __pyx_12 = PyTuple_New(8); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_12, 0, __pyx_3);
      PyTuple_SET_ITEM(__pyx_12, 1, __pyx_5);
      PyTuple_SET_ITEM(__pyx_12, 2, __pyx_7);
      PyTuple_SET_ITEM(__pyx_12, 3, __pyx_1);
      PyTuple_SET_ITEM(__pyx_12, 4, __pyx_10);
      PyTuple_SET_ITEM(__pyx_12, 5, __pyx_11);
      PyTuple_SET_ITEM(__pyx_12, 6, __pyx_8);
      PyTuple_SET_ITEM(__pyx_12, 7, __pyx_9);
      __pyx_3 = 0;
      __pyx_5 = 0;
      __pyx_7 = 0;
      __pyx_1 = 0;
      __pyx_10 = 0;
      __pyx_11 = 0;
      __pyx_8 = 0;
      __pyx_9 = 0;
      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_12);
      Py_INCREF(__pyx_v_changed);
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_changed);
      __pyx_12 = 0;
      __pyx_r = __pyx_3;
      __pyx_3 = 0;
      goto __pyx_L0;
    }
    __pyx_L31:;
    goto __pyx_L5;
  }
  __pyx_2 = (__pyx_v_source_minikind == 'a');
  if (__pyx_2) {
    __pyx_2 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_target_minikind);
  }
  if (__pyx_2) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1287 */
    __pyx_5 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;}
    __pyx_7 = __Pyx_GetItemInt(__pyx_5, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;}
    __pyx_10 = __Pyx_GetItemInt(__pyx_1, 1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_11 = PyTuple_New(2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_11, 0, __pyx_7);
    PyTuple_SET_ITEM(__pyx_11, 1, __pyx_10);
    __pyx_7 = 0;
    __pyx_10 = 0;
    __pyx_8 = PyObject_CallObject(__pyx_v_self->pathjoin, __pyx_11); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;}
    Py_DECREF(__pyx_11); __pyx_11 = 0;
    Py_DECREF(__pyx_v_path);
    __pyx_v_path = __pyx_8;
    __pyx_8 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1290 */
    __pyx_9 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__get_entry); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; goto __pyx_L1;}
    __pyx_12 = PyInt_FromLong(__pyx_v_self->target_index); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_12);
    __pyx_12 = 0;
    __pyx_5 = PyDict_New(); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; goto __pyx_L1;}
    __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; goto __pyx_L1;}
    __pyx_7 = __Pyx_GetItemInt(__pyx_1, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    if (PyDict_SetItem(__pyx_5, __pyx_n_path_utf8, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; goto __pyx_L1;}
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    __pyx_10 = PyEval_CallObjectWithKeywords(__pyx_9, __pyx_3, __pyx_5); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; goto __pyx_L1;}
    Py_DECREF(__pyx_9); __pyx_9 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_v_parent_entry);
    __pyx_v_parent_entry = __pyx_10;
    __pyx_10 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1292 */
    __pyx_6 = __pyx_v_parent_entry == Py_None;
    if (__pyx_6) {
      __pyx_11 = __Pyx_GetName(__pyx_m, __pyx_n_errors); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; goto __pyx_L1;}
      __pyx_8 = PyObject_GetAttr(__pyx_11, __pyx_n_DirstateCorrupt); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; goto __pyx_L1;}
      Py_DECREF(__pyx_11); __pyx_11 = 0;
      __pyx_12 = PyInt_FromLong(__pyx_v_self->target_index); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; goto __pyx_L1;}
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; goto __pyx_L1;}
      __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_7, 0, __pyx_12);
      PyTuple_SET_ITEM(__pyx_7, 1, __pyx_1);
      __pyx_12 = 0;
      __pyx_1 = 0;
      __pyx_9 = PyNumber_Remainder(__pyx_k83p, __pyx_7); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; goto __pyx_L1;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; goto __pyx_L1;}
      Py_INCREF(__pyx_v_self->state);
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self->state);
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_9);
      __pyx_9 = 0;
      __pyx_5 = PyObject_CallObject(__pyx_8, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; goto __pyx_L1;}
      Py_DECREF(__pyx_8); __pyx_8 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __Pyx_Raise(__pyx_5, 0, 0);
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; goto __pyx_L1;}
      goto __pyx_L34;
    }
    __pyx_L34:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1297 */
    __pyx_10 = __Pyx_GetItemInt(__pyx_v_parent_entry, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; goto __pyx_L1;}
    __pyx_11 = __Pyx_GetItemInt(__pyx_10, 2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; goto __pyx_L1;}
    Py_DECREF(__pyx_10); __pyx_10 = 0;
    Py_DECREF(__pyx_v_parent_id);
    __pyx_v_parent_id = __pyx_11;
    __pyx_11 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1298 */
    __pyx_12 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; goto __pyx_L1;}
    __pyx_1 = __Pyx_GetItemInt(__pyx_12, 2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; goto __pyx_L1;}
    Py_DECREF(__pyx_12); __pyx_12 = 0;
    if (PyObject_Cmp(__pyx_v_parent_id, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; goto __pyx_L1;}
    __pyx_2 = __pyx_2 == 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    if (__pyx_2) {
      Py_INCREF(Py_None);
      Py_DECREF(__pyx_v_parent_id);
      __pyx_v_parent_id = Py_None;
      goto __pyx_L35;
    }
    __pyx_L35:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1300 */
    __pyx_6 = __pyx_v_path_info != Py_None;
    if (__pyx_6) {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1302 */
      __pyx_2 = PyObject_IsTrue(__pyx_v_self->use_filesystem_for_exec); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; goto __pyx_L1;}
      if (__pyx_2) {
        __pyx_9 = __Pyx_GetItemInt(__pyx_v_path_info, 3); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;}
        __pyx_8 = PyObject_GetAttr(__pyx_9, __pyx_n_st_mode); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;}
        Py_DECREF(__pyx_9); __pyx_9 = 0;
        __pyx_6 = PyInt_AsLong(__pyx_8); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;}
        Py_DECREF(__pyx_8); __pyx_8 = 0;
        __pyx_7 = PyInt_FromLong(S_ISREG(__pyx_6)); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;}
        __pyx_2 = PyObject_IsTrue(__pyx_7); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;}
        if (__pyx_2) {
          Py_DECREF(__pyx_7); __pyx_7 = 0;
          __pyx_3 = PyInt_FromLong(S_IXUSR); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;}
          __pyx_5 = __Pyx_GetItemInt(__pyx_v_path_info, 3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;}
          __pyx_10 = PyObject_GetAttr(__pyx_5, __pyx_n_st_mode); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;}
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          __pyx_7 = PyNumber_And(__pyx_3, __pyx_10); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          Py_DECREF(__pyx_10); __pyx_10 = 0;
        }
        __pyx_6 = PyObject_IsTrue(__pyx_7); if (__pyx_6 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; goto __pyx_L1;}
        Py_DECREF(__pyx_7); __pyx_7 = 0;
        __pyx_11 = PyInt_FromLong(__pyx_6); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; goto __pyx_L1;}
        Py_DECREF(__pyx_v_target_exec);
        __pyx_v_target_exec = __pyx_11;
        __pyx_11 = 0;
        goto __pyx_L37;
      }
      /*else*/ {
        __pyx_12 = __Pyx_GetItemInt(__pyx_v_target_details, 3); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; goto __pyx_L1;}
        Py_DECREF(__pyx_v_target_exec);
        __pyx_v_target_exec = __pyx_12;
        __pyx_12 = 0;
      }
      __pyx_L37:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1310 */
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; goto __pyx_L1;}
      __pyx_9 = __Pyx_GetItemInt(__pyx_1, 2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; goto __pyx_L1;}
      Py_INCREF(__pyx_v_path);
      PyTuple_SET_ITEM(__pyx_8, 0, __pyx_v_path);
      __pyx_5 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_8); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; goto __pyx_L1;}
      Py_DECREF(__pyx_8); __pyx_8 = 0;
      __pyx_3 = __Pyx_GetItemInt(__pyx_5, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_10 = PyTuple_New(2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_10, 0, Py_None);
      PyTuple_SET_ITEM(__pyx_10, 1, __pyx_3);
      __pyx_3 = 0;
      __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; goto __pyx_L1;}
      Py_INCREF(Py_False);
      PyTuple_SET_ITEM(__pyx_7, 0, Py_False);
      Py_INCREF(Py_True);
      PyTuple_SET_ITEM(__pyx_7, 1, Py_True);
      __pyx_11 = PyTuple_New(2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_11, 0, Py_None);
      Py_INCREF(__pyx_v_parent_id);
      PyTuple_SET_ITEM(__pyx_11, 1, __pyx_v_parent_id);
      __pyx_12 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; goto __pyx_L1;}
      __pyx_1 = __Pyx_GetItemInt(__pyx_12, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; goto __pyx_L1;}
      Py_DECREF(__pyx_12); __pyx_12 = 0;
      __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_8, 0, __pyx_1);
      __pyx_1 = 0;
      __pyx_5 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_8); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; goto __pyx_L1;}
      Py_DECREF(__pyx_8); __pyx_8 = 0;
      __pyx_3 = __Pyx_GetItemInt(__pyx_5, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_12 = PyTuple_New(2); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_12, 0, Py_None);
      PyTuple_SET_ITEM(__pyx_12, 1, __pyx_3);
      __pyx_3 = 0;
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_path_info, 2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; goto __pyx_L1;}
      __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_8, 0, Py_None);
      PyTuple_SET_ITEM(__pyx_8, 1, __pyx_1);
      __pyx_1 = 0;
      __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_5, 0, Py_None);
      Py_INCREF(__pyx_v_target_exec);
      PyTuple_SET_ITEM(__pyx_5, 1, __pyx_v_target_exec);
      __pyx_3 = PyTuple_New(8); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_9);
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_10);
      Py_INCREF(Py_True);
      PyTuple_SET_ITEM(__pyx_3, 2, Py_True);
      PyTuple_SET_ITEM(__pyx_3, 3, __pyx_7);
      PyTuple_SET_ITEM(__pyx_3, 4, __pyx_11);
      PyTuple_SET_ITEM(__pyx_3, 5, __pyx_12);
      PyTuple_SET_ITEM(__pyx_3, 6, __pyx_8);
      PyTuple_SET_ITEM(__pyx_3, 7, __pyx_5);
      __pyx_9 = 0;
      __pyx_10 = 0;
      __pyx_7 = 0;
      __pyx_11 = 0;
      __pyx_12 = 0;
      __pyx_8 = 0;
      __pyx_5 = 0;
      __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1310; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
      Py_INCREF(Py_True);
      PyTuple_SET_ITEM(__pyx_1, 1, Py_True);
      __pyx_3 = 0;
      __pyx_r = __pyx_1;
      __pyx_1 = 0;
      goto __pyx_L0;
      goto __pyx_L36;
    }
    /*else*/ {
      __pyx_9 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; goto __pyx_L1;}
      __pyx_10 = __Pyx_GetItemInt(__pyx_9, 2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; goto __pyx_L1;}
      Py_DECREF(__pyx_9); __pyx_9 = 0;
      __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; goto __pyx_L1;}
      Py_INCREF(__pyx_v_path);
      PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_path);
      __pyx_11 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_7); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; goto __pyx_L1;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      __pyx_12 = __Pyx_GetItemInt(__pyx_11, 0); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; goto __pyx_L1;}
      Py_DECREF(__pyx_11); __pyx_11 = 0;
      __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_8, 0, Py_None);
      PyTuple_SET_ITEM(__pyx_8, 1, __pyx_12);
      __pyx_12 = 0;
      __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; goto __pyx_L1;}
      Py_INCREF(Py_False);
      PyTuple_SET_ITEM(__pyx_5, 0, Py_False);
      Py_INCREF(Py_True);
      PyTuple_SET_ITEM(__pyx_5, 1, Py_True);
      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_3, 0, Py_None);
      Py_INCREF(__pyx_v_parent_id);
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_parent_id);
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; goto __pyx_L1;}
      __pyx_9 = __Pyx_GetItemInt(__pyx_1, 1); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_7, 0, __pyx_9);
      __pyx_9 = 0;
      __pyx_11 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_7); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; goto __pyx_L1;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      __pyx_12 = __Pyx_GetItemInt(__pyx_11, 0); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; goto __pyx_L1;}
      Py_DECREF(__pyx_11); __pyx_11 = 0;
      __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_1, 0, Py_None);
      PyTuple_SET_ITEM(__pyx_1, 1, __pyx_12);
      __pyx_12 = 0;
      __pyx_9 = PyTuple_New(2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_9, 0, Py_None);
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_9, 1, Py_None);
      __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_7, 0, Py_None);
      Py_INCREF(Py_False);
      PyTuple_SET_ITEM(__pyx_7, 1, Py_False);
      __pyx_11 = PyTuple_New(8); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_11, 0, __pyx_10);
      PyTuple_SET_ITEM(__pyx_11, 1, __pyx_8);
      Py_INCREF(Py_False);
      PyTuple_SET_ITEM(__pyx_11, 2, Py_False);
      PyTuple_SET_ITEM(__pyx_11, 3, __pyx_5);
      PyTuple_SET_ITEM(__pyx_11, 4, __pyx_3);
      PyTuple_SET_ITEM(__pyx_11, 5, __pyx_1);
      PyTuple_SET_ITEM(__pyx_11, 6, __pyx_9);
      PyTuple_SET_ITEM(__pyx_11, 7, __pyx_7);
      __pyx_10 = 0;
      __pyx_8 = 0;
      __pyx_5 = 0;
      __pyx_3 = 0;
      __pyx_1 = 0;
      __pyx_9 = 0;
      __pyx_7 = 0;
      __pyx_12 = PyTuple_New(2); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_12, 0, __pyx_11);
      Py_INCREF(Py_True);
      PyTuple_SET_ITEM(__pyx_12, 1, Py_True);
      __pyx_11 = 0;
      __pyx_r = __pyx_12;
      __pyx_12 = 0;
      goto __pyx_L0;
    }
    __pyx_L36:;
    goto __pyx_L5;
  }
  __pyx_2 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_source_minikind);
  if (__pyx_2) {
    __pyx_2 = (__pyx_v_target_minikind == 'a');
  }
  if (__pyx_2) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1333 */
    __pyx_10 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; goto __pyx_L1;}
    __pyx_8 = __Pyx_GetItemInt(__pyx_10, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; goto __pyx_L1;}
    Py_DECREF(__pyx_10); __pyx_10 = 0;
    __pyx_5 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; goto __pyx_L1;}
    __pyx_3 = __Pyx_GetItemInt(__pyx_5, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_8);
    PyTuple_SET_ITEM(__pyx_1, 1, __pyx_3);
    __pyx_8 = 0;
    __pyx_3 = 0;
    __pyx_9 = PyObject_CallObject(__pyx_v_self->pathjoin, __pyx_1); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_v_old_path);
    __pyx_v_old_path = __pyx_9;
    __pyx_9 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1335 */
    __pyx_7 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__get_entry); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;}
    __pyx_11 = PyInt_FromLong(__pyx_v_self->source_index); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;}
    __pyx_12 = PyTuple_New(1); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_12, 0, __pyx_11);
    __pyx_11 = 0;
    __pyx_10 = PyDict_New(); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;}
    __pyx_5 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;}
    __pyx_8 = __Pyx_GetItemInt(__pyx_5, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    if (PyDict_SetItem(__pyx_10, __pyx_n_path_utf8, __pyx_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;}
    Py_DECREF(__pyx_8); __pyx_8 = 0;
    __pyx_3 = PyEval_CallObjectWithKeywords(__pyx_7, __pyx_12, __pyx_10); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;}
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    Py_DECREF(__pyx_12); __pyx_12 = 0;
    Py_DECREF(__pyx_10); __pyx_10 = 0;
    __pyx_1 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    __pyx_9 = __Pyx_GetItemInt(__pyx_1, 2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_v_parent_id);
    __pyx_v_parent_id = __pyx_9;
    __pyx_9 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1336 */
    __pyx_11 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; goto __pyx_L1;}
    __pyx_5 = __Pyx_GetItemInt(__pyx_11, 2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; goto __pyx_L1;}
    Py_DECREF(__pyx_11); __pyx_11 = 0;
    if (PyObject_Cmp(__pyx_v_parent_id, __pyx_5, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; goto __pyx_L1;}
    __pyx_6 = __pyx_6 == 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    if (__pyx_6) {
      Py_INCREF(Py_None);
      Py_DECREF(__pyx_v_parent_id);
      __pyx_v_parent_id = Py_None;
      goto __pyx_L38;
    }
    __pyx_L38:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1338 */
    __pyx_8 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;}
    __pyx_7 = __Pyx_GetItemInt(__pyx_8, 2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;}
    Py_DECREF(__pyx_8); __pyx_8 = 0;
    __pyx_12 = PyTuple_New(1); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;}
    Py_INCREF(__pyx_v_old_path);
    PyTuple_SET_ITEM(__pyx_12, 0, __pyx_v_old_path);
    __pyx_10 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_12); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;}
    Py_DECREF(__pyx_12); __pyx_12 = 0;
    __pyx_3 = __Pyx_GetItemInt(__pyx_10, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;}
    Py_DECREF(__pyx_10); __pyx_10 = 0;
    __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
    Py_INCREF(Py_None);
    PyTuple_SET_ITEM(__pyx_1, 1, Py_None);
    __pyx_3 = 0;
    __pyx_9 = PyTuple_New(2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; goto __pyx_L1;}
    Py_INCREF(Py_True);
    PyTuple_SET_ITEM(__pyx_9, 0, Py_True);
    Py_INCREF(Py_False);
    PyTuple_SET_ITEM(__pyx_9, 1, Py_False);
    __pyx_11 = PyTuple_New(2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; goto __pyx_L1;}
    Py_INCREF(__pyx_v_parent_id);
    PyTuple_SET_ITEM(__pyx_11, 0, __pyx_v_parent_id);
    Py_INCREF(Py_None);
    PyTuple_SET_ITEM(__pyx_11, 1, Py_None);
    __pyx_5 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; goto __pyx_L1;}
    __pyx_8 = __Pyx_GetItemInt(__pyx_5, 1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_12 = PyTuple_New(1); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_12, 0, __pyx_8);
    __pyx_8 = 0;
    __pyx_10 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_12); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; goto __pyx_L1;}
    Py_DECREF(__pyx_12); __pyx_12 = 0;
    __pyx_3 = __Pyx_GetItemInt(__pyx_10, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; goto __pyx_L1;}
    Py_DECREF(__pyx_10); __pyx_10 = 0;
    __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
    Py_INCREF(Py_None);
    PyTuple_SET_ITEM(__pyx_5, 1, Py_None);
    __pyx_3 = 0;
    __pyx_8 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_to_kind(__pyx_v_source_minikind); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; goto __pyx_L1;}
    __pyx_12 = PyTuple_New(2); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_12, 0, __pyx_8);
    Py_INCREF(Py_None);
    PyTuple_SET_ITEM(__pyx_12, 1, Py_None);
    __pyx_8 = 0;
    __pyx_10 = __Pyx_GetItemInt(__pyx_v_source_details, 3); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_10);
    Py_INCREF(Py_None);
    PyTuple_SET_ITEM(__pyx_3, 1, Py_None);
    __pyx_10 = 0;
    __pyx_8 = PyTuple_New(8); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_8, 0, __pyx_7);
    PyTuple_SET_ITEM(__pyx_8, 1, __pyx_1);
    Py_INCREF(Py_True);
    PyTuple_SET_ITEM(__pyx_8, 2, Py_True);
    PyTuple_SET_ITEM(__pyx_8, 3, __pyx_9);
    PyTuple_SET_ITEM(__pyx_8, 4, __pyx_11);
    PyTuple_SET_ITEM(__pyx_8, 5, __pyx_5);
    PyTuple_SET_ITEM(__pyx_8, 6, __pyx_12);
    PyTuple_SET_ITEM(__pyx_8, 7, __pyx_3);
    __pyx_7 = 0;
    __pyx_1 = 0;
    __pyx_9 = 0;
    __pyx_11 = 0;
    __pyx_5 = 0;
    __pyx_12 = 0;
    __pyx_3 = 0;
    __pyx_10 = PyTuple_New(2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_10, 0, __pyx_8);
    Py_INCREF(Py_True);
    PyTuple_SET_ITEM(__pyx_10, 1, Py_True);
    __pyx_8 = 0;
    __pyx_r = __pyx_10;
    __pyx_10 = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_2 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_source_minikind);
  if (__pyx_2) {
    __pyx_2 = (__pyx_v_target_minikind == 'r');
  }
  if (__pyx_2) {
    __pyx_6 = (!__pyx_v_self->doing_consistency_expansion);
    if (__pyx_6) {
      __pyx_7 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; goto __pyx_L1;}
      __pyx_1 = PyObject_GetAttr(__pyx_7, __pyx_n_is_inside_any); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; goto __pyx_L1;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      __pyx_9 = __Pyx_GetItemInt(__pyx_v_target_details, 1); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; goto __pyx_L1;}
      __pyx_11 = PyTuple_New(2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; goto __pyx_L1;}
      Py_INCREF(__pyx_v_self->searched_specific_files);
      PyTuple_SET_ITEM(__pyx_11, 0, __pyx_v_self->searched_specific_files);
      PyTuple_SET_ITEM(__pyx_11, 1, __pyx_9);
      __pyx_9 = 0;
      __pyx_5 = PyObject_CallObject(__pyx_1, __pyx_11); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_11); __pyx_11 = 0;
      __pyx_2 = PyObject_IsTrue(__pyx_5); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_6 = (!__pyx_2);
    }
    if (__pyx_6) {
      __pyx_12 = PyObject_GetAttr(__pyx_v_self->search_specific_files, __pyx_n_add); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; goto __pyx_L1;}
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_target_details, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; goto __pyx_L1;}
      __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_8, 0, __pyx_3);
      __pyx_3 = 0;
      __pyx_10 = PyObject_CallObject(__pyx_12, __pyx_8); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; goto __pyx_L1;}
      Py_DECREF(__pyx_12); __pyx_12 = 0;
      Py_DECREF(__pyx_8); __pyx_8 = 0;
      Py_DECREF(__pyx_10); __pyx_10 = 0;
      goto __pyx_L39;
    }
    __pyx_L39:;
    goto __pyx_L5;
  }
  __pyx_2 = (__pyx_v_source_minikind == 'r');
  if (!__pyx_2) {
    __pyx_2 = (__pyx_v_source_minikind == 'a');
  }
  if (__pyx_2) {
    __pyx_2 = (__pyx_v_target_minikind == 'r');
    if (!__pyx_2) {
      __pyx_2 = (__pyx_v_target_minikind == 'a');
    }
  }
  if (__pyx_2) {
    goto __pyx_L5;
  }
  /*else*/ {
    __pyx_7 = PyInt_FromLong(__pyx_v_source_minikind); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; goto __pyx_L1;}
    __pyx_9 = PyInt_FromLong(__pyx_v_target_minikind); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; goto __pyx_L1;}
    __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_7);
    PyTuple_SET_ITEM(__pyx_1, 1, __pyx_9);
    __pyx_7 = 0;
    __pyx_9 = 0;
    __pyx_11 = PyNumber_Remainder(__pyx_k84p, __pyx_1); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_11);
    __pyx_11 = 0;
    __pyx_3 = PyObject_CallObject(PyExc_AssertionError, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __Pyx_Raise(__pyx_3, 0, 0);
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; goto __pyx_L1;}
  }
  __pyx_L5:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1369 */
  __pyx_12 = PyTuple_New(2); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; goto __pyx_L1;}
  Py_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_12, 0, Py_None);
  Py_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_12, 1, Py_None);
  __pyx_r = __pyx_12;
  __pyx_12 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_7);
  Py_XDECREF(__pyx_8);
  Py_XDECREF(__pyx_9);
  Py_XDECREF(__pyx_10);
  Py_XDECREF(__pyx_11);
  Py_XDECREF(__pyx_12);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._process_entry");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_file_id);
  Py_DECREF(__pyx_v_details_list);
  Py_DECREF(__pyx_v_source_details);
  Py_DECREF(__pyx_v_target_details);
  Py_DECREF(__pyx_v_link_or_sha1);
  Py_DECREF(__pyx_v_old_dirname);
  Py_DECREF(__pyx_v_old_basename);
  Py_DECREF(__pyx_v_old_path);
  Py_DECREF(__pyx_v_path);
  Py_DECREF(__pyx_v_old_entry);
  Py_DECREF(__pyx_v_target_kind);
  Py_DECREF(__pyx_v_target_exec);
  Py_DECREF(__pyx_v_statvalue);
  Py_DECREF(__pyx_v_source_parent_id);
  Py_DECREF(__pyx_v__);
  Py_DECREF(__pyx_v_source_parent_entry);
  Py_DECREF(__pyx_v_new_dirname);
  Py_DECREF(__pyx_v_target_parent_id);
  Py_DECREF(__pyx_v_target_parent_entry);
  Py_DECREF(__pyx_v_source_exec);
  Py_DECREF(__pyx_v_changed);
  Py_DECREF(__pyx_v_old_path_u);
  Py_DECREF(__pyx_v_path_u);
  Py_DECREF(__pyx_v_source_kind);
  Py_DECREF(__pyx_v_parent_entry);
  Py_DECREF(__pyx_v_parent_id);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_entry);
  Py_DECREF(__pyx_v_path_info);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC___iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC___iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_iter_changes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_iter_changes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__gather_result_for_consistency(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self,PyObject *__pyx_v_result) {
  PyObject *__pyx_v_new_path;
  int __pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  int __pyx_3;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  PyObject *__pyx_7 = 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_result);
  __pyx_v_new_path = Py_None; Py_INCREF(Py_None);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1384 */
  __pyx_1 = (!__pyx_v_self->partial);
  if (!__pyx_1) {
    __pyx_2 = __Pyx_GetItemInt(__pyx_v_result, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1384; goto __pyx_L1;}
    __pyx_3 = PyObject_IsTrue(__pyx_2); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1384; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_1 = (!__pyx_3);
  }
  if (__pyx_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1386 */
  __pyx_2 = PyObject_GetAttr(__pyx_v_self->seen_ids, __pyx_n_add); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; goto __pyx_L1;}
  __pyx_4 = __Pyx_GetItemInt(__pyx_v_result, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; goto __pyx_L1;}
  __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_5, 0, __pyx_4);
  __pyx_4 = 0;
  __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  Py_DECREF(__pyx_4); __pyx_4 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1387 */
  __pyx_2 = __Pyx_GetItemInt(__pyx_v_result, 1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1387; goto __pyx_L1;}
  __pyx_5 = __Pyx_GetItemInt(__pyx_2, 1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1387; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_v_new_path);
  __pyx_v_new_path = __pyx_5;
  __pyx_5 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1388 */
  __pyx_3 = PyObject_IsTrue(__pyx_v_new_path); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; goto __pyx_L1;}
  if (__pyx_3) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1390 */
    __pyx_4 = PyObject_GetAttr(__pyx_v_self->search_specific_file_parents, __pyx_n_update); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; goto __pyx_L1;}
    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; goto __pyx_L1;}
    __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_parent_directories); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyObject_GetAttr(__pyx_v_new_path, __pyx_n_encode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; goto __pyx_L1;}
    __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; goto __pyx_L1;}
    Py_INCREF(__pyx_n_utf8);
    PyTuple_SET_ITEM(__pyx_6, 0, __pyx_n_utf8);
    __pyx_7 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_7);
    __pyx_7 = 0;
    __pyx_6 = PyObject_CallObject(__pyx_5, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; goto __pyx_L1;}
    PyTuple_SET_ITEM(__pyx_7, 0, __pyx_6);
    __pyx_6 = 0;
    __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_7); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1394 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self->search_specific_file_parents, __pyx_n_add); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; goto __pyx_L1;}
    __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; goto __pyx_L1;}
    Py_INCREF(__pyx_k5p);
    PyTuple_SET_ITEM(__pyx_6, 0, __pyx_k5p);
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1395 */
  __pyx_r = 0;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  Py_XDECREF(__pyx_7);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._gather_result_for_consistency");
  __pyx_r = (-1);
  __pyx_L0:;
  Py_DECREF(__pyx_v_new_path);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_result);
  return __pyx_r;
}

static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__update_current_block(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self) {
  int __pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_ssize_t __pyx_3;
  int __pyx_4;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  Py_INCREF(__pyx_v_self);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1398 */
  __pyx_2 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__dirblocks); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; goto __pyx_L1;}
  __pyx_3 = PyObject_Length(__pyx_2); if (__pyx_3 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_1 = PyInt_FromLong((__pyx_v_self->block_index < __pyx_3)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; goto __pyx_L1;}
  __pyx_4 = PyObject_IsTrue(__pyx_1); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; goto __pyx_L1;}
  if (__pyx_4) {
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;}
    __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_is_inside); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__dirblocks); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;}
    __pyx_6 = __Pyx_GetItemInt(__pyx_2, __pyx_v_self->block_index); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = __Pyx_GetItemInt(__pyx_6, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;}
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;}
    Py_INCREF(__pyx_v_self->current_root);
    PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_self->current_root);
    PyTuple_SET_ITEM(__pyx_6, 1, __pyx_2);
    __pyx_2 = 0;
    __pyx_1 = PyObject_CallObject(__pyx_5, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
  }
  __pyx_4 = PyObject_IsTrue(__pyx_1); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_4) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1400 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__dirblocks); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; goto __pyx_L1;}
    __pyx_5 = __Pyx_GetItemInt(__pyx_2, __pyx_v_self->block_index); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_v_self->current_block);
    __pyx_v_self->current_block = __pyx_5;
    __pyx_5 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1401 */
    __pyx_6 = __Pyx_GetItemInt(__pyx_v_self->current_block, 1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1401; goto __pyx_L1;}
    Py_DECREF(__pyx_v_self->current_block_list);
    __pyx_v_self->current_block_list = __pyx_6;
    __pyx_6 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1402 */
    __pyx_v_self->current_block_pos = 0;
    goto __pyx_L2;
  }
  /*else*/ {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1404 */
    Py_INCREF(Py_None);
    Py_DECREF(__pyx_v_self->current_block);
    __pyx_v_self->current_block = Py_None;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1405 */
    Py_INCREF(Py_None);
    Py_DECREF(__pyx_v_self->current_block_list);
    __pyx_v_self->current_block_list = Py_None;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1406 */
  __pyx_r = 0;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._update_current_block");
  __pyx_r = (-1);
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC___next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC___next__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->__pyx_vtab)->_iter_next(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; goto __pyx_L1;}
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC.__next__");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__iter_next(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self) {
  PyObject *__pyx_v_current_dirname;
  PyObject *__pyx_v_current_blockname;
  char *__pyx_v_current_dirname_c;
  char *__pyx_v_current_blockname_c;
  int __pyx_v_path_handled;
  PyObject *__pyx_v_searched_specific_files;
  PyObject *__pyx_v_entry;
  PyObject *__pyx_v_result;
  PyObject *__pyx_v_changed;
  PyObject *__pyx_v__;
  PyObject *__pyx_v_root_stat;
  PyObject *__pyx_v_e;
  PyObject *__pyx_v_new_executable;
  PyObject *__pyx_v_e_winerror;
  PyObject *__pyx_v_win_errors;
  PyObject *__pyx_v_bzr_index;
  PyObject *__pyx_v_initial_key;
  PyObject *__pyx_v_current_path_info;
  PyObject *__pyx_v_current_entry;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  Py_ssize_t __pyx_6;
  PyObject *__pyx_7 = 0;
  PyObject *__pyx_8 = 0;
  int __pyx_9;
  PyObject *__pyx_10 = 0;
  PyObject *__pyx_11 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_current_dirname = Py_None; Py_INCREF(Py_None);
  __pyx_v_current_blockname = Py_None; Py_INCREF(Py_None);
  __pyx_v_searched_specific_files = Py_None; Py_INCREF(Py_None);
  __pyx_v_entry = Py_None; Py_INCREF(Py_None);
  __pyx_v_result = Py_None; Py_INCREF(Py_None);
  __pyx_v_changed = Py_None; Py_INCREF(Py_None);
  __pyx_v__ = Py_None; Py_INCREF(Py_None);
  __pyx_v_root_stat = Py_None; Py_INCREF(Py_None);
  __pyx_v_e = Py_None; Py_INCREF(Py_None);
  __pyx_v_new_executable = Py_None; Py_INCREF(Py_None);
  __pyx_v_e_winerror = Py_None; Py_INCREF(Py_None);
  __pyx_v_win_errors = Py_None; Py_INCREF(Py_None);
  __pyx_v_bzr_index = Py_None; Py_INCREF(Py_None);
  __pyx_v_initial_key = Py_None; Py_INCREF(Py_None);
  __pyx_v_current_path_info = Py_None; Py_INCREF(Py_None);
  __pyx_v_current_entry = Py_None; Py_INCREF(Py_None);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1464 */
  Py_INCREF(__pyx_v_self->searched_specific_files);
  Py_DECREF(__pyx_v_searched_specific_files);
  __pyx_v_searched_specific_files = __pyx_v_self->searched_specific_files;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1466 */
  while (1) {
    __pyx_1 = (__pyx_v_self->root_entries_pos < __pyx_v_self->root_entries_len);
    if (!__pyx_1) break;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1467 */
    __pyx_2 = __Pyx_GetItemInt(__pyx_v_self->root_entries, __pyx_v_self->root_entries_pos); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; goto __pyx_L1;}
    Py_DECREF(__pyx_v_entry);
    __pyx_v_entry = __pyx_2;
    __pyx_2 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1468 */
    __pyx_v_self->root_entries_pos = (__pyx_v_self->root_entries_pos + 1);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1469 */
    __pyx_2 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self,__pyx_v_entry,__pyx_v_self->root_dir_info); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;}
    __pyx_3 = PyObject_GetIter(__pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_2 = __Pyx_UnpackItem(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;}
    Py_DECREF(__pyx_v_result);
    __pyx_v_result = __pyx_2;
    __pyx_2 = 0;
    __pyx_2 = __Pyx_UnpackItem(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;}
    Py_DECREF(__pyx_v_changed);
    __pyx_v_changed = __pyx_2;
    __pyx_2 = 0;
    if (__Pyx_EndUnpack(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1470 */
    __pyx_1 = __pyx_v_changed != Py_None;
    if (__pyx_1) {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1471 */
      __pyx_1 = PyObject_IsTrue(__pyx_v_changed); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; goto __pyx_L1;}
      if (__pyx_1) {
        __pyx_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_gather_result_for_consistency(__pyx_v_self,__pyx_v_result); if (__pyx_1 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; goto __pyx_L1;}
        goto __pyx_L5;
      }
      __pyx_L5:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1473 */
      __pyx_2 = __pyx_v_changed;
      Py_INCREF(__pyx_2);
      __pyx_1 = PyObject_IsTrue(__pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; goto __pyx_L1;}
      if (!__pyx_1) {
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        __pyx_2 = PyInt_FromLong(__pyx_v_self->include_unchanged); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; goto __pyx_L1;}
      }
      __pyx_1 = PyObject_IsTrue(__pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      if (__pyx_1) {
        Py_INCREF(__pyx_v_result);
        __pyx_r = __pyx_v_result;
        goto __pyx_L0;
        goto __pyx_L6;
      }
      __pyx_L6:;
      goto __pyx_L4;
    }
    __pyx_L4:;
  }

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1476 */
  __pyx_1 = __pyx_v_self->current_root == Py_None;
  if (__pyx_1) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1479 */
    /*try:*/ {
      __pyx_3 = PyObject_GetAttr(__pyx_v_self->search_specific_files, __pyx_n_pop); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; goto __pyx_L8;}
      __pyx_2 = PyObject_CallObject(__pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1480; goto __pyx_L8;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_v_self->current_root);
      __pyx_v_self->current_root = __pyx_2;
      __pyx_2 = 0;
    }
    goto __pyx_L9;
    __pyx_L8:;
    Py_XDECREF(__pyx_3); __pyx_3 = 0;
    Py_XDECREF(__pyx_2); __pyx_2 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1481 */
    __pyx_1 = PyErr_ExceptionMatches(PyExc_KeyError);
    if (__pyx_1) {
      __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._iter_next");
      if (__Pyx_GetException(&__pyx_3, &__pyx_2, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;}
      Py_INCREF(__pyx_2);
      Py_DECREF(__pyx_v__);
      __pyx_v__ = __pyx_2;
      __pyx_5 = PyObject_CallObject(PyExc_StopIteration, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; goto __pyx_L1;}
      __Pyx_Raise(__pyx_5, 0, 0);
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      goto __pyx_L9;
    }
    goto __pyx_L1;
    __pyx_L9:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1483 */
    __pyx_5 = PyObject_GetAttr(__pyx_v_self->searched_specific_files, __pyx_n_add); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; goto __pyx_L1;}
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; goto __pyx_L1;}
    Py_INCREF(__pyx_v_self->current_root);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self->current_root);
    __pyx_2 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1486 */
    __pyx_4 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__entries_for_path); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; goto __pyx_L1;}
    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; goto __pyx_L1;}
    Py_INCREF(__pyx_v_self->current_root);
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_self->current_root);
    __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1486; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_v_self->root_entries);
    __pyx_v_self->root_entries = __pyx_3;
    __pyx_3 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1487 */
    __pyx_6 = PyObject_Length(__pyx_v_self->root_entries); if (__pyx_6 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; goto __pyx_L1;}
    __pyx_v_self->root_entries_len = __pyx_6;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1488 */
    __pyx_2 = PyObject_GetAttr(__pyx_v_self->current_root, __pyx_n_decode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; goto __pyx_L1;}
    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; goto __pyx_L1;}
    Py_INCREF(__pyx_n_utf8);
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_n_utf8);
    __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1488; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    Py_DECREF(__pyx_v_self->current_root_unicode);
    __pyx_v_self->current_root_unicode = __pyx_5;
    __pyx_5 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1489 */
    __pyx_3 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n_abspath); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; goto __pyx_L1;}
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; goto __pyx_L1;}
    Py_INCREF(__pyx_v_self->current_root_unicode);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self->current_root_unicode);
    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_v_self->root_abspath);
    __pyx_v_self->root_abspath = __pyx_4;
    __pyx_4 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1490 */
    /*try:*/ {
      __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; goto __pyx_L10;}
      __pyx_3 = PyObject_GetAttr(__pyx_5, __pyx_n_lstat); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; goto __pyx_L10;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; goto __pyx_L10;}
      Py_INCREF(__pyx_v_self->root_abspath);
      PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self->root_abspath);
      __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; goto __pyx_L10;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_v_root_stat);
      __pyx_v_root_stat = __pyx_4;
      __pyx_4 = 0;
    }
    /*else:*/ {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1500 */
      __pyx_7 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; goto __pyx_L1;}
      __pyx_4 = PyObject_GetAttr(__pyx_7, __pyx_n_file_kind_from_stat_mode); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; goto __pyx_L1;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      __pyx_8 = PyObject_GetAttr(__pyx_v_root_stat, __pyx_n_st_mode); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; goto __pyx_L1;}
      __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_5, 0, __pyx_8);
      __pyx_8 = 0;
      __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_2 = PyTuple_New(5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; goto __pyx_L1;}
      Py_INCREF(__pyx_k5p);
      PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k5p);
      Py_INCREF(__pyx_v_self->current_root);
      PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_self->current_root);
      PyTuple_SET_ITEM(__pyx_2, 2, __pyx_3);
      Py_INCREF(__pyx_v_root_stat);
      PyTuple_SET_ITEM(__pyx_2, 3, __pyx_v_root_stat);
      Py_INCREF(__pyx_v_self->root_abspath);
      PyTuple_SET_ITEM(__pyx_2, 4, __pyx_v_self->root_abspath);
      __pyx_3 = 0;
      Py_DECREF(__pyx_v_self->root_dir_info);
      __pyx_v_self->root_dir_info = __pyx_2;
      __pyx_2 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1503 */
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1503; goto __pyx_L1;}
      if (PyObject_Cmp(__pyx_7, __pyx_n_directory, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1503; goto __pyx_L1;}
      __pyx_1 = __pyx_1 == 0;
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      if (__pyx_1) {
        __pyx_8 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n__directory_is_tree_reference); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; goto __pyx_L1;}
        __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; goto __pyx_L1;}
        Py_INCREF(__pyx_v_self->current_root_unicode);
        PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_self->current_root_unicode);
        __pyx_5 = PyObject_CallObject(__pyx_8, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; goto __pyx_L1;}
        Py_DECREF(__pyx_8); __pyx_8 = 0;
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        if (__pyx_1) {
          __pyx_3 = PySequence_GetSlice(__pyx_v_self->root_dir_info, 0, 2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; goto __pyx_L1;}
          __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1507; goto __pyx_L1;}
          Py_INCREF(__pyx_k80p);
          PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k80p);
          __pyx_7 = PyNumber_Add(__pyx_3, __pyx_2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; goto __pyx_L1;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          __pyx_8 = PySequence_GetSlice(__pyx_v_self->root_dir_info, 3, PY_SSIZE_T_MAX); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1507; goto __pyx_L1;}
          __pyx_4 = PyNumber_Add(__pyx_7, __pyx_8); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1507; goto __pyx_L1;}
          Py_DECREF(__pyx_7); __pyx_7 = 0;
          Py_DECREF(__pyx_8); __pyx_8 = 0;
          Py_DECREF(__pyx_v_self->root_dir_info);
          __pyx_v_self->root_dir_info = __pyx_4;
          __pyx_4 = 0;
          goto __pyx_L13;
        }
        __pyx_L13:;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    goto __pyx_L11;
    __pyx_L10:;
    Py_XDECREF(__pyx_5); __pyx_5 = 0;
    Py_XDECREF(__pyx_3); __pyx_3 = 0;
    Py_XDECREF(__pyx_2); __pyx_2 = 0;
    Py_XDECREF(__pyx_4); __pyx_4 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1492 */
    __pyx_1 = PyErr_ExceptionMatches(PyExc_OSError);
    if (__pyx_1) {
      __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._iter_next");
      if (__Pyx_GetException(&__pyx_5, &__pyx_3, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1492; goto __pyx_L1;}
      Py_INCREF(__pyx_3);
      Py_DECREF(__pyx_v_e);
      __pyx_v_e = __pyx_3;
      __pyx_4 = PyObject_GetAttr(__pyx_v_e, __pyx_n_errno); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; goto __pyx_L1;}
      __pyx_7 = __Pyx_GetName(__pyx_m, __pyx_n_errno); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; goto __pyx_L1;}
      __pyx_8 = PyObject_GetAttr(__pyx_7, __pyx_n_ENOENT); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; goto __pyx_L1;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      if (PyObject_Cmp(__pyx_4, __pyx_8, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; goto __pyx_L1;}
      __pyx_1 = __pyx_1 == 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_8); __pyx_8 = 0;
      if (__pyx_1) {
        Py_INCREF(Py_None);
        Py_DECREF(__pyx_v_self->root_dir_info);
        __pyx_v_self->root_dir_info = Py_None;
        goto __pyx_L14;
      }
      /*else*/ {
        __Pyx_Raise(__pyx_5, __pyx_3, __pyx_2);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; goto __pyx_L1;}
      }
      __pyx_L14:;
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      goto __pyx_L11;
    }
    goto __pyx_L1;
    __pyx_L11:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1508 */
    __pyx_9 = PyObject_IsTrue(__pyx_v_self->root_entries); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; goto __pyx_L1;}
    __pyx_1 = (!__pyx_9);
    if (__pyx_1) {
      __pyx_9 = PyObject_IsTrue(__pyx_v_self->root_dir_info); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1508; goto __pyx_L1;}
      __pyx_1 = (!__pyx_9);
    }
    if (__pyx_1) {
      __pyx_5 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_iter_next(__pyx_v_self); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1512; goto __pyx_L1;}
      __pyx_r = __pyx_5;
      __pyx_5 = 0;
      goto __pyx_L0;
      goto __pyx_L15;
    }
    __pyx_L15:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1513 */
    __pyx_v_path_handled = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1514 */
    __pyx_v_self->root_entries_pos = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1519 */
    while (1) {
      __pyx_9 = (__pyx_v_self->root_entries_pos < __pyx_v_self->root_entries_len);
      if (!__pyx_9) break;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1520 */
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_self->root_entries, __pyx_v_self->root_entries_pos); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1520; goto __pyx_L1;}
      Py_DECREF(__pyx_v_entry);
      __pyx_v_entry = __pyx_3;
      __pyx_3 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1521 */
      __pyx_v_self->root_entries_pos = (__pyx_v_self->root_entries_pos + 1);

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1522 */
      __pyx_2 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self,__pyx_v_entry,__pyx_v_self->root_dir_info); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; goto __pyx_L1;}
      __pyx_7 = PyObject_GetIter(__pyx_2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      __pyx_8 = __Pyx_UnpackItem(__pyx_7); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; goto __pyx_L1;}
      Py_DECREF(__pyx_v_result);
      __pyx_v_result = __pyx_8;
      __pyx_8 = 0;
      __pyx_4 = __Pyx_UnpackItem(__pyx_7); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; goto __pyx_L1;}
      Py_DECREF(__pyx_v_changed);
      __pyx_v_changed = __pyx_4;
      __pyx_4 = 0;
      if (__Pyx_EndUnpack(__pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; goto __pyx_L1;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1523 */
      __pyx_1 = __pyx_v_changed != Py_None;
      if (__pyx_1) {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1524 */
        __pyx_v_path_handled = (-1);

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1525 */
        __pyx_9 = PyObject_IsTrue(__pyx_v_changed); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
        if (__pyx_9) {
          __pyx_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_gather_result_for_consistency(__pyx_v_self,__pyx_v_result); if (__pyx_1 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; goto __pyx_L1;}
          goto __pyx_L19;
        }
        __pyx_L19:;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1527 */
        __pyx_5 = __pyx_v_changed;
        Py_INCREF(__pyx_5);
        __pyx_9 = PyObject_IsTrue(__pyx_5); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; goto __pyx_L1;}
        if (!__pyx_9) {
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          __pyx_5 = PyInt_FromLong(__pyx_v_self->include_unchanged); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; goto __pyx_L1;}
        }
        __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        if (__pyx_1) {
          Py_INCREF(__pyx_v_result);
          __pyx_r = __pyx_v_result;
          goto __pyx_L0;
          goto __pyx_L20;
        }
        __pyx_L20:;
        goto __pyx_L18;
      }
      __pyx_L18:;
    }

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1530 */
    __pyx_3 = PyInt_FromLong(__pyx_v_self->want_unversioned); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; goto __pyx_L1;}
    __pyx_9 = PyObject_IsTrue(__pyx_3); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; goto __pyx_L1;}
    if (__pyx_9) {
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_3 = PyInt_FromLong((!__pyx_v_path_handled)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; goto __pyx_L1;}
      __pyx_1 = PyObject_IsTrue(__pyx_3); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; goto __pyx_L1;}
      if (__pyx_1) {
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        __pyx_3 = __pyx_v_self->root_dir_info;
        Py_INCREF(__pyx_3);
      }
    }
    __pyx_9 = PyObject_IsTrue(__pyx_3); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    if (__pyx_9) {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1531 */
      __pyx_8 = __Pyx_GetName(__pyx_m, __pyx_n_stat); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; goto __pyx_L1;}
      __pyx_4 = PyObject_GetAttr(__pyx_8, __pyx_n_S_ISREG); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; goto __pyx_L1;}
      Py_DECREF(__pyx_8); __pyx_8 = 0;
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; goto __pyx_L1;}
      __pyx_5 = PyObject_GetAttr(__pyx_7, __pyx_n_st_mode); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; goto __pyx_L1;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_5);
      __pyx_5 = 0;
      __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_1 = PyObject_IsTrue(__pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; goto __pyx_L1;}
      if (__pyx_1) {
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        __pyx_8 = __Pyx_GetName(__pyx_m, __pyx_n_stat); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; goto __pyx_L1;}
        __pyx_7 = PyObject_GetAttr(__pyx_8, __pyx_n_S_IEXEC); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; goto __pyx_L1;}
        Py_DECREF(__pyx_8); __pyx_8 = 0;
        __pyx_5 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; goto __pyx_L1;}
        __pyx_4 = PyObject_GetAttr(__pyx_5, __pyx_n_st_mode); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        __pyx_2 = PyNumber_And(__pyx_7, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; goto __pyx_L1;}
        Py_DECREF(__pyx_7); __pyx_7 = 0;
        Py_DECREF(__pyx_4); __pyx_4 = 0;
      }
      __pyx_9 = PyObject_IsTrue(__pyx_2); if (__pyx_9 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      __pyx_3 = PyInt_FromLong(__pyx_9); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; goto __pyx_L1;}
      Py_DECREF(__pyx_v_new_executable);
      __pyx_v_new_executable = __pyx_3;
      __pyx_3 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1534 */
      __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_8, 0, Py_None);
      Py_INCREF(__pyx_v_self->current_root_unicode);
      PyTuple_SET_ITEM(__pyx_8, 1, __pyx_v_self->current_root_unicode);
      __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; goto __pyx_L1;}
      Py_INCREF(Py_False);
      PyTuple_SET_ITEM(__pyx_5, 0, Py_False);
      Py_INCREF(Py_False);
      PyTuple_SET_ITEM(__pyx_5, 1, Py_False);
      __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_7, 0, Py_None);
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_7, 1, Py_None);
      __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_splitpath); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; goto __pyx_L1;}
      __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; goto __pyx_L1;}
      Py_INCREF(__pyx_v_self->current_root_unicode);
      PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self->current_root_unicode);
      __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      __pyx_4 = __Pyx_GetItemInt(__pyx_3, (-1)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_2, 0, Py_None);
      PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4);
      __pyx_4 = 0;
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; goto __pyx_L1;}
      __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1540; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_4, 0, Py_None);
      PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
      __pyx_3 = 0;
      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_3, 0, Py_None);
      Py_INCREF(__pyx_v_new_executable);
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_new_executable);
      __pyx_10 = PyTuple_New(8); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1534; goto __pyx_L1;}
      Py_INCREF(Py_None);
      PyTuple_SET_ITEM(__pyx_10, 0, Py_None);
      PyTuple_SET_ITEM(__pyx_10, 1, __pyx_8);
      Py_INCREF(Py_True);
      PyTuple_SET_ITEM(__pyx_10, 2, Py_True);
      PyTuple_SET_ITEM(__pyx_10, 3, __pyx_5);
      PyTuple_SET_ITEM(__pyx_10, 4, __pyx_7);
      PyTuple_SET_ITEM(__pyx_10, 5, __pyx_2);
      PyTuple_SET_ITEM(__pyx_10, 6, __pyx_4);
      PyTuple_SET_ITEM(__pyx_10, 7, __pyx_3);
      __pyx_8 = 0;
      __pyx_5 = 0;
      __pyx_7 = 0;
      __pyx_2 = 0;
      __pyx_4 = 0;
      __pyx_3 = 0;
      __pyx_r = __pyx_10;
      __pyx_10 = 0;
      goto __pyx_L0;
      goto __pyx_L21;
    }
    __pyx_L21:;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1545 */
  __pyx_1 = __pyx_v_self->current_dir_info == Py_None;
  if (__pyx_1) {
    __pyx_1 = __pyx_v_self->current_block == Py_None;
    if (__pyx_1) {
      __pyx_1 = (!__pyx_v_self->doing_consistency_expansion);
    }
  }
  if (__pyx_1) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1548 */
    Py_INCREF(Py_None);
    Py_DECREF(__pyx_v_self->current_dir_list);
    __pyx_v_self->current_dir_list = Py_None;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1549 */
    __pyx_8 = __pyx_v_self->root_dir_info;
    Py_INCREF(__pyx_8);
    __pyx_9 = PyObject_IsTrue(__pyx_8); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1549; goto __pyx_L1;}
    if (__pyx_9) {
      Py_DECREF(__pyx_8); __pyx_8 = 0;
      __pyx_5 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1549; goto __pyx_L1;}
      if (PyObject_Cmp(__pyx_5, __pyx_k80p, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1549; goto __pyx_L1;}
      __pyx_1 = __pyx_1 == 0;
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_8 = PyInt_FromLong(__pyx_1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1549; goto __pyx_L1;}
    }
    __pyx_9 = PyObject_IsTrue(__pyx_8); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1549; goto __pyx_L1;}
    Py_DECREF(__pyx_8); __pyx_8 = 0;
    if (__pyx_9) {
      Py_INCREF(Py_None);
      Py_DECREF(__pyx_v_self->current_dir_info);
      __pyx_v_self->current_dir_info = Py_None;
      goto __pyx_L23;
    }
    /*else*/ {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1552 */
      __pyx_7 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; goto __pyx_L1;}
      __pyx_2 = PyObject_GetAttr(__pyx_7, __pyx_n__walkdirs_utf8); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; goto __pyx_L1;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; goto __pyx_L1;}
      Py_INCREF(__pyx_v_self->root_abspath);
      PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_self->root_abspath);
      __pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; goto __pyx_L1;}
      if (PyDict_SetItem(__pyx_3, __pyx_n_prefix, __pyx_v_self->current_root) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; goto __pyx_L1;}
      __pyx_10 = PyEval_CallObjectWithKeywords(__pyx_2, __pyx_4, __pyx_3); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_v_self->dir_iterator);
      __pyx_v_self->dir_iterator = __pyx_10;
      __pyx_10 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1554 */
      __pyx_v_self->path_index = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1555 */
      /*try:*/ {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1556 */
        __pyx_5 = PyObject_GetAttr(__pyx_v_self->dir_iterator, __pyx_n_next); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; goto __pyx_L24;}
        __pyx_8 = PyObject_CallObject(__pyx_5, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; goto __pyx_L24;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        Py_DECREF(__pyx_v_self->current_dir_info);
        __pyx_v_self->current_dir_info = __pyx_8;
        __pyx_8 = 0;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1557 */
        __pyx_7 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1557; goto __pyx_L24;}
        Py_DECREF(__pyx_v_self->current_dir_list);
        __pyx_v_self->current_dir_list = __pyx_7;
        __pyx_7 = 0;
      }
      /*else:*/ {
        __pyx_5 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1581; goto __pyx_L1;}
        __pyx_11 = __Pyx_GetItemInt(__pyx_5, 0); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1581; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        if (PyObject_Cmp(__pyx_11, __pyx_k5p, &__pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1581; goto __pyx_L1;}
        __pyx_9 = __pyx_9 == 0;
        Py_DECREF(__pyx_11); __pyx_11 = 0;
        if (__pyx_9) {

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1583 */
          __pyx_10 = PyTuple_New(1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; goto __pyx_L1;}
          Py_INCREF(__pyx_k106p);
          PyTuple_SET_ITEM(__pyx_10, 0, __pyx_k106p);
          __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; goto __pyx_L1;}
          Py_INCREF(__pyx_v_self->current_dir_list);
          PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_self->current_dir_list);
          PyTuple_SET_ITEM(__pyx_7, 1, __pyx_10);
          __pyx_10 = 0;
          __pyx_8 = PyObject_CallObject(__pyx_v_self->bisect_left, __pyx_7); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; goto __pyx_L1;}
          Py_DECREF(__pyx_7); __pyx_7 = 0;
          Py_DECREF(__pyx_v_bzr_index);
          __pyx_v_bzr_index = __pyx_8;
          __pyx_8 = 0;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1584 */
          __pyx_2 = PyObject_GetItem(__pyx_v_self->current_dir_list, __pyx_v_bzr_index); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1584; goto __pyx_L1;}
          __pyx_4 = __Pyx_GetItemInt(__pyx_2, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1584; goto __pyx_L1;}
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          if (PyObject_Cmp(__pyx_4, __pyx_k106p, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1584; goto __pyx_L1;}
          __pyx_1 = __pyx_1 != 0;
          Py_DECREF(__pyx_4); __pyx_4 = 0;
          if (__pyx_1) {
            __pyx_3 = PyObject_CallObject(PyExc_AssertionError, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1585; goto __pyx_L1;}
            __Pyx_Raise(__pyx_3, 0, 0);
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1585; goto __pyx_L1;}
            goto __pyx_L27;
          }
          __pyx_L27:;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1586 */
          if (PyObject_DelItem(__pyx_v_self->current_dir_list, __pyx_v_bzr_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; goto __pyx_L1;}
          goto __pyx_L26;
        }
        __pyx_L26:;
      }
      goto __pyx_L25;
      __pyx_L24:;
      Py_XDECREF(__pyx_2); __pyx_2 = 0;
      Py_XDECREF(__pyx_4); __pyx_4 = 0;
      Py_XDECREF(__pyx_3); __pyx_3 = 0;
      Py_XDECREF(__pyx_10); __pyx_10 = 0;
      Py_XDECREF(__pyx_5); __pyx_5 = 0;
      Py_XDECREF(__pyx_8); __pyx_8 = 0;
      Py_XDECREF(__pyx_7); __pyx_7 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1558 */
      __pyx_1 = PyErr_ExceptionMatches(PyExc_OSError);
      if (__pyx_1) {
        __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._iter_next");
        if (__Pyx_GetException(&__pyx_2, &__pyx_4, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; goto __pyx_L1;}
        Py_INCREF(__pyx_4);
        Py_DECREF(__pyx_v_e);
        __pyx_v_e = __pyx_4;
        __pyx_10 = PyObject_GetAttr(__pyx_v_e, __pyx_n_errno); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; goto __pyx_L1;}
        __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_errno); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; goto __pyx_L1;}
        __pyx_8 = PyObject_GetAttr(__pyx_5, __pyx_n_ENOENT); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        __pyx_7 = __Pyx_GetName(__pyx_m, __pyx_n_errno); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; goto __pyx_L1;}
        __pyx_5 = PyObject_GetAttr(__pyx_7, __pyx_n_ENOTDIR); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; goto __pyx_L1;}
        Py_DECREF(__pyx_7); __pyx_7 = 0;
        __pyx_7 = __Pyx_GetName(__pyx_m, __pyx_n_errno); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; goto __pyx_L1;}
        __pyx_11 = PyObject_GetAttr(__pyx_7, __pyx_n_EINVAL); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; goto __pyx_L1;}
        Py_DECREF(__pyx_7); __pyx_7 = 0;
        __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; goto __pyx_L1;}
        PyTuple_SET_ITEM(__pyx_7, 0, __pyx_8);
        PyTuple_SET_ITEM(__pyx_7, 1, __pyx_5);
        PyTuple_SET_ITEM(__pyx_7, 2, __pyx_11);
        __pyx_8 = 0;
        __pyx_5 = 0;
        __pyx_11 = 0;
        __pyx_9 = PySequence_Contains(__pyx_7, __pyx_10); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; goto __pyx_L1;}
        Py_DECREF(__pyx_10); __pyx_10 = 0;
        Py_DECREF(__pyx_7); __pyx_7 = 0;
        if (__pyx_9) {
          Py_INCREF(Py_None);
          Py_DECREF(__pyx_v_self->current_dir_info);
          __pyx_v_self->current_dir_info = Py_None;
          goto __pyx_L28;
        }
        __pyx_8 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; goto __pyx_L1;}
        __pyx_5 = PyObject_GetAttr(__pyx_8, __pyx_n_platform); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; goto __pyx_L1;}
        Py_DECREF(__pyx_8); __pyx_8 = 0;
        if (PyObject_Cmp(__pyx_5, __pyx_n_win32, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; goto __pyx_L1;}
        __pyx_1 = __pyx_1 == 0;
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        if (__pyx_1) {

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1568 */
          /*try:*/ {
            __pyx_11 = PyObject_GetAttr(__pyx_v_e, __pyx_n_winerror); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1569; goto __pyx_L29;}
            Py_DECREF(__pyx_v_e_winerror);
            __pyx_v_e_winerror = __pyx_11;
            __pyx_11 = 0;
          }
          goto __pyx_L30;
          __pyx_L29:;
          Py_XDECREF(__pyx_10); __pyx_10 = 0;
          Py_XDECREF(__pyx_7); __pyx_7 = 0;
          Py_XDECREF(__pyx_8); __pyx_8 = 0;
          Py_XDECREF(__pyx_5); __pyx_5 = 0;
          Py_XDECREF(__pyx_11); __pyx_11 = 0;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1570 */
          __pyx_10 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1570; goto __pyx_L1;}
          __pyx_9 = PyErr_ExceptionMatches(__pyx_10);
          Py_DECREF(__pyx_10); __pyx_10 = 0;
          if (__pyx_9) {
            __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._iter_next");
            if (__Pyx_GetException(&__pyx_7, &__pyx_8, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1570; goto __pyx_L1;}
            Py_INCREF(__pyx_8);
            Py_DECREF(__pyx_v__);
            __pyx_v__ = __pyx_8;
            Py_INCREF(Py_None);
            Py_DECREF(__pyx_v_e_winerror);
            __pyx_v_e_winerror = Py_None;
            Py_DECREF(__pyx_7); __pyx_7 = 0;
            Py_DECREF(__pyx_8); __pyx_8 = 0;
            Py_DECREF(__pyx_5); __pyx_5 = 0;
            goto __pyx_L30;
          }
          goto __pyx_L1;
          __pyx_L30:;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1572 */
          __pyx_11 = PyInt_FromLong(__pyx_v_6bzrlib_21_dirstate_helpers_pyx_ERROR_DIRECTORY); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1572; goto __pyx_L1;}
          __pyx_10 = PyInt_FromLong(__pyx_v_6bzrlib_21_dirstate_helpers_pyx_ERROR_PATH_NOT_FOUND); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1572; goto __pyx_L1;}
          __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1572; goto __pyx_L1;}
          PyTuple_SET_ITEM(__pyx_7, 0, __pyx_11);
          PyTuple_SET_ITEM(__pyx_7, 1, __pyx_10);
          __pyx_11 = 0;
          __pyx_10 = 0;
          Py_DECREF(__pyx_v_win_errors);
          __pyx_v_win_errors = __pyx_7;
          __pyx_7 = 0;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1573 */
          __pyx_8 = PyObject_GetAttr(__pyx_v_e, __pyx_n_errno); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1573; goto __pyx_L1;}
          __pyx_1 = PySequence_Contains(__pyx_v_win_errors, __pyx_8); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1573; goto __pyx_L1;}
          Py_DECREF(__pyx_8); __pyx_8 = 0;
          if (!__pyx_1) {
            __pyx_1 = PySequence_Contains(__pyx_v_win_errors, __pyx_v_e_winerror); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1573; goto __pyx_L1;}
          }
          if (__pyx_1) {
            Py_INCREF(Py_None);
            Py_DECREF(__pyx_v_self->current_dir_info);
            __pyx_v_self->current_dir_info = Py_None;
            goto __pyx_L31;
          }
          /*else*/ {
            __Pyx_Raise(__pyx_2, __pyx_4, __pyx_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; goto __pyx_L1;}
          }
          __pyx_L31:;
          goto __pyx_L28;
        }
        /*else*/ {
          __Pyx_Raise(__pyx_2, __pyx_4, __pyx_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; goto __pyx_L1;}
        }
        __pyx_L28:;
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        goto __pyx_L25;
      }
      goto __pyx_L1;
      __pyx_L25:;
    }
    __pyx_L23:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1587 */
    __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; goto __pyx_L1;}
    Py_INCREF(__pyx_v_self->current_root);
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_self->current_root);
    Py_INCREF(__pyx_k5p);
    PyTuple_SET_ITEM(__pyx_5, 1, __pyx_k5p);
    Py_INCREF(__pyx_k5p);
    PyTuple_SET_ITEM(__pyx_5, 2, __pyx_k5p);
    Py_DECREF(__pyx_v_initial_key);
    __pyx_v_initial_key = __pyx_5;
    __pyx_5 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1588 */
    __pyx_11 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__find_block_index_from_key); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; goto __pyx_L1;}
    __pyx_10 = PyTuple_New(1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; goto __pyx_L1;}
    Py_INCREF(__pyx_v_initial_key);
    PyTuple_SET_ITEM(__pyx_10, 0, __pyx_v_initial_key);
    __pyx_7 = PyObject_CallObject(__pyx_11, __pyx_10); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; goto __pyx_L1;}
    Py_DECREF(__pyx_11); __pyx_11 = 0;
    Py_DECREF(__pyx_10); __pyx_10 = 0;
    __pyx_8 = PyObject_GetIter(__pyx_7); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; goto __pyx_L1;}
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    __pyx_2 = __Pyx_UnpackItem(__pyx_8); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; goto __pyx_L1;}
    __pyx_9 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_v_self->block_index = __pyx_9;
    __pyx_4 = __Pyx_UnpackItem(__pyx_8); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; goto __pyx_L1;}
    Py_DECREF(__pyx_v__);
    __pyx_v__ = __pyx_4;
    __pyx_4 = 0;
    if (__Pyx_EndUnpack(__pyx_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; goto __pyx_L1;}
    Py_DECREF(__pyx_8); __pyx_8 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1589 */
    __pyx_1 = (__pyx_v_self->block_index == 0);
    if (__pyx_1) {
      __pyx_v_self->block_index = (__pyx_v_self->block_index + 1);
      goto __pyx_L32;
    }
    __pyx_L32:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1593 */
    __pyx_9 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_update_current_block(__pyx_v_self); if (__pyx_9 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; goto __pyx_L1;}
    goto __pyx_L22;
  }
  __pyx_L22:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1596 */
  while (1) {
    __pyx_1 = __pyx_v_self->current_dir_info != Py_None;
    if (!__pyx_1) {
      __pyx_1 = __pyx_v_self->current_block != Py_None;
    }
    if (!__pyx_1) break;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1599 */
    __pyx_3 = __pyx_v_self->current_dir_info;
    Py_INCREF(__pyx_3);
    __pyx_9 = PyObject_IsTrue(__pyx_3); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; goto __pyx_L1;}
    if (__pyx_9) {
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_3 = __pyx_v_self->current_block;
      Py_INCREF(__pyx_3);
      __pyx_1 = PyObject_IsTrue(__pyx_3); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; goto __pyx_L1;}
      if (__pyx_1) {
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        __pyx_5 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; goto __pyx_L1;}
        __pyx_11 = __Pyx_GetItemInt(__pyx_5, 0); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        __pyx_10 = __Pyx_GetItemInt(__pyx_v_self->current_block, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; goto __pyx_L1;}
        if (PyObject_Cmp(__pyx_11, __pyx_10, &__pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; goto __pyx_L1;}
        __pyx_9 = __pyx_9 != 0;
        Py_DECREF(__pyx_11); __pyx_11 = 0;
        Py_DECREF(__pyx_10); __pyx_10 = 0;
        __pyx_3 = PyInt_FromLong(__pyx_9); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; goto __pyx_L1;}
      }
    }
    __pyx_1 = PyObject_IsTrue(__pyx_3); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    if (__pyx_1) {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1603 */
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1603; goto __pyx_L1;}
      __pyx_2 = __Pyx_GetItemInt(__pyx_7, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1603; goto __pyx_L1;}
      Py_DECREF(__pyx_7); __pyx_7 = 0;
      Py_DECREF(__pyx_v_current_dirname);
      __pyx_v_current_dirname = __pyx_2;
      __pyx_2 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1604 */
      __pyx_v_current_dirname_c = PyString_AS_STRING(((void *)__pyx_v_current_dirname));

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1606 */
      __pyx_4 = __Pyx_GetItemInt(__pyx_v_self->current_block, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1606; goto __pyx_L1;}
      Py_DECREF(__pyx_v_current_blockname);
      __pyx_v_current_blockname = __pyx_4;
      __pyx_4 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1607 */
      __pyx_v_current_blockname_c = PyString_AS_STRING(((void *)__pyx_v_current_blockname));

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1613 */
      __pyx_9 = (__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_by_dirs(__pyx_v_current_dirname_c,PyString_Size(__pyx_v_current_dirname),__pyx_v_current_blockname_c,PyString_Size(__pyx_v_current_blockname)) < 0);
      if (__pyx_9) {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1627 */
        while (1) {
          __pyx_6 = PyObject_Length(__pyx_v_self->current_dir_list); if (__pyx_6 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; goto __pyx_L1;}
          __pyx_1 = (__pyx_v_self->path_index < __pyx_6);
          if (!__pyx_1) break;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1628 */
          __pyx_8 = __Pyx_GetItemInt(__pyx_v_self->current_dir_list, __pyx_v_self->path_index); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; goto __pyx_L1;}
          Py_DECREF(__pyx_v_current_path_info);
          __pyx_v_current_path_info = __pyx_8;
          __pyx_8 = 0;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1631 */
          __pyx_5 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; goto __pyx_L1;}
          __pyx_11 = PyTuple_New(2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; goto __pyx_L1;}
          Py_INCREF(__pyx_n_directory);
          PyTuple_SET_ITEM(__pyx_11, 0, __pyx_n_directory);
          Py_INCREF(__pyx_k80p);
          PyTuple_SET_ITEM(__pyx_11, 1, __pyx_k80p);
          __pyx_9 = PySequence_Contains(__pyx_11, __pyx_5); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1631; goto __pyx_L1;}
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          Py_DECREF(__pyx_11); __pyx_11 = 0;
          if (__pyx_9) {

            /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1633 */
            if (PySequence_DelItem(__pyx_v_self->current_dir_list, __pyx_v_self->path_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; goto __pyx_L1;}

            /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1634 */
            __pyx_v_self->path_index = (__pyx_v_self->path_index - 1);
            goto __pyx_L39;
          }
          __pyx_L39:;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1635 */
          __pyx_v_self->path_index = (__pyx_v_self->path_index + 1);

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1636 */
          __pyx_1 = __pyx_v_self->want_unversioned;
          if (__pyx_1) {

            /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1637 */
            __pyx_10 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1637; goto __pyx_L1;}
            if (PyObject_Cmp(__pyx_10, __pyx_n_directory, &__pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1637; goto __pyx_L1;}
            __pyx_9 = __pyx_9 == 0;
            Py_DECREF(__pyx_10); __pyx_10 = 0;
            if (__pyx_9) {
              __pyx_3 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n__directory_is_tree_reference); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; goto __pyx_L1;}
              __pyx_7 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; goto __pyx_L1;}
              __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; goto __pyx_L1;}
              PyTuple_SET_ITEM(__pyx_2, 0, __pyx_7);
              __pyx_7 = 0;
              __pyx_4 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; goto __pyx_L1;}
              Py_DECREF(__pyx_2); __pyx_2 = 0;
              __pyx_8 = __Pyx_GetItemInt(__pyx_4, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; goto __pyx_L1;}
              Py_DECREF(__pyx_4); __pyx_4 = 0;
              __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; goto __pyx_L1;}
              PyTuple_SET_ITEM(__pyx_5, 0, __pyx_8);
              __pyx_8 = 0;
              __pyx_11 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; goto __pyx_L1;}
              Py_DECREF(__pyx_3); __pyx_3 = 0;
              Py_DECREF(__pyx_5); __pyx_5 = 0;
              __pyx_1 = PyObject_IsTrue(__pyx_11); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; goto __pyx_L1;}
              Py_DECREF(__pyx_11); __pyx_11 = 0;
              if (__pyx_1) {
                __pyx_10 = PySequence_GetSlice(__pyx_v_current_path_info, 0, 2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; goto __pyx_L1;}
                __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; goto __pyx_L1;}
                Py_INCREF(__pyx_k80p);
                PyTuple_SET_ITEM(__pyx_7, 0, __pyx_k80p);
                __pyx_2 = PyNumber_Add(__pyx_10, __pyx_7); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; goto __pyx_L1;}
                Py_DECREF(__pyx_10); __pyx_10 = 0;
                Py_DECREF(__pyx_7); __pyx_7 = 0;
                __pyx_4 = PySequence_GetSlice(__pyx_v_current_path_info, 3, PY_SSIZE_T_MAX); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; goto __pyx_L1;}
                __pyx_8 = PyNumber_Add(__pyx_2, __pyx_4); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; goto __pyx_L1;}
                Py_DECREF(__pyx_2); __pyx_2 = 0;
                Py_DECREF(__pyx_4); __pyx_4 = 0;
                Py_DECREF(__pyx_v_current_path_info);
                __pyx_v_current_path_info = __pyx_8;
                __pyx_8 = 0;
                goto __pyx_L42;
              }
              __pyx_L42:;
              goto __pyx_L41;
            }
            __pyx_L41:;

            /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1642 */
            __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_stat); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; goto __pyx_L1;}
            __pyx_11 = PyObject_GetAttr(__pyx_5, __pyx_n_S_ISREG); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; goto __pyx_L1;}
            Py_DECREF(__pyx_5); __pyx_5 = 0;
            __pyx_10 = __Pyx_GetItemInt(__pyx_v_current_path_info, 3); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; goto __pyx_L1;}
            __pyx_7 = PyObject_GetAttr(__pyx_10, __pyx_n_st_mode); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; goto __pyx_L1;}
            Py_DECREF(__pyx_10); __pyx_10 = 0;
            __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; goto __pyx_L1;}
            PyTuple_SET_ITEM(__pyx_2, 0, __pyx_7);
            __pyx_7 = 0;
            __pyx_3 = PyObject_CallObject(__pyx_11, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; goto __pyx_L1;}
            Py_DECREF(__pyx_11); __pyx_11 = 0;
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            __pyx_9 = PyObject_IsTrue(__pyx_3); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; goto __pyx_L1;}
            if (__pyx_9) {
              Py_DECREF(__pyx_3); __pyx_3 = 0;
              __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_stat); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; goto __pyx_L1;}
              __pyx_8 = PyObject_GetAttr(__pyx_4, __pyx_n_S_IEXEC); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; goto __pyx_L1;}
              Py_DECREF(__pyx_4); __pyx_4 = 0;
              __pyx_5 = __Pyx_GetItemInt(__pyx_v_current_path_info, 3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; goto __pyx_L1;}
              __pyx_10 = PyObject_GetAttr(__pyx_5, __pyx_n_st_mode); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; goto __pyx_L1;}
              Py_DECREF(__pyx_5); __pyx_5 = 0;
              __pyx_3 = PyNumber_And(__pyx_8, __pyx_10); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; goto __pyx_L1;}
              Py_DECREF(__pyx_8); __pyx_8 = 0;
              Py_DECREF(__pyx_10); __pyx_10 = 0;
            }
            __pyx_1 = PyObject_IsTrue(__pyx_3); if (__pyx_1 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; goto __pyx_L1;}
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            __pyx_7 = PyInt_FromLong(__pyx_1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; goto __pyx_L1;}
            Py_DECREF(__pyx_v_new_executable);
            __pyx_v_new_executable = __pyx_7;
            __pyx_7 = 0;

            /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1645 */
            __pyx_11 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; goto __pyx_L1;}
            __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; goto __pyx_L1;}
            PyTuple_SET_ITEM(__pyx_2, 0, __pyx_11);
            __pyx_11 = 0;
            __pyx_4 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; goto __pyx_L1;}
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            __pyx_5 = __Pyx_GetItemInt(__pyx_4, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; goto __pyx_L1;}
            Py_DECREF(__pyx_4); __pyx_4 = 0;
            __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; goto __pyx_L1;}
            Py_INCREF(Py_None);
            PyTuple_SET_ITEM(__pyx_8, 0, Py_None);
            PyTuple_SET_ITEM(__pyx_8, 1, __pyx_5);
            __pyx_5 = 0;
            __pyx_10 = PyTuple_New(2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; goto __pyx_L1;}
            Py_INCREF(Py_False);
            PyTuple_SET_ITEM(__pyx_10, 0, Py_False);
            Py_INCREF(Py_False);
            PyTuple_SET_ITEM(__pyx_10, 1, Py_False);
            __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;}
            Py_INCREF(Py_None);
            PyTuple_SET_ITEM(__pyx_3, 0, Py_None);
            Py_INCREF(Py_None);
            PyTuple_SET_ITEM(__pyx_3, 1, Py_None);
            __pyx_7 = __Pyx_GetItemInt(__pyx_v_current_path_info, 1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1650; goto __pyx_L1;}
            __pyx_11 = PyTuple_New(1); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1650; goto __pyx_L1;}
            PyTuple_SET_ITEM(__pyx_11, 0, __pyx_7);
            __pyx_7 = 0;
            __pyx_2 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_11); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1650; goto __pyx_L1;}
            Py_DECREF(__pyx_11); __pyx_11 = 0;
            __pyx_4 = __Pyx_GetItemInt(__pyx_2, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1650; goto __pyx_L1;}
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1650; goto __pyx_L1;}
            Py_INCREF(Py_None);
            PyTuple_SET_ITEM(__pyx_5, 0, Py_None);
            PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4);
            __pyx_4 = 0;
            __pyx_7 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; goto __pyx_L1;}
            __pyx_11 = PyTuple_New(2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; goto __pyx_L1;}
            Py_INCREF(Py_None);
            PyTuple_SET_ITEM(__pyx_11, 0, Py_None);
            PyTuple_SET_ITEM(__pyx_11, 1, __pyx_7);
            __pyx_7 = 0;
            __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1652; goto __pyx_L1;}
            Py_INCREF(Py_None);
            PyTuple_SET_ITEM(__pyx_2, 0, Py_None);
            Py_INCREF(__pyx_v_new_executable);
            PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_new_executable);
            __pyx_4 = PyTuple_New(8); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;}
            Py_INCREF(Py_None);
            PyTuple_SET_ITEM(__pyx_4, 0, Py_None);
            PyTuple_SET_ITEM(__pyx_4, 1, __pyx_8);
            Py_INCREF(Py_True);
            PyTuple_SET_ITEM(__pyx_4, 2, Py_True);
            PyTuple_SET_ITEM(__pyx_4, 3, __pyx_10);
            PyTuple_SET_ITEM(__pyx_4, 4, __pyx_3);
            PyTuple_SET_ITEM(__pyx_4, 5, __pyx_5);
            PyTuple_SET_ITEM(__pyx_4, 6, __pyx_11);
            PyTuple_SET_ITEM(__pyx_4, 7, __pyx_2);
            __pyx_8 = 0;
            __pyx_10 = 0;
            __pyx_3 = 0;
            __pyx_5 = 0;
            __pyx_11 = 0;
            __pyx_2 = 0;
            __pyx_r = __pyx_4;
            __pyx_4 = 0;
            goto __pyx_L0;
            goto __pyx_L40;
          }
          __pyx_L40:;
        }

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1654 */
        __pyx_v_self->path_index = 0;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1655 */
        Py_INCREF(Py_None);
        Py_DECREF(__pyx_v_self->current_dir_list);
        __pyx_v_self->current_dir_list = Py_None;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1656 */
        /*try:*/ {

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1657 */
          __pyx_7 = PyObject_GetAttr(__pyx_v_self->dir_iterator, __pyx_n_next); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; goto __pyx_L43;}
          __pyx_8 = PyObject_CallObject(__pyx_7, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; goto __pyx_L43;}
          Py_DECREF(__pyx_7); __pyx_7 = 0;
          Py_DECREF(__pyx_v_self->current_dir_info);
          __pyx_v_self->current_dir_info = __pyx_8;
          __pyx_8 = 0;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1658 */
          __pyx_10 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; goto __pyx_L43;}
          Py_DECREF(__pyx_v_self->current_dir_list);
          __pyx_v_self->current_dir_list = __pyx_10;
          __pyx_10 = 0;
        }
        goto __pyx_L44;
        __pyx_L43:;
        Py_XDECREF(__pyx_3); __pyx_3 = 0;
        Py_XDECREF(__pyx_5); __pyx_5 = 0;
        Py_XDECREF(__pyx_11); __pyx_11 = 0;
        Py_XDECREF(__pyx_2); __pyx_2 = 0;
        Py_XDECREF(__pyx_4); __pyx_4 = 0;
        Py_XDECREF(__pyx_7); __pyx_7 = 0;
        Py_XDECREF(__pyx_8); __pyx_8 = 0;
        Py_XDECREF(__pyx_10); __pyx_10 = 0;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1659 */
        __pyx_9 = PyErr_ExceptionMatches(PyExc_StopIteration);
        if (__pyx_9) {
          __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._iter_next");
          if (__Pyx_GetException(&__pyx_3, &__pyx_5, &__pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; goto __pyx_L1;}
          Py_INCREF(__pyx_5);
          Py_DECREF(__pyx_v__);
          __pyx_v__ = __pyx_5;
          Py_INCREF(Py_None);
          Py_DECREF(__pyx_v_self->current_dir_info);
          __pyx_v_self->current_dir_info = Py_None;
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          Py_DECREF(__pyx_11); __pyx_11 = 0;
          goto __pyx_L44;
        }
        goto __pyx_L1;
        __pyx_L44:;
        goto __pyx_L36;
      }
      /*else*/ {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1669 */
        while (1) {
          __pyx_6 = PyObject_Length(__pyx_v_self->current_block_list); if (__pyx_6 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; goto __pyx_L1;}
          __pyx_1 = (__pyx_v_self->current_block_pos < __pyx_6);
          if (!__pyx_1) break;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1670 */
          __pyx_2 = __Pyx_GetItemInt(__pyx_v_self->current_block_list, __pyx_v_self->current_block_pos); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; goto __pyx_L1;}
          Py_DECREF(__pyx_v_current_entry);
          __pyx_v_current_entry = __pyx_2;
          __pyx_2 = 0;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1671 */
          __pyx_v_self->current_block_pos = (__pyx_v_self->current_block_pos + 1);

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1674 */
          __pyx_4 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self,__pyx_v_current_entry,Py_None); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; goto __pyx_L1;}
          __pyx_7 = PyObject_GetIter(__pyx_4); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; goto __pyx_L1;}
          Py_DECREF(__pyx_4); __pyx_4 = 0;
          __pyx_8 = __Pyx_UnpackItem(__pyx_7); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; goto __pyx_L1;}
          Py_DECREF(__pyx_v_result);
          __pyx_v_result = __pyx_8;
          __pyx_8 = 0;
          __pyx_10 = __Pyx_UnpackItem(__pyx_7); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; goto __pyx_L1;}
          Py_DECREF(__pyx_v_changed);
          __pyx_v_changed = __pyx_10;
          __pyx_10 = 0;
          if (__Pyx_EndUnpack(__pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; goto __pyx_L1;}
          Py_DECREF(__pyx_7); __pyx_7 = 0;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1675 */
          __pyx_9 = __pyx_v_changed != Py_None;
          if (__pyx_9) {

            /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1676 */
            __pyx_1 = PyObject_IsTrue(__pyx_v_changed); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; goto __pyx_L1;}
            if (__pyx_1) {
              __pyx_9 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_gather_result_for_consistency(__pyx_v_self,__pyx_v_result); if (__pyx_9 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; goto __pyx_L1;}
              goto __pyx_L48;
            }
            __pyx_L48:;

            /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1678 */
            __pyx_3 = __pyx_v_changed;
            Py_INCREF(__pyx_3);
            __pyx_1 = PyObject_IsTrue(__pyx_3); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; goto __pyx_L1;}
            if (!__pyx_1) {
              Py_DECREF(__pyx_3); __pyx_3 = 0;
              __pyx_3 = PyInt_FromLong(__pyx_v_self->include_unchanged); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; goto __pyx_L1;}
            }
            __pyx_9 = PyObject_IsTrue(__pyx_3); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; goto __pyx_L1;}
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            if (__pyx_9) {
              Py_INCREF(__pyx_v_result);
              __pyx_r = __pyx_v_result;
              goto __pyx_L0;
              goto __pyx_L49;
            }
            __pyx_L49:;
            goto __pyx_L47;
          }
          __pyx_L47:;
        }

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1680 */
        __pyx_v_self->block_index = (__pyx_v_self->block_index + 1);

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1681 */
        __pyx_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_update_current_block(__pyx_v_self); if (__pyx_1 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; goto __pyx_L1;}
      }
      __pyx_L36:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1682 */
      goto __pyx_L33;
      goto __pyx_L35;
    }
    __pyx_L35:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1683 */
    __pyx_5 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_loop_one_block(__pyx_v_self); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;}
    Py_DECREF(__pyx_v_result);
    __pyx_v_result = __pyx_5;
    __pyx_5 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1684 */
    __pyx_9 = __pyx_v_result != Py_None;
    if (__pyx_9) {
      Py_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;
      goto __pyx_L50;
    }
    __pyx_L50:;
    __pyx_L33:;
  }

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1686 */
  __pyx_6 = PyObject_Length(__pyx_v_self->search_specific_files); if (__pyx_6 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; goto __pyx_L1;}
  if (__pyx_6) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1688 */
    Py_INCREF(Py_None);
    Py_DECREF(__pyx_v_self->current_root);
    __pyx_v_self->current_root = Py_None;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1689 */
    __pyx_11 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_iter_next(__pyx_v_self); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; goto __pyx_L1;}
    __pyx_r = __pyx_11;
    __pyx_11 = 0;
    goto __pyx_L0;
    goto __pyx_L51;
  }
  __pyx_L51:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1692 */
  __pyx_v_self->doing_consistency_expansion = 1;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1693 */
  __pyx_1 = PyObject_IsTrue(__pyx_v_self->_pending_consistent_entries); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; goto __pyx_L1;}
  __pyx_9 = (!__pyx_1);
  if (__pyx_9) {
    __pyx_2 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_next_consistent_entries(__pyx_v_self); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; goto __pyx_L1;}
    Py_DECREF(__pyx_v_self->_pending_consistent_entries);
    __pyx_v_self->_pending_consistent_entries = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L52;
  }
  __pyx_L52:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1695 */
  while (1) {
    __pyx_1 = PyObject_IsTrue(__pyx_v_self->_pending_consistent_entries); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; goto __pyx_L1;}
    if (!__pyx_1) break;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1696 */
    __pyx_4 = PyObject_GetAttr(__pyx_v_self->_pending_consistent_entries, __pyx_n_pop); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; goto __pyx_L1;}
    __pyx_8 = PyObject_CallObject(__pyx_4, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    __pyx_10 = PyObject_GetIter(__pyx_8); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; goto __pyx_L1;}
    Py_DECREF(__pyx_8); __pyx_8 = 0;
    __pyx_7 = __Pyx_UnpackItem(__pyx_10); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; goto __pyx_L1;}
    Py_DECREF(__pyx_v_result);
    __pyx_v_result = __pyx_7;
    __pyx_7 = 0;
    __pyx_3 = __Pyx_UnpackItem(__pyx_10); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; goto __pyx_L1;}
    Py_DECREF(__pyx_v_changed);
    __pyx_v_changed = __pyx_3;
    __pyx_3 = 0;
    if (__Pyx_EndUnpack(__pyx_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; goto __pyx_L1;}
    Py_DECREF(__pyx_10); __pyx_10 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1697 */
    __pyx_9 = __pyx_v_changed != Py_None;
    if (__pyx_9) {
      Py_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;
      goto __pyx_L55;
    }
    __pyx_L55:;
  }

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1699 */
  __pyx_5 = PyObject_CallObject(PyExc_StopIteration, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; goto __pyx_L1;}
  __Pyx_Raise(__pyx_5, 0, 0);
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; goto __pyx_L1;}

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_7);
  Py_XDECREF(__pyx_8);
  Py_XDECREF(__pyx_10);
  Py_XDECREF(__pyx_11);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._iter_next");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_current_dirname);
  Py_DECREF(__pyx_v_current_blockname);
  Py_DECREF(__pyx_v_searched_specific_files);
  Py_DECREF(__pyx_v_entry);
  Py_DECREF(__pyx_v_result);
  Py_DECREF(__pyx_v_changed);
  Py_DECREF(__pyx_v__);
  Py_DECREF(__pyx_v_root_stat);
  Py_DECREF(__pyx_v_e);
  Py_DECREF(__pyx_v_new_executable);
  Py_DECREF(__pyx_v_e_winerror);
  Py_DECREF(__pyx_v_win_errors);
  Py_DECREF(__pyx_v_bzr_index);
  Py_DECREF(__pyx_v_initial_key);
  Py_DECREF(__pyx_v_current_path_info);
  Py_DECREF(__pyx_v_current_entry);
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__maybe_tree_ref(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self,PyObject *__pyx_v_current_path_info) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_current_path_info);
  __pyx_1 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n__directory_is_tree_reference); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; goto __pyx_L1;}
  __pyx_2 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; goto __pyx_L1;}
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
  __pyx_2 = 0;
  __pyx_2 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  __pyx_3 = __Pyx_GetItemInt(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
  __pyx_3 = 0;
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_4 = PyObject_IsTrue(__pyx_3); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;
  if (__pyx_4) {
    __pyx_1 = PySequence_GetSlice(__pyx_v_current_path_info, 0, 2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; goto __pyx_L1;}
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; goto __pyx_L1;}
    Py_INCREF(__pyx_k80p);
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k80p);
    __pyx_3 = PyNumber_Add(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    __pyx_1 = PySequence_GetSlice(__pyx_v_current_path_info, 3, PY_SSIZE_T_MAX); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; goto __pyx_L1;}
    __pyx_2 = PyNumber_Add(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  /*else*/ {
    Py_INCREF(__pyx_v_current_path_info);
    __pyx_r = __pyx_v_current_path_info;
    goto __pyx_L0;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._maybe_tree_ref");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_current_path_info);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__loop_one_block(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self) {
  PyObject *__pyx_v_current_entry;
  PyObject *__pyx_v_current_path_info;
  int __pyx_v_path_handled;
  char __pyx_v_minikind;
  int __pyx_v_cmp_result;
  PyObject *__pyx_v_disk_kind;
  PyObject *__pyx_v_advance_entry;
  PyObject *__pyx_v_advance_path;
  PyObject *__pyx_v_result;
  PyObject *__pyx_v_changed;
  PyObject *__pyx_v_new_executable;
  PyObject *__pyx_v_relpath_unicode;
  PyObject *__pyx_v__;
  PyObject *__pyx_r;
  int __pyx_1;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  char __pyx_4;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  int __pyx_7;
  PyObject *__pyx_8 = 0;
  PyObject *__pyx_9 = 0;
  PyObject *__pyx_10 = 0;
  Py_ssize_t __pyx_11;
  Py_INCREF(__pyx_v_self);
  __pyx_v_current_entry = Py_None; Py_INCREF(Py_None);
  __pyx_v_current_path_info = Py_None; Py_INCREF(Py_None);
  __pyx_v_disk_kind = Py_None; Py_INCREF(Py_None);
  __pyx_v_advance_entry = Py_None; Py_INCREF(Py_None);
  __pyx_v_advance_path = Py_None; Py_INCREF(Py_None);
  __pyx_v_result = Py_None; Py_INCREF(Py_None);
  __pyx_v_changed = Py_None; Py_INCREF(Py_None);
  __pyx_v_new_executable = Py_None; Py_INCREF(Py_None);
  __pyx_v_relpath_unicode = Py_None; Py_INCREF(Py_None);
  __pyx_v__ = Py_None; Py_INCREF(Py_None);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1722 */
  __pyx_1 = __pyx_v_self->current_block != Py_None;
  if (__pyx_1) {
    __pyx_1 = (__pyx_v_self->current_block_pos < PyList_GET_SIZE(__pyx_v_self->current_block_list));
  }
  if (__pyx_1) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1724 */
    __pyx_2 = PyList_GET_ITEM(__pyx_v_self->current_block_list,__pyx_v_self->current_block_pos); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1724; goto __pyx_L1;}
    Py_DECREF(__pyx_v_current_entry);
    __pyx_v_current_entry = __pyx_2;
    __pyx_2 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1727 */
    Py_INCREF(__pyx_v_current_entry);
    goto __pyx_L2;
  }
  /*else*/ {
    Py_INCREF(Py_None);
    Py_DECREF(__pyx_v_current_entry);
    __pyx_v_current_entry = Py_None;
  }
  __pyx_L2:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1730 */
  __pyx_1 = __pyx_v_self->current_dir_info != Py_None;
  if (__pyx_1) {
    __pyx_1 = (__pyx_v_self->path_index < PyList_GET_SIZE(__pyx_v_self->current_dir_list));
  }
  if (__pyx_1) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1732 */
    __pyx_2 = PyList_GET_ITEM(__pyx_v_self->current_dir_list,__pyx_v_self->path_index); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1732; goto __pyx_L1;}
    Py_DECREF(__pyx_v_current_path_info);
    __pyx_v_current_path_info = __pyx_2;
    __pyx_2 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1735 */
    Py_INCREF(__pyx_v_current_path_info);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1736 */
    __pyx_2 = PyTuple_GET_ITEM(__pyx_v_current_path_info,2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1736; goto __pyx_L1;}
    Py_DECREF(__pyx_v_disk_kind);
    __pyx_v_disk_kind = __pyx_2;
    __pyx_2 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1738 */
    Py_INCREF(__pyx_v_disk_kind);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1739 */
    if (PyObject_Cmp(__pyx_v_disk_kind, __pyx_n_directory, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1739; goto __pyx_L1;}
    __pyx_1 = __pyx_1 == 0;
    if (__pyx_1) {
      __pyx_2 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_maybe_tree_ref(__pyx_v_self,__pyx_v_current_path_info); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; goto __pyx_L1;}
      Py_DECREF(__pyx_v_current_path_info);
      __pyx_v_current_path_info = __pyx_2;
      __pyx_2 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  /*else*/ {
    Py_INCREF(Py_None);
    Py_DECREF(__pyx_v_current_path_info);
    __pyx_v_current_path_info = Py_None;
  }
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1743 */
  while (1) {
    __pyx_1 = __pyx_v_current_entry != Py_None;
    if (!__pyx_1) {
      __pyx_1 = __pyx_v_current_path_info != Py_None;
    }
    if (!__pyx_1) break;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1744 */
    __pyx_2 = PyInt_FromLong((-1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; goto __pyx_L1;}
    Py_DECREF(__pyx_v_advance_entry);
    __pyx_v_advance_entry = __pyx_2;
    __pyx_2 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1745 */
    __pyx_2 = PyInt_FromLong((-1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; goto __pyx_L1;}
    Py_DECREF(__pyx_v_advance_path);
    __pyx_v_advance_path = __pyx_2;
    __pyx_2 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1746 */
    Py_INCREF(Py_None);
    Py_DECREF(__pyx_v_result);
    __pyx_v_result = Py_None;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1747 */
    __pyx_v_path_handled = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1748 */
    __pyx_1 = __pyx_v_current_entry == Py_None;
    if (__pyx_1) {
      goto __pyx_L7;
    }
    __pyx_1 = __pyx_v_current_path_info == Py_None;
    if (__pyx_1) {
      __pyx_2 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self,__pyx_v_current_entry,__pyx_v_current_path_info); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; goto __pyx_L1;}
      __pyx_3 = PyObject_GetIter(__pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      __pyx_2 = __Pyx_UnpackItem(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; goto __pyx_L1;}
      Py_DECREF(__pyx_v_result);
      __pyx_v_result = __pyx_2;
      __pyx_2 = 0;
      __pyx_2 = __Pyx_UnpackItem(__pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; goto __pyx_L1;}
      Py_DECREF(__pyx_v_changed);
      __pyx_v_changed = __pyx_2;
      __pyx_2 = 0;
      if (__Pyx_EndUnpack(__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      goto __pyx_L7;
    }
    /*else*/ {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1757 */
      __pyx_2 = __Pyx_GetItemInt(__pyx_v_current_entry, 1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; goto __pyx_L1;}
      __pyx_3 = __Pyx_GetItemInt(__pyx_2, __pyx_v_self->target_index); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      __pyx_2 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_4 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_from_string(__pyx_2); if (__pyx_4 == (-1) && PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      __pyx_v_minikind = __pyx_4;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1759 */
      __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_cmp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; goto __pyx_L1;}
      __pyx_2 = __Pyx_GetItemInt(__pyx_v_current_path_info, 1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; goto __pyx_L1;}
      __pyx_5 = __Pyx_GetItemInt(__pyx_v_current_entry, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; goto __pyx_L1;}
      __pyx_6 = __Pyx_GetItemInt(__pyx_5, 1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2);
      PyTuple_SET_ITEM(__pyx_5, 1, __pyx_6);
      __pyx_2 = 0;
      __pyx_6 = 0;
      __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_1 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      __pyx_v_cmp_result = __pyx_1;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1760 */
      __pyx_1 = __pyx_v_cmp_result;
      if (!__pyx_1) {
        __pyx_1 = (__pyx_v_minikind == 'a');
        if (!__pyx_1) {
          __pyx_1 = (__pyx_v_minikind == 'r');
        }
      }
      if (__pyx_1) {
        __pyx_1 = (__pyx_v_cmp_result < 0);
        if (__pyx_1) {
          __pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1772; goto __pyx_L1;}
          Py_DECREF(__pyx_v_advance_entry);
          __pyx_v_advance_entry = __pyx_6;
          __pyx_6 = 0;
          goto __pyx_L9;
        }
        /*else*/ {

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1776 */
          __pyx_3 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self,__pyx_v_current_entry,Py_None); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; goto __pyx_L1;}
          __pyx_5 = PyObject_GetIter(__pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; goto __pyx_L1;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          __pyx_2 = __Pyx_UnpackItem(__pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; goto __pyx_L1;}
          Py_DECREF(__pyx_v_result);
          __pyx_v_result = __pyx_2;
          __pyx_2 = 0;
          __pyx_6 = __Pyx_UnpackItem(__pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; goto __pyx_L1;}
          Py_DECREF(__pyx_v_changed);
          __pyx_v_changed = __pyx_6;
          __pyx_6 = 0;
          if (__Pyx_EndUnpack(__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; goto __pyx_L1;}
          Py_DECREF(__pyx_5); __pyx_5 = 0;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1778 */
          __pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1778; goto __pyx_L1;}
          Py_DECREF(__pyx_v_advance_path);
          __pyx_v_advance_path = __pyx_3;
          __pyx_3 = 0;
        }
        __pyx_L9:;
        goto __pyx_L8;
      }
      /*else*/ {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1782 */
        __pyx_2 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self,__pyx_v_current_entry,__pyx_v_current_path_info); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; goto __pyx_L1;}
        __pyx_6 = PyObject_GetIter(__pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; goto __pyx_L1;}
        Py_DECREF(__pyx_2); __pyx_2 = 0;
        __pyx_5 = __Pyx_UnpackItem(__pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; goto __pyx_L1;}
        Py_DECREF(__pyx_v_result);
        __pyx_v_result = __pyx_5;
        __pyx_5 = 0;
        __pyx_3 = __Pyx_UnpackItem(__pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; goto __pyx_L1;}
        Py_DECREF(__pyx_v_changed);
        __pyx_v_changed = __pyx_3;
        __pyx_3 = 0;
        if (__Pyx_EndUnpack(__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1782; goto __pyx_L1;}
        Py_DECREF(__pyx_6); __pyx_6 = 0;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1784 */
        __pyx_1 = __pyx_v_changed != Py_None;
        if (__pyx_1) {

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1785 */
          __pyx_v_path_handled = (-1);

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1786 */
          __pyx_7 = PyObject_IsTrue(__pyx_v_changed); if (__pyx_7 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1786; goto __pyx_L1;}
          __pyx_1 = (!__pyx_7);
          if (__pyx_1) {
            __pyx_1 = (!__pyx_v_self->include_unchanged);
          }
          if (__pyx_1) {
            Py_INCREF(Py_None);
            Py_DECREF(__pyx_v_changed);
            __pyx_v_changed = Py_None;
            goto __pyx_L11;
          }
          __pyx_L11:;
          goto __pyx_L10;
        }
        __pyx_L10:;
      }
      __pyx_L8:;
    }
    __pyx_L7:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1790 */
    __pyx_2 = __pyx_v_advance_entry;
    Py_INCREF(__pyx_2);
    __pyx_7 = PyObject_IsTrue(__pyx_2); if (__pyx_7 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; goto __pyx_L1;}
    if (__pyx_7) {
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      __pyx_1 = __pyx_v_current_entry != Py_None;
      __pyx_2 = PyInt_FromLong(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; goto __pyx_L1;}
    }
    __pyx_7 = PyObject_IsTrue(__pyx_2); if (__pyx_7 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; goto __pyx_L1;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    if (__pyx_7) {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1791 */
      __pyx_v_self->current_block_pos = (__pyx_v_self->current_block_pos + 1);

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1792 */
      __pyx_1 = (__pyx_v_self->current_block_pos < PyList_GET_SIZE(__pyx_v_self->current_block_list));
      if (__pyx_1) {
        __pyx_5 = __Pyx_GetItemInt(__pyx_v_self->current_block_list, __pyx_v_self->current_block_pos); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; goto __pyx_L1;}
        Py_DECREF(__pyx_v_current_entry);
        __pyx_v_current_entry = __pyx_5;
        __pyx_5 = 0;
        goto __pyx_L13;
      }
      /*else*/ {
        Py_INCREF(Py_None);
        Py_DECREF(__pyx_v_current_entry);
        __pyx_v_current_entry = Py_None;
      }
      __pyx_L13:;
      goto __pyx_L12;
    }
    __pyx_L12:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1797 */
    __pyx_3 = __pyx_v_advance_path;
    Py_INCREF(__pyx_3);
    __pyx_7 = PyObject_IsTrue(__pyx_3); if (__pyx_7 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; goto __pyx_L1;}
    if (__pyx_7) {
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_1 = __pyx_v_current_path_info != Py_None;
      __pyx_3 = PyInt_FromLong(__pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; goto __pyx_L1;}
    }
    __pyx_7 = PyObject_IsTrue(__pyx_3); if (__pyx_7 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    if (__pyx_7) {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1798 */
      __pyx_1 = (!__pyx_v_path_handled);
      if (__pyx_1) {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1800 */
        __pyx_7 = __pyx_v_self->want_unversioned;
        if (__pyx_7) {

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1801 */
          __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_stat); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; goto __pyx_L1;}
          __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_S_ISREG); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; goto __pyx_L1;}
          Py_DECREF(__pyx_2); __pyx_2 = 0;
          __pyx_3 = __Pyx_GetItemInt(__pyx_v_current_path_info, 3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; goto __pyx_L1;}
          __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_st_mode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; goto __pyx_L1;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; goto __pyx_L1;}
          PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
          __pyx_2 = 0;
          __pyx_6 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; goto __pyx_L1;}
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          __pyx_1 = PyObject_IsTrue(__pyx_6); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; goto __pyx_L1;}
          if (__pyx_1) {
            Py_DECREF(__pyx_6); __pyx_6 = 0;
            __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_stat); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; goto __pyx_L1;}
            __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_S_IEXEC); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; goto __pyx_L1;}
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            __pyx_3 = __Pyx_GetItemInt(__pyx_v_current_path_info, 3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; goto __pyx_L1;}
            __pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_st_mode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; goto __pyx_L1;}
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            __pyx_6 = PyNumber_And(__pyx_5, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; goto __pyx_L1;}
            Py_DECREF(__pyx_5); __pyx_5 = 0;
            Py_DECREF(__pyx_2); __pyx_2 = 0;
          }
          __pyx_7 = PyObject_IsTrue(__pyx_6); if (__pyx_7 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; goto __pyx_L1;}
          Py_DECREF(__pyx_6); __pyx_6 = 0;
          __pyx_3 = PyInt_FromLong(__pyx_7); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; goto __pyx_L1;}
          Py_DECREF(__pyx_v_new_executable);
          __pyx_v_new_executable = __pyx_3;
          __pyx_3 = 0;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1804 */
          /*try:*/ {
            __pyx_5 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; goto __pyx_L17;}
            __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; goto __pyx_L17;}
            PyTuple_SET_ITEM(__pyx_2, 0, __pyx_5);
            __pyx_5 = 0;
            __pyx_6 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; goto __pyx_L17;}
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            __pyx_3 = __Pyx_GetItemInt(__pyx_6, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1805; goto __pyx_L17;}
            Py_DECREF(__pyx_6); __pyx_6 = 0;
            Py_DECREF(__pyx_v_relpath_unicode);
            __pyx_v_relpath_unicode = __pyx_3;
            __pyx_3 = 0;
          }
          goto __pyx_L18;
          __pyx_L17:;
          Py_XDECREF(__pyx_5); __pyx_5 = 0;
          Py_XDECREF(__pyx_2); __pyx_2 = 0;
          Py_XDECREF(__pyx_6); __pyx_6 = 0;
          Py_XDECREF(__pyx_3); __pyx_3 = 0;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1806 */
          __pyx_1 = PyErr_ExceptionMatches(PyExc_UnicodeDecodeError);
          if (__pyx_1) {
            __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._loop_one_block");
            if (__Pyx_GetException(&__pyx_5, &__pyx_2, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; goto __pyx_L1;}
            Py_INCREF(__pyx_2);
            Py_DECREF(__pyx_v__);
            __pyx_v__ = __pyx_2;
            __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_errors); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; goto __pyx_L1;}
            __pyx_8 = PyObject_GetAttr(__pyx_3, __pyx_n_BadFilenameEncoding); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; goto __pyx_L1;}
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            __pyx_3 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; goto __pyx_L1;}
            __pyx_9 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; goto __pyx_L1;}
            __pyx_10 = PyObject_GetAttr(__pyx_9, __pyx_n__fs_enc); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1808; goto __pyx_L1;}
            Py_DECREF(__pyx_9); __pyx_9 = 0;
            __pyx_9 = PyTuple_New(2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; goto __pyx_L1;}
            PyTuple_SET_ITEM(__pyx_9, 0, __pyx_3);
            PyTuple_SET_ITEM(__pyx_9, 1, __pyx_10);
            __pyx_3 = 0;
            __pyx_10 = 0;
            __pyx_3 = PyObject_CallObject(__pyx_8, __pyx_9); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; goto __pyx_L1;}
            Py_DECREF(__pyx_8); __pyx_8 = 0;
            Py_DECREF(__pyx_9); __pyx_9 = 0;
            __Pyx_Raise(__pyx_3, 0, 0);
            Py_DECREF(__pyx_3); __pyx_3 = 0;
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1807; goto __pyx_L1;}
            Py_DECREF(__pyx_5); __pyx_5 = 0;
            Py_DECREF(__pyx_2); __pyx_2 = 0;
            Py_DECREF(__pyx_6); __pyx_6 = 0;
            goto __pyx_L18;
          }
          goto __pyx_L1;
          __pyx_L18:;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1809 */
          __pyx_7 = __pyx_v_changed != Py_None;
          if (__pyx_7) {
            __pyx_10 = PyNumber_Remainder(__pyx_k118p, __pyx_v_result); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1811; goto __pyx_L1;}
            __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; goto __pyx_L1;}
            PyTuple_SET_ITEM(__pyx_8, 0, __pyx_10);
            __pyx_10 = 0;
            __pyx_9 = PyObject_CallObject(PyExc_AssertionError, __pyx_8); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; goto __pyx_L1;}
            Py_DECREF(__pyx_8); __pyx_8 = 0;
            __Pyx_Raise(__pyx_9, 0, 0);
            Py_DECREF(__pyx_9); __pyx_9 = 0;
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; goto __pyx_L1;}
            goto __pyx_L19;
          }
          __pyx_L19:;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1812 */
          __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; goto __pyx_L1;}
          Py_INCREF(Py_None);
          PyTuple_SET_ITEM(__pyx_3, 0, Py_None);
          Py_INCREF(__pyx_v_relpath_unicode);
          PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_relpath_unicode);
          __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; goto __pyx_L1;}
          Py_INCREF(Py_False);
          PyTuple_SET_ITEM(__pyx_5, 0, Py_False);
          Py_INCREF(Py_False);
          PyTuple_SET_ITEM(__pyx_5, 1, Py_False);
          __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; goto __pyx_L1;}
          Py_INCREF(Py_None);
          PyTuple_SET_ITEM(__pyx_2, 0, Py_None);
          Py_INCREF(Py_None);
          PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
          __pyx_6 = __Pyx_GetItemInt(__pyx_v_current_path_info, 1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; goto __pyx_L1;}
          __pyx_10 = PyTuple_New(1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; goto __pyx_L1;}
          PyTuple_SET_ITEM(__pyx_10, 0, __pyx_6);
          __pyx_6 = 0;
          __pyx_8 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_10); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; goto __pyx_L1;}
          Py_DECREF(__pyx_10); __pyx_10 = 0;
          __pyx_9 = __Pyx_GetItemInt(__pyx_8, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; goto __pyx_L1;}
          Py_DECREF(__pyx_8); __pyx_8 = 0;
          __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1817; goto __pyx_L1;}
          Py_INCREF(Py_None);
          PyTuple_SET_ITEM(__pyx_6, 0, Py_None);
          PyTuple_SET_ITEM(__pyx_6, 1, __pyx_9);
          __pyx_9 = 0;
          __pyx_10 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; goto __pyx_L1;}
          __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; goto __pyx_L1;}
          Py_INCREF(Py_None);
          PyTuple_SET_ITEM(__pyx_8, 0, Py_None);
          PyTuple_SET_ITEM(__pyx_8, 1, __pyx_10);
          __pyx_10 = 0;
          __pyx_9 = PyTuple_New(2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; goto __pyx_L1;}
          Py_INCREF(Py_None);
          PyTuple_SET_ITEM(__pyx_9, 0, Py_None);
          Py_INCREF(__pyx_v_new_executable);
          PyTuple_SET_ITEM(__pyx_9, 1, __pyx_v_new_executable);
          __pyx_10 = PyTuple_New(8); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; goto __pyx_L1;}
          Py_INCREF(Py_None);
          PyTuple_SET_ITEM(__pyx_10, 0, Py_None);
          PyTuple_SET_ITEM(__pyx_10, 1, __pyx_3);
          Py_INCREF(Py_True);
          PyTuple_SET_ITEM(__pyx_10, 2, Py_True);
          PyTuple_SET_ITEM(__pyx_10, 3, __pyx_5);
          PyTuple_SET_ITEM(__pyx_10, 4, __pyx_2);
          PyTuple_SET_ITEM(__pyx_10, 5, __pyx_6);
          PyTuple_SET_ITEM(__pyx_10, 6, __pyx_8);
          PyTuple_SET_ITEM(__pyx_10, 7, __pyx_9);
          __pyx_3 = 0;
          __pyx_5 = 0;
          __pyx_2 = 0;
          __pyx_6 = 0;
          __pyx_8 = 0;
          __pyx_9 = 0;
          Py_DECREF(__pyx_v_result);
          __pyx_v_result = __pyx_10;
          __pyx_10 = 0;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1820 */
          Py_INCREF(Py_True);
          Py_DECREF(__pyx_v_changed);
          __pyx_v_changed = Py_True;
          goto __pyx_L16;
        }
        __pyx_L16:;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1823 */
        __pyx_3 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; goto __pyx_L1;}
        __pyx_1 = PySequence_Contains(__pyx_n_directory, __pyx_3); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        if (__pyx_1) {

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1824 */
          if (PySequence_DelItem(__pyx_v_self->current_dir_list, __pyx_v_self->path_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; goto __pyx_L1;}

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1825 */
          __pyx_v_self->path_index = (__pyx_v_self->path_index - 1);
          goto __pyx_L20;
        }
        __pyx_L20:;
        goto __pyx_L15;
      }
      __pyx_L15:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1828 */
      __pyx_5 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; goto __pyx_L1;}
      if (PyObject_Cmp(__pyx_5, __pyx_k80p, &__pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; goto __pyx_L1;}
      __pyx_7 = __pyx_7 == 0;
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      if (__pyx_7) {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1829 */
        if (PySequence_DelItem(__pyx_v_self->current_dir_list, __pyx_v_self->path_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1829; goto __pyx_L1;}

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1830 */
        __pyx_v_self->path_index = (__pyx_v_self->path_index - 1);
        goto __pyx_L21;
      }
      __pyx_L21:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1831 */
      __pyx_v_self->path_index = (__pyx_v_self->path_index + 1);

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1832 */
      __pyx_11 = PyObject_Length(__pyx_v_self->current_dir_list); if (__pyx_11 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1832; goto __pyx_L1;}
      __pyx_1 = (__pyx_v_self->path_index < __pyx_11);
      if (__pyx_1) {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1833 */
        __pyx_2 = __Pyx_GetItemInt(__pyx_v_self->current_dir_list, __pyx_v_self->path_index); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1833; goto __pyx_L1;}
        Py_DECREF(__pyx_v_current_path_info);
        __pyx_v_current_path_info = __pyx_2;
        __pyx_2 = 0;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1834 */
        __pyx_6 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; goto __pyx_L1;}
        if (PyObject_Cmp(__pyx_6, __pyx_n_directory, &__pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1834; goto __pyx_L1;}
        __pyx_7 = __pyx_7 == 0;
        Py_DECREF(__pyx_6); __pyx_6 = 0;
        if (__pyx_7) {
          __pyx_8 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_maybe_tree_ref(__pyx_v_self,__pyx_v_current_path_info); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1835; goto __pyx_L1;}
          Py_DECREF(__pyx_v_current_path_info);
          __pyx_v_current_path_info = __pyx_8;
          __pyx_8 = 0;
          goto __pyx_L23;
        }
        __pyx_L23:;
        goto __pyx_L22;
      }
      /*else*/ {
        Py_INCREF(Py_None);
        Py_DECREF(__pyx_v_current_path_info);
        __pyx_v_current_path_info = Py_None;
      }
      __pyx_L22:;
      goto __pyx_L14;
    }
    __pyx_L14:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1839 */
    __pyx_1 = __pyx_v_changed != Py_None;
    if (__pyx_1) {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1841 */
      __pyx_7 = PyObject_IsTrue(__pyx_v_changed); if (__pyx_7 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1841; goto __pyx_L1;}
      if (__pyx_7) {
        __pyx_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_gather_result_for_consistency(__pyx_v_self,__pyx_v_result); if (__pyx_1 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; goto __pyx_L1;}
        goto __pyx_L25;
      }
      __pyx_L25:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1843 */
      __pyx_9 = __pyx_v_changed;
      Py_INCREF(__pyx_9);
      __pyx_7 = PyObject_IsTrue(__pyx_9); if (__pyx_7 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; goto __pyx_L1;}
      if (!__pyx_7) {
        Py_DECREF(__pyx_9); __pyx_9 = 0;
        __pyx_9 = PyInt_FromLong(__pyx_v_self->include_unchanged); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; goto __pyx_L1;}
      }
      __pyx_1 = PyObject_IsTrue(__pyx_9); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; goto __pyx_L1;}
      Py_DECREF(__pyx_9); __pyx_9 = 0;
      if (__pyx_1) {
        Py_INCREF(__pyx_v_result);
        __pyx_r = __pyx_v_result;
        goto __pyx_L0;
        goto __pyx_L26;
      }
      __pyx_L26:;
      goto __pyx_L24;
    }
    __pyx_L24:;
  }

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1845 */
  __pyx_7 = __pyx_v_self->current_block != Py_None;
  if (__pyx_7) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1846 */
    __pyx_v_self->block_index = (__pyx_v_self->block_index + 1);

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1847 */
    __pyx_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_update_current_block(__pyx_v_self); if (__pyx_1 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1847; goto __pyx_L1;}
    goto __pyx_L27;
  }
  __pyx_L27:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1848 */
  __pyx_7 = __pyx_v_self->current_dir_info != Py_None;
  if (__pyx_7) {

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1849 */
    __pyx_v_self->path_index = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1850 */
    Py_INCREF(Py_None);
    Py_DECREF(__pyx_v_self->current_dir_list);
    __pyx_v_self->current_dir_list = Py_None;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1851 */
    /*try:*/ {

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1852 */
      __pyx_10 = PyObject_GetAttr(__pyx_v_self->dir_iterator, __pyx_n_next); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; goto __pyx_L29;}
      __pyx_3 = PyObject_CallObject(__pyx_10, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; goto __pyx_L29;}
      Py_DECREF(__pyx_10); __pyx_10 = 0;
      Py_DECREF(__pyx_v_self->current_dir_info);
      __pyx_v_self->current_dir_info = __pyx_3;
      __pyx_3 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1853 */
      __pyx_5 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; goto __pyx_L29;}
      Py_DECREF(__pyx_v_self->current_dir_list);
      __pyx_v_self->current_dir_list = __pyx_5;
      __pyx_5 = 0;
    }
    goto __pyx_L30;
    __pyx_L29:;
    Py_XDECREF(__pyx_2); __pyx_2 = 0;
    Py_XDECREF(__pyx_6); __pyx_6 = 0;
    Py_XDECREF(__pyx_8); __pyx_8 = 0;
    Py_XDECREF(__pyx_9); __pyx_9 = 0;
    Py_XDECREF(__pyx_10); __pyx_10 = 0;
    Py_XDECREF(__pyx_3); __pyx_3 = 0;
    Py_XDECREF(__pyx_5); __pyx_5 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1854 */
    __pyx_1 = PyErr_ExceptionMatches(PyExc_StopIteration);
    if (__pyx_1) {
      __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._loop_one_block");
      if (__Pyx_GetException(&__pyx_2, &__pyx_6, &__pyx_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; goto __pyx_L1;}
      Py_INCREF(__pyx_6);
      Py_DECREF(__pyx_v__);
      __pyx_v__ = __pyx_6;
      Py_INCREF(Py_None);
      Py_DECREF(__pyx_v_self->current_dir_info);
      __pyx_v_self->current_dir_info = Py_None;
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_6); __pyx_6 = 0;
      Py_DECREF(__pyx_8); __pyx_8 = 0;
      goto __pyx_L30;
    }
    goto __pyx_L1;
    __pyx_L30:;
    goto __pyx_L28;
  }
  __pyx_L28:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  Py_XDECREF(__pyx_8);
  Py_XDECREF(__pyx_9);
  Py_XDECREF(__pyx_10);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._loop_one_block");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_current_entry);
  Py_DECREF(__pyx_v_current_path_info);
  Py_DECREF(__pyx_v_disk_kind);
  Py_DECREF(__pyx_v_advance_entry);
  Py_DECREF(__pyx_v_advance_path);
  Py_DECREF(__pyx_v_result);
  Py_DECREF(__pyx_v_changed);
  Py_DECREF(__pyx_v_new_executable);
  Py_DECREF(__pyx_v_relpath_unicode);
  Py_DECREF(__pyx_v__);
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__next_consistent_entries(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self) {
  PyObject *__pyx_v_results;
  PyObject *__pyx_v_path_utf8;
  PyObject *__pyx_v_path_entries;
  PyObject *__pyx_v_selected_entries;
  PyObject *__pyx_v_found_item;
  PyObject *__pyx_v_candidate_entry;
  PyObject *__pyx_v_path_info;
  PyObject *__pyx_v_entry;
  PyObject *__pyx_v_result;
  PyObject *__pyx_v_changed;
  PyObject *__pyx_v_entry_path_utf8;
  PyObject *__pyx_v_initial_key;
  PyObject *__pyx_v_block_index;
  PyObject *__pyx_v__;
  PyObject *__pyx_v_current_block;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  int __pyx_2;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  int __pyx_6;
  Py_ssize_t __pyx_7;
  PyObject *__pyx_8 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_results = Py_None; Py_INCREF(Py_None);
  __pyx_v_path_utf8 = Py_None; Py_INCREF(Py_None);
  __pyx_v_path_entries = Py_None; Py_INCREF(Py_None);
  __pyx_v_selected_entries = Py_None; Py_INCREF(Py_None);
  __pyx_v_found_item = Py_None; Py_INCREF(Py_None);
  __pyx_v_candidate_entry = Py_None; Py_INCREF(Py_None);
  __pyx_v_path_info = Py_None; Py_INCREF(Py_None);
  __pyx_v_entry = Py_None; Py_INCREF(Py_None);
  __pyx_v_result = Py_None; Py_INCREF(Py_None);
  __pyx_v_changed = Py_None; Py_INCREF(Py_None);
  __pyx_v_entry_path_utf8 = Py_None; Py_INCREF(Py_None);
  __pyx_v_initial_key = Py_None; Py_INCREF(Py_None);
  __pyx_v_block_index = Py_None; Py_INCREF(Py_None);
  __pyx_v__ = Py_None; Py_INCREF(Py_None);
  __pyx_v_current_block = Py_None; Py_INCREF(Py_None);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1862 */
  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; goto __pyx_L1;}
  Py_DECREF(__pyx_v_results);
  __pyx_v_results = __pyx_1;
  __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1863 */
  while (1) {
    __pyx_2 = PyObject_IsTrue(__pyx_v_self->search_specific_file_parents); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; goto __pyx_L1;}
    if (!__pyx_2) break;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1867 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_self->search_specific_file_parents, __pyx_n_pop); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1867; goto __pyx_L1;}
    __pyx_3 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1867; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_v_path_utf8);
    __pyx_v_path_utf8 = __pyx_3;
    __pyx_3 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1868 */
    __pyx_2 = PySequence_Contains(__pyx_v_self->searched_exact_paths, __pyx_v_path_utf8); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; goto __pyx_L1;}
    if (__pyx_2) {
      goto __pyx_L2;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1871 */
    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; goto __pyx_L1;}
    __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_is_inside_any); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; goto __pyx_L1;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; goto __pyx_L1;}
    Py_INCREF(__pyx_v_self->searched_specific_files);
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_self->searched_specific_files);
    Py_INCREF(__pyx_v_path_utf8);
    PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_path_utf8);
    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_2 = PyObject_IsTrue(__pyx_4); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; goto __pyx_L1;}
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    if (__pyx_2) {
      goto __pyx_L2;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1874 */
    __pyx_3 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__entries_for_path); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1874; goto __pyx_L1;}
    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1874; goto __pyx_L1;}
    Py_INCREF(__pyx_v_path_utf8);
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_path_utf8);
    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1874; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_v_path_entries);
    __pyx_v_path_entries = __pyx_4;
    __pyx_4 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1879 */
    __pyx_3 = PyList_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; goto __pyx_L1;}
    Py_DECREF(__pyx_v_selected_entries);
    __pyx_v_selected_entries = __pyx_3;
    __pyx_3 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1880 */
    Py_INCREF(Py_False);
    Py_DECREF(__pyx_v_found_item);
    __pyx_v_found_item = Py_False;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1881 */
    __pyx_1 = PyObject_GetIter(__pyx_v_path_entries); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; goto __pyx_L1;}
    for (;;) {
      __pyx_4 = PyIter_Next(__pyx_1);
      if (!__pyx_4) {
        if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1881; goto __pyx_L1;}
        break;
      }
      Py_DECREF(__pyx_v_candidate_entry);
      __pyx_v_candidate_entry = __pyx_4;
      __pyx_4 = 0;
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_candidate_entry, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; goto __pyx_L1;}
      __pyx_4 = __Pyx_GetItemInt(__pyx_3, __pyx_v_self->target_index); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_3 = __Pyx_GetItemInt(__pyx_4, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      __pyx_2 = PySequence_Contains(__pyx_n_ar, __pyx_3); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1883; goto __pyx_L1;}
      __pyx_2 = !__pyx_2;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      if (__pyx_2) {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1884 */
        Py_INCREF(Py_True);
        Py_DECREF(__pyx_v_found_item);
        __pyx_v_found_item = Py_True;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1885 */
        __pyx_4 = PyObject_GetAttr(__pyx_v_selected_entries, __pyx_n_append); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1885; goto __pyx_L1;}
        __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1885; goto __pyx_L1;}
        Py_INCREF(__pyx_v_candidate_entry);
        PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_candidate_entry);
        __pyx_5 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1885; goto __pyx_L1;}
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        goto __pyx_L8;
      }
      __pyx_4 = PyInt_FromLong(__pyx_v_self->source_index); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; goto __pyx_L1;}
      __pyx_2 = __pyx_4 != Py_None;
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      if (__pyx_2) {
        __pyx_3 = __Pyx_GetItemInt(__pyx_v_candidate_entry, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; goto __pyx_L1;}
        __pyx_5 = __Pyx_GetItemInt(__pyx_3, __pyx_v_self->source_index); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        __pyx_4 = __Pyx_GetItemInt(__pyx_5, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        __pyx_2 = PySequence_Contains(__pyx_n_ar, __pyx_4); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; goto __pyx_L1;}
        __pyx_2 = !__pyx_2;
        Py_DECREF(__pyx_4); __pyx_4 = 0;
      }
      if (__pyx_2) {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1889 */
        Py_INCREF(Py_True);
        Py_DECREF(__pyx_v_found_item);
        __pyx_v_found_item = Py_True;

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1890 */
        __pyx_3 = __Pyx_GetItemInt(__pyx_v_candidate_entry, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; goto __pyx_L1;}
        __pyx_5 = __Pyx_GetItemInt(__pyx_3, __pyx_v_self->target_index); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; goto __pyx_L1;}
        Py_DECREF(__pyx_3); __pyx_3 = 0;
        __pyx_4 = __Pyx_GetItemInt(__pyx_5, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        if (PyObject_Cmp(__pyx_4, __pyx_n_a, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; goto __pyx_L1;}
        __pyx_2 = __pyx_2 == 0;
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        if (__pyx_2) {
          __pyx_3 = PyObject_GetAttr(__pyx_v_selected_entries, __pyx_n_append); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1892; goto __pyx_L1;}
          __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1892; goto __pyx_L1;}
          Py_INCREF(__pyx_v_candidate_entry);
          PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_candidate_entry);
          __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1892; goto __pyx_L1;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          Py_DECREF(__pyx_4); __pyx_4 = 0;
          goto __pyx_L9;
        }
        /*else*/ {
          __pyx_3 = PyObject_GetAttr(__pyx_v_self->search_specific_file_parents, __pyx_n_add); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; goto __pyx_L1;}
          __pyx_5 = __Pyx_GetItemInt(__pyx_v_candidate_entry, 1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; goto __pyx_L1;}
          __pyx_4 = __Pyx_GetItemInt(__pyx_5, __pyx_v_self->target_index); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; goto __pyx_L1;}
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          __pyx_5 = __Pyx_GetItemInt(__pyx_4, 1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; goto __pyx_L1;}
          Py_DECREF(__pyx_4); __pyx_4 = 0;
          __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; goto __pyx_L1;}
          PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5);
          __pyx_5 = 0;
          __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1896; goto __pyx_L1;}
          Py_DECREF(__pyx_3); __pyx_3 = 0;
          Py_DECREF(__pyx_4); __pyx_4 = 0;
          Py_DECREF(__pyx_5); __pyx_5 = 0;
        }
        __pyx_L9:;
        goto __pyx_L8;
      }
      __pyx_L8:;
    }
    Py_DECREF(__pyx_1); __pyx_1 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1898 */
    __pyx_2 = PyObject_IsTrue(__pyx_v_found_item); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; goto __pyx_L1;}
    __pyx_6 = (!__pyx_2);
    if (__pyx_6) {
      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; goto __pyx_L1;}
      Py_INCREF(__pyx_v_path_utf8);
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_path_utf8);
      Py_INCREF(__pyx_v_path_entries);
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_path_entries);
      __pyx_4 = PyNumber_Remainder(__pyx_k121p, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1900; goto __pyx_L1;}
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; goto __pyx_L1;}
      PyTuple_SET_ITEM(__pyx_5, 0, __pyx_4);
      __pyx_4 = 0;
      __pyx_1 = PyObject_CallObject(PyExc_AssertionError, __pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __Pyx_Raise(__pyx_1, 0, 0);
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; goto __pyx_L1;}
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1902 */
    __pyx_3 = PyObject_GetAttr(__pyx_v_path_utf8, __pyx_n_decode); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; goto __pyx_L1;}
    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; goto __pyx_L1;}
    Py_INCREF(__pyx_n_utf8);
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_n_utf8);
    __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; goto __pyx_L1;}
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_4); __pyx_4 = 0;
    __pyx_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_path_info(__pyx_v_self,__pyx_v_path_utf8,__pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_v_path_info);
    __pyx_v_path_info = __pyx_1;
    __pyx_1 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1903 */
    __pyx_3 = PyObject_GetIter(__pyx_v_selected_entries); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; goto __pyx_L1;}
    for (;;) {
      __pyx_4 = PyIter_Next(__pyx_3);
      if (!__pyx_4) {
        if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; goto __pyx_L1;}
        break;
      }
      Py_DECREF(__pyx_v_entry);
      __pyx_v_entry = __pyx_4;
      __pyx_4 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1904 */
      __pyx_5 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1904; goto __pyx_L1;}
      __pyx_1 = __Pyx_GetItemInt(__pyx_5, 2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1904; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;
      __pyx_2 = PySequence_Contains(__pyx_v_self->seen_ids, __pyx_1); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1904; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      if (__pyx_2) {
        goto __pyx_L11;
        goto __pyx_L13;
      }
      __pyx_L13:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1906 */
      __pyx_4 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self,__pyx_v_entry,__pyx_v_path_info); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; goto __pyx_L1;}
      __pyx_5 = PyObject_GetIter(__pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      __pyx_1 = __Pyx_UnpackItem(__pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; goto __pyx_L1;}
      Py_DECREF(__pyx_v_result);
      __pyx_v_result = __pyx_1;
      __pyx_1 = 0;
      __pyx_4 = __Pyx_UnpackItem(__pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; goto __pyx_L1;}
      Py_DECREF(__pyx_v_changed);
      __pyx_v_changed = __pyx_4;
      __pyx_4 = 0;
      if (__Pyx_EndUnpack(__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; goto __pyx_L1;}
      Py_DECREF(__pyx_5); __pyx_5 = 0;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1907 */
      __pyx_6 = __pyx_v_changed == Py_None;
      if (__pyx_6) {
        __pyx_1 = PyTuple_New(3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1911; goto __pyx_L1;}
        Py_INCREF(__pyx_v_path_utf8);
        PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_path_utf8);
        Py_INCREF(__pyx_v_entry);
        PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_entry);
        Py_INCREF(__pyx_v_path_info);
        PyTuple_SET_ITEM(__pyx_1, 2, __pyx_v_path_info);
        __pyx_4 = PyNumber_Remainder(__pyx_k122p, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1908; goto __pyx_L1;}
        PyTuple_SET_ITEM(__pyx_5, 0, __pyx_4);
        __pyx_4 = 0;
        __pyx_1 = PyObject_CallObject(PyExc_AssertionError, __pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1908; goto __pyx_L1;}
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        __Pyx_Raise(__pyx_1, 0, 0);
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1908; goto __pyx_L1;}
        goto __pyx_L14;
      }
      __pyx_L14:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1914 */
      __pyx_2 = PyObject_IsTrue(__pyx_v_changed); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1914; goto __pyx_L1;}
      if (__pyx_2) {

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1915 */
        __pyx_6 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_gather_result_for_consistency(__pyx_v_self,__pyx_v_result); if (__pyx_6 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; goto __pyx_L1;}

        /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1916 */
        __pyx_4 = __Pyx_GetItemInt(__pyx_v_result, 6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; goto __pyx_L1;}
        __pyx_5 = __Pyx_GetItemInt(__pyx_4, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; goto __pyx_L1;}
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        if (PyObject_Cmp(__pyx_5, __pyx_n_directory, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1916; goto __pyx_L1;}
        __pyx_2 = __pyx_2 == 0;
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        if (__pyx_2) {
          __pyx_1 = __Pyx_GetItemInt(__pyx_v_result, 6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; goto __pyx_L1;}
          __pyx_4 = __Pyx_GetItemInt(__pyx_1, 1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; goto __pyx_L1;}
          Py_DECREF(__pyx_1); __pyx_1 = 0;
          if (PyObject_Cmp(__pyx_4, __pyx_n_directory, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; goto __pyx_L1;}
          __pyx_2 = __pyx_2 != 0;
          Py_DECREF(__pyx_4); __pyx_4 = 0;
        }
        if (__pyx_2) {

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1920 */
          __pyx_5 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; goto __pyx_L1;}
          __pyx_1 = __Pyx_GetItemInt(__pyx_5, __pyx_v_self->source_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; goto __pyx_L1;}
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          __pyx_4 = __Pyx_GetItemInt(__pyx_1, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; goto __pyx_L1;}
          Py_DECREF(__pyx_1); __pyx_1 = 0;
          if (PyObject_Cmp(__pyx_4, __pyx_n_r, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; goto __pyx_L1;}
          __pyx_6 = __pyx_6 == 0;
          Py_DECREF(__pyx_4); __pyx_4 = 0;
          if (__pyx_6) {
            __pyx_5 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; goto __pyx_L1;}
            __pyx_1 = __Pyx_GetItemInt(__pyx_5, __pyx_v_self->source_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; goto __pyx_L1;}
            Py_DECREF(__pyx_5); __pyx_5 = 0;
            __pyx_4 = __Pyx_GetItemInt(__pyx_1, 1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; goto __pyx_L1;}
            Py_DECREF(__pyx_1); __pyx_1 = 0;
            Py_DECREF(__pyx_v_entry_path_utf8);
            __pyx_v_entry_path_utf8 = __pyx_4;
            __pyx_4 = 0;
            goto __pyx_L17;
          }
          /*else*/ {
            Py_INCREF(__pyx_v_path_utf8);
            Py_DECREF(__pyx_v_entry_path_utf8);
            __pyx_v_entry_path_utf8 = __pyx_v_path_utf8;
          }
          __pyx_L17:;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1925 */
          __pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; goto __pyx_L1;}
          Py_INCREF(__pyx_v_entry_path_utf8);
          PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_entry_path_utf8);
          Py_INCREF(__pyx_k5p);
          PyTuple_SET_ITEM(__pyx_5, 1, __pyx_k5p);
          Py_INCREF(__pyx_k5p);
          PyTuple_SET_ITEM(__pyx_5, 2, __pyx_k5p);
          Py_DECREF(__pyx_v_initial_key);
          __pyx_v_initial_key = __pyx_5;
          __pyx_5 = 0;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1926 */
          __pyx_1 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__find_block_index_from_key); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; goto __pyx_L1;}
          __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; goto __pyx_L1;}
          Py_INCREF(__pyx_v_initial_key);
          PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_initial_key);
          __pyx_5 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; goto __pyx_L1;}
          Py_DECREF(__pyx_1); __pyx_1 = 0;
          Py_DECREF(__pyx_4); __pyx_4 = 0;
          __pyx_1 = PyObject_GetIter(__pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; goto __pyx_L1;}
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          __pyx_4 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; goto __pyx_L1;}
          Py_DECREF(__pyx_v_block_index);
          __pyx_v_block_index = __pyx_4;
          __pyx_4 = 0;
          __pyx_5 = __Pyx_UnpackItem(__pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; goto __pyx_L1;}
          Py_DECREF(__pyx_v__);
          __pyx_v__ = __pyx_5;
          __pyx_5 = 0;
          if (__Pyx_EndUnpack(__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; goto __pyx_L1;}
          Py_DECREF(__pyx_1); __pyx_1 = 0;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1928 */
          __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1928; goto __pyx_L1;}
          if (PyObject_Cmp(__pyx_v_block_index, __pyx_4, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1928; goto __pyx_L1;}
          __pyx_2 = __pyx_2 == 0;
          Py_DECREF(__pyx_4); __pyx_4 = 0;
          if (__pyx_2) {
            __pyx_5 = PyInt_FromLong(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; goto __pyx_L1;}
            __pyx_1 = PyNumber_Add(__pyx_v_block_index, __pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; goto __pyx_L1;}
            Py_DECREF(__pyx_5); __pyx_5 = 0;
            Py_DECREF(__pyx_v_block_index);
            __pyx_v_block_index = __pyx_1;
            __pyx_1 = 0;
            goto __pyx_L18;
          }
          __pyx_L18:;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1931 */
          Py_INCREF(Py_None);
          Py_DECREF(__pyx_v_current_block);
          __pyx_v_current_block = Py_None;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1932 */
          __pyx_4 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__dirblocks); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; goto __pyx_L1;}
          __pyx_7 = PyObject_Length(__pyx_4); if (__pyx_7 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; goto __pyx_L1;}
          Py_DECREF(__pyx_4); __pyx_4 = 0;
          __pyx_5 = PyInt_FromSsize_t(__pyx_7); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; goto __pyx_L1;}
          if (PyObject_Cmp(__pyx_v_block_index, __pyx_5, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; goto __pyx_L1;}
          __pyx_6 = __pyx_6 < 0;
          Py_DECREF(__pyx_5); __pyx_5 = 0;
          if (__pyx_6) {

            /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1933 */
            __pyx_1 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__dirblocks); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; goto __pyx_L1;}
            __pyx_4 = PyObject_GetItem(__pyx_1, __pyx_v_block_index); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; goto __pyx_L1;}
            Py_DECREF(__pyx_1); __pyx_1 = 0;
            Py_DECREF(__pyx_v_current_block);
            __pyx_v_current_block = __pyx_4;
            __pyx_4 = 0;

            /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1934 */
            __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1934; goto __pyx_L1;}
            __pyx_1 = PyObject_GetAttr(__pyx_5, __pyx_n_is_inside); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1934; goto __pyx_L1;}
            Py_DECREF(__pyx_5); __pyx_5 = 0;
            __pyx_4 = __Pyx_GetItemInt(__pyx_v_current_block, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; goto __pyx_L1;}
            __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1934; goto __pyx_L1;}
            Py_INCREF(__pyx_v_entry_path_utf8);
            PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_entry_path_utf8);
            PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4);
            __pyx_4 = 0;
            __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1934; goto __pyx_L1;}
            Py_DECREF(__pyx_1); __pyx_1 = 0;
            Py_DECREF(__pyx_5); __pyx_5 = 0;
            __pyx_2 = PyObject_IsTrue(__pyx_4); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1934; goto __pyx_L1;}
            Py_DECREF(__pyx_4); __pyx_4 = 0;
            __pyx_6 = (!__pyx_2);
            if (__pyx_6) {
              Py_INCREF(Py_None);
              Py_DECREF(__pyx_v_current_block);
              __pyx_v_current_block = Py_None;
              goto __pyx_L20;
            }
            __pyx_L20:;
            goto __pyx_L19;
          }
          __pyx_L19:;

          /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1938 */
          __pyx_2 = __pyx_v_current_block != Py_None;
          if (__pyx_2) {
            __pyx_1 = __Pyx_GetItemInt(__pyx_v_current_block, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; goto __pyx_L1;}
            __pyx_5 = PyObject_GetIter(__pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; goto __pyx_L1;}
            Py_DECREF(__pyx_1); __pyx_1 = 0;
            for (;;) {
              __pyx_4 = PyIter_Next(__pyx_5);
              if (!__pyx_4) {
                if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; goto __pyx_L1;}
                break;
              }
              Py_DECREF(__pyx_v_entry);
              __pyx_v_entry = __pyx_4;
              __pyx_4 = 0;

              /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1940 */
              __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; goto __pyx_L1;}
              __pyx_4 = __Pyx_GetItemInt(__pyx_1, __pyx_v_self->source_index); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; goto __pyx_L1;}
              Py_DECREF(__pyx_1); __pyx_1 = 0;
              __pyx_1 = __Pyx_GetItemInt(__pyx_4, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; goto __pyx_L1;}
              Py_DECREF(__pyx_4); __pyx_4 = 0;
              __pyx_6 = PySequence_Contains(__pyx_n_ar, __pyx_1); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1940; goto __pyx_L1;}
              Py_DECREF(__pyx_1); __pyx_1 = 0;
              if (__pyx_6) {
                goto __pyx_L22;
                goto __pyx_L24;
              }
              __pyx_L24:;

              /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1945 */
              __pyx_4 = PyObject_GetAttr(__pyx_v_self->search_specific_file_parents, __pyx_n_add); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; goto __pyx_L1;}
              __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; goto __pyx_L1;}
              __pyx_8 = PySequence_GetSlice(__pyx_1, 0, 2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; goto __pyx_L1;}
              Py_DECREF(__pyx_1); __pyx_1 = 0;
              __pyx_1 = PySequence_Tuple(__pyx_8); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; goto __pyx_L1;}
              Py_DECREF(__pyx_8); __pyx_8 = 0;
              __pyx_8 = PyObject_CallObject(__pyx_v_self->pathjoin, __pyx_1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; goto __pyx_L1;}
              Py_DECREF(__pyx_1); __pyx_1 = 0;
              __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; goto __pyx_L1;}
              PyTuple_SET_ITEM(__pyx_1, 0, __pyx_8);
              __pyx_8 = 0;
              __pyx_8 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; goto __pyx_L1;}
              Py_DECREF(__pyx_4); __pyx_4 = 0;
              Py_DECREF(__pyx_1); __pyx_1 = 0;
              Py_DECREF(__pyx_8); __pyx_8 = 0;
              __pyx_L22:;
            }
            Py_DECREF(__pyx_5); __pyx_5 = 0;
            goto __pyx_L21;
          }
          __pyx_L21:;
          goto __pyx_L16;
        }
        __pyx_L16:;
        goto __pyx_L15;
      }
      __pyx_L15:;

      /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1947 */
      __pyx_4 = __pyx_v_changed;
      Py_INCREF(__pyx_4);
      __pyx_2 = PyObject_IsTrue(__pyx_4); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; goto __pyx_L1;}
      if (!__pyx_2) {
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        __pyx_4 = PyInt_FromLong(__pyx_v_self->include_unchanged); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; goto __pyx_L1;}
      }
      __pyx_6 = PyObject_IsTrue(__pyx_4); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1947; goto __pyx_L1;}
      Py_DECREF(__pyx_4); __pyx_4 = 0;
      if (__pyx_6) {
        __pyx_1 = PyObject_GetAttr(__pyx_v_results, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; goto __pyx_L1;}
        __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; goto __pyx_L1;}
        Py_INCREF(__pyx_v_result);
        PyTuple_SET_ITEM(__pyx_8, 0, __pyx_v_result);
        Py_INCREF(__pyx_v_changed);
        PyTuple_SET_ITEM(__pyx_8, 1, __pyx_v_changed);
        __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; goto __pyx_L1;}
        PyTuple_SET_ITEM(__pyx_5, 0, __pyx_8);
        __pyx_8 = 0;
        __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; goto __pyx_L1;}
        Py_DECREF(__pyx_1); __pyx_1 = 0;
        Py_DECREF(__pyx_5); __pyx_5 = 0;
        Py_DECREF(__pyx_4); __pyx_4 = 0;
        goto __pyx_L25;
      }
      __pyx_L25:;
      __pyx_L11:;
    }
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1949 */
    __pyx_8 = PyObject_GetAttr(__pyx_v_self->searched_exact_paths, __pyx_n_add); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1949; goto __pyx_L1;}
    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1949; goto __pyx_L1;}
    Py_INCREF(__pyx_v_path_utf8);
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_path_utf8);
    __pyx_5 = PyObject_CallObject(__pyx_8, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1949; goto __pyx_L1;}
    Py_DECREF(__pyx_8); __pyx_8 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_L2:;
  }

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1950 */
  Py_INCREF(__pyx_v_results);
  __pyx_r = __pyx_v_results;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_8);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._next_consistent_entries");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_results);
  Py_DECREF(__pyx_v_path_utf8);
  Py_DECREF(__pyx_v_path_entries);
  Py_DECREF(__pyx_v_selected_entries);
  Py_DECREF(__pyx_v_found_item);
  Py_DECREF(__pyx_v_candidate_entry);
  Py_DECREF(__pyx_v_path_info);
  Py_DECREF(__pyx_v_entry);
  Py_DECREF(__pyx_v_result);
  Py_DECREF(__pyx_v_changed);
  Py_DECREF(__pyx_v_entry_path_utf8);
  Py_DECREF(__pyx_v_initial_key);
  Py_DECREF(__pyx_v_block_index);
  Py_DECREF(__pyx_v__);
  Py_DECREF(__pyx_v_current_block);
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__path_info(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self,PyObject *__pyx_v_utf8_path,PyObject *__pyx_v_unicode_path) {
  PyObject *__pyx_v_abspath;
  PyObject *__pyx_v_stat;
  PyObject *__pyx_v_e;
  PyObject *__pyx_v_utf8_basename;
  PyObject *__pyx_v_dir_info;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  PyObject *__pyx_7 = 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_utf8_path);
  Py_INCREF(__pyx_v_unicode_path);
  __pyx_v_abspath = Py_None; Py_INCREF(Py_None);
  __pyx_v_stat = Py_None; Py_INCREF(Py_None);
  __pyx_v_e = Py_None; Py_INCREF(Py_None);
  __pyx_v_utf8_basename = Py_None; Py_INCREF(Py_None);
  __pyx_v_dir_info = Py_None; Py_INCREF(Py_None);

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1957 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n_abspath); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; goto __pyx_L1;}
  Py_INCREF(__pyx_v_unicode_path);
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_unicode_path);
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_v_abspath);
  __pyx_v_abspath = __pyx_3;
  __pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1958 */
  /*try:*/ {
    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; goto __pyx_L2;}
    __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_lstat); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; goto __pyx_L2;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; goto __pyx_L2;}
    Py_INCREF(__pyx_v_abspath);
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_abspath);
    __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; goto __pyx_L2;}
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_v_stat);
    __pyx_v_stat = __pyx_1;
    __pyx_1 = 0;
  }
  goto __pyx_L3;
  __pyx_L2:;
  Py_XDECREF(__pyx_2); __pyx_2 = 0;
  Py_XDECREF(__pyx_3); __pyx_3 = 0;
  Py_XDECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1960 */
  __pyx_4 = PyErr_ExceptionMatches(PyExc_OSError);
  if (__pyx_4) {
    __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._path_info");
    if (__Pyx_GetException(&__pyx_2, &__pyx_3, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; goto __pyx_L1;}
    Py_INCREF(__pyx_3);
    Py_DECREF(__pyx_v_e);
    __pyx_v_e = __pyx_3;
    __pyx_5 = PyObject_GetAttr(__pyx_v_e, __pyx_n_errno); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; goto __pyx_L1;}
    __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n_errno); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; goto __pyx_L1;}
    __pyx_7 = PyObject_GetAttr(__pyx_6, __pyx_n_ENOENT); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; goto __pyx_L1;}
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    if (PyObject_Cmp(__pyx_5, __pyx_7, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1961; goto __pyx_L1;}
    __pyx_4 = __pyx_4 == 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    if (__pyx_4) {
      Py_INCREF(Py_None);
      __pyx_r = Py_None;
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    /*else*/ {
      __Pyx_Raise(__pyx_2, __pyx_3, __pyx_1);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1965; goto __pyx_L1;}
    }
    __pyx_L4:;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    goto __pyx_L3;
  }
  goto __pyx_L1;
  __pyx_L3:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1966 */
  __pyx_6 = PyObject_GetAttr(__pyx_v_utf8_path, __pyx_n_rsplit); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; goto __pyx_L1;}
  __pyx_5 = PyInt_FromLong(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; goto __pyx_L1;}
  __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; goto __pyx_L1;}
  Py_INCREF(__pyx_k125p);
  PyTuple_SET_ITEM(__pyx_7, 0, __pyx_k125p);
  PyTuple_SET_ITEM(__pyx_7, 1, __pyx_5);
  __pyx_5 = 0;
  __pyx_2 = PyObject_CallObject(__pyx_6, __pyx_7); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; goto __pyx_L1;}
  Py_DECREF(__pyx_6); __pyx_6 = 0;
  Py_DECREF(__pyx_7); __pyx_7 = 0;
  __pyx_3 = __Pyx_GetItemInt(__pyx_2, (-1)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_v_utf8_basename);
  __pyx_v_utf8_basename = __pyx_3;
  __pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1967 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; goto __pyx_L1;}
  __pyx_5 = PyObject_GetAttr(__pyx_1, __pyx_n_file_kind_from_stat_mode); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_6 = PyObject_GetAttr(__pyx_v_stat, __pyx_n_st_mode); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; goto __pyx_L1;}
  __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; goto __pyx_L1;}
  PyTuple_SET_ITEM(__pyx_7, 0, __pyx_6);
  __pyx_6 = 0;
  __pyx_2 = PyObject_CallObject(__pyx_5, __pyx_7); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; goto __pyx_L1;}
  Py_DECREF(__pyx_5); __pyx_5 = 0;
  Py_DECREF(__pyx_7); __pyx_7 = 0;
  __pyx_3 = PyTuple_New(5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; goto __pyx_L1;}
  Py_INCREF(__pyx_v_utf8_path);
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_utf8_path);
  Py_INCREF(__pyx_v_utf8_basename);
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_utf8_basename);
  PyTuple_SET_ITEM(__pyx_3, 2, __pyx_2);
  Py_INCREF(__pyx_v_stat);
  PyTuple_SET_ITEM(__pyx_3, 3, __pyx_v_stat);
  Py_INCREF(__pyx_v_abspath);
  PyTuple_SET_ITEM(__pyx_3, 4, __pyx_v_abspath);
  __pyx_2 = 0;
  Py_DECREF(__pyx_v_dir_info);
  __pyx_v_dir_info = __pyx_3;
  __pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1970 */
  __pyx_1 = __Pyx_GetItemInt(__pyx_v_dir_info, 2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1970; goto __pyx_L1;}
  if (PyObject_Cmp(__pyx_1, __pyx_n_directory, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1970; goto __pyx_L1;}
  __pyx_4 = __pyx_4 == 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (__pyx_4) {
    __pyx_6 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n__directory_is_tree_reference); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1971; goto __pyx_L1;}
    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1971; goto __pyx_L1;}
    Py_INCREF(__pyx_v_unicode_path);
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_unicode_path);
    __pyx_7 = PyObject_CallObject(__pyx_6, __pyx_5); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1971; goto __pyx_L1;}
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    __pyx_4 = PyObject_IsTrue(__pyx_7); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1971; goto __pyx_L1;}
    Py_DECREF(__pyx_7); __pyx_7 = 0;
    if (__pyx_4) {
      __pyx_2 = PySequence_GetSlice(__pyx_v_self->root_dir_info, 0, 2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; goto __pyx_L1;}
      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; goto __pyx_L1;}
      Py_INCREF(__pyx_k80p);
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k80p);
      __pyx_1 = PyNumber_Add(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; goto __pyx_L1;}
      Py_DECREF(__pyx_2); __pyx_2 = 0;
      Py_DECREF(__pyx_3); __pyx_3 = 0;
      __pyx_6 = PySequence_GetSlice(__pyx_v_self->root_dir_info, 3, PY_SSIZE_T_MAX); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; goto __pyx_L1;}
      __pyx_5 = PyNumber_Add(__pyx_1, __pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; goto __pyx_L1;}
      Py_DECREF(__pyx_1); __pyx_1 = 0;
      Py_DECREF(__pyx_6); __pyx_6 = 0;
      Py_DECREF(__pyx_v_self->root_dir_info);
      __pyx_v_self->root_dir_info = __pyx_5;
      __pyx_5 = 0;
      goto __pyx_L6;
    }
    __pyx_L6:;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1975 */
  Py_INCREF(__pyx_v_dir_info);
  __pyx_r = __pyx_v_dir_info;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  Py_XDECREF(__pyx_7);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._path_info");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_abspath);
  Py_DECREF(__pyx_v_stat);
  Py_DECREF(__pyx_v_e);
  Py_DECREF(__pyx_v_utf8_basename);
  Py_DECREF(__pyx_v_dir_info);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_utf8_path);
  Py_DECREF(__pyx_v_unicode_path);
  return __pyx_r;
}
static struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_Reader;

static PyObject *__pyx_tp_new_6bzrlib_21_dirstate_helpers_pyx_Reader(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)o);
  *(struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader **)&p->__pyx_vtab = __pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_Reader;
  p->state = Py_None; Py_INCREF(Py_None);
  p->text = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6bzrlib_21_dirstate_helpers_pyx_Reader(PyObject *o) {
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *p = (struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)o;
  Py_XDECREF(p->state);
  Py_XDECREF(p->text);
  (*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_6bzrlib_21_dirstate_helpers_pyx_Reader(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *p = (struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)o;
  if (p->state) {
    e = (*v)(p->state, a); if (e) return e;
  }
  if (p->text) {
    e = (*v)(p->text, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6bzrlib_21_dirstate_helpers_pyx_Reader(PyObject *o) {
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *p = (struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)o;
  PyObject *t;
  t = p->state; 
  p->state = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->text; 
  p->text = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  return 0;
}

static struct PyMethodDef __pyx_methods_6bzrlib_21_dirstate_helpers_pyx_Reader[] = {
  {"_parse_dirblocks", (PyCFunction)__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader__parse_dirblocks, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_6Reader__parse_dirblocks},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Reader = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_divide*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_coerce*/
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  0, /*nb_oct*/
  0, /*nb_hex*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_divide*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Reader = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Reader = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Reader = {
  0, /*bf_getreadbuffer*/
  0, /*bf_getwritebuffer*/
  0, /*bf_getsegcount*/
  0, /*bf_getcharbuffer*/
};

PyTypeObject __pyx_type_6bzrlib_21_dirstate_helpers_pyx_Reader = {
  PyObject_HEAD_INIT(0)
  0, /*ob_size*/
  "bzrlib._dirstate_helpers_pyx.Reader", /*tp_name*/
  sizeof(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6bzrlib_21_dirstate_helpers_pyx_Reader, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_Reader, /*tp_as_number*/
  &__pyx_tp_as_sequence_Reader, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Reader, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Reader, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "Maintain the current location, and return fields as you parse them.", /*tp_doc*/
  __pyx_tp_traverse_6bzrlib_21_dirstate_helpers_pyx_Reader, /*tp_traverse*/
  __pyx_tp_clear_6bzrlib_21_dirstate_helpers_pyx_Reader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6bzrlib_21_dirstate_helpers_pyx_Reader, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6bzrlib_21_dirstate_helpers_pyx_Reader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};
static struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC;

static PyObject *__pyx_tp_new_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)o);
  *(struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC **)&p->__pyx_vtab = __pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC;
  p->old_dirname_to_file_id = Py_None; Py_INCREF(Py_None);
  p->new_dirname_to_file_id = Py_None; Py_INCREF(Py_None);
  p->last_source_parent = Py_None; Py_INCREF(Py_None);
  p->last_target_parent = Py_None; Py_INCREF(Py_None);
  p->use_filesystem_for_exec = Py_None; Py_INCREF(Py_None);
  p->utf8_decode = Py_None; Py_INCREF(Py_None);
  p->searched_specific_files = Py_None; Py_INCREF(Py_None);
  p->searched_exact_paths = Py_None; Py_INCREF(Py_None);
  p->search_specific_files = Py_None; Py_INCREF(Py_None);
  p->search_specific_file_parents = Py_None; Py_INCREF(Py_None);
  p->state = Py_None; Py_INCREF(Py_None);
  p->current_root = Py_None; Py_INCREF(Py_None);
  p->current_root_unicode = Py_None; Py_INCREF(Py_None);
  p->root_entries = Py_None; Py_INCREF(Py_None);
  p->root_abspath = Py_None; Py_INCREF(Py_None);
  p->tree = Py_None; Py_INCREF(Py_None);
  p->dir_iterator = Py_None; Py_INCREF(Py_None);
  p->current_block = Py_None; Py_INCREF(Py_None);
  p->current_block_list = Py_None; Py_INCREF(Py_None);
  p->current_dir_info = Py_None; Py_INCREF(Py_None);
  p->current_dir_list = Py_None; Py_INCREF(Py_None);
  p->_pending_consistent_entries = Py_None; Py_INCREF(Py_None);
  p->root_dir_info = Py_None; Py_INCREF(Py_None);
  p->bisect_left = Py_None; Py_INCREF(Py_None);
  p->pathjoin = Py_None; Py_INCREF(Py_None);
  p->fstat = Py_None; Py_INCREF(Py_None);
  p->seen_ids = Py_None; Py_INCREF(Py_None);
  p->sha_file = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC(PyObject *o) {
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *p = (struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)o;
  Py_XDECREF(p->old_dirname_to_file_id);
  Py_XDECREF(p->new_dirname_to_file_id);
  Py_XDECREF(p->last_source_parent);
  Py_XDECREF(p->last_target_parent);
  Py_XDECREF(p->use_filesystem_for_exec);
  Py_XDECREF(p->utf8_decode);
  Py_XDECREF(p->searched_specific_files);
  Py_XDECREF(p->searched_exact_paths);
  Py_XDECREF(p->search_specific_files);
  Py_XDECREF(p->search_specific_file_parents);
  Py_XDECREF(p->state);
  Py_XDECREF(p->current_root);
  Py_XDECREF(p->current_root_unicode);
  Py_XDECREF(p->root_entries);
  Py_XDECREF(p->root_abspath);
  Py_XDECREF(p->tree);
  Py_XDECREF(p->dir_iterator);
  Py_XDECREF(p->current_block);
  Py_XDECREF(p->current_block_list);
  Py_XDECREF(p->current_dir_info);
  Py_XDECREF(p->current_dir_list);
  Py_XDECREF(p->_pending_consistent_entries);
  Py_XDECREF(p->root_dir_info);
  Py_XDECREF(p->bisect_left);
  Py_XDECREF(p->pathjoin);
  Py_XDECREF(p->fstat);
  Py_XDECREF(p->seen_ids);
  Py_XDECREF(p->sha_file);
  (*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *p = (struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)o;
  if (p->old_dirname_to_file_id) {
    e = (*v)(p->old_dirname_to_file_id, a); if (e) return e;
  }
  if (p->new_dirname_to_file_id) {
    e = (*v)(p->new_dirname_to_file_id, a); if (e) return e;
  }
  if (p->last_source_parent) {
    e = (*v)(p->last_source_parent, a); if (e) return e;
  }
  if (p->last_target_parent) {
    e = (*v)(p->last_target_parent, a); if (e) return e;
  }
  if (p->use_filesystem_for_exec) {
    e = (*v)(p->use_filesystem_for_exec, a); if (e) return e;
  }
  if (p->utf8_decode) {
    e = (*v)(p->utf8_decode, a); if (e) return e;
  }
  if (p->searched_specific_files) {
    e = (*v)(p->searched_specific_files, a); if (e) return e;
  }
  if (p->searched_exact_paths) {
    e = (*v)(p->searched_exact_paths, a); if (e) return e;
  }
  if (p->search_specific_files) {
    e = (*v)(p->search_specific_files, a); if (e) return e;
  }
  if (p->search_specific_file_parents) {
    e = (*v)(p->search_specific_file_parents, a); if (e) return e;
  }
  if (p->state) {
    e = (*v)(p->state, a); if (e) return e;
  }
  if (p->current_root) {
    e = (*v)(p->current_root, a); if (e) return e;
  }
  if (p->current_root_unicode) {
    e = (*v)(p->current_root_unicode, a); if (e) return e;
  }
  if (p->root_entries) {
    e = (*v)(p->root_entries, a); if (e) return e;
  }
  if (p->root_abspath) {
    e = (*v)(p->root_abspath, a); if (e) return e;
  }
  if (p->tree) {
    e = (*v)(p->tree, a); if (e) return e;
  }
  if (p->dir_iterator) {
    e = (*v)(p->dir_iterator, a); if (e) return e;
  }
  if (p->current_block) {
    e = (*v)(p->current_block, a); if (e) return e;
  }
  if (p->current_block_list) {
    e = (*v)(p->current_block_list, a); if (e) return e;
  }
  if (p->current_dir_info) {
    e = (*v)(p->current_dir_info, a); if (e) return e;
  }
  if (p->current_dir_list) {
    e = (*v)(p->current_dir_list, a); if (e) return e;
  }
  if (p->_pending_consistent_entries) {
    e = (*v)(p->_pending_consistent_entries, a); if (e) return e;
  }
  if (p->root_dir_info) {
    e = (*v)(p->root_dir_info, a); if (e) return e;
  }
  if (p->bisect_left) {
    e = (*v)(p->bisect_left, a); if (e) return e;
  }
  if (p->pathjoin) {
    e = (*v)(p->pathjoin, a); if (e) return e;
  }
  if (p->fstat) {
    e = (*v)(p->fstat, a); if (e) return e;
  }
  if (p->seen_ids) {
    e = (*v)(p->seen_ids, a); if (e) return e;
  }
  if (p->sha_file) {
    e = (*v)(p->sha_file, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC(PyObject *o) {
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *p = (struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)o;
  PyObject *t;
  t = p->old_dirname_to_file_id; 
  p->old_dirname_to_file_id = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->new_dirname_to_file_id; 
  p->new_dirname_to_file_id = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->last_source_parent; 
  p->last_source_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->last_target_parent; 
  p->last_target_parent = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->use_filesystem_for_exec; 
  p->use_filesystem_for_exec = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->utf8_decode; 
  p->utf8_decode = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->searched_specific_files; 
  p->searched_specific_files = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->searched_exact_paths; 
  p->searched_exact_paths = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->search_specific_files; 
  p->search_specific_files = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->search_specific_file_parents; 
  p->search_specific_file_parents = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->state; 
  p->state = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->current_root; 
  p->current_root = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->current_root_unicode; 
  p->current_root_unicode = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->root_entries; 
  p->root_entries = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->root_abspath; 
  p->root_abspath = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->tree; 
  p->tree = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->dir_iterator; 
  p->dir_iterator = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->current_block; 
  p->current_block = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->current_block_list; 
  p->current_block_list = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->current_dir_info; 
  p->current_dir_info = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->current_dir_list; 
  p->current_dir_list = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->_pending_consistent_entries; 
  p->_pending_consistent_entries = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->root_dir_info; 
  p->root_dir_info = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->bisect_left; 
  p->bisect_left = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->pathjoin; 
  p->pathjoin = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->fstat; 
  p->fstat = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->seen_ids; 
  p->seen_ids = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  t = p->sha_file; 
  p->sha_file = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(t);
  return 0;
}

static struct PyMethodDef __pyx_methods_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC[] = {
  {"iter_changes", (PyCFunction)__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_iter_changes, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyMemberDef __pyx_members_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC[] = {
  {"searched_specific_files", T_OBJECT, offsetof(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC, searched_specific_files), READONLY, 0},
  {"searched_exact_paths", T_OBJECT, offsetof(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC, searched_exact_paths), READONLY, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_ProcessEntryC = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_divide*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_coerce*/
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  0, /*nb_oct*/
  0, /*nb_hex*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_divide*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_ProcessEntryC = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_ProcessEntryC = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_ProcessEntryC = {
  0, /*bf_getreadbuffer*/
  0, /*bf_getwritebuffer*/
  0, /*bf_getsegcount*/
  0, /*bf_getcharbuffer*/
};

PyTypeObject __pyx_type_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC = {
  PyObject_HEAD_INIT(0)
  0, /*ob_size*/
  "bzrlib._dirstate_helpers_pyx.ProcessEntryC", /*tp_name*/
  sizeof(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_ProcessEntryC, /*tp_as_number*/
  &__pyx_tp_as_sequence_ProcessEntryC, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_ProcessEntryC, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_ProcessEntryC, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC, /*tp_traverse*/
  __pyx_tp_clear_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC___iter__, /*tp_iter*/
  __pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC___next__, /*tp_iternext*/
  __pyx_methods_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC, /*tp_methods*/
  __pyx_members_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};

static struct PyMethodDef __pyx_methods[] = {
  {"_py_memrchr", (PyCFunction)__pyx_f_6bzrlib_21_dirstate_helpers_pyx__py_memrchr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bzrlib_21_dirstate_helpers_pyx__py_memrchr},
  {"cmp_by_dirs", (PyCFunction)__pyx_f_6bzrlib_21_dirstate_helpers_pyx_cmp_by_dirs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_cmp_by_dirs},
  {"_cmp_path_by_dirblock", (PyCFunction)__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock},
  {"_bisect_path_left", (PyCFunction)__pyx_f_6bzrlib_21_dirstate_helpers_pyx__bisect_path_left, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bzrlib_21_dirstate_helpers_pyx__bisect_path_left},
  {"_bisect_path_right", (PyCFunction)__pyx_f_6bzrlib_21_dirstate_helpers_pyx__bisect_path_right, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bzrlib_21_dirstate_helpers_pyx__bisect_path_right},
  {"bisect_dirblock", (PyCFunction)__pyx_f_6bzrlib_21_dirstate_helpers_pyx_bisect_dirblock, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_bisect_dirblock},
  {"_read_dirblocks", (PyCFunction)__pyx_f_6bzrlib_21_dirstate_helpers_pyx__read_dirblocks, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bzrlib_21_dirstate_helpers_pyx__read_dirblocks},
  {"update_entry", (PyCFunction)__pyx_f_6bzrlib_21_dirstate_helpers_pyx_update_entry, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_update_entry},
  {0, 0, 0, 0}
};

static void __pyx_init_filenames(void); /*proto*/

PyMODINIT_FUNC init_dirstate_helpers_pyx(void); /*proto*/
PyMODINIT_FUNC init_dirstate_helpers_pyx(void) {
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  __pyx_init_filenames();
  __pyx_m = Py_InitModule4("_dirstate_helpers_pyx", __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION);
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;};
  Py_INCREF(__pyx_m);
  __pyx_b = PyImport_AddModule("__builtin__");
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;};
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;};
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;};
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_absent = Py_None; Py_INCREF(Py_None);
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_file = Py_None; Py_INCREF(Py_None);
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_directory = Py_None; Py_INCREF(Py_None);
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_symlink = Py_None; Py_INCREF(Py_None);
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_relocated = Py_None; Py_INCREF(Py_None);
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_tree_reference = Py_None; Py_INCREF(Py_None);
  __pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_Reader = &__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_Reader;
  *(void(**)(void))&__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_Reader.get_next = (void(*)(void))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader_get_next;
  *(void(**)(void))&__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_Reader.get_next_str = (void(*)(void))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader_get_next_str;
  *(void(**)(void))&__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_Reader._init = (void(*)(void))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader__init;
  *(void(**)(void))&__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_Reader._get_entry = (void(*)(void))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader__get_entry;
  __pyx_type_6bzrlib_21_dirstate_helpers_pyx_Reader.tp_free = _PyObject_GC_Del;
  if (PyType_Ready(&__pyx_type_6bzrlib_21_dirstate_helpers_pyx_Reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;}
  if (__Pyx_SetVtable(__pyx_type_6bzrlib_21_dirstate_helpers_pyx_Reader.tp_dict, __pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_Reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "Reader", (PyObject *)&__pyx_type_6bzrlib_21_dirstate_helpers_pyx_Reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;}
  __pyx_ptype_6bzrlib_21_dirstate_helpers_pyx_Reader = &__pyx_type_6bzrlib_21_dirstate_helpers_pyx_Reader;
  __pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC = &__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC;
  *(void(**)(void))&__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._process_entry = (void(*)(void))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__process_entry;
  *(void(**)(void))&__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._gather_result_for_consistency = (void(*)(void))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__gather_result_for_consistency;
  *(void(**)(void))&__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._update_current_block = (void(*)(void))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__update_current_block;
  *(void(**)(void))&__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._iter_next = (void(*)(void))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__iter_next;
  *(void(**)(void))&__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._maybe_tree_ref = (void(*)(void))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__maybe_tree_ref;
  *(void(**)(void))&__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._loop_one_block = (void(*)(void))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__loop_one_block;
  *(void(**)(void))&__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._next_consistent_entries = (void(*)(void))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__next_consistent_entries;
  *(void(**)(void))&__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._path_info = (void(*)(void))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__path_info;
  __pyx_type_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC.tp_free = _PyObject_GC_Del;
  if (PyType_Ready(&__pyx_type_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; goto __pyx_L1;}
  if (__Pyx_SetVtable(__pyx_type_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC.tp_dict, __pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "ProcessEntryC", (PyObject *)&__pyx_type_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; goto __pyx_L1;}
  __pyx_ptype_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC = &__pyx_type_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":22 */
  __pyx_1 = __Pyx_Import(__pyx_n_binascii, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_binascii, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":23 */
  __pyx_1 = __Pyx_Import(__pyx_n_bisect, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_bisect, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":24 */
  __pyx_1 = __Pyx_Import(__pyx_n_errno, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_errno, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":25 */
  __pyx_1 = __Pyx_Import(__pyx_n_os, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_os, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":26 */
  __pyx_1 = __Pyx_Import(__pyx_n_stat, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_stat, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":27 */
  __pyx_1 = __Pyx_Import(__pyx_n_sys, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_sys, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":29 */
  __pyx_1 = PyList_New(3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
  Py_INCREF(__pyx_n_cache_utf8);
  PyList_SET_ITEM(__pyx_1, 0, __pyx_n_cache_utf8);
  Py_INCREF(__pyx_n_errors);
  PyList_SET_ITEM(__pyx_1, 1, __pyx_n_errors);
  Py_INCREF(__pyx_n_osutils);
  PyList_SET_ITEM(__pyx_1, 2, __pyx_n_osutils);
  __pyx_2 = __Pyx_Import(__pyx_n_bzrlib, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_cache_utf8); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_cache_utf8, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_errors); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_errors, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_osutils); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_osutils, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":30 */
  __pyx_2 = PyList_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
  Py_INCREF(__pyx_n_DirState);
  PyList_SET_ITEM(__pyx_2, 0, __pyx_n_DirState);
  __pyx_1 = __Pyx_Import(__pyx_k128p, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_DirState); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_DirState, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":31 */
  __pyx_1 = PyList_New(3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
  Py_INCREF(__pyx_n_parent_directories);
  PyList_SET_ITEM(__pyx_1, 0, __pyx_n_parent_directories);
  Py_INCREF(__pyx_n_pathjoin);
  PyList_SET_ITEM(__pyx_1, 1, __pyx_n_pathjoin);
  Py_INCREF(__pyx_n_splitpath);
  PyList_SET_ITEM(__pyx_1, 2, __pyx_n_splitpath);
  __pyx_2 = __Pyx_Import(__pyx_k129p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_parent_directories); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_parent_directories, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_pathjoin); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_pathjoin, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_splitpath); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_splitpath, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":39 */
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx_ERROR_PATH_NOT_FOUND = 3;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":41 */
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx_ERROR_DIRECTORY = 267;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":477 */
  __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; goto __pyx_L1;}
  __pyx_d1 = __pyx_2;
  __pyx_2 = 0;
  Py_INCREF(Py_None);
  __pyx_d2 = Py_None;
  Py_INCREF(Py_None);
  __pyx_d3 = Py_None;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":782 */
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_binascii); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; goto __pyx_L1;}
  __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_b2a_base64); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n__encode, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; goto __pyx_L1;}
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":785 */
  __pyx_1 = PyList_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;}
  Py_INCREF(__pyx_n_pack);
  PyList_SET_ITEM(__pyx_1, 0, __pyx_n_pack);
  __pyx_3 = __Pyx_Import(__pyx_n_struct, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_pack); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_pack, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":930 */
  Py_INCREF(__pyx_n_absent);
  Py_DECREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_absent);
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_absent = __pyx_n_absent;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":931 */
  Py_INCREF(__pyx_n_file);
  Py_DECREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_file);
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_file = __pyx_n_file;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":932 */
  Py_INCREF(__pyx_n_directory);
  Py_DECREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_directory);
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_directory = __pyx_n_directory;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":933 */
  Py_INCREF(__pyx_n_symlink);
  Py_DECREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_symlink);
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_symlink = __pyx_n_symlink;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":934 */
  Py_INCREF(__pyx_n_relocated);
  Py_DECREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_relocated);
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_relocated = __pyx_n_relocated;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":935 */
  Py_INCREF(__pyx_k80p);
  Py_DECREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_tree_reference);
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_tree_reference = __pyx_k80p;

  /* "/home/vila/src/bzr/releases/prepare-2.2.2/bzrlib/_dirstate_helpers_pyx.pyx":1952 */
  return;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx");
}

static char *__pyx_filenames[] = {
  "_dirstate_helpers_pyx.pyx",
};

/* Runtime support code */

static void __pyx_init_filenames(void) {
  __pyx_f = __pyx_filenames;
}

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    /* First, check the traceback argument, replacing None with NULL. */
    if (tb == Py_None) {
        Py_DECREF(tb);
        tb = 0;
    }
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto raise_error;
    }
    /* Next, replace a missing value with None */
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    #if PY_VERSION_HEX < 0x02050000
    if (!PyClass_Check(type))
    #else
    if (!PyType_Check(type))
    #endif
    {
        /* Raising an instance.  The value should be a dummy. */
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        /* Normalize to raise <class>, <instance> */
        Py_DECREF(value);
        value = type;
        #if PY_VERSION_HEX < 0x02050000
            if (PyInstance_Check(type)) {
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                Py_INCREF(type);
            }
            else {
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception must be an old-style class or instance");
                goto raise_error;
            }
        #else
            type = (PyObject*) type->ob_type;
            Py_INCREF(type);
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception class must be a subclass of BaseException");
                goto raise_error;
            }
        #endif
    }
    PyErr_Restore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result)
        PyErr_SetObject(PyExc_NameError, name);
    return result;
}

static PyObject *__Pyx_GetItemInt(PyObject *o, Py_ssize_t i) {
    PyTypeObject *t = o->ob_type;
    PyObject *r;
    if (t->tp_as_sequence && t->tp_as_sequence->sq_item)
        r = PySequence_GetItem(o, i);
    else {
        PyObject *j = PyInt_FromLong(i);
        if (!j)
            return 0;
        r = PyObject_GetItem(o, j);
        Py_DECREF(j);
    }
    return r;
}

static int __Pyx_SetItemInt(PyObject *o, Py_ssize_t i, PyObject *v) {
    PyTypeObject *t = o->ob_type;
    int r;
    if (t->tp_as_sequence && t->tp_as_sequence->sq_item)
        r = PySequence_SetItem(o, i, v);
    else {
        PyObject *j = PyInt_FromLong(i);
        if (!j)
            return -1;
        r = PyObject_SetItem(o, j, v);
        Py_DECREF(j);
    }
    return r;
}

static void __Pyx_UnpackError(void) {
    PyErr_SetString(PyExc_ValueError, "unpack sequence of wrong size");
}

static PyObject *__Pyx_UnpackItem(PyObject *iter) {
    PyObject *item;
    if (!(item = PyIter_Next(iter))) {
        if (!PyErr_Occurred())
            __Pyx_UnpackError();
    }
    return item;
}

static int __Pyx_EndUnpack(PyObject *iter) {
    PyObject *item;
    if ((item = PyIter_Next(iter))) {
        Py_DECREF(item);
        __Pyx_UnpackError();
        return -1;
    }
    else if (!PyErr_Occurred())
        return 0;
    else
        return -1;
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyThreadState *tstate = PyThreadState_Get();
    PyErr_Fetch(type, value, tb);
    PyErr_NormalizeException(type, value, tb);
    if (PyErr_Occurred())
        goto bad;
    Py_INCREF(*type);
    Py_INCREF(*value);
    Py_INCREF(*tb);
    Py_XDECREF(tstate->exc_type);
    Py_XDECREF(tstate->exc_value);
    Py_XDECREF(tstate->exc_traceback);
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
    return 0;
bad:
    Py_XDECREF(*type);
    Py_XDECREF(*value);
    Py_XDECREF(*tb);
    return -1;
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        if (!*t->p)
            return -1;
        if (t->i)
            PyString_InternInPlace(t->p);
        ++t;
    }
    return 0;
}

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
    PyObject *pycobj = 0;
    int result;
    
    pycobj = PyCObject_FromVoidPtr(vtable, 0);
    if (!pycobj)
        goto bad;
    if (PyDict_SetItemString(dict, "__pyx_vtable__", pycobj) < 0)
        goto bad;
    result = 0;
    goto done;

bad:
    result = -1;
done:
    Py_XDECREF(pycobj);
    return result;
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
    PyObject *__import__ = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    __import__ = PyObject_GetAttrString(__pyx_b, "__import__");
    if (!__import__)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    module = PyObject_CallFunction(__import__, "OOOO",
        name, global_dict, empty_dict, list);
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(__import__);
    Py_XDECREF(empty_dict);
    return module;
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"

static void __Pyx_AddTraceback(char *funcname) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyObject *empty_tuple = 0;
    PyObject *empty_string = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    
    py_srcfile = PyString_FromString(__pyx_filename);
    if (!py_srcfile) goto bad;
    py_funcname = PyString_FromString(funcname);
    if (!py_funcname) goto bad;
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    empty_tuple = PyTuple_New(0);
    if (!empty_tuple) goto bad;
    empty_string = PyString_FromString("");
    if (!empty_string) goto bad;
    py_code = PyCode_New(
        0,            /*int argcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        empty_string, /*PyObject *code,*/
        empty_tuple,  /*PyObject *consts,*/
        empty_tuple,  /*PyObject *names,*/
        empty_tuple,  /*PyObject *varnames,*/
        empty_tuple,  /*PyObject *freevars,*/
        empty_tuple,  /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        __pyx_lineno,   /*int firstlineno,*/
        empty_string  /*PyObject *lnotab*/
    );
    if (!py_code) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_Get(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(empty_tuple);
    Py_XDECREF(empty_string);
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
