~ubuntu-branches/ubuntu/karmic/bzr/karmic-proposed

« back to all changes in this revision

Viewing changes to bzrlib/_dirstate_helpers_c.c

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2009-06-18 13:08:56 UTC
  • mfrom: (1.1.55 upstream)
  • Revision ID: james.westby@ubuntu.com-20090618130856-7wxyrwynoj72374q
Tags: 1.16-1
* New upstream release.
* Add python-pyrex to build-deps to ensure C extensions are always build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 0.9.7.2 on Fri Jun 12 16:20:45 2009 */
 
2
 
 
3
#define PY_SSIZE_T_CLEAN
 
4
#include "Python.h"
 
5
#include "structmember.h"
 
6
#ifndef PY_LONG_LONG
 
7
  #define PY_LONG_LONG LONG_LONG
 
8
#endif
 
9
#if PY_VERSION_HEX < 0x02050000
 
10
  typedef int Py_ssize_t;
 
11
  #define PY_SSIZE_T_MAX INT_MAX
 
12
  #define PY_SSIZE_T_MIN INT_MIN
 
13
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
 
14
  #define PyInt_AsSsize_t(o)    PyInt_AsLong(o)
 
15
#endif
 
16
#ifndef WIN32
 
17
  #ifndef __stdcall
 
18
    #define __stdcall
 
19
  #endif
 
20
  #ifndef __cdecl
 
21
    #define __cdecl
 
22
  #endif
 
23
#endif
 
24
#ifdef __cplusplus
 
25
#define __PYX_EXTERN_C extern "C"
 
26
#else
 
27
#define __PYX_EXTERN_C extern
 
28
#endif
 
29
#include <math.h>
 
30
#include "python-compat.h"
 
31
#include "_dirstate_helpers_c.h"
 
32
#include "stdlib.h"
 
33
#include "sys/stat.h"
 
34
#include "string.h"
 
35
 
 
36
 
 
37
typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/
 
38
typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/
 
39
 
 
40
static PyObject *__pyx_m;
 
41
static PyObject *__pyx_b;
 
42
static int __pyx_lineno;
 
43
static char *__pyx_filename;
 
44
static char **__pyx_f;
 
45
 
 
46
static char __pyx_mdoc[] = "Helper functions for DirState.\n\nThis is the python implementation for DirState functions.\n";
 
47
 
 
48
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
 
49
 
 
50
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
 
51
 
 
52
static PyObject *__Pyx_GetItemInt(PyObject *o, Py_ssize_t i); /*proto*/
 
53
 
 
54
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 
55
 
 
56
static int __Pyx_SetItemInt(PyObject *o, Py_ssize_t i, PyObject *v); /*proto*/
 
57
 
 
58
static PyObject *__Pyx_UnpackItem(PyObject *); /*proto*/
 
59
static int __Pyx_EndUnpack(PyObject *); /*proto*/
 
60
 
 
61
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
62
 
 
63
static void __Pyx_WriteUnraisable(char *name); /*proto*/
 
64
 
 
65
static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/
 
66
 
 
67
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
 
68
 
 
69
static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
 
70
 
 
71
static void __Pyx_AddTraceback(char *funcname); /*proto*/
 
72
 
 
73
/* Declarations from _dirstate_helpers_c */
 
74
 
 
75
struct __pyx_obj_19_dirstate_helpers_c_Reader {
 
76
  PyObject_HEAD
 
77
  struct __pyx_vtabstruct_19_dirstate_helpers_c_Reader *__pyx_vtab;
 
78
  PyObject *state;
 
79
  PyObject *text;
 
80
  char *text_cstr;
 
81
  int text_size;
 
82
  char *end_cstr;
 
83
  char *cur_cstr;
 
84
  char *next;
 
85
};
 
86
 
 
87
struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC {
 
88
  PyObject_HEAD
 
89
  struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC *__pyx_vtab;
 
90
  PyObject *old_dirname_to_file_id;
 
91
  PyObject *new_dirname_to_file_id;
 
92
  PyObject *uninteresting;
 
93
  PyObject *last_source_parent;
 
94
  PyObject *last_target_parent;
 
95
  PyObject *include_unchanged;
 
96
  PyObject *use_filesystem_for_exec;
 
97
  PyObject *utf8_decode;
 
98
  PyObject *searched_specific_files;
 
99
  PyObject *search_specific_files;
 
100
  PyObject *state;
 
101
  PyObject *current_root;
 
102
  PyObject *current_root_unicode;
 
103
  PyObject *root_entries;
 
104
  int root_entries_pos;
 
105
  int root_entries_len;
 
106
  PyObject *root_abspath;
 
107
  int source_index;
 
108
  int target_index;
 
109
  int want_unversioned;
 
110
  PyObject *tree;
 
111
  PyObject *dir_iterator;
 
112
  int block_index;
 
113
  PyObject *current_block;
 
114
  int current_block_pos;
 
115
  PyObject *current_block_list;
 
116
  PyObject *current_dir_info;
 
117
  PyObject *current_dir_list;
 
118
  int path_index;
 
119
  PyObject *root_dir_info;
 
120
  PyObject *bisect_left;
 
121
  PyObject *pathjoin;
 
122
  PyObject *fstat;
 
123
  PyObject *sha_file;
 
124
};
 
125
 
 
126
 
 
127
struct __pyx_vtabstruct_19_dirstate_helpers_c_Reader {
 
128
  char *(*get_next)(struct __pyx_obj_19_dirstate_helpers_c_Reader *,int *);
 
129
  PyObject *(*get_next_str)(struct __pyx_obj_19_dirstate_helpers_c_Reader *);
 
130
  int (*_init)(struct __pyx_obj_19_dirstate_helpers_c_Reader *);
 
131
  PyObject *(*_get_entry)(struct __pyx_obj_19_dirstate_helpers_c_Reader *,int,void **,int *);
 
132
};
 
133
static struct __pyx_vtabstruct_19_dirstate_helpers_c_Reader *__pyx_vtabptr_19_dirstate_helpers_c_Reader;
 
134
 
 
135
 
 
136
struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC {
 
137
  PyObject *(*_process_entry)(struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *,PyObject *,PyObject *);
 
138
  void (*_update_current_block)(struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *);
 
139
  PyObject *(*_iter_next)(struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *);
 
140
  PyObject *(*_maybe_tree_ref)(struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *,PyObject *);
 
141
  PyObject *(*_loop_one_block)(struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *);
 
142
};
 
143
static struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC *__pyx_vtabptr_19_dirstate_helpers_c_ProcessEntryC;
 
144
 
 
145
static PyTypeObject *__pyx_ptype_19_dirstate_helpers_c_Reader = 0;
 
146
static PyTypeObject *__pyx_ptype_19_dirstate_helpers_c_ProcessEntryC = 0;
 
147
static int __pyx_v_19_dirstate_helpers_c_ERROR_PATH_NOT_FOUND;
 
148
static int __pyx_v_19_dirstate_helpers_c_ERROR_DIRECTORY;
 
149
static PyObject *__pyx_v_19_dirstate_helpers_c__kind_absent;
 
150
static PyObject *__pyx_v_19_dirstate_helpers_c__kind_file;
 
151
static PyObject *__pyx_v_19_dirstate_helpers_c__kind_directory;
 
152
static PyObject *__pyx_v_19_dirstate_helpers_c__kind_symlink;
 
153
static PyObject *__pyx_v_19_dirstate_helpers_c__kind_relocated;
 
154
static PyObject *__pyx_v_19_dirstate_helpers_c__kind_tree_reference;
 
155
static PyObject *__pyx_k16;
 
156
static PyObject *__pyx_k17;
 
157
static PyObject *__pyx_k18;
 
158
static void *__pyx_f_19_dirstate_helpers_c__my_memrchr(void *,int,size_t); /*proto*/
 
159
static PyObject *__pyx_f_19_dirstate_helpers_c_safe_string_from_size(char *,Py_ssize_t); /*proto*/
 
160
static int __pyx_f_19_dirstate_helpers_c__is_aligned(void *); /*proto*/
 
161
static int __pyx_f_19_dirstate_helpers_c__cmp_by_dirs(char *,int,char *,int); /*proto*/
 
162
static int __pyx_f_19_dirstate_helpers_c__cmp_path_by_dirblock(char *,int,char *,int); /*proto*/
 
163
static int __pyx_f_19_dirstate_helpers_c_minikind_from_mode(int); /*proto*/
 
164
static PyObject *__pyx_f_19_dirstate_helpers_c__pack_stat(PyObject *); /*proto*/
 
165
static PyObject *__pyx_f_19_dirstate_helpers_c__update_entry(PyObject *,PyObject *,PyObject *,PyObject *); /*proto*/
 
166
static char __pyx_f_19_dirstate_helpers_c__minikind_from_string(PyObject *); /*proto*/
 
167
static PyObject *__pyx_f_19_dirstate_helpers_c__minikind_to_kind(char); /*proto*/
 
168
static int __pyx_f_19_dirstate_helpers_c__versioned_minikind(char); /*proto*/
 
169
 
 
170
 
 
171
/* Implementation of _dirstate_helpers_c */
 
172
 
 
173
static char __pyx_k11[] = "bzrlib.dirstate";
 
174
static char __pyx_k13[] = "bzrlib.osutils";
 
175
static char __pyx_k26[] = "tree-reference";
 
176
 
 
177
static PyObject *__pyx_n_binascii;
 
178
static PyObject *__pyx_n_bisect;
 
179
static PyObject *__pyx_n_errno;
 
180
static PyObject *__pyx_n_os;
 
181
static PyObject *__pyx_n_stat;
 
182
static PyObject *__pyx_n_sys;
 
183
static PyObject *__pyx_n_bzrlib;
 
184
static PyObject *__pyx_n_cache_utf8;
 
185
static PyObject *__pyx_n_errors;
 
186
static PyObject *__pyx_n_osutils;
 
187
static PyObject *__pyx_n_DirState;
 
188
static PyObject *__pyx_n_pathjoin;
 
189
static PyObject *__pyx_n_splitpath;
 
190
static PyObject *__pyx_n_b2a_base64;
 
191
static PyObject *__pyx_n__encode;
 
192
static PyObject *__pyx_n_struct;
 
193
static PyObject *__pyx_n_pack;
 
194
static PyObject *__pyx_n_absent;
 
195
static PyObject *__pyx_n_file;
 
196
static PyObject *__pyx_n_directory;
 
197
static PyObject *__pyx_n_symlink;
 
198
static PyObject *__pyx_n_relocated;
 
199
 
 
200
static PyObject *__pyx_k11p;
 
201
static PyObject *__pyx_k13p;
 
202
static PyObject *__pyx_k26p;
 
203
 
 
204
static void *__pyx_f_19_dirstate_helpers_c__my_memrchr(void *__pyx_v_s,int __pyx_v_c,size_t __pyx_v_n) {
 
205
  char *__pyx_v_pos;
 
206
  char *__pyx_v_start;
 
207
  void *__pyx_r;
 
208
  int __pyx_1;
 
209
 
 
210
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":127 */
 
211
  __pyx_v_start = ((char *)__pyx_v_s);
 
212
 
 
213
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":128 */
 
214
  __pyx_v_pos = ((__pyx_v_start + __pyx_v_n) - 1);
 
215
 
 
216
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":129 */
 
217
  while (1) {
 
218
    __pyx_1 = (__pyx_v_pos >= __pyx_v_start);
 
219
    if (!__pyx_1) break;
 
220
 
 
221
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":130 */
 
222
    __pyx_1 = ((__pyx_v_pos[0]) == __pyx_v_c);
 
223
    if (__pyx_1) {
 
224
      __pyx_r = ((void *)__pyx_v_pos);
 
225
      goto __pyx_L0;
 
226
      goto __pyx_L4;
 
227
    }
 
228
    __pyx_L4:;
 
229
 
 
230
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":132 */
 
231
    __pyx_v_pos = (__pyx_v_pos - 1);
 
232
  }
 
233
 
 
234
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":133 */
 
235
  __pyx_r = NULL;
 
236
  goto __pyx_L0;
 
237
 
 
238
  __pyx_r = 0;
 
239
  __pyx_L0:;
 
240
  return __pyx_r;
 
241
}
 
242
 
 
243
static PyObject *__pyx_k27p;
 
244
 
 
245
static char __pyx_k27[] = "Must be a single character string, not %s";
 
246
 
 
247
static PyObject *__pyx_f_19_dirstate_helpers_c__py_memrchr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
248
static char __pyx_doc_19_dirstate_helpers_c__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    ";
 
249
static PyObject *__pyx_f_19_dirstate_helpers_c__py_memrchr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
250
  PyObject *__pyx_v_s = 0;
 
251
  PyObject *__pyx_v_c = 0;
 
252
  void *__pyx_v__s;
 
253
  void *__pyx_v_found;
 
254
  int __pyx_v_length;
 
255
  char *__pyx_v__c;
 
256
  PyObject *__pyx_r;
 
257
  PyObject *__pyx_1 = 0;
 
258
  PyObject *__pyx_2 = 0;
 
259
  int __pyx_3;
 
260
  static char *__pyx_argnames[] = {"s","c",0};
 
261
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_s, &__pyx_v_c)) return 0;
 
262
  Py_INCREF(__pyx_v_s);
 
263
  Py_INCREF(__pyx_v_c);
 
264
 
 
265
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":148 */
 
266
  __pyx_v__s = PyString_AsString(__pyx_v_s);
 
267
 
 
268
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":149 */
 
269
  __pyx_v_length = PyString_Size(__pyx_v_s);
 
270
 
 
271
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":151 */
 
272
  __pyx_v__c = PyString_AsString(__pyx_v_c);
 
273
 
 
274
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":152 */
 
275
  #ifndef PYREX_WITHOUT_ASSERTIONS
 
276
  if (!(PyString_Size(__pyx_v_c) == 1)) {
 
277
    __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;}
 
278
    Py_INCREF(__pyx_v_c);
 
279
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_c);
 
280
    __pyx_2 = PyNumber_Remainder(__pyx_k27p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; goto __pyx_L1;}
 
281
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
282
    PyErr_SetObject(PyExc_AssertionError, __pyx_2);
 
283
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; goto __pyx_L1;}
 
284
  }
 
285
  #endif
 
286
 
 
287
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":154 */
 
288
  __pyx_v_found = __pyx_f_19_dirstate_helpers_c__my_memrchr(__pyx_v__s,(__pyx_v__c[0]),__pyx_v_length);
 
289
 
 
290
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":155 */
 
291
  __pyx_3 = (__pyx_v_found == NULL);
 
292
  if (__pyx_3) {
 
293
    Py_INCREF(Py_None);
 
294
    __pyx_r = Py_None;
 
295
    goto __pyx_L0;
 
296
    goto __pyx_L2;
 
297
  }
 
298
  __pyx_L2:;
 
299
 
 
300
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":157 */
 
301
  __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;}
 
302
  __pyx_r = __pyx_1;
 
303
  __pyx_1 = 0;
 
304
  goto __pyx_L0;
 
305
 
 
306
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
307
  goto __pyx_L0;
 
308
  __pyx_L1:;
 
309
  Py_XDECREF(__pyx_1);
 
310
  Py_XDECREF(__pyx_2);
 
311
  __Pyx_AddTraceback("_dirstate_helpers_c._py_memrchr");
 
312
  __pyx_r = 0;
 
313
  __pyx_L0:;
 
314
  Py_DECREF(__pyx_v_s);
 
315
  Py_DECREF(__pyx_v_c);
 
316
  return __pyx_r;
 
317
}
 
318
 
 
319
static PyObject *__pyx_k28p;
 
320
 
 
321
static char __pyx_k28[] = "tried to create a string with an invalid size: %d @0x%x";
 
322
 
 
323
static PyObject *__pyx_f_19_dirstate_helpers_c_safe_string_from_size(char *__pyx_v_s,Py_ssize_t __pyx_v_size) {
 
324
  PyObject *__pyx_r;
 
325
  int __pyx_1;
 
326
  PyObject *__pyx_2 = 0;
 
327
  PyObject *__pyx_3 = 0;
 
328
  PyObject *__pyx_4 = 0;
 
329
 
 
330
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":160 */
 
331
  __pyx_1 = (__pyx_v_size < 0);
 
332
  if (__pyx_1) {
 
333
    __pyx_2 = PyInt_FromSsize_t(__pyx_v_size); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;}
 
334
    __pyx_3 = PyInt_FromLong(((int)__pyx_v_s)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;}
 
335
    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;}
 
336
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
 
337
    PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
 
338
    __pyx_2 = 0;
 
339
    __pyx_3 = 0;
 
340
    __pyx_2 = PyNumber_Remainder(__pyx_k28p, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; goto __pyx_L1;}
 
341
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
342
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; goto __pyx_L1;}
 
343
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
 
344
    __pyx_2 = 0;
 
345
    __pyx_4 = PyObject_CallObject(PyExc_AssertionError, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; goto __pyx_L1;}
 
346
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
347
    __Pyx_Raise(__pyx_4, 0, 0);
 
348
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
349
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; goto __pyx_L1;}
 
350
    goto __pyx_L2;
 
351
  }
 
352
  __pyx_L2:;
 
353
 
 
354
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":165 */
 
355
  __pyx_2 = PyString_FromStringAndSize(__pyx_v_s,__pyx_v_size); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; goto __pyx_L1;}
 
356
  __pyx_r = __pyx_2;
 
357
  __pyx_2 = 0;
 
358
  goto __pyx_L0;
 
359
 
 
360
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
361
  goto __pyx_L0;
 
362
  __pyx_L1:;
 
363
  Py_XDECREF(__pyx_2);
 
364
  Py_XDECREF(__pyx_3);
 
365
  Py_XDECREF(__pyx_4);
 
366
  __Pyx_AddTraceback("_dirstate_helpers_c.safe_string_from_size");
 
367
  __pyx_r = 0;
 
368
  __pyx_L0:;
 
369
  return __pyx_r;
 
370
}
 
371
 
 
372
static int __pyx_f_19_dirstate_helpers_c__is_aligned(void *__pyx_v_ptr) {
 
373
  int __pyx_r;
 
374
  __pyx_r = ((((intptr_t)__pyx_v_ptr) & ((sizeof(int)) - 1)) == 0);
 
375
  goto __pyx_L0;
 
376
 
 
377
  __pyx_r = 0;
 
378
  __pyx_L0:;
 
379
  return __pyx_r;
 
380
}
 
381
 
 
382
static int __pyx_f_19_dirstate_helpers_c__cmp_by_dirs(char *__pyx_v_path1,int __pyx_v_size1,char *__pyx_v_path2,int __pyx_v_size2) {
 
383
  unsigned char *__pyx_v_cur1;
 
384
  unsigned char *__pyx_v_cur2;
 
385
  unsigned char *__pyx_v_end1;
 
386
  unsigned char *__pyx_v_end2;
 
387
  int *__pyx_v_cur_int1;
 
388
  int *__pyx_v_cur_int2;
 
389
  int *__pyx_v_end_int1;
 
390
  int *__pyx_v_end_int2;
 
391
  int __pyx_r;
 
392
  int __pyx_1;
 
393
 
 
394
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":186 */
 
395
  __pyx_1 = (__pyx_v_path1 == __pyx_v_path2);
 
396
  if (__pyx_1) {
 
397
    __pyx_1 = (__pyx_v_size1 == __pyx_v_size2);
 
398
  }
 
399
  if (__pyx_1) {
 
400
    __pyx_r = 0;
 
401
    goto __pyx_L0;
 
402
    goto __pyx_L2;
 
403
  }
 
404
  __pyx_L2:;
 
405
 
 
406
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":189 */
 
407
  __pyx_v_end1 = (((unsigned char *)__pyx_v_path1) + __pyx_v_size1);
 
408
 
 
409
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":190 */
 
410
  __pyx_v_end2 = (((unsigned char *)__pyx_v_path2) + __pyx_v_size2);
 
411
 
 
412
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":197 */
 
413
  __pyx_1 = __pyx_f_19_dirstate_helpers_c__is_aligned(__pyx_v_path1);
 
414
  if (__pyx_1) {
 
415
    __pyx_1 = __pyx_f_19_dirstate_helpers_c__is_aligned(__pyx_v_path2);
 
416
  }
 
417
  if (__pyx_1) {
 
418
 
 
419
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":198 */
 
420
    __pyx_v_cur_int1 = ((int *)__pyx_v_path1);
 
421
 
 
422
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":199 */
 
423
    __pyx_v_cur_int2 = ((int *)__pyx_v_path2);
 
424
 
 
425
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":200 */
 
426
    __pyx_v_end_int1 = ((int *)((__pyx_v_path1 + __pyx_v_size1) - (__pyx_v_size1 % (sizeof(int)))));
 
427
 
 
428
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":201 */
 
429
    __pyx_v_end_int2 = ((int *)((__pyx_v_path2 + __pyx_v_size2) - (__pyx_v_size2 % (sizeof(int)))));
 
430
 
 
431
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":203 */
 
432
    while (1) {
 
433
      __pyx_1 = (__pyx_v_cur_int1 < __pyx_v_end_int1);
 
434
      if (__pyx_1) {
 
435
        __pyx_1 = (__pyx_v_cur_int2 < __pyx_v_end_int2);
 
436
      }
 
437
      if (!__pyx_1) break;
 
438
 
 
439
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":204 */
 
440
      __pyx_1 = ((__pyx_v_cur_int1[0]) != (__pyx_v_cur_int2[0]));
 
441
      if (__pyx_1) {
 
442
        goto __pyx_L5;
 
443
        goto __pyx_L6;
 
444
      }
 
445
      __pyx_L6:;
 
446
 
 
447
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":206 */
 
448
      __pyx_v_cur_int1 = (__pyx_v_cur_int1 + 1);
 
449
 
 
450
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":207 */
 
451
      __pyx_v_cur_int2 = (__pyx_v_cur_int2 + 1);
 
452
    }
 
453
    __pyx_L5:;
 
454
 
 
455
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":209 */
 
456
    __pyx_v_cur1 = ((unsigned char *)__pyx_v_cur_int1);
 
457
 
 
458
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":210 */
 
459
    __pyx_v_cur2 = ((unsigned char *)__pyx_v_cur_int2);
 
460
    goto __pyx_L3;
 
461
  }
 
462
  /*else*/ {
 
463
 
 
464
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":212 */
 
465
    __pyx_v_cur1 = ((unsigned char *)__pyx_v_path1);
 
466
 
 
467
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":213 */
 
468
    __pyx_v_cur2 = ((unsigned char *)__pyx_v_path2);
 
469
  }
 
470
  __pyx_L3:;
 
471
 
 
472
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":215 */
 
473
  while (1) {
 
474
    __pyx_1 = (__pyx_v_cur1 < __pyx_v_end1);
 
475
    if (__pyx_1) {
 
476
      __pyx_1 = (__pyx_v_cur2 < __pyx_v_end2);
 
477
    }
 
478
    if (!__pyx_1) break;
 
479
 
 
480
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":216 */
 
481
    __pyx_1 = ((__pyx_v_cur1[0]) == (__pyx_v_cur2[0]));
 
482
    if (__pyx_1) {
 
483
 
 
484
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":218 */
 
485
      __pyx_v_cur1 = (__pyx_v_cur1 + 1);
 
486
 
 
487
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":219 */
 
488
      __pyx_v_cur2 = (__pyx_v_cur2 + 1);
 
489
 
 
490
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":220 */
 
491
      goto __pyx_L7;
 
492
      goto __pyx_L9;
 
493
    }
 
494
    __pyx_L9:;
 
495
 
 
496
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":222 */
 
497
    __pyx_1 = ((__pyx_v_cur1[0]) == '/');
 
498
    if (__pyx_1) {
 
499
      __pyx_r = (-1);
 
500
      goto __pyx_L0;
 
501
      goto __pyx_L10;
 
502
    }
 
503
    __pyx_1 = ((__pyx_v_cur2[0]) == '/');
 
504
    if (__pyx_1) {
 
505
      __pyx_r = 1;
 
506
      goto __pyx_L0;
 
507
      goto __pyx_L10;
 
508
    }
 
509
    __pyx_1 = ((__pyx_v_cur1[0]) < (__pyx_v_cur2[0]));
 
510
    if (__pyx_1) {
 
511
      __pyx_r = (-1);
 
512
      goto __pyx_L0;
 
513
      goto __pyx_L10;
 
514
    }
 
515
    /*else*/ {
 
516
      __pyx_r = 1;
 
517
      goto __pyx_L0;
 
518
    }
 
519
    __pyx_L10:;
 
520
    __pyx_L7:;
 
521
  }
 
522
 
 
523
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":232 */
 
524
  __pyx_1 = (__pyx_v_cur1 < __pyx_v_end1);
 
525
  if (__pyx_1) {
 
526
    __pyx_r = 1;
 
527
    goto __pyx_L0;
 
528
    goto __pyx_L11;
 
529
  }
 
530
  __pyx_L11:;
 
531
 
 
532
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":234 */
 
533
  __pyx_1 = (__pyx_v_cur2 < __pyx_v_end2);
 
534
  if (__pyx_1) {
 
535
    __pyx_r = (-1);
 
536
    goto __pyx_L0;
 
537
    goto __pyx_L12;
 
538
  }
 
539
  __pyx_L12:;
 
540
 
 
541
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":237 */
 
542
  __pyx_r = 0;
 
543
  goto __pyx_L0;
 
544
 
 
545
  __pyx_r = 0;
 
546
  __pyx_L0:;
 
547
  return __pyx_r;
 
548
}
 
549
 
 
550
static PyObject *__pyx_k29p;
 
551
static PyObject *__pyx_k30p;
 
552
 
 
553
static char __pyx_k29[] = "'path1' must be a plain string, not %s: %r";
 
554
static char __pyx_k30[] = "'path2' must be a plain string, not %s: %r";
 
555
 
 
556
static PyObject *__pyx_f_19_dirstate_helpers_c_cmp_by_dirs_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
557
static char __pyx_doc_19_dirstate_helpers_c_cmp_by_dirs_c[] = "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    ";
 
558
static PyObject *__pyx_f_19_dirstate_helpers_c_cmp_by_dirs_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
559
  PyObject *__pyx_v_path1 = 0;
 
560
  PyObject *__pyx_v_path2 = 0;
 
561
  PyObject *__pyx_r;
 
562
  int __pyx_1;
 
563
  PyObject *__pyx_2 = 0;
 
564
  PyObject *__pyx_3 = 0;
 
565
  static char *__pyx_argnames[] = {"path1","path2",0};
 
566
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_path1, &__pyx_v_path2)) return 0;
 
567
  Py_INCREF(__pyx_v_path1);
 
568
  Py_INCREF(__pyx_v_path2);
 
569
 
 
570
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":257 */
 
571
  __pyx_1 = (!PyString_CheckExact(__pyx_v_path1));
 
572
  if (__pyx_1) {
 
573
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
 
574
    Py_INCREF(__pyx_v_path1);
 
575
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path1);
 
576
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
 
577
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
578
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
 
579
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
580
    Py_INCREF(__pyx_v_path1);
 
581
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_path1);
 
582
    __pyx_3 = 0;
 
583
    __pyx_3 = PyNumber_Remainder(__pyx_k29p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; goto __pyx_L1;}
 
584
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
585
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;}
 
586
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
587
    __pyx_3 = 0;
 
588
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;}
 
589
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
590
    __Pyx_Raise(__pyx_3, 0, 0);
 
591
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
592
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; goto __pyx_L1;}
 
593
    goto __pyx_L2;
 
594
  }
 
595
  __pyx_L2:;
 
596
 
 
597
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":260 */
 
598
  __pyx_1 = (!PyString_CheckExact(__pyx_v_path2));
 
599
  if (__pyx_1) {
 
600
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;}
 
601
    Py_INCREF(__pyx_v_path2);
 
602
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path2);
 
603
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;}
 
604
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
605
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;}
 
606
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
607
    Py_INCREF(__pyx_v_path2);
 
608
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_path2);
 
609
    __pyx_3 = 0;
 
610
    __pyx_3 = PyNumber_Remainder(__pyx_k30p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; goto __pyx_L1;}
 
611
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
612
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L1;}
 
613
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
614
    __pyx_3 = 0;
 
615
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L1;}
 
616
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
617
    __Pyx_Raise(__pyx_3, 0, 0);
 
618
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
619
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; goto __pyx_L1;}
 
620
    goto __pyx_L3;
 
621
  }
 
622
  __pyx_L3:;
 
623
 
 
624
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":263 */
 
625
  __pyx_2 = PyInt_FromLong(__pyx_f_19_dirstate_helpers_c__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;}
 
626
  __pyx_r = __pyx_2;
 
627
  __pyx_2 = 0;
 
628
  goto __pyx_L0;
 
629
 
 
630
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
631
  goto __pyx_L0;
 
632
  __pyx_L1:;
 
633
  Py_XDECREF(__pyx_2);
 
634
  Py_XDECREF(__pyx_3);
 
635
  __Pyx_AddTraceback("_dirstate_helpers_c.cmp_by_dirs_c");
 
636
  __pyx_r = 0;
 
637
  __pyx_L0:;
 
638
  Py_DECREF(__pyx_v_path1);
 
639
  Py_DECREF(__pyx_v_path2);
 
640
  return __pyx_r;
 
641
}
 
642
 
 
643
static PyObject *__pyx_k31p;
 
644
static PyObject *__pyx_k32p;
 
645
 
 
646
static char __pyx_k31[] = "'path1' must be a plain string, not %s: %r";
 
647
static char __pyx_k32[] = "'path2' must be a plain string, not %s: %r";
 
648
 
 
649
static PyObject *__pyx_f_19_dirstate_helpers_c__cmp_path_by_dirblock_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
650
static char __pyx_doc_19_dirstate_helpers_c__cmp_path_by_dirblock_c[] = "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    ";
 
651
static PyObject *__pyx_f_19_dirstate_helpers_c__cmp_path_by_dirblock_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
652
  PyObject *__pyx_v_path1 = 0;
 
653
  PyObject *__pyx_v_path2 = 0;
 
654
  PyObject *__pyx_r;
 
655
  int __pyx_1;
 
656
  PyObject *__pyx_2 = 0;
 
657
  PyObject *__pyx_3 = 0;
 
658
  static char *__pyx_argnames[] = {"path1","path2",0};
 
659
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_path1, &__pyx_v_path2)) return 0;
 
660
  Py_INCREF(__pyx_v_path1);
 
661
  Py_INCREF(__pyx_v_path2);
 
662
 
 
663
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":285 */
 
664
  __pyx_1 = (!PyString_CheckExact(__pyx_v_path1));
 
665
  if (__pyx_1) {
 
666
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
 
667
    Py_INCREF(__pyx_v_path1);
 
668
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path1);
 
669
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
 
670
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
671
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
 
672
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
673
    Py_INCREF(__pyx_v_path1);
 
674
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_path1);
 
675
    __pyx_3 = 0;
 
676
    __pyx_3 = PyNumber_Remainder(__pyx_k31p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; goto __pyx_L1;}
 
677
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
678
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;}
 
679
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
680
    __pyx_3 = 0;
 
681
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;}
 
682
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
683
    __Pyx_Raise(__pyx_3, 0, 0);
 
684
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
685
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; goto __pyx_L1;}
 
686
    goto __pyx_L2;
 
687
  }
 
688
  __pyx_L2:;
 
689
 
 
690
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":288 */
 
691
  __pyx_1 = (!PyString_CheckExact(__pyx_v_path2));
 
692
  if (__pyx_1) {
 
693
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
 
694
    Py_INCREF(__pyx_v_path2);
 
695
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path2);
 
696
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
 
697
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
698
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
 
699
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
700
    Py_INCREF(__pyx_v_path2);
 
701
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_path2);
 
702
    __pyx_3 = 0;
 
703
    __pyx_3 = PyNumber_Remainder(__pyx_k32p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; goto __pyx_L1;}
 
704
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
705
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;}
 
706
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
707
    __pyx_3 = 0;
 
708
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;}
 
709
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
710
    __Pyx_Raise(__pyx_3, 0, 0);
 
711
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
712
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; goto __pyx_L1;}
 
713
    goto __pyx_L3;
 
714
  }
 
715
  __pyx_L3:;
 
716
 
 
717
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":291 */
 
718
  __pyx_2 = PyInt_FromLong(__pyx_f_19_dirstate_helpers_c__cmp_path_by_dirblock(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;}
 
719
  __pyx_r = __pyx_2;
 
720
  __pyx_2 = 0;
 
721
  goto __pyx_L0;
 
722
 
 
723
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
724
  goto __pyx_L0;
 
725
  __pyx_L1:;
 
726
  Py_XDECREF(__pyx_2);
 
727
  Py_XDECREF(__pyx_3);
 
728
  __Pyx_AddTraceback("_dirstate_helpers_c._cmp_path_by_dirblock_c");
 
729
  __pyx_r = 0;
 
730
  __pyx_L0:;
 
731
  Py_DECREF(__pyx_v_path1);
 
732
  Py_DECREF(__pyx_v_path2);
 
733
  return __pyx_r;
 
734
}
 
735
 
 
736
static char __pyx_k33[] = "";
 
737
static char __pyx_k34[] = "";
 
738
 
 
739
static int __pyx_f_19_dirstate_helpers_c__cmp_path_by_dirblock(char *__pyx_v_path1,int __pyx_v_path1_len,char *__pyx_v_path2,int __pyx_v_path2_len) {
 
740
  char *__pyx_v_dirname1;
 
741
  int __pyx_v_dirname1_len;
 
742
  char *__pyx_v_dirname2;
 
743
  int __pyx_v_dirname2_len;
 
744
  char *__pyx_v_basename1;
 
745
  int __pyx_v_basename1_len;
 
746
  char *__pyx_v_basename2;
 
747
  int __pyx_v_basename2_len;
 
748
  int __pyx_v_cur_len;
 
749
  int __pyx_v_cmp_val;
 
750
  int __pyx_r;
 
751
  int __pyx_1;
 
752
 
 
753
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":314 */
 
754
  __pyx_1 = (__pyx_v_path1_len == 0);
 
755
  if (__pyx_1) {
 
756
    __pyx_1 = (__pyx_v_path2_len == 0);
 
757
  }
 
758
  if (__pyx_1) {
 
759
    __pyx_r = 0;
 
760
    goto __pyx_L0;
 
761
    goto __pyx_L2;
 
762
  }
 
763
  __pyx_L2:;
 
764
 
 
765
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":317 */
 
766
  __pyx_1 = (__pyx_v_path1 == __pyx_v_path2);
 
767
  if (__pyx_1) {
 
768
    __pyx_1 = (__pyx_v_path1_len == __pyx_v_path2_len);
 
769
  }
 
770
  if (__pyx_1) {
 
771
    __pyx_r = 0;
 
772
    goto __pyx_L0;
 
773
    goto __pyx_L3;
 
774
  }
 
775
  __pyx_L3:;
 
776
 
 
777
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":320 */
 
778
  __pyx_1 = (__pyx_v_path1_len == 0);
 
779
  if (__pyx_1) {
 
780
    __pyx_r = (-1);
 
781
    goto __pyx_L0;
 
782
    goto __pyx_L4;
 
783
  }
 
784
  __pyx_L4:;
 
785
 
 
786
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":323 */
 
787
  __pyx_1 = (__pyx_v_path2_len == 0);
 
788
  if (__pyx_1) {
 
789
    __pyx_r = 1;
 
790
    goto __pyx_L0;
 
791
    goto __pyx_L5;
 
792
  }
 
793
  __pyx_L5:;
 
794
 
 
795
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":326 */
 
796
  __pyx_v_basename1 = ((char *)__pyx_f_19_dirstate_helpers_c__my_memrchr(__pyx_v_path1,'/',__pyx_v_path1_len));
 
797
 
 
798
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":328 */
 
799
  __pyx_1 = (__pyx_v_basename1 == NULL);
 
800
  if (__pyx_1) {
 
801
 
 
802
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":329 */
 
803
    __pyx_v_basename1 = __pyx_v_path1;
 
804
 
 
805
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":330 */
 
806
    __pyx_v_basename1_len = __pyx_v_path1_len;
 
807
 
 
808
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":331 */
 
809
    __pyx_v_dirname1 = __pyx_k33;
 
810
 
 
811
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":332 */
 
812
    __pyx_v_dirname1_len = 0;
 
813
    goto __pyx_L6;
 
814
  }
 
815
  /*else*/ {
 
816
 
 
817
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":334 */
 
818
    __pyx_v_dirname1 = __pyx_v_path1;
 
819
 
 
820
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":335 */
 
821
    __pyx_v_dirname1_len = (__pyx_v_basename1 - __pyx_v_path1);
 
822
 
 
823
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":336 */
 
824
    __pyx_v_basename1 = (__pyx_v_basename1 + 1);
 
825
 
 
826
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":337 */
 
827
    __pyx_v_basename1_len = ((__pyx_v_path1_len - __pyx_v_dirname1_len) - 1);
 
828
  }
 
829
  __pyx_L6:;
 
830
 
 
831
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":339 */
 
832
  __pyx_v_basename2 = ((char *)__pyx_f_19_dirstate_helpers_c__my_memrchr(__pyx_v_path2,'/',__pyx_v_path2_len));
 
833
 
 
834
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":341 */
 
835
  __pyx_1 = (__pyx_v_basename2 == NULL);
 
836
  if (__pyx_1) {
 
837
 
 
838
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":342 */
 
839
    __pyx_v_basename2 = __pyx_v_path2;
 
840
 
 
841
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":343 */
 
842
    __pyx_v_basename2_len = __pyx_v_path2_len;
 
843
 
 
844
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":344 */
 
845
    __pyx_v_dirname2 = __pyx_k34;
 
846
 
 
847
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":345 */
 
848
    __pyx_v_dirname2_len = 0;
 
849
    goto __pyx_L7;
 
850
  }
 
851
  /*else*/ {
 
852
 
 
853
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":347 */
 
854
    __pyx_v_dirname2 = __pyx_v_path2;
 
855
 
 
856
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":348 */
 
857
    __pyx_v_dirname2_len = (__pyx_v_basename2 - __pyx_v_path2);
 
858
 
 
859
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":349 */
 
860
    __pyx_v_basename2 = (__pyx_v_basename2 + 1);
 
861
 
 
862
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":350 */
 
863
    __pyx_v_basename2_len = ((__pyx_v_path2_len - __pyx_v_dirname2_len) - 1);
 
864
  }
 
865
  __pyx_L7:;
 
866
 
 
867
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":352 */
 
868
  __pyx_v_cmp_val = __pyx_f_19_dirstate_helpers_c__cmp_by_dirs(__pyx_v_dirname1,__pyx_v_dirname1_len,__pyx_v_dirname2,__pyx_v_dirname2_len);
 
869
 
 
870
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":354 */
 
871
  __pyx_1 = (__pyx_v_cmp_val != 0);
 
872
  if (__pyx_1) {
 
873
    __pyx_r = __pyx_v_cmp_val;
 
874
    goto __pyx_L0;
 
875
    goto __pyx_L8;
 
876
  }
 
877
  __pyx_L8:;
 
878
 
 
879
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":357 */
 
880
  __pyx_v_cur_len = __pyx_v_basename1_len;
 
881
 
 
882
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":358 */
 
883
  __pyx_1 = (__pyx_v_basename2_len < __pyx_v_basename1_len);
 
884
  if (__pyx_1) {
 
885
    __pyx_v_cur_len = __pyx_v_basename2_len;
 
886
    goto __pyx_L9;
 
887
  }
 
888
  __pyx_L9:;
 
889
 
 
890
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":361 */
 
891
  __pyx_v_cmp_val = memcmp(__pyx_v_basename1,__pyx_v_basename2,__pyx_v_cur_len);
 
892
 
 
893
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":362 */
 
894
  __pyx_1 = (__pyx_v_cmp_val != 0);
 
895
  if (__pyx_1) {
 
896
    __pyx_r = __pyx_v_cmp_val;
 
897
    goto __pyx_L0;
 
898
    goto __pyx_L10;
 
899
  }
 
900
  __pyx_L10:;
 
901
 
 
902
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":364 */
 
903
  __pyx_1 = (__pyx_v_basename1_len == __pyx_v_basename2_len);
 
904
  if (__pyx_1) {
 
905
    __pyx_r = 0;
 
906
    goto __pyx_L0;
 
907
    goto __pyx_L11;
 
908
  }
 
909
  __pyx_L11:;
 
910
 
 
911
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":366 */
 
912
  __pyx_1 = (__pyx_v_basename1_len < __pyx_v_basename2_len);
 
913
  if (__pyx_1) {
 
914
    __pyx_r = (-1);
 
915
    goto __pyx_L0;
 
916
    goto __pyx_L12;
 
917
  }
 
918
  __pyx_L12:;
 
919
 
 
920
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":368 */
 
921
  __pyx_r = 1;
 
922
  goto __pyx_L0;
 
923
 
 
924
  __pyx_r = 0;
 
925
  __pyx_L0:;
 
926
  return __pyx_r;
 
927
}
 
928
 
 
929
static PyObject *__pyx_k35p;
 
930
static PyObject *__pyx_k36p;
 
931
 
 
932
static char __pyx_k35[] = "you must pass a python list for 'paths' not: %s %r";
 
933
static char __pyx_k36[] = "you must pass a string for 'path' not: %s %r";
 
934
 
 
935
static PyObject *__pyx_f_19_dirstate_helpers_c__bisect_path_left_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
936
static char __pyx_doc_19_dirstate_helpers_c__bisect_path_left_c[] = "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    ";
 
937
static PyObject *__pyx_f_19_dirstate_helpers_c__bisect_path_left_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
938
  PyObject *__pyx_v_paths = 0;
 
939
  PyObject *__pyx_v_path = 0;
 
940
  int __pyx_v__lo;
 
941
  int __pyx_v__hi;
 
942
  int __pyx_v__mid;
 
943
  char *__pyx_v_path_cstr;
 
944
  int __pyx_v_path_size;
 
945
  char *__pyx_v_cur_cstr;
 
946
  int __pyx_v_cur_size;
 
947
  void *__pyx_v_cur;
 
948
  PyObject *__pyx_r;
 
949
  int __pyx_1;
 
950
  PyObject *__pyx_2 = 0;
 
951
  PyObject *__pyx_3 = 0;
 
952
  Py_ssize_t __pyx_4;
 
953
  static char *__pyx_argnames[] = {"paths","path",0};
 
954
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_paths, &__pyx_v_path)) return 0;
 
955
  Py_INCREF(__pyx_v_paths);
 
956
  Py_INCREF(__pyx_v_path);
 
957
 
 
958
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":398 */
 
959
  __pyx_1 = (!PyList_CheckExact(__pyx_v_paths));
 
960
  if (__pyx_1) {
 
961
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
 
962
    Py_INCREF(__pyx_v_paths);
 
963
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_paths);
 
964
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
 
965
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
966
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
 
967
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
968
    Py_INCREF(__pyx_v_paths);
 
969
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_paths);
 
970
    __pyx_3 = 0;
 
971
    __pyx_3 = PyNumber_Remainder(__pyx_k35p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; goto __pyx_L1;}
 
972
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
973
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
 
974
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
975
    __pyx_3 = 0;
 
976
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
 
977
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
978
    __Pyx_Raise(__pyx_3, 0, 0);
 
979
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
980
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; goto __pyx_L1;}
 
981
    goto __pyx_L2;
 
982
  }
 
983
  __pyx_L2:;
 
984
 
 
985
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":401 */
 
986
  __pyx_1 = (!PyString_CheckExact(__pyx_v_path));
 
987
  if (__pyx_1) {
 
988
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; goto __pyx_L1;}
 
989
    Py_INCREF(__pyx_v_path);
 
990
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path);
 
991
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; goto __pyx_L1;}
 
992
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
993
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; goto __pyx_L1;}
 
994
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
995
    Py_INCREF(__pyx_v_path);
 
996
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_path);
 
997
    __pyx_3 = 0;
 
998
    __pyx_3 = PyNumber_Remainder(__pyx_k36p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; goto __pyx_L1;}
 
999
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1000
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; goto __pyx_L1;}
 
1001
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
1002
    __pyx_3 = 0;
 
1003
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; goto __pyx_L1;}
 
1004
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1005
    __Pyx_Raise(__pyx_3, 0, 0);
 
1006
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
1007
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; goto __pyx_L1;}
 
1008
    goto __pyx_L3;
 
1009
  }
 
1010
  __pyx_L3:;
 
1011
 
 
1012
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":405 */
 
1013
  __pyx_4 = PyObject_Length(__pyx_v_paths); if (__pyx_4 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; goto __pyx_L1;}
 
1014
  __pyx_v__hi = __pyx_4;
 
1015
 
 
1016
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":406 */
 
1017
  __pyx_v__lo = 0;
 
1018
 
 
1019
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":408 */
 
1020
  __pyx_v_path_cstr = PyString_AsString(__pyx_v_path);
 
1021
 
 
1022
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":409 */
 
1023
  __pyx_v_path_size = PyString_Size(__pyx_v_path);
 
1024
 
 
1025
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":411 */
 
1026
  while (1) {
 
1027
    __pyx_1 = (__pyx_v__lo < __pyx_v__hi);
 
1028
    if (!__pyx_1) break;
 
1029
 
 
1030
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":412 */
 
1031
    __pyx_v__mid = ((__pyx_v__lo + __pyx_v__hi) / 2);
 
1032
 
 
1033
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":413 */
 
1034
    __pyx_v_cur = PyList_GET_ITEM(__pyx_v_paths,__pyx_v__mid);
 
1035
 
 
1036
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":414 */
 
1037
    __pyx_v_cur_cstr = PyString_AS_STRING(__pyx_v_cur);
 
1038
 
 
1039
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":415 */
 
1040
    __pyx_v_cur_size = PyString_GET_SIZE(__pyx_v_cur);
 
1041
 
 
1042
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":416 */
 
1043
    __pyx_1 = (__pyx_f_19_dirstate_helpers_c__cmp_path_by_dirblock(__pyx_v_cur_cstr,__pyx_v_cur_size,__pyx_v_path_cstr,__pyx_v_path_size) < 0);
 
1044
    if (__pyx_1) {
 
1045
      __pyx_v__lo = (__pyx_v__mid + 1);
 
1046
      goto __pyx_L6;
 
1047
    }
 
1048
    /*else*/ {
 
1049
      __pyx_v__hi = __pyx_v__mid;
 
1050
    }
 
1051
    __pyx_L6:;
 
1052
  }
 
1053
 
 
1054
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":420 */
 
1055
  __pyx_2 = PyInt_FromLong(__pyx_v__lo); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; goto __pyx_L1;}
 
1056
  __pyx_r = __pyx_2;
 
1057
  __pyx_2 = 0;
 
1058
  goto __pyx_L0;
 
1059
 
 
1060
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
1061
  goto __pyx_L0;
 
1062
  __pyx_L1:;
 
1063
  Py_XDECREF(__pyx_2);
 
1064
  Py_XDECREF(__pyx_3);
 
1065
  __Pyx_AddTraceback("_dirstate_helpers_c._bisect_path_left_c");
 
1066
  __pyx_r = 0;
 
1067
  __pyx_L0:;
 
1068
  Py_DECREF(__pyx_v_paths);
 
1069
  Py_DECREF(__pyx_v_path);
 
1070
  return __pyx_r;
 
1071
}
 
1072
 
 
1073
static PyObject *__pyx_k37p;
 
1074
static PyObject *__pyx_k38p;
 
1075
 
 
1076
static char __pyx_k37[] = "you must pass a python list for 'paths' not: %s %r";
 
1077
static char __pyx_k38[] = "you must pass a string for 'path' not: %s %r";
 
1078
 
 
1079
static PyObject *__pyx_f_19_dirstate_helpers_c__bisect_path_right_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
1080
static char __pyx_doc_19_dirstate_helpers_c__bisect_path_right_c[] = "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    ";
 
1081
static PyObject *__pyx_f_19_dirstate_helpers_c__bisect_path_right_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
1082
  PyObject *__pyx_v_paths = 0;
 
1083
  PyObject *__pyx_v_path = 0;
 
1084
  int __pyx_v__lo;
 
1085
  int __pyx_v__hi;
 
1086
  int __pyx_v__mid;
 
1087
  char *__pyx_v_path_cstr;
 
1088
  int __pyx_v_path_size;
 
1089
  char *__pyx_v_cur_cstr;
 
1090
  int __pyx_v_cur_size;
 
1091
  void *__pyx_v_cur;
 
1092
  PyObject *__pyx_r;
 
1093
  int __pyx_1;
 
1094
  PyObject *__pyx_2 = 0;
 
1095
  PyObject *__pyx_3 = 0;
 
1096
  Py_ssize_t __pyx_4;
 
1097
  static char *__pyx_argnames[] = {"paths","path",0};
 
1098
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_paths, &__pyx_v_path)) return 0;
 
1099
  Py_INCREF(__pyx_v_paths);
 
1100
  Py_INCREF(__pyx_v_path);
 
1101
 
 
1102
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":450 */
 
1103
  __pyx_1 = (!PyList_CheckExact(__pyx_v_paths));
 
1104
  if (__pyx_1) {
 
1105
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; goto __pyx_L1;}
 
1106
    Py_INCREF(__pyx_v_paths);
 
1107
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_paths);
 
1108
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; goto __pyx_L1;}
 
1109
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1110
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; goto __pyx_L1;}
 
1111
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
1112
    Py_INCREF(__pyx_v_paths);
 
1113
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_paths);
 
1114
    __pyx_3 = 0;
 
1115
    __pyx_3 = PyNumber_Remainder(__pyx_k37p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; goto __pyx_L1;}
 
1116
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1117
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; goto __pyx_L1;}
 
1118
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
1119
    __pyx_3 = 0;
 
1120
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; goto __pyx_L1;}
 
1121
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1122
    __Pyx_Raise(__pyx_3, 0, 0);
 
1123
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
1124
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; goto __pyx_L1;}
 
1125
    goto __pyx_L2;
 
1126
  }
 
1127
  __pyx_L2:;
 
1128
 
 
1129
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":453 */
 
1130
  __pyx_1 = (!PyString_CheckExact(__pyx_v_path));
 
1131
  if (__pyx_1) {
 
1132
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; goto __pyx_L1;}
 
1133
    Py_INCREF(__pyx_v_path);
 
1134
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_path);
 
1135
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; goto __pyx_L1;}
 
1136
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1137
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; goto __pyx_L1;}
 
1138
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
1139
    Py_INCREF(__pyx_v_path);
 
1140
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_path);
 
1141
    __pyx_3 = 0;
 
1142
    __pyx_3 = PyNumber_Remainder(__pyx_k38p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; goto __pyx_L1;}
 
1143
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1144
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
 
1145
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
1146
    __pyx_3 = 0;
 
1147
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
 
1148
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1149
    __Pyx_Raise(__pyx_3, 0, 0);
 
1150
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
1151
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
 
1152
    goto __pyx_L3;
 
1153
  }
 
1154
  __pyx_L3:;
 
1155
 
 
1156
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":457 */
 
1157
  __pyx_4 = PyObject_Length(__pyx_v_paths); if (__pyx_4 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; goto __pyx_L1;}
 
1158
  __pyx_v__hi = __pyx_4;
 
1159
 
 
1160
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":458 */
 
1161
  __pyx_v__lo = 0;
 
1162
 
 
1163
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":460 */
 
1164
  __pyx_v_path_cstr = PyString_AsString(__pyx_v_path);
 
1165
 
 
1166
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":461 */
 
1167
  __pyx_v_path_size = PyString_Size(__pyx_v_path);
 
1168
 
 
1169
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":463 */
 
1170
  while (1) {
 
1171
    __pyx_1 = (__pyx_v__lo < __pyx_v__hi);
 
1172
    if (!__pyx_1) break;
 
1173
 
 
1174
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":464 */
 
1175
    __pyx_v__mid = ((__pyx_v__lo + __pyx_v__hi) / 2);
 
1176
 
 
1177
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":465 */
 
1178
    __pyx_v_cur = PyList_GET_ITEM(__pyx_v_paths,__pyx_v__mid);
 
1179
 
 
1180
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":466 */
 
1181
    __pyx_v_cur_cstr = PyString_AS_STRING(__pyx_v_cur);
 
1182
 
 
1183
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":467 */
 
1184
    __pyx_v_cur_size = PyString_GET_SIZE(__pyx_v_cur);
 
1185
 
 
1186
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":468 */
 
1187
    __pyx_1 = (__pyx_f_19_dirstate_helpers_c__cmp_path_by_dirblock(__pyx_v_path_cstr,__pyx_v_path_size,__pyx_v_cur_cstr,__pyx_v_cur_size) < 0);
 
1188
    if (__pyx_1) {
 
1189
      __pyx_v__hi = __pyx_v__mid;
 
1190
      goto __pyx_L6;
 
1191
    }
 
1192
    /*else*/ {
 
1193
      __pyx_v__lo = (__pyx_v__mid + 1);
 
1194
    }
 
1195
    __pyx_L6:;
 
1196
  }
 
1197
 
 
1198
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":472 */
 
1199
  __pyx_2 = PyInt_FromLong(__pyx_v__lo); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; goto __pyx_L1;}
 
1200
  __pyx_r = __pyx_2;
 
1201
  __pyx_2 = 0;
 
1202
  goto __pyx_L0;
 
1203
 
 
1204
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
1205
  goto __pyx_L0;
 
1206
  __pyx_L1:;
 
1207
  Py_XDECREF(__pyx_2);
 
1208
  Py_XDECREF(__pyx_3);
 
1209
  __Pyx_AddTraceback("_dirstate_helpers_c._bisect_path_right_c");
 
1210
  __pyx_r = 0;
 
1211
  __pyx_L0:;
 
1212
  Py_DECREF(__pyx_v_paths);
 
1213
  Py_DECREF(__pyx_v_path);
 
1214
  return __pyx_r;
 
1215
}
 
1216
 
 
1217
static PyObject *__pyx_k39p;
 
1218
static PyObject *__pyx_k40p;
 
1219
 
 
1220
static char __pyx_k39[] = "you must pass a python list for 'dirblocks' not: %s %r";
 
1221
static char __pyx_k40[] = "you must pass a string for dirname not: %s %r";
 
1222
 
 
1223
static PyObject *__pyx_f_19_dirstate_helpers_c_bisect_dirblock_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
1224
static char __pyx_doc_19_dirstate_helpers_c_bisect_dirblock_c[] = "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    ";
 
1225
static PyObject *__pyx_f_19_dirstate_helpers_c_bisect_dirblock_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
1226
  PyObject *__pyx_v_dirblocks = 0;
 
1227
  PyObject *__pyx_v_dirname = 0;
 
1228
  PyObject *__pyx_v_lo = 0;
 
1229
  PyObject *__pyx_v_hi = 0;
 
1230
  PyObject *__pyx_v_cache = 0;
 
1231
  int __pyx_v__lo;
 
1232
  int __pyx_v__hi;
 
1233
  int __pyx_v__mid;
 
1234
  char *__pyx_v_dirname_cstr;
 
1235
  int __pyx_v_dirname_size;
 
1236
  char *__pyx_v_cur_cstr;
 
1237
  int __pyx_v_cur_size;
 
1238
  void *__pyx_v_cur;
 
1239
  PyObject *__pyx_r;
 
1240
  int __pyx_1;
 
1241
  PyObject *__pyx_2 = 0;
 
1242
  PyObject *__pyx_3 = 0;
 
1243
  Py_ssize_t __pyx_4;
 
1244
  static char *__pyx_argnames[] = {"dirblocks","dirname","lo","hi","cache",0};
 
1245
  __pyx_v_lo = __pyx_k16;
 
1246
  __pyx_v_hi = __pyx_k17;
 
1247
  __pyx_v_cache = __pyx_k18;
 
1248
  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;
 
1249
  Py_INCREF(__pyx_v_dirblocks);
 
1250
  Py_INCREF(__pyx_v_dirname);
 
1251
  Py_INCREF(__pyx_v_lo);
 
1252
  Py_INCREF(__pyx_v_hi);
 
1253
  Py_INCREF(__pyx_v_cache);
 
1254
 
 
1255
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":494 */
 
1256
  __pyx_1 = (!PyList_CheckExact(__pyx_v_dirblocks));
 
1257
  if (__pyx_1) {
 
1258
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
 
1259
    Py_INCREF(__pyx_v_dirblocks);
 
1260
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_dirblocks);
 
1261
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
 
1262
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1263
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
 
1264
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
1265
    Py_INCREF(__pyx_v_dirblocks);
 
1266
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_dirblocks);
 
1267
    __pyx_3 = 0;
 
1268
    __pyx_3 = PyNumber_Remainder(__pyx_k39p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;}
 
1269
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1270
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}
 
1271
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
1272
    __pyx_3 = 0;
 
1273
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}
 
1274
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1275
    __Pyx_Raise(__pyx_3, 0, 0);
 
1276
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
1277
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;}
 
1278
    goto __pyx_L2;
 
1279
  }
 
1280
  __pyx_L2:;
 
1281
 
 
1282
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":497 */
 
1283
  __pyx_1 = (!PyString_CheckExact(__pyx_v_dirname));
 
1284
  if (__pyx_1) {
 
1285
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L1;}
 
1286
    Py_INCREF(__pyx_v_dirname);
 
1287
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_dirname);
 
1288
    __pyx_3 = PyObject_CallObject(((PyObject *)(&PyType_Type)), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L1;}
 
1289
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1290
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L1;}
 
1291
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
1292
    Py_INCREF(__pyx_v_dirname);
 
1293
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_dirname);
 
1294
    __pyx_3 = 0;
 
1295
    __pyx_3 = PyNumber_Remainder(__pyx_k40p, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; goto __pyx_L1;}
 
1296
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1297
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;}
 
1298
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
1299
    __pyx_3 = 0;
 
1300
    __pyx_3 = PyObject_CallObject(PyExc_TypeError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;}
 
1301
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1302
    __Pyx_Raise(__pyx_3, 0, 0);
 
1303
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
1304
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;}
 
1305
    goto __pyx_L3;
 
1306
  }
 
1307
  __pyx_L3:;
 
1308
 
 
1309
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":500 */
 
1310
  __pyx_1 = __pyx_v_hi == Py_None;
 
1311
  if (__pyx_1) {
 
1312
    __pyx_4 = PyObject_Length(__pyx_v_dirblocks); if (__pyx_4 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; goto __pyx_L1;}
 
1313
    __pyx_v__hi = __pyx_4;
 
1314
    goto __pyx_L4;
 
1315
  }
 
1316
  /*else*/ {
 
1317
    __pyx_1 = PyInt_AsLong(__pyx_v_hi); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; goto __pyx_L1;}
 
1318
    __pyx_v__hi = __pyx_1;
 
1319
  }
 
1320
  __pyx_L4:;
 
1321
 
 
1322
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":505 */
 
1323
  __pyx_1 = PyInt_AsLong(__pyx_v_lo); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; goto __pyx_L1;}
 
1324
  __pyx_v__lo = __pyx_1;
 
1325
 
 
1326
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":506 */
 
1327
  __pyx_v_dirname_cstr = PyString_AsString(__pyx_v_dirname);
 
1328
 
 
1329
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":507 */
 
1330
  __pyx_v_dirname_size = PyString_Size(__pyx_v_dirname);
 
1331
 
 
1332
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":509 */
 
1333
  while (1) {
 
1334
    __pyx_1 = (__pyx_v__lo < __pyx_v__hi);
 
1335
    if (!__pyx_1) break;
 
1336
 
 
1337
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":510 */
 
1338
    __pyx_v__mid = ((__pyx_v__lo + __pyx_v__hi) / 2);
 
1339
 
 
1340
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":513 */
 
1341
    __pyx_v_cur = PyTuple_GET_ITEM(PyList_GET_ITEM(__pyx_v_dirblocks,__pyx_v__mid),0);
 
1342
 
 
1343
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":515 */
 
1344
    __pyx_v_cur_cstr = PyString_AS_STRING(__pyx_v_cur);
 
1345
 
 
1346
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":516 */
 
1347
    __pyx_v_cur_size = PyString_GET_SIZE(__pyx_v_cur);
 
1348
 
 
1349
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":517 */
 
1350
    __pyx_1 = (__pyx_f_19_dirstate_helpers_c__cmp_by_dirs(__pyx_v_cur_cstr,__pyx_v_cur_size,__pyx_v_dirname_cstr,__pyx_v_dirname_size) < 0);
 
1351
    if (__pyx_1) {
 
1352
      __pyx_v__lo = (__pyx_v__mid + 1);
 
1353
      goto __pyx_L7;
 
1354
    }
 
1355
    /*else*/ {
 
1356
      __pyx_v__hi = __pyx_v__mid;
 
1357
    }
 
1358
    __pyx_L7:;
 
1359
  }
 
1360
 
 
1361
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":521 */
 
1362
  __pyx_2 = PyInt_FromLong(__pyx_v__lo); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; goto __pyx_L1;}
 
1363
  __pyx_r = __pyx_2;
 
1364
  __pyx_2 = 0;
 
1365
  goto __pyx_L0;
 
1366
 
 
1367
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
1368
  goto __pyx_L0;
 
1369
  __pyx_L1:;
 
1370
  Py_XDECREF(__pyx_2);
 
1371
  Py_XDECREF(__pyx_3);
 
1372
  __Pyx_AddTraceback("_dirstate_helpers_c.bisect_dirblock_c");
 
1373
  __pyx_r = 0;
 
1374
  __pyx_L0:;
 
1375
  Py_DECREF(__pyx_v_dirblocks);
 
1376
  Py_DECREF(__pyx_v_dirname);
 
1377
  Py_DECREF(__pyx_v_lo);
 
1378
  Py_DECREF(__pyx_v_hi);
 
1379
  Py_DECREF(__pyx_v_cache);
 
1380
  return __pyx_r;
 
1381
}
 
1382
 
 
1383
static int __pyx_f_19_dirstate_helpers_c_6Reader___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
1384
static int __pyx_f_19_dirstate_helpers_c_6Reader___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
1385
  PyObject *__pyx_v_text = 0;
 
1386
  PyObject *__pyx_v_state = 0;
 
1387
  int __pyx_r;
 
1388
  static char *__pyx_argnames[] = {"text","state",0};
 
1389
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_text, &__pyx_v_state)) return -1;
 
1390
  Py_INCREF(__pyx_v_self);
 
1391
  Py_INCREF(__pyx_v_text);
 
1392
  Py_INCREF(__pyx_v_state);
 
1393
 
 
1394
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":537 */
 
1395
  Py_INCREF(__pyx_v_state);
 
1396
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->state);
 
1397
  ((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->state = __pyx_v_state;
 
1398
 
 
1399
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":538 */
 
1400
  Py_INCREF(__pyx_v_text);
 
1401
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->text);
 
1402
  ((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->text = __pyx_v_text;
 
1403
 
 
1404
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":539 */
 
1405
  ((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->text_cstr = PyString_AsString(__pyx_v_text);
 
1406
 
 
1407
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":540 */
 
1408
  ((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->text_size = PyString_Size(__pyx_v_text);
 
1409
 
 
1410
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":541 */
 
1411
  ((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->end_cstr = (((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->text_cstr + ((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->text_size);
 
1412
 
 
1413
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":542 */
 
1414
  ((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->cur_cstr = ((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->text_cstr;
 
1415
 
 
1416
  __pyx_r = 0;
 
1417
  Py_DECREF(__pyx_v_self);
 
1418
  Py_DECREF(__pyx_v_text);
 
1419
  Py_DECREF(__pyx_v_state);
 
1420
  return __pyx_r;
 
1421
}
 
1422
 
 
1423
static PyObject *__pyx_n_DirstateCorrupt;
 
1424
 
 
1425
static PyObject *__pyx_k41p;
 
1426
static PyObject *__pyx_k42p;
 
1427
static PyObject *__pyx_k43p;
 
1428
 
 
1429
static char __pyx_k41[] = "get_next() called when cur_str is NULL";
 
1430
static char __pyx_k42[] = "get_next() called when there are no chars left";
 
1431
static char __pyx_k43[] = "failed to find trailing NULL (\\0). Trailing garbage: %r";
 
1432
 
 
1433
static char *__pyx_f_19_dirstate_helpers_c_6Reader_get_next(struct __pyx_obj_19_dirstate_helpers_c_Reader *__pyx_v_self,int *__pyx_v_size) {
 
1434
  char *__pyx_v_next;
 
1435
  Py_ssize_t __pyx_v_extra_len;
 
1436
  char *__pyx_r;
 
1437
  int __pyx_1;
 
1438
  PyObject *__pyx_2 = 0;
 
1439
  PyObject *__pyx_3 = 0;
 
1440
  PyObject *__pyx_4 = 0;
 
1441
  Py_INCREF(__pyx_v_self);
 
1442
 
 
1443
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":549 */
 
1444
  __pyx_1 = (__pyx_v_self->cur_cstr == NULL);
 
1445
  if (__pyx_1) {
 
1446
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
 
1447
    Py_INCREF(__pyx_k41p);
 
1448
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k41p);
 
1449
    __pyx_3 = PyObject_CallObject(PyExc_AssertionError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
 
1450
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1451
    __Pyx_Raise(__pyx_3, 0, 0);
 
1452
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
1453
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;}
 
1454
    goto __pyx_L2;
 
1455
  }
 
1456
  __pyx_1 = (__pyx_v_self->cur_cstr >= __pyx_v_self->end_cstr);
 
1457
  if (__pyx_1) {
 
1458
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;}
 
1459
    Py_INCREF(__pyx_k42p);
 
1460
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k42p);
 
1461
    __pyx_3 = PyObject_CallObject(PyExc_AssertionError, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;}
 
1462
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1463
    __Pyx_Raise(__pyx_3, 0, 0);
 
1464
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
1465
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;}
 
1466
    goto __pyx_L2;
 
1467
  }
 
1468
  __pyx_L2:;
 
1469
 
 
1470
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":554 */
 
1471
  __pyx_v_next = __pyx_v_self->cur_cstr;
 
1472
 
 
1473
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":555 */
 
1474
  __pyx_v_self->cur_cstr = ((char *)memchr(__pyx_v_next,'\0',(__pyx_v_self->end_cstr - __pyx_v_next)));
 
1475
 
 
1476
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":556 */
 
1477
  __pyx_1 = (__pyx_v_self->cur_cstr == NULL);
 
1478
  if (__pyx_1) {
 
1479
 
 
1480
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":557 */
 
1481
    __pyx_v_extra_len = (__pyx_v_self->end_cstr - __pyx_v_next);
 
1482
 
 
1483
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":558 */
 
1484
    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_errors); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; goto __pyx_L1;}
 
1485
    __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_DirstateCorrupt); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; goto __pyx_L1;}
 
1486
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1487
    __pyx_2 = __pyx_f_19_dirstate_helpers_c_safe_string_from_size(__pyx_v_next,__pyx_v_extra_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; goto __pyx_L1;}
 
1488
    __pyx_4 = PyNumber_Remainder(__pyx_k43p, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; goto __pyx_L1;}
 
1489
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1490
    __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; goto __pyx_L1;}
 
1491
    Py_INCREF(__pyx_v_self->state);
 
1492
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self->state);
 
1493
    PyTuple_SET_ITEM(__pyx_2, 1, __pyx_4);
 
1494
    __pyx_4 = 0;
 
1495
    __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; goto __pyx_L1;}
 
1496
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
1497
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1498
    __Pyx_Raise(__pyx_4, 0, 0);
 
1499
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
1500
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; goto __pyx_L1;}
 
1501
    goto __pyx_L3;
 
1502
  }
 
1503
  __pyx_L3:;
 
1504
 
 
1505
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":562 */
 
1506
  (__pyx_v_size[0]) = (__pyx_v_self->cur_cstr - __pyx_v_next);
 
1507
 
 
1508
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":563 */
 
1509
  __pyx_v_self->cur_cstr = (__pyx_v_self->cur_cstr + 1);
 
1510
 
 
1511
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":564 */
 
1512
  __pyx_r = __pyx_v_next;
 
1513
  goto __pyx_L0;
 
1514
 
 
1515
  __pyx_r = 0;
 
1516
  goto __pyx_L0;
 
1517
  __pyx_L1:;
 
1518
  Py_XDECREF(__pyx_2);
 
1519
  Py_XDECREF(__pyx_3);
 
1520
  Py_XDECREF(__pyx_4);
 
1521
  __Pyx_AddTraceback("_dirstate_helpers_c.Reader.get_next");
 
1522
  __pyx_r = NULL;
 
1523
  __pyx_L0:;
 
1524
  Py_DECREF(__pyx_v_self);
 
1525
  return __pyx_r;
 
1526
}
 
1527
 
 
1528
static PyObject *__pyx_f_19_dirstate_helpers_c_6Reader_get_next_str(struct __pyx_obj_19_dirstate_helpers_c_Reader *__pyx_v_self) {
 
1529
  int __pyx_v_size;
 
1530
  char *__pyx_v_next;
 
1531
  PyObject *__pyx_r;
 
1532
  char *__pyx_1;
 
1533
  PyObject *__pyx_2 = 0;
 
1534
  Py_INCREF(__pyx_v_self);
 
1535
 
 
1536
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":570 */
 
1537
  __pyx_1 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_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 = 570; goto __pyx_L1;}
 
1538
  __pyx_v_next = __pyx_1;
 
1539
 
 
1540
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":571 */
 
1541
  __pyx_2 = __pyx_f_19_dirstate_helpers_c_safe_string_from_size(__pyx_v_next,__pyx_v_size); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; goto __pyx_L1;}
 
1542
  __pyx_r = __pyx_2;
 
1543
  __pyx_2 = 0;
 
1544
  goto __pyx_L0;
 
1545
 
 
1546
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
1547
  goto __pyx_L0;
 
1548
  __pyx_L1:;
 
1549
  Py_XDECREF(__pyx_2);
 
1550
  __Pyx_AddTraceback("_dirstate_helpers_c.Reader.get_next_str");
 
1551
  __pyx_r = 0;
 
1552
  __pyx_L0:;
 
1553
  Py_DECREF(__pyx_v_self);
 
1554
  return __pyx_r;
 
1555
}
 
1556
 
 
1557
static PyObject *__pyx_k44p;
 
1558
 
 
1559
static char __pyx_k44[] = "First character should be null not: %s";
 
1560
 
 
1561
static int __pyx_f_19_dirstate_helpers_c_6Reader__init(struct __pyx_obj_19_dirstate_helpers_c_Reader *__pyx_v_self) {
 
1562
  char *__pyx_v_first;
 
1563
  int __pyx_v_size;
 
1564
  int __pyx_r;
 
1565
  char *__pyx_1;
 
1566
  int __pyx_2;
 
1567
  PyObject *__pyx_3 = 0;
 
1568
  PyObject *__pyx_4 = 0;
 
1569
  Py_INCREF(__pyx_v_self);
 
1570
 
 
1571
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":584 */
 
1572
  __pyx_1 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_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 = 584; goto __pyx_L1;}
 
1573
  __pyx_v_first = __pyx_1;
 
1574
 
 
1575
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":585 */
 
1576
  __pyx_2 = ((__pyx_v_first[0]) != '\0');
 
1577
  if (__pyx_2) {
 
1578
    __pyx_2 = (__pyx_v_size == 0);
 
1579
  }
 
1580
  if (__pyx_2) {
 
1581
    __pyx_3 = PyString_FromString(__pyx_v_first); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; goto __pyx_L1;}
 
1582
    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; goto __pyx_L1;}
 
1583
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
 
1584
    __pyx_3 = 0;
 
1585
    __pyx_3 = PyNumber_Remainder(__pyx_k44p, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; goto __pyx_L1;}
 
1586
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
1587
    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; goto __pyx_L1;}
 
1588
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
 
1589
    __pyx_3 = 0;
 
1590
    __pyx_3 = PyObject_CallObject(PyExc_AssertionError, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; goto __pyx_L1;}
 
1591
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
1592
    __Pyx_Raise(__pyx_3, 0, 0);
 
1593
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
1594
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; goto __pyx_L1;}
 
1595
    goto __pyx_L2;
 
1596
  }
 
1597
  __pyx_L2:;
 
1598
 
 
1599
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":588 */
 
1600
  __pyx_r = 0;
 
1601
  goto __pyx_L0;
 
1602
 
 
1603
  __pyx_r = 0;
 
1604
  goto __pyx_L0;
 
1605
  __pyx_L1:;
 
1606
  Py_XDECREF(__pyx_3);
 
1607
  Py_XDECREF(__pyx_4);
 
1608
  __Pyx_AddTraceback("_dirstate_helpers_c.Reader._init");
 
1609
  __pyx_r = (-1);
 
1610
  __pyx_L0:;
 
1611
  Py_DECREF(__pyx_v_self);
 
1612
  return __pyx_r;
 
1613
}
 
1614
 
 
1615
static PyObject *__pyx_k45p;
 
1616
 
 
1617
static char __pyx_k45[] = "Bad parse, we expected to end on \\n, not: %d %s: %s";
 
1618
 
 
1619
static PyObject *__pyx_f_19_dirstate_helpers_c_6Reader__get_entry(struct __pyx_obj_19_dirstate_helpers_c_Reader *__pyx_v_self,int __pyx_v_num_trees,void **__pyx_v_p_current_dirname,int *__pyx_v_new_block) {
 
1620
  PyObject *__pyx_v_path_name_file_id_key;
 
1621
  char *__pyx_v_entry_size_cstr;
 
1622
  unsigned long __pyx_v_entry_size;
 
1623
  char *__pyx_v_executable_cstr;
 
1624
  int __pyx_v_is_executable;
 
1625
  char *__pyx_v_dirname_cstr;
 
1626
  char *__pyx_v_trailing;
 
1627
  int __pyx_v_cur_size;
 
1628
  int __pyx_v_i;
 
1629
  PyObject *__pyx_v_minikind;
 
1630
  PyObject *__pyx_v_fingerprint;
 
1631
  PyObject *__pyx_v_info;
 
1632
  PyObject *__pyx_v_dirname;
 
1633
  PyObject *__pyx_v_trees;
 
1634
  PyObject *__pyx_v_ret;
 
1635
  PyObject *__pyx_r;
 
1636
  char *__pyx_1;
 
1637
  int __pyx_2;
 
1638
  PyObject *__pyx_3 = 0;
 
1639
  PyObject *__pyx_4 = 0;
 
1640
  PyObject *__pyx_5 = 0;
 
1641
  PyObject *__pyx_6 = 0;
 
1642
  Py_INCREF(__pyx_v_self);
 
1643
  __pyx_v_path_name_file_id_key = Py_None; Py_INCREF(Py_None);
 
1644
  __pyx_v_minikind = Py_None; Py_INCREF(Py_None);
 
1645
  __pyx_v_fingerprint = Py_None; Py_INCREF(Py_None);
 
1646
  __pyx_v_info = Py_None; Py_INCREF(Py_None);
 
1647
  __pyx_v_dirname = Py_None; Py_INCREF(Py_None);
 
1648
  __pyx_v_trees = Py_None; Py_INCREF(Py_None);
 
1649
  __pyx_v_ret = Py_None; Py_INCREF(Py_None);
 
1650
 
 
1651
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":625 */
 
1652
  __pyx_1 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_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 = 625; goto __pyx_L1;}
 
1653
  __pyx_v_dirname_cstr = __pyx_1;
 
1654
 
 
1655
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":633 */
 
1656
  __pyx_2 = (__pyx_v_cur_size != PyString_GET_SIZE((__pyx_v_p_current_dirname[0])));
 
1657
  if (!__pyx_2) {
 
1658
    __pyx_2 = (strncmp(__pyx_v_dirname_cstr,PyString_AS_STRING((__pyx_v_p_current_dirname[0])),(__pyx_v_cur_size + 1)) != 0);
 
1659
  }
 
1660
  if (__pyx_2) {
 
1661
 
 
1662
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":642 */
 
1663
    __pyx_3 = __pyx_f_19_dirstate_helpers_c_safe_string_from_size(__pyx_v_dirname_cstr,__pyx_v_cur_size); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; goto __pyx_L1;}
 
1664
    Py_DECREF(__pyx_v_dirname);
 
1665
    __pyx_v_dirname = __pyx_3;
 
1666
    __pyx_3 = 0;
 
1667
 
 
1668
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":643 */
 
1669
    (__pyx_v_p_current_dirname[0]) = ((void *)__pyx_v_dirname);
 
1670
 
 
1671
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":644 */
 
1672
    (__pyx_v_new_block[0]) = 1;
 
1673
    goto __pyx_L2;
 
1674
  }
 
1675
  /*else*/ {
 
1676
    (__pyx_v_new_block[0]) = 0;
 
1677
  }
 
1678
  __pyx_L2:;
 
1679
 
 
1680
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":651 */
 
1681
  __pyx_3 = (PyObject *)(__pyx_v_p_current_dirname[0]);
 
1682
  Py_INCREF(__pyx_3);
 
1683
  __pyx_4 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; goto __pyx_L1;}
 
1684
  __pyx_5 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; goto __pyx_L1;}
 
1685
  __pyx_6 = PyTuple_New(3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; goto __pyx_L1;}
 
1686
  PyTuple_SET_ITEM(__pyx_6, 0, __pyx_3);
 
1687
  PyTuple_SET_ITEM(__pyx_6, 1, __pyx_4);
 
1688
  PyTuple_SET_ITEM(__pyx_6, 2, __pyx_5);
 
1689
  __pyx_3 = 0;
 
1690
  __pyx_4 = 0;
 
1691
  __pyx_5 = 0;
 
1692
  Py_DECREF(__pyx_v_path_name_file_id_key);
 
1693
  __pyx_v_path_name_file_id_key = __pyx_6;
 
1694
  __pyx_6 = 0;
 
1695
 
 
1696
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":669 */
 
1697
  __pyx_3 = PyList_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; goto __pyx_L1;}
 
1698
  Py_DECREF(__pyx_v_trees);
 
1699
  __pyx_v_trees = __pyx_3;
 
1700
  __pyx_3 = 0;
 
1701
 
 
1702
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":670 */
 
1703
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_num_trees; ++__pyx_v_i) {
 
1704
 
 
1705
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":671 */
 
1706
    __pyx_4 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; goto __pyx_L1;}
 
1707
    Py_DECREF(__pyx_v_minikind);
 
1708
    __pyx_v_minikind = __pyx_4;
 
1709
    __pyx_4 = 0;
 
1710
 
 
1711
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":672 */
 
1712
    __pyx_5 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; goto __pyx_L1;}
 
1713
    Py_DECREF(__pyx_v_fingerprint);
 
1714
    __pyx_v_fingerprint = __pyx_5;
 
1715
    __pyx_5 = 0;
 
1716
 
 
1717
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":673 */
 
1718
    __pyx_1 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_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 = 673; goto __pyx_L1;}
 
1719
    __pyx_v_entry_size_cstr = __pyx_1;
 
1720
 
 
1721
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":674 */
 
1722
    __pyx_v_entry_size = strtoul(__pyx_v_entry_size_cstr,NULL,10);
 
1723
 
 
1724
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":675 */
 
1725
    __pyx_1 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_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;}
 
1726
    __pyx_v_executable_cstr = __pyx_1;
 
1727
 
 
1728
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":676 */
 
1729
    __pyx_v_is_executable = ((__pyx_v_executable_cstr[0]) == 'y');
 
1730
 
 
1731
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":677 */
 
1732
    __pyx_6 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; goto __pyx_L1;}
 
1733
    Py_DECREF(__pyx_v_info);
 
1734
    __pyx_v_info = __pyx_6;
 
1735
    __pyx_6 = 0;
 
1736
 
 
1737
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":678 */
 
1738
    __pyx_3 = PyLong_FromUnsignedLong(__pyx_v_entry_size); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; goto __pyx_L1;}
 
1739
    __pyx_4 = PyInt_FromLong(__pyx_v_is_executable); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; goto __pyx_L1;}
 
1740
    __pyx_5 = PyTuple_New(5); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; goto __pyx_L1;}
 
1741
    Py_INCREF(__pyx_v_minikind);
 
1742
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_minikind);
 
1743
    Py_INCREF(__pyx_v_fingerprint);
 
1744
    PyTuple_SET_ITEM(__pyx_5, 1, __pyx_v_fingerprint);
 
1745
    PyTuple_SET_ITEM(__pyx_5, 2, __pyx_3);
 
1746
    PyTuple_SET_ITEM(__pyx_5, 3, __pyx_4);
 
1747
    Py_INCREF(__pyx_v_info);
 
1748
    PyTuple_SET_ITEM(__pyx_5, 4, __pyx_v_info);
 
1749
    __pyx_3 = 0;
 
1750
    __pyx_4 = 0;
 
1751
    __pyx_2 = PyList_Append(__pyx_v_trees,__pyx_5); if (__pyx_2 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; goto __pyx_L1;}
 
1752
    Py_DECREF(__pyx_5); __pyx_5 = 0;
 
1753
  }
 
1754
 
 
1755
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":687 */
 
1756
  __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; goto __pyx_L1;}
 
1757
  Py_INCREF(__pyx_v_path_name_file_id_key);
 
1758
  PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_path_name_file_id_key);
 
1759
  Py_INCREF(__pyx_v_trees);
 
1760
  PyTuple_SET_ITEM(__pyx_6, 1, __pyx_v_trees);
 
1761
  Py_DECREF(__pyx_v_ret);
 
1762
  __pyx_v_ret = __pyx_6;
 
1763
  __pyx_6 = 0;
 
1764
 
 
1765
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":691 */
 
1766
  __pyx_1 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_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 = 691; goto __pyx_L1;}
 
1767
  __pyx_v_trailing = __pyx_1;
 
1768
 
 
1769
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":692 */
 
1770
  __pyx_2 = (__pyx_v_cur_size != 1);
 
1771
  if (!__pyx_2) {
 
1772
    __pyx_2 = ((__pyx_v_trailing[0]) != '\n');
 
1773
  }
 
1774
  if (__pyx_2) {
 
1775
    __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_errors); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; goto __pyx_L1;}
 
1776
    __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_DirstateCorrupt); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; goto __pyx_L1;}
 
1777
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
1778
    __pyx_5 = PyInt_FromLong(__pyx_v_cur_size); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; goto __pyx_L1;}
 
1779
    __pyx_6 = __pyx_f_19_dirstate_helpers_c_safe_string_from_size(__pyx_v_trailing,__pyx_v_cur_size); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; goto __pyx_L1;}
 
1780
    __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; goto __pyx_L1;}
 
1781
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_5);
 
1782
    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_6);
 
1783
    Py_INCREF(__pyx_v_ret);
 
1784
    PyTuple_SET_ITEM(__pyx_3, 2, __pyx_v_ret);
 
1785
    __pyx_5 = 0;
 
1786
    __pyx_6 = 0;
 
1787
    __pyx_5 = PyNumber_Remainder(__pyx_k45p, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; goto __pyx_L1;}
 
1788
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
1789
    __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; goto __pyx_L1;}
 
1790
    Py_INCREF(__pyx_v_self->state);
 
1791
    PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_self->state);
 
1792
    PyTuple_SET_ITEM(__pyx_6, 1, __pyx_5);
 
1793
    __pyx_5 = 0;
 
1794
    __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; goto __pyx_L1;}
 
1795
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
1796
    Py_DECREF(__pyx_6); __pyx_6 = 0;
 
1797
    __Pyx_Raise(__pyx_3, 0, 0);
 
1798
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
1799
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; goto __pyx_L1;}
 
1800
    goto __pyx_L5;
 
1801
  }
 
1802
  __pyx_L5:;
 
1803
 
 
1804
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":697 */
 
1805
  Py_INCREF(__pyx_v_ret);
 
1806
  __pyx_r = __pyx_v_ret;
 
1807
  goto __pyx_L0;
 
1808
 
 
1809
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
1810
  goto __pyx_L0;
 
1811
  __pyx_L1:;
 
1812
  Py_XDECREF(__pyx_3);
 
1813
  Py_XDECREF(__pyx_4);
 
1814
  Py_XDECREF(__pyx_5);
 
1815
  Py_XDECREF(__pyx_6);
 
1816
  __Pyx_AddTraceback("_dirstate_helpers_c.Reader._get_entry");
 
1817
  __pyx_r = 0;
 
1818
  __pyx_L0:;
 
1819
  Py_DECREF(__pyx_v_path_name_file_id_key);
 
1820
  Py_DECREF(__pyx_v_minikind);
 
1821
  Py_DECREF(__pyx_v_fingerprint);
 
1822
  Py_DECREF(__pyx_v_info);
 
1823
  Py_DECREF(__pyx_v_dirname);
 
1824
  Py_DECREF(__pyx_v_trees);
 
1825
  Py_DECREF(__pyx_v_ret);
 
1826
  Py_DECREF(__pyx_v_self);
 
1827
  return __pyx_r;
 
1828
}
 
1829
 
 
1830
static PyObject *__pyx_n__num_present_parents;
 
1831
static PyObject *__pyx_n__num_entries;
 
1832
static PyObject *__pyx_n__dirblocks;
 
1833
static PyObject *__pyx_n__split_root_dirblock_into_contents;
 
1834
 
 
1835
static PyObject *__pyx_k46p;
 
1836
static PyObject *__pyx_k47p;
 
1837
static PyObject *__pyx_k48p;
 
1838
static PyObject *__pyx_k49p;
 
1839
 
 
1840
static char __pyx_k46[] = "";
 
1841
static char __pyx_k47[] = "";
 
1842
static char __pyx_k48[] = "";
 
1843
static char __pyx_k49[] = "We read the wrong number of entries. We expected to read %s, but read %s";
 
1844
 
 
1845
static PyObject *__pyx_f_19_dirstate_helpers_c_6Reader__parse_dirblocks(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
1846
static char __pyx_doc_19_dirstate_helpers_c_6Reader__parse_dirblocks[] = "Parse all dirblocks in the state file.";
 
1847
static PyObject *__pyx_f_19_dirstate_helpers_c_6Reader__parse_dirblocks(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
1848
  int __pyx_v_num_trees;
 
1849
  PyObject *__pyx_v_current_block;
 
1850
  PyObject *__pyx_v_entry;
 
1851
  void *__pyx_v_current_dirname;
 
1852
  int __pyx_v_new_block;
 
1853
  int __pyx_v_expected_entry_count;
 
1854
  int __pyx_v_entry_count;
 
1855
  PyObject *__pyx_v_dirblocks;
 
1856
  PyObject *__pyx_v_obj;
 
1857
  PyObject *__pyx_r;
 
1858
  PyObject *__pyx_1 = 0;
 
1859
  PyObject *__pyx_2 = 0;
 
1860
  PyObject *__pyx_3 = 0;
 
1861
  int __pyx_4;
 
1862
  PyObject *__pyx_5 = 0;
 
1863
  static char *__pyx_argnames[] = {0};
 
1864
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
 
1865
  Py_INCREF(__pyx_v_self);
 
1866
  __pyx_v_current_block = Py_None; Py_INCREF(Py_None);
 
1867
  __pyx_v_entry = Py_None; Py_INCREF(Py_None);
 
1868
  __pyx_v_dirblocks = Py_None; Py_INCREF(Py_None);
 
1869
  __pyx_v_obj = Py_None; Py_INCREF(Py_None);
 
1870
 
 
1871
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":709 */
 
1872
  __pyx_1 = PyObject_GetAttr(((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->state, __pyx_n__num_present_parents); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; goto __pyx_L1;}
 
1873
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; goto __pyx_L1;}
 
1874
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
1875
  __pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; goto __pyx_L1;}
 
1876
  __pyx_3 = PyNumber_Add(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; goto __pyx_L1;}
 
1877
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1878
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
1879
  __pyx_4 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; goto __pyx_L1;}
 
1880
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
1881
  __pyx_v_num_trees = __pyx_4;
 
1882
 
 
1883
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":710 */
 
1884
  __pyx_2 = PyObject_GetAttr(((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->state, __pyx_n__num_entries); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;}
 
1885
  __pyx_4 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; goto __pyx_L1;}
 
1886
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
1887
  __pyx_v_expected_entry_count = __pyx_4;
 
1888
 
 
1889
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":713 */
 
1890
  __pyx_4 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_Reader *)((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->__pyx_vtab)->_init(((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)); if (__pyx_4 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; goto __pyx_L1;}
 
1891
 
 
1892
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":715 */
 
1893
  __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; goto __pyx_L1;}
 
1894
  Py_DECREF(__pyx_v_current_block);
 
1895
  __pyx_v_current_block = __pyx_1;
 
1896
  __pyx_1 = 0;
 
1897
 
 
1898
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":716 */
 
1899
  __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; goto __pyx_L1;}
 
1900
  Py_INCREF(__pyx_k46p);
 
1901
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k46p);
 
1902
  Py_INCREF(__pyx_v_current_block);
 
1903
  PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_current_block);
 
1904
  __pyx_2 = PyList_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; goto __pyx_L1;}
 
1905
  __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; goto __pyx_L1;}
 
1906
  Py_INCREF(__pyx_k47p);
 
1907
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k47p);
 
1908
  PyTuple_SET_ITEM(__pyx_1, 1, __pyx_2);
 
1909
  __pyx_2 = 0;
 
1910
  __pyx_2 = PyList_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; goto __pyx_L1;}
 
1911
  PyList_SET_ITEM(__pyx_2, 0, __pyx_3);
 
1912
  PyList_SET_ITEM(__pyx_2, 1, __pyx_1);
 
1913
  __pyx_3 = 0;
 
1914
  __pyx_1 = 0;
 
1915
  Py_DECREF(__pyx_v_dirblocks);
 
1916
  __pyx_v_dirblocks = __pyx_2;
 
1917
  __pyx_2 = 0;
 
1918
 
 
1919
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":717 */
 
1920
  if (PyObject_SetAttr(((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->state, __pyx_n__dirblocks, __pyx_v_dirblocks) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; goto __pyx_L1;}
 
1921
 
 
1922
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":718 */
 
1923
  Py_INCREF(__pyx_k48p);
 
1924
  Py_DECREF(__pyx_v_obj);
 
1925
  __pyx_v_obj = __pyx_k48p;
 
1926
 
 
1927
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":719 */
 
1928
  __pyx_v_current_dirname = ((void *)__pyx_v_obj);
 
1929
 
 
1930
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":720 */
 
1931
  __pyx_v_new_block = 0;
 
1932
 
 
1933
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":721 */
 
1934
  __pyx_v_entry_count = 0;
 
1935
 
 
1936
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":730 */
 
1937
  while (1) {
 
1938
    __pyx_4 = (((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->cur_cstr < ((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->end_cstr);
 
1939
    if (!__pyx_4) break;
 
1940
 
 
1941
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":731 */
 
1942
    __pyx_3 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_Reader *)((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->__pyx_vtab)->_get_entry(((struct __pyx_obj_19_dirstate_helpers_c_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 = 731; goto __pyx_L1;}
 
1943
    Py_DECREF(__pyx_v_entry);
 
1944
    __pyx_v_entry = __pyx_3;
 
1945
    __pyx_3 = 0;
 
1946
 
 
1947
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":732 */
 
1948
    __pyx_4 = __pyx_v_new_block;
 
1949
    if (__pyx_4) {
 
1950
 
 
1951
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":734 */
 
1952
      __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; goto __pyx_L1;}
 
1953
      Py_DECREF(__pyx_v_current_block);
 
1954
      __pyx_v_current_block = __pyx_1;
 
1955
      __pyx_1 = 0;
 
1956
 
 
1957
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":735 */
 
1958
      __pyx_2 = (PyObject *)__pyx_v_current_dirname;
 
1959
      Py_INCREF(__pyx_2);
 
1960
      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; goto __pyx_L1;}
 
1961
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
 
1962
      Py_INCREF(__pyx_v_current_block);
 
1963
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_current_block);
 
1964
      __pyx_2 = 0;
 
1965
      __pyx_4 = PyList_Append(__pyx_v_dirblocks,__pyx_3); if (__pyx_4 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; goto __pyx_L1;}
 
1966
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
1967
      goto __pyx_L4;
 
1968
    }
 
1969
    __pyx_L4:;
 
1970
 
 
1971
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":737 */
 
1972
    __pyx_4 = PyList_Append(__pyx_v_current_block,__pyx_v_entry); if (__pyx_4 == (-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; goto __pyx_L1;}
 
1973
 
 
1974
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":738 */
 
1975
    __pyx_v_entry_count = (__pyx_v_entry_count + 1);
 
1976
  }
 
1977
 
 
1978
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":739 */
 
1979
  __pyx_4 = (__pyx_v_entry_count != __pyx_v_expected_entry_count);
 
1980
  if (__pyx_4) {
 
1981
    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_errors); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; goto __pyx_L1;}
 
1982
    __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_DirstateCorrupt); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; goto __pyx_L1;}
 
1983
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
1984
    __pyx_3 = PyInt_FromLong(__pyx_v_expected_entry_count); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; goto __pyx_L1;}
 
1985
    __pyx_1 = PyInt_FromLong(__pyx_v_entry_count); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; goto __pyx_L1;}
 
1986
    __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; goto __pyx_L1;}
 
1987
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
 
1988
    PyTuple_SET_ITEM(__pyx_5, 1, __pyx_1);
 
1989
    __pyx_3 = 0;
 
1990
    __pyx_1 = 0;
 
1991
    __pyx_3 = PyNumber_Remainder(__pyx_k49p, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; goto __pyx_L1;}
 
1992
    Py_DECREF(__pyx_5); __pyx_5 = 0;
 
1993
    __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; goto __pyx_L1;}
 
1994
    Py_INCREF(((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->state);
 
1995
    PyTuple_SET_ITEM(__pyx_1, 0, ((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->state);
 
1996
    PyTuple_SET_ITEM(__pyx_1, 1, __pyx_3);
 
1997
    __pyx_3 = 0;
 
1998
    __pyx_5 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; goto __pyx_L1;}
 
1999
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
2000
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2001
    __Pyx_Raise(__pyx_5, 0, 0);
 
2002
    Py_DECREF(__pyx_5); __pyx_5 = 0;
 
2003
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; goto __pyx_L1;}
 
2004
    goto __pyx_L5;
 
2005
  }
 
2006
  __pyx_L5:;
 
2007
 
 
2008
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":744 */
 
2009
  __pyx_3 = PyObject_GetAttr(((struct __pyx_obj_19_dirstate_helpers_c_Reader *)__pyx_v_self)->state, __pyx_n__split_root_dirblock_into_contents); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; goto __pyx_L1;}
 
2010
  __pyx_2 = PyObject_CallObject(__pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; goto __pyx_L1;}
 
2011
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2012
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
2013
 
 
2014
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
2015
  goto __pyx_L0;
 
2016
  __pyx_L1:;
 
2017
  Py_XDECREF(__pyx_1);
 
2018
  Py_XDECREF(__pyx_2);
 
2019
  Py_XDECREF(__pyx_3);
 
2020
  Py_XDECREF(__pyx_5);
 
2021
  __Pyx_AddTraceback("_dirstate_helpers_c.Reader._parse_dirblocks");
 
2022
  __pyx_r = 0;
 
2023
  __pyx_L0:;
 
2024
  Py_DECREF(__pyx_v_current_block);
 
2025
  Py_DECREF(__pyx_v_entry);
 
2026
  Py_DECREF(__pyx_v_dirblocks);
 
2027
  Py_DECREF(__pyx_v_obj);
 
2028
  Py_DECREF(__pyx_v_self);
 
2029
  return __pyx_r;
 
2030
}
 
2031
 
 
2032
static PyObject *__pyx_n__state_file;
 
2033
static PyObject *__pyx_n_seek;
 
2034
static PyObject *__pyx_n__end_of_header;
 
2035
static PyObject *__pyx_n_read;
 
2036
static PyObject *__pyx_n__parse_dirblocks;
 
2037
static PyObject *__pyx_n_IN_MEMORY_UNMODIFIED;
 
2038
static PyObject *__pyx_n__dirblock_state;
 
2039
 
 
2040
static PyObject *__pyx_f_19_dirstate_helpers_c__read_dirblocks_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
2041
static char __pyx_doc_19_dirstate_helpers_c__read_dirblocks_c[] = "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    ";
 
2042
static PyObject *__pyx_f_19_dirstate_helpers_c__read_dirblocks_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
2043
  PyObject *__pyx_v_state = 0;
 
2044
  PyObject *__pyx_v_text;
 
2045
  PyObject *__pyx_v_reader;
 
2046
  PyObject *__pyx_r;
 
2047
  PyObject *__pyx_1 = 0;
 
2048
  PyObject *__pyx_2 = 0;
 
2049
  PyObject *__pyx_3 = 0;
 
2050
  static char *__pyx_argnames[] = {"state",0};
 
2051
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_state)) return 0;
 
2052
  Py_INCREF(__pyx_v_state);
 
2053
  __pyx_v_text = Py_None; Py_INCREF(Py_None);
 
2054
  __pyx_v_reader = Py_None; Py_INCREF(Py_None);
 
2055
 
 
2056
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":759 */
 
2057
  __pyx_1 = PyObject_GetAttr(__pyx_v_state, __pyx_n__state_file); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;}
 
2058
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_seek); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;}
 
2059
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2060
  __pyx_1 = PyObject_GetAttr(__pyx_v_state, __pyx_n__end_of_header); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;}
 
2061
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;}
 
2062
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
 
2063
  __pyx_1 = 0;
 
2064
  __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;}
 
2065
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
2066
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2067
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2068
 
 
2069
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":760 */
 
2070
  __pyx_2 = PyObject_GetAttr(__pyx_v_state, __pyx_n__state_file); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; goto __pyx_L1;}
 
2071
  __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_read); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; goto __pyx_L1;}
 
2072
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
2073
  __pyx_1 = PyObject_CallObject(__pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; goto __pyx_L1;}
 
2074
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2075
  Py_DECREF(__pyx_v_text);
 
2076
  __pyx_v_text = __pyx_1;
 
2077
  __pyx_1 = 0;
 
2078
 
 
2079
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":763 */
 
2080
  __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; goto __pyx_L1;}
 
2081
  Py_INCREF(__pyx_v_text);
 
2082
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_text);
 
2083
  Py_INCREF(__pyx_v_state);
 
2084
  PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_state);
 
2085
  __pyx_3 = PyObject_CallObject(((PyObject *)__pyx_ptype_19_dirstate_helpers_c_Reader), __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; goto __pyx_L1;}
 
2086
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
2087
  Py_DECREF(__pyx_v_reader);
 
2088
  __pyx_v_reader = __pyx_3;
 
2089
  __pyx_3 = 0;
 
2090
 
 
2091
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":765 */
 
2092
  __pyx_1 = PyObject_GetAttr(__pyx_v_reader, __pyx_n__parse_dirblocks); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; goto __pyx_L1;}
 
2093
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 765; goto __pyx_L1;}
 
2094
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2095
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
2096
 
 
2097
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":766 */
 
2098
  __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_DirState); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; goto __pyx_L1;}
 
2099
  __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_IN_MEMORY_UNMODIFIED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; goto __pyx_L1;}
 
2100
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2101
  if (PyObject_SetAttr(__pyx_v_state, __pyx_n__dirblock_state, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; goto __pyx_L1;}
 
2102
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2103
 
 
2104
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
2105
  goto __pyx_L0;
 
2106
  __pyx_L1:;
 
2107
  Py_XDECREF(__pyx_1);
 
2108
  Py_XDECREF(__pyx_2);
 
2109
  Py_XDECREF(__pyx_3);
 
2110
  __Pyx_AddTraceback("_dirstate_helpers_c._read_dirblocks_c");
 
2111
  __pyx_r = 0;
 
2112
  __pyx_L0:;
 
2113
  Py_DECREF(__pyx_v_text);
 
2114
  Py_DECREF(__pyx_v_reader);
 
2115
  Py_DECREF(__pyx_v_state);
 
2116
  return __pyx_r;
 
2117
}
 
2118
 
 
2119
static int __pyx_f_19_dirstate_helpers_c_minikind_from_mode(int __pyx_v_mode) {
 
2120
  int __pyx_r;
 
2121
  int __pyx_1;
 
2122
 
 
2123
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":771 */
 
2124
  __pyx_1 = S_ISREG(__pyx_v_mode);
 
2125
  if (__pyx_1) {
 
2126
    __pyx_r = 'f';
 
2127
    goto __pyx_L0;
 
2128
    goto __pyx_L2;
 
2129
  }
 
2130
  __pyx_L2:;
 
2131
 
 
2132
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":773 */
 
2133
  __pyx_1 = S_ISDIR(__pyx_v_mode);
 
2134
  if (__pyx_1) {
 
2135
    __pyx_r = 'd';
 
2136
    goto __pyx_L0;
 
2137
    goto __pyx_L3;
 
2138
  }
 
2139
  __pyx_L3:;
 
2140
 
 
2141
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":775 */
 
2142
  __pyx_1 = S_ISLNK(__pyx_v_mode);
 
2143
  if (__pyx_1) {
 
2144
    __pyx_r = 'l';
 
2145
    goto __pyx_L0;
 
2146
    goto __pyx_L4;
 
2147
  }
 
2148
  __pyx_L4:;
 
2149
 
 
2150
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":777 */
 
2151
  __pyx_r = 0;
 
2152
  goto __pyx_L0;
 
2153
 
 
2154
  __pyx_r = 0;
 
2155
  __pyx_L0:;
 
2156
  return __pyx_r;
 
2157
}
 
2158
 
 
2159
static PyObject *__pyx_n_st_size;
 
2160
static PyObject *__pyx_n_st_mtime;
 
2161
static PyObject *__pyx_n_st_ctime;
 
2162
static PyObject *__pyx_n_st_dev;
 
2163
static PyObject *__pyx_n_st_ino;
 
2164
static PyObject *__pyx_n_st_mode;
 
2165
 
 
2166
static PyObject *__pyx_f_19_dirstate_helpers_c__pack_stat(PyObject *__pyx_v_stat_value) {
 
2167
  char __pyx_v_result[(6 * 4)];
 
2168
  int *__pyx_v_aliased;
 
2169
  PyObject *__pyx_v_packed;
 
2170
  PyObject *__pyx_r;
 
2171
  PyObject *__pyx_1 = 0;
 
2172
  unsigned long __pyx_2;
 
2173
  PyObject *__pyx_3 = 0;
 
2174
  PyObject *__pyx_4 = 0;
 
2175
  Py_INCREF(__pyx_v_stat_value);
 
2176
  __pyx_v_packed = Py_None; Py_INCREF(Py_None);
 
2177
 
 
2178
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":792 */
 
2179
  __pyx_v_aliased = ((int *)__pyx_v_result);
 
2180
 
 
2181
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":793 */
 
2182
  __pyx_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;}
 
2183
  __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;}
 
2184
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2185
  (__pyx_v_aliased[0]) = htonl(__pyx_2);
 
2186
 
 
2187
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":794 */
 
2188
  __pyx_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_mtime); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; goto __pyx_L1;}
 
2189
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; goto __pyx_L1;}
 
2190
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
 
2191
  __pyx_1 = 0;
 
2192
  __pyx_1 = PyObject_CallObject(((PyObject *)(&PyInt_Type)), __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; goto __pyx_L1;}
 
2193
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2194
  __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; goto __pyx_L1;}
 
2195
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2196
  (__pyx_v_aliased[1]) = htonl(__pyx_2);
 
2197
 
 
2198
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":795 */
 
2199
  __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_ctime); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; goto __pyx_L1;}
 
2200
  __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; goto __pyx_L1;}
 
2201
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
 
2202
  __pyx_3 = 0;
 
2203
  __pyx_3 = PyObject_CallObject(((PyObject *)(&PyInt_Type)), __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; goto __pyx_L1;}
 
2204
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2205
  __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; goto __pyx_L1;}
 
2206
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2207
  (__pyx_v_aliased[2]) = htonl(__pyx_2);
 
2208
 
 
2209
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":796 */
 
2210
  __pyx_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_dev); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;}
 
2211
  __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; goto __pyx_L1;}
 
2212
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2213
  (__pyx_v_aliased[3]) = htonl(__pyx_2);
 
2214
 
 
2215
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":797 */
 
2216
  __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_ino); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; goto __pyx_L1;}
 
2217
  __pyx_1 = PyInt_FromLong(0xFFFFFFFF); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; goto __pyx_L1;}
 
2218
  __pyx_4 = PyNumber_And(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; goto __pyx_L1;}
 
2219
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2220
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2221
  __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; goto __pyx_L1;}
 
2222
  Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2223
  (__pyx_v_aliased[4]) = htonl(__pyx_2);
 
2224
 
 
2225
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":798 */
 
2226
  __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_mode); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; goto __pyx_L1;}
 
2227
  __pyx_2 = PyInt_AsUnsignedLongMask(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; goto __pyx_L1;}
 
2228
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2229
  (__pyx_v_aliased[5]) = htonl(__pyx_2);
 
2230
 
 
2231
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":799 */
 
2232
  __pyx_1 = PyString_FromStringAndSize(__pyx_v_result,(6 * 4)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; goto __pyx_L1;}
 
2233
  Py_DECREF(__pyx_v_packed);
 
2234
  __pyx_v_packed = __pyx_1;
 
2235
  __pyx_1 = 0;
 
2236
 
 
2237
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":800 */
 
2238
  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__encode); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; goto __pyx_L1;}
 
2239
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; goto __pyx_L1;}
 
2240
  Py_INCREF(__pyx_v_packed);
 
2241
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_packed);
 
2242
  __pyx_1 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; goto __pyx_L1;}
 
2243
  Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2244
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2245
  __pyx_4 = PySequence_GetSlice(__pyx_1, 0, (-1)); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; goto __pyx_L1;}
 
2246
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2247
  __pyx_r = __pyx_4;
 
2248
  __pyx_4 = 0;
 
2249
  goto __pyx_L0;
 
2250
 
 
2251
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
2252
  goto __pyx_L0;
 
2253
  __pyx_L1:;
 
2254
  Py_XDECREF(__pyx_1);
 
2255
  Py_XDECREF(__pyx_3);
 
2256
  Py_XDECREF(__pyx_4);
 
2257
  __Pyx_AddTraceback("_dirstate_helpers_c._pack_stat");
 
2258
  __pyx_r = 0;
 
2259
  __pyx_L0:;
 
2260
  Py_DECREF(__pyx_v_packed);
 
2261
  Py_DECREF(__pyx_v_stat_value);
 
2262
  return __pyx_r;
 
2263
}
 
2264
 
 
2265
static PyObject *__pyx_f_19_dirstate_helpers_c_update_entry(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
2266
static char __pyx_doc_19_dirstate_helpers_c_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    ";
 
2267
static PyObject *__pyx_f_19_dirstate_helpers_c_update_entry(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
2268
  PyObject *__pyx_v_self = 0;
 
2269
  PyObject *__pyx_v_entry = 0;
 
2270
  PyObject *__pyx_v_abspath = 0;
 
2271
  PyObject *__pyx_v_stat_value = 0;
 
2272
  PyObject *__pyx_r;
 
2273
  PyObject *__pyx_1 = 0;
 
2274
  static char *__pyx_argnames[] = {"self","entry","abspath","stat_value",0};
 
2275
  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;
 
2276
  Py_INCREF(__pyx_v_self);
 
2277
  Py_INCREF(__pyx_v_entry);
 
2278
  Py_INCREF(__pyx_v_abspath);
 
2279
  Py_INCREF(__pyx_v_stat_value);
 
2280
  __pyx_1 = __pyx_f_19_dirstate_helpers_c__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 = 817; goto __pyx_L1;}
 
2281
  __pyx_r = __pyx_1;
 
2282
  __pyx_1 = 0;
 
2283
  goto __pyx_L0;
 
2284
 
 
2285
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
2286
  goto __pyx_L0;
 
2287
  __pyx_L1:;
 
2288
  Py_XDECREF(__pyx_1);
 
2289
  __Pyx_AddTraceback("_dirstate_helpers_c.update_entry");
 
2290
  __pyx_r = 0;
 
2291
  __pyx_L0:;
 
2292
  Py_DECREF(__pyx_v_self);
 
2293
  Py_DECREF(__pyx_v_entry);
 
2294
  Py_DECREF(__pyx_v_abspath);
 
2295
  Py_DECREF(__pyx_v_stat_value);
 
2296
  return __pyx_r;
 
2297
}
 
2298
 
 
2299
static PyObject *__pyx_n__is_executable;
 
2300
static PyObject *__pyx_n__cutoff_time;
 
2301
static PyObject *__pyx_n__sha_cutoff_time;
 
2302
static PyObject *__pyx_n_a;
 
2303
static PyObject *__pyx_n__sha1_file;
 
2304
static PyObject *__pyx_n_f;
 
2305
static PyObject *__pyx_n_NULLSTAT;
 
2306
static PyObject *__pyx_n_d;
 
2307
static PyObject *__pyx_n__get_block_entry_index;
 
2308
static PyObject *__pyx_n__ensure_block;
 
2309
static PyObject *__pyx_n__read_link;
 
2310
static PyObject *__pyx_n_l;
 
2311
static PyObject *__pyx_n_IN_MEMORY_MODIFIED;
 
2312
 
 
2313
static PyObject *__pyx_k53p;
 
2314
static PyObject *__pyx_k55p;
 
2315
static PyObject *__pyx_k58p;
 
2316
 
 
2317
static char __pyx_k53[] = "";
 
2318
static char __pyx_k55[] = "";
 
2319
static char __pyx_k58[] = "";
 
2320
 
 
2321
static PyObject *__pyx_f_19_dirstate_helpers_c__update_entry(PyObject *__pyx_v_self,PyObject *__pyx_v_entry,PyObject *__pyx_v_abspath,PyObject *__pyx_v_stat_value) {
 
2322
  int __pyx_v_minikind;
 
2323
  int __pyx_v_saved_minikind;
 
2324
  void *__pyx_v_details;
 
2325
  PyObject *__pyx_v_packed_stat;
 
2326
  PyObject *__pyx_v_saved_link_or_sha1;
 
2327
  PyObject *__pyx_v_saved_file_size;
 
2328
  PyObject *__pyx_v_saved_executable;
 
2329
  PyObject *__pyx_v_saved_packed_stat;
 
2330
  PyObject *__pyx_v_link_or_sha1;
 
2331
  PyObject *__pyx_v_executable;
 
2332
  PyObject *__pyx_v_block_index;
 
2333
  PyObject *__pyx_v_entry_index;
 
2334
  PyObject *__pyx_v_dir_present;
 
2335
  PyObject *__pyx_v_file_present;
 
2336
  PyObject *__pyx_r;
 
2337
  PyObject *__pyx_1 = 0;
 
2338
  int __pyx_2;
 
2339
  PyObject *__pyx_3 = 0;
 
2340
  PyObject *__pyx_4 = 0;
 
2341
  Py_ssize_t __pyx_5;
 
2342
  PyObject *__pyx_6 = 0;
 
2343
  PyObject *__pyx_7 = 0;
 
2344
  Py_INCREF(__pyx_v_self);
 
2345
  Py_INCREF(__pyx_v_entry);
 
2346
  Py_INCREF(__pyx_v_abspath);
 
2347
  Py_INCREF(__pyx_v_stat_value);
 
2348
  __pyx_v_packed_stat = Py_None; Py_INCREF(Py_None);
 
2349
  __pyx_v_saved_link_or_sha1 = Py_None; Py_INCREF(Py_None);
 
2350
  __pyx_v_saved_file_size = Py_None; Py_INCREF(Py_None);
 
2351
  __pyx_v_saved_executable = Py_None; Py_INCREF(Py_None);
 
2352
  __pyx_v_saved_packed_stat = Py_None; Py_INCREF(Py_None);
 
2353
  __pyx_v_link_or_sha1 = Py_None; Py_INCREF(Py_None);
 
2354
  __pyx_v_executable = Py_None; Py_INCREF(Py_None);
 
2355
  __pyx_v_block_index = Py_None; Py_INCREF(Py_None);
 
2356
  __pyx_v_entry_index = Py_None; Py_INCREF(Py_None);
 
2357
  __pyx_v_dir_present = Py_None; Py_INCREF(Py_None);
 
2358
  __pyx_v_file_present = Py_None; Py_INCREF(Py_None);
 
2359
 
 
2360
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":838 */
 
2361
  __pyx_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_mode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;}
 
2362
  __pyx_2 = PyInt_AsLong(__pyx_1); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; goto __pyx_L1;}
 
2363
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2364
  __pyx_v_minikind = __pyx_f_19_dirstate_helpers_c_minikind_from_mode(__pyx_2);
 
2365
 
 
2366
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":839 */
 
2367
  __pyx_2 = (0 == __pyx_v_minikind);
 
2368
  if (__pyx_2) {
 
2369
    Py_INCREF(Py_None);
 
2370
    __pyx_r = Py_None;
 
2371
    goto __pyx_L0;
 
2372
    goto __pyx_L2;
 
2373
  }
 
2374
  __pyx_L2:;
 
2375
 
 
2376
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":841 */
 
2377
  __pyx_1 = __pyx_f_19_dirstate_helpers_c__pack_stat(__pyx_v_stat_value); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; goto __pyx_L1;}
 
2378
  Py_DECREF(__pyx_v_packed_stat);
 
2379
  __pyx_v_packed_stat = __pyx_1;
 
2380
  __pyx_1 = 0;
 
2381
 
 
2382
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":842 */
 
2383
  __pyx_v_details = PyList_GET_ITEM(PyTuple_GET_ITEM(((void *)__pyx_v_entry),1),0);
 
2384
 
 
2385
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":843 */
 
2386
  __pyx_v_saved_minikind = (PyString_AsString(((PyObject *)PyTuple_GET_ITEM(__pyx_v_details,0)))[0]);
 
2387
 
 
2388
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":844 */
 
2389
  __pyx_2 = (__pyx_v_minikind == 'd');
 
2390
  if (__pyx_2) {
 
2391
    __pyx_2 = (__pyx_v_saved_minikind == 't');
 
2392
  }
 
2393
  if (__pyx_2) {
 
2394
    __pyx_v_minikind = 't';
 
2395
    goto __pyx_L3;
 
2396
  }
 
2397
  __pyx_L3:;
 
2398
 
 
2399
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":846 */
 
2400
  __pyx_1 = PyTuple_GET_ITEM(__pyx_v_details,1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; goto __pyx_L1;}
 
2401
  Py_DECREF(__pyx_v_saved_link_or_sha1);
 
2402
  __pyx_v_saved_link_or_sha1 = __pyx_1;
 
2403
  __pyx_1 = 0;
 
2404
 
 
2405
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":847 */
 
2406
  __pyx_1 = PyTuple_GET_ITEM(__pyx_v_details,2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; goto __pyx_L1;}
 
2407
  Py_DECREF(__pyx_v_saved_file_size);
 
2408
  __pyx_v_saved_file_size = __pyx_1;
 
2409
  __pyx_1 = 0;
 
2410
 
 
2411
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":848 */
 
2412
  __pyx_1 = PyTuple_GET_ITEM(__pyx_v_details,3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; goto __pyx_L1;}
 
2413
  Py_DECREF(__pyx_v_saved_executable);
 
2414
  __pyx_v_saved_executable = __pyx_1;
 
2415
  __pyx_1 = 0;
 
2416
 
 
2417
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":849 */
 
2418
  __pyx_1 = PyTuple_GET_ITEM(__pyx_v_details,4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; goto __pyx_L1;}
 
2419
  Py_DECREF(__pyx_v_saved_packed_stat);
 
2420
  __pyx_v_saved_packed_stat = __pyx_1;
 
2421
  __pyx_1 = 0;
 
2422
 
 
2423
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":851 */
 
2424
  Py_INCREF(__pyx_v_saved_link_or_sha1);
 
2425
 
 
2426
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":852 */
 
2427
  Py_INCREF(__pyx_v_saved_file_size);
 
2428
 
 
2429
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":853 */
 
2430
  Py_INCREF(__pyx_v_saved_executable);
 
2431
 
 
2432
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":854 */
 
2433
  Py_INCREF(__pyx_v_saved_packed_stat);
 
2434
 
 
2435
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":858 */
 
2436
  __pyx_2 = (__pyx_v_minikind == __pyx_v_saved_minikind);
 
2437
  if (__pyx_2) {
 
2438
    if (PyObject_Cmp(__pyx_v_packed_stat, __pyx_v_saved_packed_stat, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;}
 
2439
    __pyx_2 = __pyx_2 == 0;
 
2440
  }
 
2441
  if (__pyx_2) {
 
2442
 
 
2443
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":862 */
 
2444
    __pyx_2 = (__pyx_v_minikind == 'd');
 
2445
    if (__pyx_2) {
 
2446
      Py_INCREF(Py_None);
 
2447
      __pyx_r = Py_None;
 
2448
      goto __pyx_L0;
 
2449
      goto __pyx_L5;
 
2450
    }
 
2451
    __pyx_L5:;
 
2452
 
 
2453
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":866 */
 
2454
    __pyx_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_size); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; goto __pyx_L1;}
 
2455
    if (PyObject_Cmp(__pyx_v_saved_file_size, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; goto __pyx_L1;}
 
2456
    __pyx_2 = __pyx_2 == 0;
 
2457
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2458
    if (__pyx_2) {
 
2459
      Py_INCREF(__pyx_v_saved_link_or_sha1);
 
2460
      __pyx_r = __pyx_v_saved_link_or_sha1;
 
2461
      goto __pyx_L0;
 
2462
      goto __pyx_L6;
 
2463
    }
 
2464
    __pyx_L6:;
 
2465
    goto __pyx_L4;
 
2466
  }
 
2467
  __pyx_L4:;
 
2468
 
 
2469
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":871 */
 
2470
  Py_INCREF(Py_None);
 
2471
  Py_DECREF(__pyx_v_link_or_sha1);
 
2472
  __pyx_v_link_or_sha1 = Py_None;
 
2473
 
 
2474
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":872 */
 
2475
  __pyx_2 = (__pyx_v_minikind == 'f');
 
2476
  if (__pyx_2) {
 
2477
 
 
2478
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":873 */
 
2479
    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__is_executable); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;}
 
2480
    __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_mode); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;}
 
2481
    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;}
 
2482
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
 
2483
    Py_INCREF(__pyx_v_saved_executable);
 
2484
    PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_saved_executable);
 
2485
    __pyx_3 = 0;
 
2486
    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; goto __pyx_L1;}
 
2487
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2488
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2489
    Py_DECREF(__pyx_v_executable);
 
2490
    __pyx_v_executable = __pyx_3;
 
2491
    __pyx_3 = 0;
 
2492
 
 
2493
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":875 */
 
2494
    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__cutoff_time); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; goto __pyx_L1;}
 
2495
    __pyx_2 = __pyx_1 == Py_None;
 
2496
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2497
    if (__pyx_2) {
 
2498
      __pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__sha_cutoff_time); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; goto __pyx_L1;}
 
2499
      __pyx_3 = PyObject_CallObject(__pyx_4, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; goto __pyx_L1;}
 
2500
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2501
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2502
      goto __pyx_L8;
 
2503
    }
 
2504
    __pyx_L8:;
 
2505
 
 
2506
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":877 */
 
2507
    __pyx_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_mtime); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; goto __pyx_L1;}
 
2508
    __pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__cutoff_time); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; goto __pyx_L1;}
 
2509
    if (PyObject_Cmp(__pyx_1, __pyx_4, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; goto __pyx_L1;}
 
2510
    __pyx_2 = __pyx_2 < 0;
 
2511
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2512
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2513
    if (__pyx_2) {
 
2514
      __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_ctime); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; goto __pyx_L1;}
 
2515
      __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__cutoff_time); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; goto __pyx_L1;}
 
2516
      if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; goto __pyx_L1;}
 
2517
      __pyx_2 = __pyx_2 < 0;
 
2518
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2519
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2520
      if (__pyx_2) {
 
2521
        __pyx_4 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; goto __pyx_L1;}
 
2522
        __pyx_5 = PyObject_Length(__pyx_4); if (__pyx_5 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; goto __pyx_L1;}
 
2523
        Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2524
        __pyx_2 = (__pyx_5 > 1);
 
2525
        if (__pyx_2) {
 
2526
          __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; goto __pyx_L1;}
 
2527
          __pyx_1 = __Pyx_GetItemInt(__pyx_3, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; goto __pyx_L1;}
 
2528
          Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2529
          __pyx_4 = __Pyx_GetItemInt(__pyx_1, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; goto __pyx_L1;}
 
2530
          Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2531
          if (PyObject_Cmp(__pyx_4, __pyx_n_a, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; goto __pyx_L1;}
 
2532
          __pyx_2 = __pyx_2 != 0;
 
2533
          Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2534
        }
 
2535
      }
 
2536
    }
 
2537
    if (__pyx_2) {
 
2538
 
 
2539
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":884 */
 
2540
      __pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n__sha1_file); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; goto __pyx_L1;}
 
2541
      __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; goto __pyx_L1;}
 
2542
      Py_INCREF(__pyx_v_abspath);
 
2543
      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_abspath);
 
2544
      __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; goto __pyx_L1;}
 
2545
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2546
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2547
      Py_DECREF(__pyx_v_link_or_sha1);
 
2548
      __pyx_v_link_or_sha1 = __pyx_4;
 
2549
      __pyx_4 = 0;
 
2550
 
 
2551
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":885 */
 
2552
      __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_size); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;}
 
2553
      __pyx_1 = PyTuple_New(5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;}
 
2554
      Py_INCREF(__pyx_n_f);
 
2555
      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_f);
 
2556
      Py_INCREF(__pyx_v_link_or_sha1);
 
2557
      PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_link_or_sha1);
 
2558
      PyTuple_SET_ITEM(__pyx_1, 2, __pyx_3);
 
2559
      Py_INCREF(__pyx_v_executable);
 
2560
      PyTuple_SET_ITEM(__pyx_1, 3, __pyx_v_executable);
 
2561
      Py_INCREF(__pyx_v_packed_stat);
 
2562
      PyTuple_SET_ITEM(__pyx_1, 4, __pyx_v_packed_stat);
 
2563
      __pyx_3 = 0;
 
2564
      __pyx_4 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;}
 
2565
      if (__Pyx_SetItemInt(__pyx_4, 0, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; goto __pyx_L1;}
 
2566
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2567
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2568
      goto __pyx_L9;
 
2569
    }
 
2570
    /*else*/ {
 
2571
      __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_size); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
 
2572
      __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_DirState); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; goto __pyx_L1;}
 
2573
      __pyx_4 = PyObject_GetAttr(__pyx_1, __pyx_n_NULLSTAT); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; goto __pyx_L1;}
 
2574
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2575
      __pyx_1 = PyTuple_New(5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
 
2576
      Py_INCREF(__pyx_n_f);
 
2577
      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_f);
 
2578
      Py_INCREF(__pyx_k53p);
 
2579
      PyTuple_SET_ITEM(__pyx_1, 1, __pyx_k53p);
 
2580
      PyTuple_SET_ITEM(__pyx_1, 2, __pyx_3);
 
2581
      Py_INCREF(__pyx_v_executable);
 
2582
      PyTuple_SET_ITEM(__pyx_1, 3, __pyx_v_executable);
 
2583
      PyTuple_SET_ITEM(__pyx_1, 4, __pyx_4);
 
2584
      __pyx_3 = 0;
 
2585
      __pyx_4 = 0;
 
2586
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
 
2587
      if (__Pyx_SetItemInt(__pyx_3, 0, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; goto __pyx_L1;}
 
2588
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2589
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2590
    }
 
2591
    __pyx_L9:;
 
2592
    goto __pyx_L7;
 
2593
  }
 
2594
  __pyx_2 = (__pyx_v_minikind == 'd');
 
2595
  if (__pyx_2) {
 
2596
 
 
2597
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":891 */
 
2598
    Py_INCREF(Py_None);
 
2599
    Py_DECREF(__pyx_v_link_or_sha1);
 
2600
    __pyx_v_link_or_sha1 = Py_None;
 
2601
 
 
2602
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":892 */
 
2603
    __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; goto __pyx_L1;}
 
2604
    __pyx_1 = PyTuple_New(5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; goto __pyx_L1;}
 
2605
    Py_INCREF(__pyx_n_d);
 
2606
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_d);
 
2607
    Py_INCREF(__pyx_k55p);
 
2608
    PyTuple_SET_ITEM(__pyx_1, 1, __pyx_k55p);
 
2609
    PyTuple_SET_ITEM(__pyx_1, 2, __pyx_4);
 
2610
    Py_INCREF(Py_False);
 
2611
    PyTuple_SET_ITEM(__pyx_1, 3, Py_False);
 
2612
    Py_INCREF(__pyx_v_packed_stat);
 
2613
    PyTuple_SET_ITEM(__pyx_1, 4, __pyx_v_packed_stat);
 
2614
    __pyx_4 = 0;
 
2615
    __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; goto __pyx_L1;}
 
2616
    if (__Pyx_SetItemInt(__pyx_3, 0, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; goto __pyx_L1;}
 
2617
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2618
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2619
 
 
2620
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":893 */
 
2621
    __pyx_2 = (__pyx_v_saved_minikind != 'd');
 
2622
    if (__pyx_2) {
 
2623
 
 
2624
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":898 */
 
2625
      __pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__get_block_entry_index); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}
 
2626
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}
 
2627
      __pyx_3 = __Pyx_GetItemInt(__pyx_1, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}
 
2628
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2629
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}
 
2630
      __pyx_6 = __Pyx_GetItemInt(__pyx_1, 1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}
 
2631
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2632
      __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}
 
2633
      __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}
 
2634
      PyTuple_SET_ITEM(__pyx_7, 0, __pyx_3);
 
2635
      PyTuple_SET_ITEM(__pyx_7, 1, __pyx_6);
 
2636
      PyTuple_SET_ITEM(__pyx_7, 2, __pyx_1);
 
2637
      __pyx_3 = 0;
 
2638
      __pyx_6 = 0;
 
2639
      __pyx_1 = 0;
 
2640
      __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_7); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; goto __pyx_L1;}
 
2641
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2642
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
2643
      __pyx_6 = PyObject_GetIter(__pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; goto __pyx_L1;}
 
2644
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2645
      __pyx_1 = __Pyx_UnpackItem(__pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; goto __pyx_L1;}
 
2646
      Py_DECREF(__pyx_v_block_index);
 
2647
      __pyx_v_block_index = __pyx_1;
 
2648
      __pyx_1 = 0;
 
2649
      __pyx_4 = __Pyx_UnpackItem(__pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; goto __pyx_L1;}
 
2650
      Py_DECREF(__pyx_v_entry_index);
 
2651
      __pyx_v_entry_index = __pyx_4;
 
2652
      __pyx_4 = 0;
 
2653
      __pyx_7 = __Pyx_UnpackItem(__pyx_6); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; goto __pyx_L1;}
 
2654
      Py_DECREF(__pyx_v_dir_present);
 
2655
      __pyx_v_dir_present = __pyx_7;
 
2656
      __pyx_7 = 0;
 
2657
      __pyx_3 = __Pyx_UnpackItem(__pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; goto __pyx_L1;}
 
2658
      Py_DECREF(__pyx_v_file_present);
 
2659
      __pyx_v_file_present = __pyx_3;
 
2660
      __pyx_3 = 0;
 
2661
      if (__Pyx_EndUnpack(__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; goto __pyx_L1;}
 
2662
      Py_DECREF(__pyx_6); __pyx_6 = 0;
 
2663
 
 
2664
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":899 */
 
2665
      __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__ensure_block); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;}
 
2666
      __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_pathjoin); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
 
2667
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
 
2668
      __pyx_3 = __Pyx_GetItemInt(__pyx_7, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
 
2669
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
2670
      __pyx_6 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
 
2671
      __pyx_7 = __Pyx_GetItemInt(__pyx_6, 1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
 
2672
      Py_DECREF(__pyx_6); __pyx_6 = 0;
 
2673
      __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
 
2674
      PyTuple_SET_ITEM(__pyx_6, 0, __pyx_3);
 
2675
      PyTuple_SET_ITEM(__pyx_6, 1, __pyx_7);
 
2676
      __pyx_3 = 0;
 
2677
      __pyx_7 = 0;
 
2678
      __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; goto __pyx_L1;}
 
2679
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2680
      Py_DECREF(__pyx_6); __pyx_6 = 0;
 
2681
      __pyx_7 = PyTuple_New(3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;}
 
2682
      Py_INCREF(__pyx_v_block_index);
 
2683
      PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_block_index);
 
2684
      Py_INCREF(__pyx_v_entry_index);
 
2685
      PyTuple_SET_ITEM(__pyx_7, 1, __pyx_v_entry_index);
 
2686
      PyTuple_SET_ITEM(__pyx_7, 2, __pyx_3);
 
2687
      __pyx_3 = 0;
 
2688
      __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_7); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;}
 
2689
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2690
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
2691
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2692
      goto __pyx_L10;
 
2693
    }
 
2694
    __pyx_L10:;
 
2695
    goto __pyx_L7;
 
2696
  }
 
2697
  __pyx_2 = (__pyx_v_minikind == 'l');
 
2698
  if (__pyx_2) {
 
2699
 
 
2700
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":902 */
 
2701
    __pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n__read_link); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
 
2702
    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
 
2703
    Py_INCREF(__pyx_v_abspath);
 
2704
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_abspath);
 
2705
    Py_INCREF(__pyx_v_saved_link_or_sha1);
 
2706
    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_saved_link_or_sha1);
 
2707
    __pyx_1 = PyObject_CallObject(__pyx_6, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;}
 
2708
    Py_DECREF(__pyx_6); __pyx_6 = 0;
 
2709
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2710
    Py_DECREF(__pyx_v_link_or_sha1);
 
2711
    __pyx_v_link_or_sha1 = __pyx_1;
 
2712
    __pyx_1 = 0;
 
2713
 
 
2714
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":903 */
 
2715
    __pyx_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n__cutoff_time); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; goto __pyx_L1;}
 
2716
    __pyx_2 = __pyx_7 == Py_None;
 
2717
    Py_DECREF(__pyx_7); __pyx_7 = 0;
 
2718
    if (__pyx_2) {
 
2719
      __pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__sha_cutoff_time); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;}
 
2720
      __pyx_6 = PyObject_CallObject(__pyx_4, 0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;}
 
2721
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2722
      Py_DECREF(__pyx_6); __pyx_6 = 0;
 
2723
      goto __pyx_L11;
 
2724
    }
 
2725
    __pyx_L11:;
 
2726
 
 
2727
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":905 */
 
2728
    __pyx_3 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_mtime); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; goto __pyx_L1;}
 
2729
    __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__cutoff_time); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; goto __pyx_L1;}
 
2730
    if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; goto __pyx_L1;}
 
2731
    __pyx_2 = __pyx_2 < 0;
 
2732
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2733
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2734
    if (__pyx_2) {
 
2735
      __pyx_7 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_ctime); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; goto __pyx_L1;}
 
2736
      __pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__cutoff_time); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; goto __pyx_L1;}
 
2737
      if (PyObject_Cmp(__pyx_7, __pyx_4, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; goto __pyx_L1;}
 
2738
      __pyx_2 = __pyx_2 < 0;
 
2739
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
2740
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2741
    }
 
2742
    if (__pyx_2) {
 
2743
      __pyx_6 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_size); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; goto __pyx_L1;}
 
2744
      __pyx_3 = PyTuple_New(5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; goto __pyx_L1;}
 
2745
      Py_INCREF(__pyx_n_l);
 
2746
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_l);
 
2747
      Py_INCREF(__pyx_v_link_or_sha1);
 
2748
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_link_or_sha1);
 
2749
      PyTuple_SET_ITEM(__pyx_3, 2, __pyx_6);
 
2750
      Py_INCREF(Py_False);
 
2751
      PyTuple_SET_ITEM(__pyx_3, 3, Py_False);
 
2752
      Py_INCREF(__pyx_v_packed_stat);
 
2753
      PyTuple_SET_ITEM(__pyx_3, 4, __pyx_v_packed_stat);
 
2754
      __pyx_6 = 0;
 
2755
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; goto __pyx_L1;}
 
2756
      if (__Pyx_SetItemInt(__pyx_1, 0, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; goto __pyx_L1;}
 
2757
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2758
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2759
      goto __pyx_L12;
 
2760
    }
 
2761
    /*else*/ {
 
2762
      __pyx_7 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_st_size); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;}
 
2763
      __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_DirState); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; goto __pyx_L1;}
 
2764
      __pyx_6 = PyObject_GetAttr(__pyx_4, __pyx_n_NULLSTAT); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; goto __pyx_L1;}
 
2765
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2766
      __pyx_3 = PyTuple_New(5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;}
 
2767
      Py_INCREF(__pyx_n_l);
 
2768
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_l);
 
2769
      Py_INCREF(__pyx_k58p);
 
2770
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_k58p);
 
2771
      PyTuple_SET_ITEM(__pyx_3, 2, __pyx_7);
 
2772
      Py_INCREF(Py_False);
 
2773
      PyTuple_SET_ITEM(__pyx_3, 3, Py_False);
 
2774
      PyTuple_SET_ITEM(__pyx_3, 4, __pyx_6);
 
2775
      __pyx_7 = 0;
 
2776
      __pyx_6 = 0;
 
2777
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;}
 
2778
      if (__Pyx_SetItemInt(__pyx_1, 0, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; goto __pyx_L1;}
 
2779
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2780
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2781
    }
 
2782
    __pyx_L12:;
 
2783
    goto __pyx_L7;
 
2784
  }
 
2785
  __pyx_L7:;
 
2786
 
 
2787
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":912 */
 
2788
  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_DirState); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;}
 
2789
  __pyx_7 = PyObject_GetAttr(__pyx_4, __pyx_n_IN_MEMORY_MODIFIED); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;}
 
2790
  Py_DECREF(__pyx_4); __pyx_4 = 0;
 
2791
  if (PyObject_SetAttr(__pyx_v_self, __pyx_n__dirblock_state, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;}
 
2792
  Py_DECREF(__pyx_7); __pyx_7 = 0;
 
2793
 
 
2794
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":913 */
 
2795
  Py_INCREF(__pyx_v_link_or_sha1);
 
2796
  __pyx_r = __pyx_v_link_or_sha1;
 
2797
  goto __pyx_L0;
 
2798
 
 
2799
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
2800
  goto __pyx_L0;
 
2801
  __pyx_L1:;
 
2802
  Py_XDECREF(__pyx_1);
 
2803
  Py_XDECREF(__pyx_3);
 
2804
  Py_XDECREF(__pyx_4);
 
2805
  Py_XDECREF(__pyx_6);
 
2806
  Py_XDECREF(__pyx_7);
 
2807
  __Pyx_AddTraceback("_dirstate_helpers_c._update_entry");
 
2808
  __pyx_r = 0;
 
2809
  __pyx_L0:;
 
2810
  Py_DECREF(__pyx_v_packed_stat);
 
2811
  Py_DECREF(__pyx_v_saved_link_or_sha1);
 
2812
  Py_DECREF(__pyx_v_saved_file_size);
 
2813
  Py_DECREF(__pyx_v_saved_executable);
 
2814
  Py_DECREF(__pyx_v_saved_packed_stat);
 
2815
  Py_DECREF(__pyx_v_link_or_sha1);
 
2816
  Py_DECREF(__pyx_v_executable);
 
2817
  Py_DECREF(__pyx_v_block_index);
 
2818
  Py_DECREF(__pyx_v_entry_index);
 
2819
  Py_DECREF(__pyx_v_dir_present);
 
2820
  Py_DECREF(__pyx_v_file_present);
 
2821
  Py_DECREF(__pyx_v_self);
 
2822
  Py_DECREF(__pyx_v_entry);
 
2823
  Py_DECREF(__pyx_v_abspath);
 
2824
  Py_DECREF(__pyx_v_stat_value);
 
2825
  return __pyx_r;
 
2826
}
 
2827
 
 
2828
static char __pyx_f_19_dirstate_helpers_c__minikind_from_string(PyObject *__pyx_v_string) {
 
2829
  char __pyx_r;
 
2830
  Py_INCREF(__pyx_v_string);
 
2831
  __pyx_r = (PyString_AsString(__pyx_v_string)[0]);
 
2832
  goto __pyx_L0;
 
2833
 
 
2834
  __pyx_r = 0;
 
2835
  __pyx_L0:;
 
2836
  Py_DECREF(__pyx_v_string);
 
2837
  return __pyx_r;
 
2838
}
 
2839
 
 
2840
static PyObject *__pyx_f_19_dirstate_helpers_c__minikind_to_kind(char __pyx_v_minikind) {
 
2841
  char __pyx_v__minikind[1];
 
2842
  PyObject *__pyx_r;
 
2843
  int __pyx_1;
 
2844
  PyObject *__pyx_2 = 0;
 
2845
  PyObject *__pyx_3 = 0;
 
2846
 
 
2847
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":938 */
 
2848
  __pyx_1 = (__pyx_v_minikind == 'f');
 
2849
  if (__pyx_1) {
 
2850
    Py_INCREF(__pyx_v_19_dirstate_helpers_c__kind_file);
 
2851
    __pyx_r = __pyx_v_19_dirstate_helpers_c__kind_file;
 
2852
    goto __pyx_L0;
 
2853
    goto __pyx_L2;
 
2854
  }
 
2855
  __pyx_1 = (__pyx_v_minikind == 'd');
 
2856
  if (__pyx_1) {
 
2857
    Py_INCREF(__pyx_v_19_dirstate_helpers_c__kind_directory);
 
2858
    __pyx_r = __pyx_v_19_dirstate_helpers_c__kind_directory;
 
2859
    goto __pyx_L0;
 
2860
    goto __pyx_L2;
 
2861
  }
 
2862
  __pyx_1 = (__pyx_v_minikind == 'a');
 
2863
  if (__pyx_1) {
 
2864
    Py_INCREF(__pyx_v_19_dirstate_helpers_c__kind_absent);
 
2865
    __pyx_r = __pyx_v_19_dirstate_helpers_c__kind_absent;
 
2866
    goto __pyx_L0;
 
2867
    goto __pyx_L2;
 
2868
  }
 
2869
  __pyx_1 = (__pyx_v_minikind == 'r');
 
2870
  if (__pyx_1) {
 
2871
    Py_INCREF(__pyx_v_19_dirstate_helpers_c__kind_relocated);
 
2872
    __pyx_r = __pyx_v_19_dirstate_helpers_c__kind_relocated;
 
2873
    goto __pyx_L0;
 
2874
    goto __pyx_L2;
 
2875
  }
 
2876
  __pyx_1 = (__pyx_v_minikind == 'l');
 
2877
  if (__pyx_1) {
 
2878
    Py_INCREF(__pyx_v_19_dirstate_helpers_c__kind_symlink);
 
2879
    __pyx_r = __pyx_v_19_dirstate_helpers_c__kind_symlink;
 
2880
    goto __pyx_L0;
 
2881
    goto __pyx_L2;
 
2882
  }
 
2883
  __pyx_1 = (__pyx_v_minikind == 't');
 
2884
  if (__pyx_1) {
 
2885
    Py_INCREF(__pyx_v_19_dirstate_helpers_c__kind_tree_reference);
 
2886
    __pyx_r = __pyx_v_19_dirstate_helpers_c__kind_tree_reference;
 
2887
    goto __pyx_L0;
 
2888
    goto __pyx_L2;
 
2889
  }
 
2890
  __pyx_L2:;
 
2891
 
 
2892
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":950 */
 
2893
  (__pyx_v__minikind[0]) = __pyx_v_minikind;
 
2894
 
 
2895
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":951 */
 
2896
  __pyx_2 = PyString_FromStringAndSize(__pyx_v__minikind,1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;}
 
2897
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;}
 
2898
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
 
2899
  __pyx_2 = 0;
 
2900
  __pyx_2 = PyObject_CallObject(PyExc_KeyError, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;}
 
2901
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
2902
  __Pyx_Raise(__pyx_2, 0, 0);
 
2903
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
2904
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; goto __pyx_L1;}
 
2905
 
 
2906
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
2907
  goto __pyx_L0;
 
2908
  __pyx_L1:;
 
2909
  Py_XDECREF(__pyx_2);
 
2910
  Py_XDECREF(__pyx_3);
 
2911
  __Pyx_AddTraceback("_dirstate_helpers_c._minikind_to_kind");
 
2912
  __pyx_r = 0;
 
2913
  __pyx_L0:;
 
2914
  return __pyx_r;
 
2915
}
 
2916
 
 
2917
static int __pyx_f_19_dirstate_helpers_c__versioned_minikind(char __pyx_v_minikind) {
 
2918
  int __pyx_r;
 
2919
  int __pyx_1;
 
2920
  __pyx_1 = (__pyx_v_minikind == 'f');
 
2921
  if (!__pyx_1) {
 
2922
    __pyx_1 = (__pyx_v_minikind == 'd');
 
2923
    if (!__pyx_1) {
 
2924
      __pyx_1 = (__pyx_v_minikind == 'l');
 
2925
      if (!__pyx_1) {
 
2926
        __pyx_1 = (__pyx_v_minikind == 't');
 
2927
      }
 
2928
    }
 
2929
  }
 
2930
  __pyx_r = __pyx_1;
 
2931
  goto __pyx_L0;
 
2932
 
 
2933
  __pyx_r = 0;
 
2934
  __pyx_L0:;
 
2935
  return __pyx_r;
 
2936
}
 
2937
 
 
2938
static PyObject *__pyx_n_object;
 
2939
static PyObject *__pyx_n__utf8_decode;
 
2940
static PyObject *__pyx_n_set;
 
2941
static PyObject *__pyx_n_bisect_left;
 
2942
static PyObject *__pyx_n_fstat;
 
2943
static PyObject *__pyx_n_sha_file;
 
2944
 
 
2945
static int __pyx_f_19_dirstate_helpers_c_13ProcessEntryC___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
2946
static int __pyx_f_19_dirstate_helpers_c_13ProcessEntryC___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
2947
  PyObject *__pyx_v_include_unchanged = 0;
 
2948
  PyObject *__pyx_v_use_filesystem_for_exec = 0;
 
2949
  PyObject *__pyx_v_search_specific_files = 0;
 
2950
  PyObject *__pyx_v_state = 0;
 
2951
  PyObject *__pyx_v_source_index = 0;
 
2952
  PyObject *__pyx_v_target_index = 0;
 
2953
  PyObject *__pyx_v_want_unversioned = 0;
 
2954
  PyObject *__pyx_v_tree = 0;
 
2955
  int __pyx_r;
 
2956
  PyObject *__pyx_1 = 0;
 
2957
  PyObject *__pyx_2 = 0;
 
2958
  int __pyx_3;
 
2959
  static char *__pyx_argnames[] = {"include_unchanged","use_filesystem_for_exec","search_specific_files","state","source_index","target_index","want_unversioned","tree",0};
 
2960
  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;
 
2961
  Py_INCREF(__pyx_v_self);
 
2962
  Py_INCREF(__pyx_v_include_unchanged);
 
2963
  Py_INCREF(__pyx_v_use_filesystem_for_exec);
 
2964
  Py_INCREF(__pyx_v_search_specific_files);
 
2965
  Py_INCREF(__pyx_v_state);
 
2966
  Py_INCREF(__pyx_v_source_index);
 
2967
  Py_INCREF(__pyx_v_target_index);
 
2968
  Py_INCREF(__pyx_v_want_unversioned);
 
2969
  Py_INCREF(__pyx_v_tree);
 
2970
 
 
2971
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1001 */
 
2972
  __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; goto __pyx_L1;}
 
2973
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->old_dirname_to_file_id);
 
2974
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->old_dirname_to_file_id = __pyx_1;
 
2975
  __pyx_1 = 0;
 
2976
 
 
2977
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1002 */
 
2978
  __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; goto __pyx_L1;}
 
2979
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->new_dirname_to_file_id);
 
2980
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->new_dirname_to_file_id = __pyx_1;
 
2981
  __pyx_1 = 0;
 
2982
 
 
2983
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1005 */
 
2984
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_object); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; goto __pyx_L1;}
 
2985
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; goto __pyx_L1;}
 
2986
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
2987
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->uninteresting);
 
2988
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->uninteresting = __pyx_2;
 
2989
  __pyx_2 = 0;
 
2990
 
 
2991
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1008 */
 
2992
  __pyx_1 = PyList_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; goto __pyx_L1;}
 
2993
  Py_INCREF(Py_None);
 
2994
  PyList_SET_ITEM(__pyx_1, 0, Py_None);
 
2995
  Py_INCREF(Py_None);
 
2996
  PyList_SET_ITEM(__pyx_1, 1, Py_None);
 
2997
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->last_source_parent);
 
2998
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->last_source_parent = __pyx_1;
 
2999
  __pyx_1 = 0;
 
3000
 
 
3001
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1009 */
 
3002
  __pyx_2 = PyList_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; goto __pyx_L1;}
 
3003
  Py_INCREF(Py_None);
 
3004
  PyList_SET_ITEM(__pyx_2, 0, Py_None);
 
3005
  Py_INCREF(Py_None);
 
3006
  PyList_SET_ITEM(__pyx_2, 1, Py_None);
 
3007
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->last_target_parent);
 
3008
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->last_target_parent = __pyx_2;
 
3009
  __pyx_2 = 0;
 
3010
 
 
3011
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1010 */
 
3012
  Py_INCREF(__pyx_v_include_unchanged);
 
3013
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->include_unchanged);
 
3014
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->include_unchanged = __pyx_v_include_unchanged;
 
3015
 
 
3016
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1011 */
 
3017
  Py_INCREF(__pyx_v_use_filesystem_for_exec);
 
3018
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->use_filesystem_for_exec);
 
3019
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->use_filesystem_for_exec = __pyx_v_use_filesystem_for_exec;
 
3020
 
 
3021
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1012 */
 
3022
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_cache_utf8); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; goto __pyx_L1;}
 
3023
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n__utf8_decode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; goto __pyx_L1;}
 
3024
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3025
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->utf8_decode);
 
3026
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->utf8_decode = __pyx_2;
 
3027
  __pyx_2 = 0;
 
3028
 
 
3029
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1017 */
 
3030
  __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_set); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; goto __pyx_L1;}
 
3031
  __pyx_2 = PyObject_CallObject(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; goto __pyx_L1;}
 
3032
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3033
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->searched_specific_files);
 
3034
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->searched_specific_files = __pyx_2;
 
3035
  __pyx_2 = 0;
 
3036
 
 
3037
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1018 */
 
3038
  Py_INCREF(__pyx_v_search_specific_files);
 
3039
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->search_specific_files);
 
3040
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->search_specific_files = __pyx_v_search_specific_files;
 
3041
 
 
3042
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1019 */
 
3043
  Py_INCREF(__pyx_v_state);
 
3044
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->state);
 
3045
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->state = __pyx_v_state;
 
3046
 
 
3047
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1020 */
 
3048
  Py_INCREF(Py_None);
 
3049
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->current_root);
 
3050
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->current_root = Py_None;
 
3051
 
 
3052
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1021 */
 
3053
  Py_INCREF(Py_None);
 
3054
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->current_root_unicode);
 
3055
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->current_root_unicode = Py_None;
 
3056
 
 
3057
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1022 */
 
3058
  Py_INCREF(Py_None);
 
3059
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->root_entries);
 
3060
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->root_entries = Py_None;
 
3061
 
 
3062
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1023 */
 
3063
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->root_entries_pos = 0;
 
3064
 
 
3065
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1024 */
 
3066
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->root_entries_len = 0;
 
3067
 
 
3068
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1025 */
 
3069
  Py_INCREF(Py_None);
 
3070
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->root_abspath);
 
3071
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->root_abspath = Py_None;
 
3072
 
 
3073
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1026 */
 
3074
  __pyx_3 = __pyx_v_source_index == Py_None;
 
3075
  if (__pyx_3) {
 
3076
    ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->source_index = (-1);
 
3077
    goto __pyx_L2;
 
3078
  }
 
3079
  /*else*/ {
 
3080
    __pyx_3 = PyInt_AsLong(__pyx_v_source_index); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; goto __pyx_L1;}
 
3081
    ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->source_index = __pyx_3;
 
3082
  }
 
3083
  __pyx_L2:;
 
3084
 
 
3085
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1030 */
 
3086
  __pyx_3 = PyInt_AsLong(__pyx_v_target_index); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; goto __pyx_L1;}
 
3087
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->target_index = __pyx_3;
 
3088
 
 
3089
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1031 */
 
3090
  __pyx_3 = PyInt_AsLong(__pyx_v_want_unversioned); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; goto __pyx_L1;}
 
3091
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->want_unversioned = __pyx_3;
 
3092
 
 
3093
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1032 */
 
3094
  Py_INCREF(__pyx_v_tree);
 
3095
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->tree);
 
3096
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->tree = __pyx_v_tree;
 
3097
 
 
3098
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1033 */
 
3099
  Py_INCREF(Py_None);
 
3100
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->dir_iterator);
 
3101
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->dir_iterator = Py_None;
 
3102
 
 
3103
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1034 */
 
3104
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->block_index = (-1);
 
3105
 
 
3106
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1035 */
 
3107
  Py_INCREF(Py_None);
 
3108
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->current_block);
 
3109
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->current_block = Py_None;
 
3110
 
 
3111
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1036 */
 
3112
  Py_INCREF(Py_None);
 
3113
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->current_block_list);
 
3114
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->current_block_list = Py_None;
 
3115
 
 
3116
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1037 */
 
3117
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->current_block_pos = (-1);
 
3118
 
 
3119
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1038 */
 
3120
  Py_INCREF(Py_None);
 
3121
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->current_dir_info);
 
3122
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->current_dir_info = Py_None;
 
3123
 
 
3124
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1039 */
 
3125
  Py_INCREF(Py_None);
 
3126
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->current_dir_list);
 
3127
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->current_dir_list = Py_None;
 
3128
 
 
3129
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1040 */
 
3130
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->path_index = 0;
 
3131
 
 
3132
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1041 */
 
3133
  Py_INCREF(Py_None);
 
3134
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->root_dir_info);
 
3135
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->root_dir_info = Py_None;
 
3136
 
 
3137
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1042 */
 
3138
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bisect); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; goto __pyx_L1;}
 
3139
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_bisect_left); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; goto __pyx_L1;}
 
3140
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3141
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->bisect_left);
 
3142
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->bisect_left = __pyx_2;
 
3143
  __pyx_2 = 0;
 
3144
 
 
3145
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1043 */
 
3146
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; goto __pyx_L1;}
 
3147
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_pathjoin); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; goto __pyx_L1;}
 
3148
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3149
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->pathjoin);
 
3150
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->pathjoin = __pyx_2;
 
3151
  __pyx_2 = 0;
 
3152
 
 
3153
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1044 */
 
3154
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; goto __pyx_L1;}
 
3155
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_fstat); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; goto __pyx_L1;}
 
3156
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3157
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->fstat);
 
3158
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->fstat = __pyx_2;
 
3159
  __pyx_2 = 0;
 
3160
 
 
3161
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1045 */
 
3162
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; goto __pyx_L1;}
 
3163
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_sha_file); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; goto __pyx_L1;}
 
3164
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3165
  Py_DECREF(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->sha_file);
 
3166
  ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->sha_file = __pyx_2;
 
3167
  __pyx_2 = 0;
 
3168
 
 
3169
  __pyx_r = 0;
 
3170
  goto __pyx_L0;
 
3171
  __pyx_L1:;
 
3172
  Py_XDECREF(__pyx_1);
 
3173
  Py_XDECREF(__pyx_2);
 
3174
  __Pyx_AddTraceback("_dirstate_helpers_c.ProcessEntryC.__init__");
 
3175
  __pyx_r = -1;
 
3176
  __pyx_L0:;
 
3177
  Py_DECREF(__pyx_v_self);
 
3178
  Py_DECREF(__pyx_v_include_unchanged);
 
3179
  Py_DECREF(__pyx_v_use_filesystem_for_exec);
 
3180
  Py_DECREF(__pyx_v_search_specific_files);
 
3181
  Py_DECREF(__pyx_v_state);
 
3182
  Py_DECREF(__pyx_v_source_index);
 
3183
  Py_DECREF(__pyx_v_target_index);
 
3184
  Py_DECREF(__pyx_v_want_unversioned);
 
3185
  Py_DECREF(__pyx_v_tree);
 
3186
  return __pyx_r;
 
3187
}
 
3188
 
 
3189
static PyObject *__pyx_n_NULL_PARENT_DETAILS;
 
3190
static PyObject *__pyx_n_is_inside_any;
 
3191
static PyObject *__pyx_n_add;
 
3192
static PyObject *__pyx_n_path;
 
3193
static PyObject *__pyx_n_split;
 
3194
static PyObject *__pyx_n__get_entry;
 
3195
static PyObject *__pyx_n_path_utf8;
 
3196
static PyObject *__pyx_n_CorruptDirstate;
 
3197
static PyObject *__pyx_n__filename;
 
3198
static PyObject *__pyx_n__sha1_provider;
 
3199
static PyObject *__pyx_n_stat_and_sha1;
 
3200
static PyObject *__pyx_n__observed_sha1;
 
3201
 
 
3202
static PyObject *__pyx_k59p;
 
3203
static PyObject *__pyx_k61p;
 
3204
static PyObject *__pyx_k65p;
 
3205
static PyObject *__pyx_k66p;
 
3206
static PyObject *__pyx_k69p;
 
3207
static PyObject *__pyx_k71p;
 
3208
static PyObject *__pyx_k73p;
 
3209
 
 
3210
static char __pyx_k59[] = "Unsupported target index %d";
 
3211
static char __pyx_k61[] = "entry '%s/%s' is considered renamed from %r but source does not exist\nentry: %s";
 
3212
static char __pyx_k65[] = "tree-reference";
 
3213
static char __pyx_k66[] = "unknown kind %s";
 
3214
static char __pyx_k69[] = "Could not find target parent in wt: %s\nparent of: %s";
 
3215
static char __pyx_k71[] = "We could not find the parent entry in index %d for the entry: %s";
 
3216
static char __pyx_k73[] = "don't know how to compare source_minikind=%r, target_minikind=%r";
 
3217
 
 
3218
static PyObject *__pyx_f_19_dirstate_helpers_c_13ProcessEntryC__process_entry(struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *__pyx_v_self,PyObject *__pyx_v_entry,PyObject *__pyx_v_path_info) {
 
3219
  char __pyx_v_target_minikind;
 
3220
  char __pyx_v_source_minikind;
 
3221
  PyObject *__pyx_v_file_id;
 
3222
  int __pyx_v_content_change;
 
3223
  PyObject *__pyx_v_details_list;
 
3224
  PyObject *__pyx_v_source_details;
 
3225
  PyObject *__pyx_v_target_details;
 
3226
  PyObject *__pyx_v_link_or_sha1;
 
3227
  PyObject *__pyx_v_old_dirname;
 
3228
  PyObject *__pyx_v_old_basename;
 
3229
  PyObject *__pyx_v_old_path;
 
3230
  PyObject *__pyx_v_path;
 
3231
  PyObject *__pyx_v_old_entry;
 
3232
  PyObject *__pyx_v_target_kind;
 
3233
  PyObject *__pyx_v_target_exec;
 
3234
  PyObject *__pyx_v_statvalue;
 
3235
  PyObject *__pyx_v_source_parent_id;
 
3236
  PyObject *__pyx_v_source_parent_entry;
 
3237
  PyObject *__pyx_v_new_dirname;
 
3238
  PyObject *__pyx_v_target_parent_id;
 
3239
  PyObject *__pyx_v_target_parent_entry;
 
3240
  PyObject *__pyx_v_source_exec;
 
3241
  PyObject *__pyx_v_old_path_u;
 
3242
  PyObject *__pyx_v_path_u;
 
3243
  PyObject *__pyx_v_source_kind;
 
3244
  PyObject *__pyx_v_parent_entry;
 
3245
  PyObject *__pyx_v_parent_id;
 
3246
  PyObject *__pyx_r;
 
3247
  PyObject *__pyx_1 = 0;
 
3248
  int __pyx_2;
 
3249
  PyObject *__pyx_3 = 0;
 
3250
  PyObject *__pyx_4 = 0;
 
3251
  int __pyx_5;
 
3252
  PyObject *__pyx_6 = 0;
 
3253
  PyObject *__pyx_7 = 0;
 
3254
  PyObject *__pyx_8 = 0;
 
3255
  PyObject *__pyx_9 = 0;
 
3256
  PyObject *__pyx_10 = 0;
 
3257
  PyObject *__pyx_11 = 0;
 
3258
  Py_INCREF(__pyx_v_self);
 
3259
  Py_INCREF(__pyx_v_entry);
 
3260
  Py_INCREF(__pyx_v_path_info);
 
3261
  __pyx_v_file_id = Py_None; Py_INCREF(Py_None);
 
3262
  __pyx_v_details_list = Py_None; Py_INCREF(Py_None);
 
3263
  __pyx_v_source_details = Py_None; Py_INCREF(Py_None);
 
3264
  __pyx_v_target_details = Py_None; Py_INCREF(Py_None);
 
3265
  __pyx_v_link_or_sha1 = Py_None; Py_INCREF(Py_None);
 
3266
  __pyx_v_old_dirname = Py_None; Py_INCREF(Py_None);
 
3267
  __pyx_v_old_basename = Py_None; Py_INCREF(Py_None);
 
3268
  __pyx_v_old_path = Py_None; Py_INCREF(Py_None);
 
3269
  __pyx_v_path = Py_None; Py_INCREF(Py_None);
 
3270
  __pyx_v_old_entry = Py_None; Py_INCREF(Py_None);
 
3271
  __pyx_v_target_kind = Py_None; Py_INCREF(Py_None);
 
3272
  __pyx_v_target_exec = Py_None; Py_INCREF(Py_None);
 
3273
  __pyx_v_statvalue = Py_None; Py_INCREF(Py_None);
 
3274
  __pyx_v_source_parent_id = Py_None; Py_INCREF(Py_None);
 
3275
  __pyx_v_source_parent_entry = Py_None; Py_INCREF(Py_None);
 
3276
  __pyx_v_new_dirname = Py_None; Py_INCREF(Py_None);
 
3277
  __pyx_v_target_parent_id = Py_None; Py_INCREF(Py_None);
 
3278
  __pyx_v_target_parent_entry = Py_None; Py_INCREF(Py_None);
 
3279
  __pyx_v_source_exec = Py_None; Py_INCREF(Py_None);
 
3280
  __pyx_v_old_path_u = Py_None; Py_INCREF(Py_None);
 
3281
  __pyx_v_path_u = Py_None; Py_INCREF(Py_None);
 
3282
  __pyx_v_source_kind = Py_None; Py_INCREF(Py_None);
 
3283
  __pyx_v_parent_entry = Py_None; Py_INCREF(Py_None);
 
3284
  __pyx_v_parent_id = Py_None; Py_INCREF(Py_None);
 
3285
 
 
3286
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1066 */
 
3287
  Py_INCREF(Py_None);
 
3288
  Py_DECREF(__pyx_v_file_id);
 
3289
  __pyx_v_file_id = Py_None;
 
3290
 
 
3291
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1067 */
 
3292
  __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1067; goto __pyx_L1;}
 
3293
  Py_DECREF(__pyx_v_details_list);
 
3294
  __pyx_v_details_list = __pyx_1;
 
3295
  __pyx_1 = 0;
 
3296
 
 
3297
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1068 */
 
3298
  __pyx_2 = ((-1) == __pyx_v_self->source_index);
 
3299
  if (__pyx_2) {
 
3300
    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_DirState); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; goto __pyx_L1;}
 
3301
    __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_NULL_PARENT_DETAILS); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; goto __pyx_L1;}
 
3302
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3303
    Py_DECREF(__pyx_v_source_details);
 
3304
    __pyx_v_source_details = __pyx_3;
 
3305
    __pyx_3 = 0;
 
3306
    goto __pyx_L2;
 
3307
  }
 
3308
  /*else*/ {
 
3309
    __pyx_1 = __Pyx_GetItemInt(__pyx_v_details_list, __pyx_v_self->source_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; goto __pyx_L1;}
 
3310
    Py_DECREF(__pyx_v_source_details);
 
3311
    __pyx_v_source_details = __pyx_1;
 
3312
    __pyx_1 = 0;
 
3313
  }
 
3314
  __pyx_L2:;
 
3315
 
 
3316
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1072 */
 
3317
  __pyx_3 = __Pyx_GetItemInt(__pyx_v_details_list, __pyx_v_self->target_index); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; goto __pyx_L1;}
 
3318
  Py_DECREF(__pyx_v_target_details);
 
3319
  __pyx_v_target_details = __pyx_3;
 
3320
  __pyx_3 = 0;
 
3321
 
 
3322
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1073 */
 
3323
  __pyx_1 = __Pyx_GetItemInt(__pyx_v_target_details, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1073; goto __pyx_L1;}
 
3324
  __pyx_v_target_minikind = __pyx_f_19_dirstate_helpers_c__minikind_from_string(__pyx_1);
 
3325
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3326
 
 
3327
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1074 */
 
3328
  __pyx_2 = __pyx_v_path_info != Py_None;
 
3329
  if (__pyx_2) {
 
3330
    __pyx_2 = __pyx_f_19_dirstate_helpers_c__versioned_minikind(__pyx_v_target_minikind);
 
3331
  }
 
3332
  if (__pyx_2) {
 
3333
 
 
3334
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1075 */
 
3335
    __pyx_2 = (__pyx_v_self->target_index != 0);
 
3336
    if (__pyx_2) {
 
3337
      __pyx_3 = PyInt_FromLong(__pyx_v_self->target_index); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; goto __pyx_L1;}
 
3338
      __pyx_1 = PyNumber_Remainder(__pyx_k59p, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;}
 
3339
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3340
      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;}
 
3341
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
 
3342
      __pyx_1 = 0;
 
3343
      __pyx_1 = PyObject_CallObject(PyExc_AssertionError, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;}
 
3344
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3345
      __Pyx_Raise(__pyx_1, 0, 0);
 
3346
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3347
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;}
 
3348
      goto __pyx_L4;
 
3349
    }
 
3350
    __pyx_L4:;
 
3351
 
 
3352
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1078 */
 
3353
    __pyx_3 = __Pyx_GetItemInt(__pyx_v_path_info, 4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; goto __pyx_L1;}
 
3354
    __pyx_1 = __Pyx_GetItemInt(__pyx_v_path_info, 3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; goto __pyx_L1;}
 
3355
    __pyx_4 = __pyx_f_19_dirstate_helpers_c__update_entry(__pyx_v_self->state,__pyx_v_entry,__pyx_3,__pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; goto __pyx_L1;}
 
3356
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3357
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3358
    Py_DECREF(__pyx_v_link_or_sha1);
 
3359
    __pyx_v_link_or_sha1 = __pyx_4;
 
3360
    __pyx_4 = 0;
 
3361
 
 
3362
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1080 */
 
3363
    __pyx_3 = __Pyx_GetItemInt(__pyx_v_details_list, __pyx_v_self->target_index); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; goto __pyx_L1;}
 
3364
    Py_DECREF(__pyx_v_target_details);
 
3365
    __pyx_v_target_details = __pyx_3;
 
3366
    __pyx_3 = 0;
 
3367
 
 
3368
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1081 */
 
3369
    __pyx_1 = __Pyx_GetItemInt(__pyx_v_target_details, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; goto __pyx_L1;}
 
3370
    __pyx_v_target_minikind = __pyx_f_19_dirstate_helpers_c__minikind_from_string(__pyx_1);
 
3371
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3372
    goto __pyx_L3;
 
3373
  }
 
3374
  /*else*/ {
 
3375
    Py_INCREF(Py_None);
 
3376
    Py_DECREF(__pyx_v_link_or_sha1);
 
3377
    __pyx_v_link_or_sha1 = Py_None;
 
3378
  }
 
3379
  __pyx_L3:;
 
3380
 
 
3381
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1086 */
 
3382
  __pyx_4 = __Pyx_GetItemInt(__pyx_v_source_details, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; goto __pyx_L1;}
 
3383
  __pyx_v_source_minikind = __pyx_f_19_dirstate_helpers_c__minikind_from_string(__pyx_4);
 
3384
  Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3385
 
 
3386
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1087 */
 
3387
  __pyx_2 = __pyx_f_19_dirstate_helpers_c__versioned_minikind(__pyx_v_source_minikind);
 
3388
  if (!__pyx_2) {
 
3389
    __pyx_2 = (__pyx_v_source_minikind == 'r');
 
3390
  }
 
3391
  if (__pyx_2) {
 
3392
    __pyx_2 = __pyx_f_19_dirstate_helpers_c__versioned_minikind(__pyx_v_target_minikind);
 
3393
  }
 
3394
  if (__pyx_2) {
 
3395
 
 
3396
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1094 */
 
3397
    __pyx_2 = (__pyx_v_source_minikind != 'r');
 
3398
    if (__pyx_2) {
 
3399
 
 
3400
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1095 */
 
3401
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; goto __pyx_L1;}
 
3402
      __pyx_1 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; goto __pyx_L1;}
 
3403
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3404
      Py_DECREF(__pyx_v_old_dirname);
 
3405
      __pyx_v_old_dirname = __pyx_1;
 
3406
      __pyx_1 = 0;
 
3407
 
 
3408
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1096 */
 
3409
      __pyx_4 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; goto __pyx_L1;}
 
3410
      __pyx_3 = __Pyx_GetItemInt(__pyx_4, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; goto __pyx_L1;}
 
3411
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3412
      Py_DECREF(__pyx_v_old_basename);
 
3413
      __pyx_v_old_basename = __pyx_3;
 
3414
      __pyx_3 = 0;
 
3415
 
 
3416
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1097 */
 
3417
      Py_INCREF(Py_None);
 
3418
      Py_DECREF(__pyx_v_old_path);
 
3419
      __pyx_v_old_path = Py_None;
 
3420
      Py_INCREF(Py_None);
 
3421
      Py_DECREF(__pyx_v_path);
 
3422
      __pyx_v_path = Py_None;
 
3423
      goto __pyx_L6;
 
3424
    }
 
3425
    /*else*/ {
 
3426
 
 
3427
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1101 */
 
3428
      __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; goto __pyx_L1;}
 
3429
      __pyx_4 = PyObject_GetAttr(__pyx_1, __pyx_n_is_inside_any); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; goto __pyx_L1;}
 
3430
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3431
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_source_details, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; goto __pyx_L1;}
 
3432
      __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; goto __pyx_L1;}
 
3433
      Py_INCREF(__pyx_v_self->searched_specific_files);
 
3434
      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_self->searched_specific_files);
 
3435
      PyTuple_SET_ITEM(__pyx_1, 1, __pyx_3);
 
3436
      __pyx_3 = 0;
 
3437
      __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; goto __pyx_L1;}
 
3438
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3439
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3440
      __pyx_2 = PyObject_IsTrue(__pyx_3); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; goto __pyx_L1;}
 
3441
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3442
      __pyx_5 = (!__pyx_2);
 
3443
      if (__pyx_5) {
 
3444
        __pyx_4 = PyObject_GetAttr(__pyx_v_self->search_specific_files, __pyx_n_add); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; goto __pyx_L1;}
 
3445
        __pyx_1 = __Pyx_GetItemInt(__pyx_v_source_details, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; goto __pyx_L1;}
 
3446
        __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; goto __pyx_L1;}
 
3447
        PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
 
3448
        __pyx_1 = 0;
 
3449
        __pyx_1 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; goto __pyx_L1;}
 
3450
        Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3451
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3452
        Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3453
        goto __pyx_L7;
 
3454
      }
 
3455
      __pyx_L7:;
 
3456
 
 
3457
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1106 */
 
3458
      __pyx_4 = __Pyx_GetItemInt(__pyx_v_source_details, 1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; goto __pyx_L1;}
 
3459
      Py_DECREF(__pyx_v_old_path);
 
3460
      __pyx_v_old_path = __pyx_4;
 
3461
      __pyx_4 = 0;
 
3462
 
 
3463
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1107 */
 
3464
      __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; goto __pyx_L1;}
 
3465
      __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_path); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; goto __pyx_L1;}
 
3466
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3467
      __pyx_4 = PyObject_GetAttr(__pyx_1, __pyx_n_split); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; goto __pyx_L1;}
 
3468
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3469
      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; goto __pyx_L1;}
 
3470
      Py_INCREF(__pyx_v_old_path);
 
3471
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_old_path);
 
3472
      __pyx_1 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; goto __pyx_L1;}
 
3473
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3474
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3475
      __pyx_4 = PyObject_GetIter(__pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; goto __pyx_L1;}
 
3476
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3477
      __pyx_3 = __Pyx_UnpackItem(__pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; goto __pyx_L1;}
 
3478
      Py_DECREF(__pyx_v_old_dirname);
 
3479
      __pyx_v_old_dirname = __pyx_3;
 
3480
      __pyx_3 = 0;
 
3481
      __pyx_1 = __Pyx_UnpackItem(__pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; goto __pyx_L1;}
 
3482
      Py_DECREF(__pyx_v_old_basename);
 
3483
      __pyx_v_old_basename = __pyx_1;
 
3484
      __pyx_1 = 0;
 
3485
      if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; goto __pyx_L1;}
 
3486
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3487
 
 
3488
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1108 */
 
3489
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; goto __pyx_L1;}
 
3490
      __pyx_1 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; goto __pyx_L1;}
 
3491
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3492
      __pyx_4 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; goto __pyx_L1;}
 
3493
      __pyx_3 = __Pyx_GetItemInt(__pyx_4, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; goto __pyx_L1;}
 
3494
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3495
      __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; goto __pyx_L1;}
 
3496
      PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
 
3497
      PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
 
3498
      __pyx_1 = 0;
 
3499
      __pyx_3 = 0;
 
3500
      __pyx_1 = PyObject_CallObject(__pyx_v_self->pathjoin, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; goto __pyx_L1;}
 
3501
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3502
      Py_DECREF(__pyx_v_path);
 
3503
      __pyx_v_path = __pyx_1;
 
3504
      __pyx_1 = 0;
 
3505
 
 
3506
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1109 */
 
3507
      __pyx_3 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__get_entry); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; goto __pyx_L1;}
 
3508
      __pyx_4 = PyInt_FromLong(__pyx_v_self->source_index); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; goto __pyx_L1;}
 
3509
      __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; goto __pyx_L1;}
 
3510
      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_4);
 
3511
      __pyx_4 = 0;
 
3512
      __pyx_4 = PyDict_New(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; goto __pyx_L1;}
 
3513
      if (PyDict_SetItem(__pyx_4, __pyx_n_path_utf8, __pyx_v_old_path) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; goto __pyx_L1;}
 
3514
      __pyx_6 = PyEval_CallObjectWithKeywords(__pyx_3, __pyx_1, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; goto __pyx_L1;}
 
3515
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3516
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3517
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3518
      Py_DECREF(__pyx_v_old_entry);
 
3519
      __pyx_v_old_entry = __pyx_6;
 
3520
      __pyx_6 = 0;
 
3521
 
 
3522
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1113 */
 
3523
      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; goto __pyx_L1;}
 
3524
      Py_INCREF(Py_None);
 
3525
      PyTuple_SET_ITEM(__pyx_3, 0, Py_None);
 
3526
      Py_INCREF(Py_None);
 
3527
      PyTuple_SET_ITEM(__pyx_3, 1, Py_None);
 
3528
      if (PyObject_Cmp(__pyx_v_old_entry, __pyx_3, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; goto __pyx_L1;}
 
3529
      __pyx_2 = __pyx_2 == 0;
 
3530
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3531
      if (__pyx_2) {
 
3532
        __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_errors); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; goto __pyx_L1;}
 
3533
        __pyx_4 = PyObject_GetAttr(__pyx_1, __pyx_n_CorruptDirstate); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; goto __pyx_L1;}
 
3534
        Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3535
        __pyx_6 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__filename); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; goto __pyx_L1;}
 
3536
        __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; goto __pyx_L1;}
 
3537
        __pyx_1 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; goto __pyx_L1;}
 
3538
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3539
        __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; goto __pyx_L1;}
 
3540
        __pyx_7 = __Pyx_GetItemInt(__pyx_3, 1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; goto __pyx_L1;}
 
3541
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3542
        __pyx_3 = PyTuple_New(4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; goto __pyx_L1;}
 
3543
        PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
 
3544
        PyTuple_SET_ITEM(__pyx_3, 1, __pyx_7);
 
3545
        Py_INCREF(__pyx_v_old_path);
 
3546
        PyTuple_SET_ITEM(__pyx_3, 2, __pyx_v_old_path);
 
3547
        Py_INCREF(__pyx_v_entry);
 
3548
        PyTuple_SET_ITEM(__pyx_3, 3, __pyx_v_entry);
 
3549
        __pyx_1 = 0;
 
3550
        __pyx_7 = 0;
 
3551
        __pyx_1 = PyNumber_Remainder(__pyx_k61p, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; goto __pyx_L1;}
 
3552
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3553
        __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; goto __pyx_L1;}
 
3554
        PyTuple_SET_ITEM(__pyx_7, 0, __pyx_6);
 
3555
        PyTuple_SET_ITEM(__pyx_7, 1, __pyx_1);
 
3556
        __pyx_6 = 0;
 
3557
        __pyx_1 = 0;
 
3558
        __pyx_3 = PyObject_CallObject(__pyx_4, __pyx_7); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; goto __pyx_L1;}
 
3559
        Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3560
        Py_DECREF(__pyx_7); __pyx_7 = 0;
 
3561
        __Pyx_Raise(__pyx_3, 0, 0);
 
3562
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3563
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; goto __pyx_L1;}
 
3564
        goto __pyx_L8;
 
3565
      }
 
3566
      __pyx_L8:;
 
3567
 
 
3568
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1118 */
 
3569
      __pyx_6 = __Pyx_GetItemInt(__pyx_v_old_entry, 1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; goto __pyx_L1;}
 
3570
      __pyx_1 = __Pyx_GetItemInt(__pyx_6, __pyx_v_self->source_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1118; goto __pyx_L1;}
 
3571
      Py_DECREF(__pyx_6); __pyx_6 = 0;
 
3572
      Py_DECREF(__pyx_v_source_details);
 
3573
      __pyx_v_source_details = __pyx_1;
 
3574
      __pyx_1 = 0;
 
3575
 
 
3576
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1119 */
 
3577
      __pyx_4 = __Pyx_GetItemInt(__pyx_v_source_details, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; goto __pyx_L1;}
 
3578
      __pyx_v_source_minikind = __pyx_f_19_dirstate_helpers_c__minikind_from_string(__pyx_4);
 
3579
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3580
    }
 
3581
    __pyx_L6:;
 
3582
 
 
3583
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1120 */
 
3584
    __pyx_5 = __pyx_v_path_info == Py_None;
 
3585
    if (__pyx_5) {
 
3586
 
 
3587
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1122 */
 
3588
      __pyx_v_content_change = 1;
 
3589
 
 
3590
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1123 */
 
3591
      Py_INCREF(Py_None);
 
3592
      Py_DECREF(__pyx_v_target_kind);
 
3593
      __pyx_v_target_kind = Py_None;
 
3594
 
 
3595
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1124 */
 
3596
      Py_INCREF(Py_False);
 
3597
      Py_DECREF(__pyx_v_target_exec);
 
3598
      __pyx_v_target_exec = Py_False;
 
3599
      goto __pyx_L9;
 
3600
    }
 
3601
    /*else*/ {
 
3602
 
 
3603
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1127 */
 
3604
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_path_info, 2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; goto __pyx_L1;}
 
3605
      Py_DECREF(__pyx_v_target_kind);
 
3606
      __pyx_v_target_kind = __pyx_7;
 
3607
      __pyx_7 = 0;
 
3608
 
 
3609
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1128 */
 
3610
      if (PyObject_Cmp(__pyx_v_target_kind, __pyx_n_directory, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; goto __pyx_L1;}
 
3611
      __pyx_2 = __pyx_2 == 0;
 
3612
      if (__pyx_2) {
 
3613
 
 
3614
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1129 */
 
3615
        __pyx_5 = __pyx_v_path == Py_None;
 
3616
        if (__pyx_5) {
 
3617
          __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; goto __pyx_L1;}
 
3618
          Py_INCREF(__pyx_v_old_dirname);
 
3619
          PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_old_dirname);
 
3620
          Py_INCREF(__pyx_v_old_basename);
 
3621
          PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_old_basename);
 
3622
          __pyx_6 = PyObject_CallObject(__pyx_v_self->pathjoin, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; goto __pyx_L1;}
 
3623
          Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3624
          Py_INCREF(__pyx_6);
 
3625
          Py_DECREF(__pyx_v_old_path);
 
3626
          __pyx_v_old_path = __pyx_6;
 
3627
          Py_INCREF(__pyx_6);
 
3628
          Py_DECREF(__pyx_v_path);
 
3629
          __pyx_v_path = __pyx_6;
 
3630
          Py_DECREF(__pyx_6); __pyx_6 = 0;
 
3631
          goto __pyx_L11;
 
3632
        }
 
3633
        __pyx_L11:;
 
3634
 
 
3635
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1131 */
 
3636
        __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; goto __pyx_L1;}
 
3637
        __pyx_4 = __Pyx_GetItemInt(__pyx_1, 2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; goto __pyx_L1;}
 
3638
        Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3639
        Py_DECREF(__pyx_v_file_id);
 
3640
        __pyx_v_file_id = __pyx_4;
 
3641
        __pyx_4 = 0;
 
3642
 
 
3643
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1132 */
 
3644
        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 = 1132; goto __pyx_L1;}
 
3645
 
 
3646
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1133 */
 
3647
        __pyx_2 = (__pyx_v_source_minikind != 'd');
 
3648
        if (__pyx_2) {
 
3649
          __pyx_v_content_change = 1;
 
3650
          goto __pyx_L12;
 
3651
        }
 
3652
        /*else*/ {
 
3653
          __pyx_v_content_change = 0;
 
3654
        }
 
3655
        __pyx_L12:;
 
3656
 
 
3657
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1138 */
 
3658
        Py_INCREF(Py_False);
 
3659
        Py_DECREF(__pyx_v_target_exec);
 
3660
        __pyx_v_target_exec = Py_False;
 
3661
        goto __pyx_L10;
 
3662
      }
 
3663
      if (PyObject_Cmp(__pyx_v_target_kind, __pyx_n_file, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; goto __pyx_L1;}
 
3664
      __pyx_5 = __pyx_5 == 0;
 
3665
      if (__pyx_5) {
 
3666
 
 
3667
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1140 */
 
3668
        __pyx_2 = (__pyx_v_source_minikind != 'f');
 
3669
        if (__pyx_2) {
 
3670
          __pyx_v_content_change = 1;
 
3671
          goto __pyx_L13;
 
3672
        }
 
3673
        /*else*/ {
 
3674
 
 
3675
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1146 */
 
3676
          __pyx_5 = __pyx_v_link_or_sha1 == Py_None;
 
3677
          if (__pyx_5) {
 
3678
 
 
3679
            /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1149 */
 
3680
            __pyx_7 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__sha1_provider); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;}
 
3681
            __pyx_3 = PyObject_GetAttr(__pyx_7, __pyx_n_stat_and_sha1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;}
 
3682
            Py_DECREF(__pyx_7); __pyx_7 = 0;
 
3683
            __pyx_6 = __Pyx_GetItemInt(__pyx_v_path_info, 4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; goto __pyx_L1;}
 
3684
            __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;}
 
3685
            PyTuple_SET_ITEM(__pyx_1, 0, __pyx_6);
 
3686
            __pyx_6 = 0;
 
3687
            __pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; goto __pyx_L1;}
 
3688
            Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3689
            Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3690
            __pyx_7 = PyObject_GetIter(__pyx_4); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; goto __pyx_L1;}
 
3691
            Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3692
            __pyx_6 = __Pyx_UnpackItem(__pyx_7); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; goto __pyx_L1;}
 
3693
            Py_DECREF(__pyx_v_statvalue);
 
3694
            __pyx_v_statvalue = __pyx_6;
 
3695
            __pyx_6 = 0;
 
3696
            __pyx_3 = __Pyx_UnpackItem(__pyx_7); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; goto __pyx_L1;}
 
3697
            Py_DECREF(__pyx_v_link_or_sha1);
 
3698
            __pyx_v_link_or_sha1 = __pyx_3;
 
3699
            __pyx_3 = 0;
 
3700
            if (__Pyx_EndUnpack(__pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1148; goto __pyx_L1;}
 
3701
            Py_DECREF(__pyx_7); __pyx_7 = 0;
 
3702
 
 
3703
            /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1151 */
 
3704
            __pyx_1 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__observed_sha1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; goto __pyx_L1;}
 
3705
            __pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; goto __pyx_L1;}
 
3706
            Py_INCREF(__pyx_v_entry);
 
3707
            PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_entry);
 
3708
            Py_INCREF(__pyx_v_link_or_sha1);
 
3709
            PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_link_or_sha1);
 
3710
            Py_INCREF(__pyx_v_statvalue);
 
3711
            PyTuple_SET_ITEM(__pyx_4, 2, __pyx_v_statvalue);
 
3712
            __pyx_6 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; goto __pyx_L1;}
 
3713
            Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3714
            Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3715
            Py_DECREF(__pyx_6); __pyx_6 = 0;
 
3716
            goto __pyx_L14;
 
3717
          }
 
3718
          __pyx_L14:;
 
3719
 
 
3720
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1153 */
 
3721
          __pyx_3 = __Pyx_GetItemInt(__pyx_v_source_details, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; goto __pyx_L1;}
 
3722
          if (PyObject_Cmp(__pyx_v_link_or_sha1, __pyx_3, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; goto __pyx_L1;}
 
3723
          __pyx_2 = __pyx_2 != 0;
 
3724
          Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3725
          __pyx_v_content_change = __pyx_2;
 
3726
        }
 
3727
        __pyx_L13:;
 
3728
 
 
3729
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1155 */
 
3730
        __pyx_5 = PyObject_IsTrue(__pyx_v_self->use_filesystem_for_exec); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;}
 
3731
        if (__pyx_5) {
 
3732
          __pyx_7 = PyInt_FromLong(S_IXUSR); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; goto __pyx_L1;}
 
3733
          __pyx_1 = __Pyx_GetItemInt(__pyx_v_path_info, 3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; goto __pyx_L1;}
 
3734
          __pyx_4 = PyObject_GetAttr(__pyx_1, __pyx_n_st_mode); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; goto __pyx_L1;}
 
3735
          Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3736
          __pyx_6 = PyNumber_And(__pyx_7, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; goto __pyx_L1;}
 
3737
          Py_DECREF(__pyx_7); __pyx_7 = 0;
 
3738
          Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3739
          __pyx_2 = PyObject_IsTrue(__pyx_6); if (__pyx_2 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; goto __pyx_L1;}
 
3740
          Py_DECREF(__pyx_6); __pyx_6 = 0;
 
3741
          __pyx_3 = PyInt_FromLong(__pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; goto __pyx_L1;}
 
3742
          Py_DECREF(__pyx_v_target_exec);
 
3743
          __pyx_v_target_exec = __pyx_3;
 
3744
          __pyx_3 = 0;
 
3745
          goto __pyx_L15;
 
3746
        }
 
3747
        /*else*/ {
 
3748
          __pyx_1 = __Pyx_GetItemInt(__pyx_v_target_details, 3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; goto __pyx_L1;}
 
3749
          Py_DECREF(__pyx_v_target_exec);
 
3750
          __pyx_v_target_exec = __pyx_1;
 
3751
          __pyx_1 = 0;
 
3752
        }
 
3753
        __pyx_L15:;
 
3754
        goto __pyx_L10;
 
3755
      }
 
3756
      if (PyObject_Cmp(__pyx_v_target_kind, __pyx_n_symlink, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; goto __pyx_L1;}
 
3757
      __pyx_5 = __pyx_5 == 0;
 
3758
      if (__pyx_5) {
 
3759
 
 
3760
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1162 */
 
3761
        __pyx_2 = (__pyx_v_source_minikind != 'l');
 
3762
        if (__pyx_2) {
 
3763
          __pyx_v_content_change = 1;
 
3764
          goto __pyx_L16;
 
3765
        }
 
3766
        /*else*/ {
 
3767
          __pyx_7 = __Pyx_GetItemInt(__pyx_v_source_details, 1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; goto __pyx_L1;}
 
3768
          if (PyObject_Cmp(__pyx_v_link_or_sha1, __pyx_7, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; goto __pyx_L1;}
 
3769
          __pyx_5 = __pyx_5 != 0;
 
3770
          Py_DECREF(__pyx_7); __pyx_7 = 0;
 
3771
          __pyx_v_content_change = __pyx_5;
 
3772
        }
 
3773
        __pyx_L16:;
 
3774
 
 
3775
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1166 */
 
3776
        Py_INCREF(Py_False);
 
3777
        Py_DECREF(__pyx_v_target_exec);
 
3778
        __pyx_v_target_exec = Py_False;
 
3779
        goto __pyx_L10;
 
3780
      }
 
3781
      if (PyObject_Cmp(__pyx_v_target_kind, __pyx_k65p, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; goto __pyx_L1;}
 
3782
      __pyx_2 = __pyx_2 == 0;
 
3783
      if (__pyx_2) {
 
3784
 
 
3785
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1168 */
 
3786
        __pyx_5 = (__pyx_v_source_minikind != 't');
 
3787
        if (__pyx_5) {
 
3788
          __pyx_v_content_change = 1;
 
3789
          goto __pyx_L17;
 
3790
        }
 
3791
        /*else*/ {
 
3792
          __pyx_v_content_change = 0;
 
3793
        }
 
3794
        __pyx_L17:;
 
3795
 
 
3796
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1172 */
 
3797
        Py_INCREF(Py_False);
 
3798
        Py_DECREF(__pyx_v_target_exec);
 
3799
        __pyx_v_target_exec = Py_False;
 
3800
        goto __pyx_L10;
 
3801
      }
 
3802
      /*else*/ {
 
3803
        __pyx_4 = __Pyx_GetItemInt(__pyx_v_path_info, 2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; goto __pyx_L1;}
 
3804
        __pyx_6 = PyNumber_Remainder(__pyx_k66p, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; goto __pyx_L1;}
 
3805
        Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3806
        __Pyx_Raise(PyExc_Exception, __pyx_6, 0);
 
3807
        Py_DECREF(__pyx_6); __pyx_6 = 0;
 
3808
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1174; goto __pyx_L1;}
 
3809
      }
 
3810
      __pyx_L10:;
 
3811
    }
 
3812
    __pyx_L9:;
 
3813
 
 
3814
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1175 */
 
3815
    __pyx_2 = (__pyx_v_source_minikind == 'd');
 
3816
    if (__pyx_2) {
 
3817
 
 
3818
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1176 */
 
3819
      __pyx_5 = __pyx_v_path == Py_None;
 
3820
      if (__pyx_5) {
 
3821
        __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; goto __pyx_L1;}
 
3822
        Py_INCREF(__pyx_v_old_dirname);
 
3823
        PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_old_dirname);
 
3824
        Py_INCREF(__pyx_v_old_basename);
 
3825
        PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_old_basename);
 
3826
        __pyx_1 = PyObject_CallObject(__pyx_v_self->pathjoin, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; goto __pyx_L1;}
 
3827
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3828
        Py_INCREF(__pyx_1);
 
3829
        Py_DECREF(__pyx_v_old_path);
 
3830
        __pyx_v_old_path = __pyx_1;
 
3831
        Py_INCREF(__pyx_1);
 
3832
        Py_DECREF(__pyx_v_path);
 
3833
        __pyx_v_path = __pyx_1;
 
3834
        Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3835
        goto __pyx_L19;
 
3836
      }
 
3837
      __pyx_L19:;
 
3838
 
 
3839
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1178 */
 
3840
      __pyx_2 = __pyx_v_file_id == Py_None;
 
3841
      if (__pyx_2) {
 
3842
        __pyx_7 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; goto __pyx_L1;}
 
3843
        __pyx_4 = __Pyx_GetItemInt(__pyx_7, 2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; goto __pyx_L1;}
 
3844
        Py_DECREF(__pyx_7); __pyx_7 = 0;
 
3845
        Py_DECREF(__pyx_v_file_id);
 
3846
        __pyx_v_file_id = __pyx_4;
 
3847
        __pyx_4 = 0;
 
3848
        goto __pyx_L20;
 
3849
      }
 
3850
      __pyx_L20:;
 
3851
 
 
3852
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1180 */
 
3853
      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 = 1180; goto __pyx_L1;}
 
3854
      goto __pyx_L18;
 
3855
    }
 
3856
    __pyx_L18:;
 
3857
 
 
3858
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1182 */
 
3859
    __pyx_6 = __Pyx_GetItemInt(__pyx_v_self->last_source_parent, 0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; goto __pyx_L1;}
 
3860
    if (PyObject_Cmp(__pyx_v_old_dirname, __pyx_6, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; goto __pyx_L1;}
 
3861
    __pyx_5 = __pyx_5 == 0;
 
3862
    Py_DECREF(__pyx_6); __pyx_6 = 0;
 
3863
    if (__pyx_5) {
 
3864
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_self->last_source_parent, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; goto __pyx_L1;}
 
3865
      Py_DECREF(__pyx_v_source_parent_id);
 
3866
      __pyx_v_source_parent_id = __pyx_3;
 
3867
      __pyx_3 = 0;
 
3868
      goto __pyx_L21;
 
3869
    }
 
3870
    /*else*/ {
 
3871
 
 
3872
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1185 */
 
3873
      /*try:*/ {
 
3874
        __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 = 1186; goto __pyx_L22;}
 
3875
        Py_DECREF(__pyx_v_source_parent_id);
 
3876
        __pyx_v_source_parent_id = __pyx_1;
 
3877
        __pyx_1 = 0;
 
3878
      }
 
3879
      goto __pyx_L23;
 
3880
      __pyx_L22:;
 
3881
      Py_XDECREF(__pyx_7); __pyx_7 = 0;
 
3882
      Py_XDECREF(__pyx_4); __pyx_4 = 0;
 
3883
      Py_XDECREF(__pyx_6); __pyx_6 = 0;
 
3884
      Py_XDECREF(__pyx_3); __pyx_3 = 0;
 
3885
      Py_XDECREF(__pyx_1); __pyx_1 = 0;
 
3886
 
 
3887
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1187 */
 
3888
      __pyx_2 = PyErr_ExceptionMatches(PyExc_KeyError);
 
3889
      if (__pyx_2) {
 
3890
        __Pyx_AddTraceback("_dirstate_helpers_c._process_entry");
 
3891
        if (__Pyx_GetException(&__pyx_7, &__pyx_4, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; goto __pyx_L1;}
 
3892
 
 
3893
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1188 */
 
3894
        __pyx_3 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__get_entry); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; goto __pyx_L1;}
 
3895
        __pyx_1 = PyInt_FromLong(__pyx_v_self->source_index); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; goto __pyx_L1;}
 
3896
        __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; goto __pyx_L1;}
 
3897
        PyTuple_SET_ITEM(__pyx_8, 0, __pyx_1);
 
3898
        __pyx_1 = 0;
 
3899
        __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; goto __pyx_L1;}
 
3900
        if (PyDict_SetItem(__pyx_1, __pyx_n_path_utf8, __pyx_v_old_dirname) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; goto __pyx_L1;}
 
3901
        __pyx_9 = PyEval_CallObjectWithKeywords(__pyx_3, __pyx_8, __pyx_1); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; goto __pyx_L1;}
 
3902
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3903
        Py_DECREF(__pyx_8); __pyx_8 = 0;
 
3904
        Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3905
        Py_DECREF(__pyx_v_source_parent_entry);
 
3906
        __pyx_v_source_parent_entry = __pyx_9;
 
3907
        __pyx_9 = 0;
 
3908
 
 
3909
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1190 */
 
3910
        __pyx_3 = __Pyx_GetItemInt(__pyx_v_source_parent_entry, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; goto __pyx_L1;}
 
3911
        __pyx_8 = __Pyx_GetItemInt(__pyx_3, 2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; goto __pyx_L1;}
 
3912
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3913
        Py_DECREF(__pyx_v_source_parent_id);
 
3914
        __pyx_v_source_parent_id = __pyx_8;
 
3915
        __pyx_8 = 0;
 
3916
        Py_DECREF(__pyx_7); __pyx_7 = 0;
 
3917
        Py_DECREF(__pyx_4); __pyx_4 = 0;
 
3918
        Py_DECREF(__pyx_6); __pyx_6 = 0;
 
3919
        goto __pyx_L23;
 
3920
      }
 
3921
      goto __pyx_L1;
 
3922
      __pyx_L23:;
 
3923
 
 
3924
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1191 */
 
3925
      __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; goto __pyx_L1;}
 
3926
      __pyx_9 = __Pyx_GetItemInt(__pyx_1, 2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; goto __pyx_L1;}
 
3927
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
3928
      if (PyObject_Cmp(__pyx_v_source_parent_id, __pyx_9, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; goto __pyx_L1;}
 
3929
      __pyx_5 = __pyx_5 == 0;
 
3930
      Py_DECREF(__pyx_9); __pyx_9 = 0;
 
3931
      if (__pyx_5) {
 
3932
        Py_INCREF(Py_None);
 
3933
        Py_DECREF(__pyx_v_source_parent_id);
 
3934
        __pyx_v_source_parent_id = Py_None;
 
3935
        goto __pyx_L24;
 
3936
      }
 
3937
      /*else*/ {
 
3938
 
 
3939
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1195 */
 
3940
        if (__Pyx_SetItemInt(__pyx_v_self->last_source_parent, 0, __pyx_v_old_dirname) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; goto __pyx_L1;}
 
3941
 
 
3942
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1196 */
 
3943
        if (__Pyx_SetItemInt(__pyx_v_self->last_source_parent, 1, __pyx_v_source_parent_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; goto __pyx_L1;}
 
3944
      }
 
3945
      __pyx_L24:;
 
3946
    }
 
3947
    __pyx_L21:;
 
3948
 
 
3949
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1197 */
 
3950
    __pyx_3 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;}
 
3951
    __pyx_8 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; goto __pyx_L1;}
 
3952
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
3953
    Py_DECREF(__pyx_v_new_dirname);
 
3954
    __pyx_v_new_dirname = __pyx_8;
 
3955
    __pyx_8 = 0;
 
3956
 
 
3957
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1198 */
 
3958
    __pyx_7 = __Pyx_GetItemInt(__pyx_v_self->last_target_parent, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; goto __pyx_L1;}
 
3959
    if (PyObject_Cmp(__pyx_v_new_dirname, __pyx_7, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1198; goto __pyx_L1;}
 
3960
    __pyx_2 = __pyx_2 == 0;
 
3961
    Py_DECREF(__pyx_7); __pyx_7 = 0;
 
3962
    if (__pyx_2) {
 
3963
      __pyx_4 = __Pyx_GetItemInt(__pyx_v_self->last_target_parent, 1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1199; goto __pyx_L1;}
 
3964
      Py_DECREF(__pyx_v_target_parent_id);
 
3965
      __pyx_v_target_parent_id = __pyx_4;
 
3966
      __pyx_4 = 0;
 
3967
      goto __pyx_L25;
 
3968
    }
 
3969
    /*else*/ {
 
3970
 
 
3971
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1201 */
 
3972
      /*try:*/ {
 
3973
        __pyx_6 = PyObject_GetItem(__pyx_v_self->new_dirname_to_file_id, __pyx_v_new_dirname); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1202; goto __pyx_L26;}
 
3974
        Py_DECREF(__pyx_v_target_parent_id);
 
3975
        __pyx_v_target_parent_id = __pyx_6;
 
3976
        __pyx_6 = 0;
 
3977
      }
 
3978
      goto __pyx_L27;
 
3979
      __pyx_L26:;
 
3980
      Py_XDECREF(__pyx_1); __pyx_1 = 0;
 
3981
      Py_XDECREF(__pyx_9); __pyx_9 = 0;
 
3982
      Py_XDECREF(__pyx_3); __pyx_3 = 0;
 
3983
      Py_XDECREF(__pyx_8); __pyx_8 = 0;
 
3984
      Py_XDECREF(__pyx_7); __pyx_7 = 0;
 
3985
      Py_XDECREF(__pyx_4); __pyx_4 = 0;
 
3986
      Py_XDECREF(__pyx_6); __pyx_6 = 0;
 
3987
 
 
3988
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1203 */
 
3989
      __pyx_5 = PyErr_ExceptionMatches(PyExc_KeyError);
 
3990
      if (__pyx_5) {
 
3991
        __Pyx_AddTraceback("_dirstate_helpers_c._process_entry");
 
3992
        if (__Pyx_GetException(&__pyx_1, &__pyx_9, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; goto __pyx_L1;}
 
3993
 
 
3994
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1206 */
 
3995
        __pyx_8 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__get_entry); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; goto __pyx_L1;}
 
3996
        __pyx_7 = PyInt_FromLong(__pyx_v_self->target_index); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; goto __pyx_L1;}
 
3997
        __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; goto __pyx_L1;}
 
3998
        PyTuple_SET_ITEM(__pyx_4, 0, __pyx_7);
 
3999
        __pyx_7 = 0;
 
4000
        __pyx_6 = PyDict_New(); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; goto __pyx_L1;}
 
4001
        if (PyDict_SetItem(__pyx_6, __pyx_n_path_utf8, __pyx_v_new_dirname) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; goto __pyx_L1;}
 
4002
        __pyx_7 = PyEval_CallObjectWithKeywords(__pyx_8, __pyx_4, __pyx_6); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; goto __pyx_L1;}
 
4003
        Py_DECREF(__pyx_8); __pyx_8 = 0;
 
4004
        Py_DECREF(__pyx_4); __pyx_4 = 0;
 
4005
        Py_DECREF(__pyx_6); __pyx_6 = 0;
 
4006
        Py_DECREF(__pyx_v_target_parent_entry);
 
4007
        __pyx_v_target_parent_entry = __pyx_7;
 
4008
        __pyx_7 = 0;
 
4009
 
 
4010
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1208 */
 
4011
        __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; goto __pyx_L1;}
 
4012
        Py_INCREF(Py_None);
 
4013
        PyTuple_SET_ITEM(__pyx_8, 0, Py_None);
 
4014
        Py_INCREF(Py_None);
 
4015
        PyTuple_SET_ITEM(__pyx_8, 1, Py_None);
 
4016
        if (PyObject_Cmp(__pyx_v_target_parent_entry, __pyx_8, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; goto __pyx_L1;}
 
4017
        __pyx_2 = __pyx_2 == 0;
 
4018
        Py_DECREF(__pyx_8); __pyx_8 = 0;
 
4019
        if (__pyx_2) {
 
4020
          __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; goto __pyx_L1;}
 
4021
          Py_INCREF(__pyx_v_new_dirname);
 
4022
          PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_new_dirname);
 
4023
          Py_INCREF(__pyx_v_entry);
 
4024
          PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_entry);
 
4025
          __pyx_6 = PyNumber_Remainder(__pyx_k69p, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; goto __pyx_L1;}
 
4026
          Py_DECREF(__pyx_4); __pyx_4 = 0;
 
4027
          __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; goto __pyx_L1;}
 
4028
          PyTuple_SET_ITEM(__pyx_7, 0, __pyx_6);
 
4029
          __pyx_6 = 0;
 
4030
          __pyx_8 = PyObject_CallObject(PyExc_AssertionError, __pyx_7); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; goto __pyx_L1;}
 
4031
          Py_DECREF(__pyx_7); __pyx_7 = 0;
 
4032
          __Pyx_Raise(__pyx_8, 0, 0);
 
4033
          Py_DECREF(__pyx_8); __pyx_8 = 0;
 
4034
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; goto __pyx_L1;}
 
4035
          goto __pyx_L28;
 
4036
        }
 
4037
        __pyx_L28:;
 
4038
 
 
4039
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1212 */
 
4040
        __pyx_4 = __Pyx_GetItemInt(__pyx_v_target_parent_entry, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; goto __pyx_L1;}
 
4041
        __pyx_6 = __Pyx_GetItemInt(__pyx_4, 2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1212; goto __pyx_L1;}
 
4042
        Py_DECREF(__pyx_4); __pyx_4 = 0;
 
4043
        Py_DECREF(__pyx_v_target_parent_id);
 
4044
        __pyx_v_target_parent_id = __pyx_6;
 
4045
        __pyx_6 = 0;
 
4046
        Py_DECREF(__pyx_1); __pyx_1 = 0;
 
4047
        Py_DECREF(__pyx_9); __pyx_9 = 0;
 
4048
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
4049
        goto __pyx_L27;
 
4050
      }
 
4051
      goto __pyx_L1;
 
4052
      __pyx_L27:;
 
4053
 
 
4054
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1213 */
 
4055
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;}
 
4056
      __pyx_8 = __Pyx_GetItemInt(__pyx_7, 2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;}
 
4057
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
4058
      if (PyObject_Cmp(__pyx_v_target_parent_id, __pyx_8, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; goto __pyx_L1;}
 
4059
      __pyx_5 = __pyx_5 == 0;
 
4060
      Py_DECREF(__pyx_8); __pyx_8 = 0;
 
4061
      if (__pyx_5) {
 
4062
        Py_INCREF(Py_None);
 
4063
        Py_DECREF(__pyx_v_target_parent_id);
 
4064
        __pyx_v_target_parent_id = Py_None;
 
4065
        goto __pyx_L29;
 
4066
      }
 
4067
      /*else*/ {
 
4068
 
 
4069
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1217 */
 
4070
        if (__Pyx_SetItemInt(__pyx_v_self->last_target_parent, 0, __pyx_v_new_dirname) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; goto __pyx_L1;}
 
4071
 
 
4072
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1218 */
 
4073
        if (__Pyx_SetItemInt(__pyx_v_self->last_target_parent, 1, __pyx_v_target_parent_id) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; goto __pyx_L1;}
 
4074
      }
 
4075
      __pyx_L29:;
 
4076
    }
 
4077
    __pyx_L25:;
 
4078
 
 
4079
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1220 */
 
4080
    __pyx_4 = __Pyx_GetItemInt(__pyx_v_source_details, 3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1220; goto __pyx_L1;}
 
4081
    Py_DECREF(__pyx_v_source_exec);
 
4082
    __pyx_v_source_exec = __pyx_4;
 
4083
    __pyx_4 = 0;
 
4084
 
 
4085
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1221 */
 
4086
    __pyx_6 = __pyx_v_self->include_unchanged;
 
4087
    Py_INCREF(__pyx_6);
 
4088
    __pyx_2 = PyObject_IsTrue(__pyx_6); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;}
 
4089
    if (!__pyx_2) {
 
4090
      Py_DECREF(__pyx_6); __pyx_6 = 0;
 
4091
      __pyx_5 = __pyx_v_content_change;
 
4092
      if (!__pyx_5) {
 
4093
        if (PyObject_Cmp(__pyx_v_source_parent_id, __pyx_v_target_parent_id, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; goto __pyx_L1;}
 
4094
        __pyx_5 = __pyx_5 != 0;
 
4095
        if (!__pyx_5) {
 
4096
          __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;}
 
4097
          __pyx_9 = __Pyx_GetItemInt(__pyx_1, 1); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;}
 
4098
          Py_DECREF(__pyx_1); __pyx_1 = 0;
 
4099
          if (PyObject_Cmp(__pyx_v_old_basename, __pyx_9, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1224; goto __pyx_L1;}
 
4100
          __pyx_5 = __pyx_5 != 0;
 
4101
          Py_DECREF(__pyx_9); __pyx_9 = 0;
 
4102
          if (!__pyx_5) {
 
4103
            if (PyObject_Cmp(__pyx_v_source_exec, __pyx_v_target_exec, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; goto __pyx_L1;}
 
4104
            __pyx_5 = __pyx_5 != 0;
 
4105
          }
 
4106
        }
 
4107
      }
 
4108
      __pyx_6 = PyInt_FromLong(__pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; goto __pyx_L1;}
 
4109
    }
 
4110
    __pyx_2 = PyObject_IsTrue(__pyx_6); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; goto __pyx_L1;}
 
4111
    Py_DECREF(__pyx_6); __pyx_6 = 0;
 
4112
    if (__pyx_2) {
 
4113
 
 
4114
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1227 */
 
4115
      __pyx_5 = __pyx_v_old_path == Py_None;
 
4116
      if (__pyx_5) {
 
4117
 
 
4118
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1228 */
 
4119
        __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;}
 
4120
        Py_INCREF(__pyx_v_old_dirname);
 
4121
        PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_old_dirname);
 
4122
        Py_INCREF(__pyx_v_old_basename);
 
4123
        PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_old_basename);
 
4124
        __pyx_7 = PyObject_CallObject(__pyx_v_self->pathjoin, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1228; goto __pyx_L1;}
 
4125
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
4126
        Py_DECREF(__pyx_v_path);
 
4127
        __pyx_v_path = __pyx_7;
 
4128
        __pyx_7 = 0;
 
4129
 
 
4130
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1229 */
 
4131
        Py_INCREF(__pyx_v_path);
 
4132
        Py_DECREF(__pyx_v_old_path);
 
4133
        __pyx_v_old_path = __pyx_v_path;
 
4134
 
 
4135
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1230 */
 
4136
        __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; goto __pyx_L1;}
 
4137
        Py_INCREF(__pyx_v_old_path);
 
4138
        PyTuple_SET_ITEM(__pyx_8, 0, __pyx_v_old_path);
 
4139
        __pyx_4 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_8); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; goto __pyx_L1;}
 
4140
        Py_DECREF(__pyx_8); __pyx_8 = 0;
 
4141
        __pyx_1 = __Pyx_GetItemInt(__pyx_4, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; goto __pyx_L1;}
 
4142
        Py_DECREF(__pyx_4); __pyx_4 = 0;
 
4143
        Py_DECREF(__pyx_v_old_path_u);
 
4144
        __pyx_v_old_path_u = __pyx_1;
 
4145
        __pyx_1 = 0;
 
4146
 
 
4147
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1231 */
 
4148
        Py_INCREF(__pyx_v_old_path_u);
 
4149
        Py_DECREF(__pyx_v_path_u);
 
4150
        __pyx_v_path_u = __pyx_v_old_path_u;
 
4151
        goto __pyx_L31;
 
4152
      }
 
4153
      /*else*/ {
 
4154
 
 
4155
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1233 */
 
4156
        __pyx_9 = PyTuple_New(1); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}
 
4157
        Py_INCREF(__pyx_v_old_path);
 
4158
        PyTuple_SET_ITEM(__pyx_9, 0, __pyx_v_old_path);
 
4159
        __pyx_6 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_9); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}
 
4160
        Py_DECREF(__pyx_9); __pyx_9 = 0;
 
4161
        __pyx_3 = __Pyx_GetItemInt(__pyx_6, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1233; goto __pyx_L1;}
 
4162
        Py_DECREF(__pyx_6); __pyx_6 = 0;
 
4163
        Py_DECREF(__pyx_v_old_path_u);
 
4164
        __pyx_v_old_path_u = __pyx_3;
 
4165
        __pyx_3 = 0;
 
4166
 
 
4167
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1234 */
 
4168
        if (PyObject_Cmp(__pyx_v_old_path, __pyx_v_path, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1234; goto __pyx_L1;}
 
4169
        __pyx_2 = __pyx_2 == 0;
 
4170
        if (__pyx_2) {
 
4171
          Py_INCREF(__pyx_v_old_path_u);
 
4172
          Py_DECREF(__pyx_v_path_u);
 
4173
          __pyx_v_path_u = __pyx_v_old_path_u;
 
4174
          goto __pyx_L32;
 
4175
        }
 
4176
        /*else*/ {
 
4177
          __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; goto __pyx_L1;}
 
4178
          Py_INCREF(__pyx_v_path);
 
4179
          PyTuple_SET_ITEM(__pyx_7, 0, __pyx_v_path);
 
4180
          __pyx_8 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_7); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; goto __pyx_L1;}
 
4181
          Py_DECREF(__pyx_7); __pyx_7 = 0;
 
4182
          __pyx_4 = __Pyx_GetItemInt(__pyx_8, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; goto __pyx_L1;}
 
4183
          Py_DECREF(__pyx_8); __pyx_8 = 0;
 
4184
          Py_DECREF(__pyx_v_path_u);
 
4185
          __pyx_v_path_u = __pyx_4;
 
4186
          __pyx_4 = 0;
 
4187
        }
 
4188
        __pyx_L32:;
 
4189
      }
 
4190
      __pyx_L31:;
 
4191
 
 
4192
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1238 */
 
4193
      __pyx_1 = __pyx_f_19_dirstate_helpers_c__minikind_to_kind(__pyx_v_source_minikind); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; goto __pyx_L1;}
 
4194
      Py_DECREF(__pyx_v_source_kind);
 
4195
      __pyx_v_source_kind = __pyx_1;
 
4196
      __pyx_1 = 0;
 
4197
 
 
4198
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1239 */
 
4199
      __pyx_9 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; goto __pyx_L1;}
 
4200
      __pyx_6 = __Pyx_GetItemInt(__pyx_9, 2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; goto __pyx_L1;}
 
4201
      Py_DECREF(__pyx_9); __pyx_9 = 0;
 
4202
      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; goto __pyx_L1;}
 
4203
      Py_INCREF(__pyx_v_old_path_u);
 
4204
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_old_path_u);
 
4205
      Py_INCREF(__pyx_v_path_u);
 
4206
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_path_u);
 
4207
      __pyx_7 = PyInt_FromLong(__pyx_v_content_change); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; goto __pyx_L1;}
 
4208
      __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; goto __pyx_L1;}
 
4209
      Py_INCREF(Py_True);
 
4210
      PyTuple_SET_ITEM(__pyx_8, 0, Py_True);
 
4211
      Py_INCREF(Py_True);
 
4212
      PyTuple_SET_ITEM(__pyx_8, 1, Py_True);
 
4213
      __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1243; goto __pyx_L1;}
 
4214
      Py_INCREF(__pyx_v_source_parent_id);
 
4215
      PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_source_parent_id);
 
4216
      Py_INCREF(__pyx_v_target_parent_id);
 
4217
      PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_target_parent_id);
 
4218
      __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
 
4219
      Py_INCREF(__pyx_v_old_basename);
 
4220
      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_old_basename);
 
4221
      __pyx_9 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_1); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
 
4222
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
4223
      __pyx_1 = __Pyx_GetItemInt(__pyx_9, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
 
4224
      Py_DECREF(__pyx_9); __pyx_9 = 0;
 
4225
      __pyx_9 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
 
4226
      __pyx_10 = __Pyx_GetItemInt(__pyx_9, 1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
 
4227
      Py_DECREF(__pyx_9); __pyx_9 = 0;
 
4228
      __pyx_9 = PyTuple_New(1); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
 
4229
      PyTuple_SET_ITEM(__pyx_9, 0, __pyx_10);
 
4230
      __pyx_10 = 0;
 
4231
      __pyx_10 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_9); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
 
4232
      Py_DECREF(__pyx_9); __pyx_9 = 0;
 
4233
      __pyx_9 = __Pyx_GetItemInt(__pyx_10, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
 
4234
      Py_DECREF(__pyx_10); __pyx_10 = 0;
 
4235
      __pyx_10 = PyTuple_New(2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; goto __pyx_L1;}
 
4236
      PyTuple_SET_ITEM(__pyx_10, 0, __pyx_1);
 
4237
      PyTuple_SET_ITEM(__pyx_10, 1, __pyx_9);
 
4238
      __pyx_1 = 0;
 
4239
      __pyx_9 = 0;
 
4240
      __pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; goto __pyx_L1;}
 
4241
      Py_INCREF(__pyx_v_source_kind);
 
4242
      PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_source_kind);
 
4243
      Py_INCREF(__pyx_v_target_kind);
 
4244
      PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_target_kind);
 
4245
      __pyx_9 = PyTuple_New(2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; goto __pyx_L1;}
 
4246
      Py_INCREF(__pyx_v_source_exec);
 
4247
      PyTuple_SET_ITEM(__pyx_9, 0, __pyx_v_source_exec);
 
4248
      Py_INCREF(__pyx_v_target_exec);
 
4249
      PyTuple_SET_ITEM(__pyx_9, 1, __pyx_v_target_exec);
 
4250
      __pyx_11 = PyTuple_New(8); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; goto __pyx_L1;}
 
4251
      PyTuple_SET_ITEM(__pyx_11, 0, __pyx_6);
 
4252
      PyTuple_SET_ITEM(__pyx_11, 1, __pyx_3);
 
4253
      PyTuple_SET_ITEM(__pyx_11, 2, __pyx_7);
 
4254
      PyTuple_SET_ITEM(__pyx_11, 3, __pyx_8);
 
4255
      PyTuple_SET_ITEM(__pyx_11, 4, __pyx_4);
 
4256
      PyTuple_SET_ITEM(__pyx_11, 5, __pyx_10);
 
4257
      PyTuple_SET_ITEM(__pyx_11, 6, __pyx_1);
 
4258
      PyTuple_SET_ITEM(__pyx_11, 7, __pyx_9);
 
4259
      __pyx_6 = 0;
 
4260
      __pyx_3 = 0;
 
4261
      __pyx_7 = 0;
 
4262
      __pyx_8 = 0;
 
4263
      __pyx_4 = 0;
 
4264
      __pyx_10 = 0;
 
4265
      __pyx_1 = 0;
 
4266
      __pyx_9 = 0;
 
4267
      __pyx_r = __pyx_11;
 
4268
      __pyx_11 = 0;
 
4269
      goto __pyx_L0;
 
4270
      goto __pyx_L30;
 
4271
    }
 
4272
    /*else*/ {
 
4273
      Py_INCREF(__pyx_v_self->uninteresting);
 
4274
      __pyx_r = __pyx_v_self->uninteresting;
 
4275
      goto __pyx_L0;
 
4276
    }
 
4277
    __pyx_L30:;
 
4278
    goto __pyx_L5;
 
4279
  }
 
4280
  __pyx_5 = (__pyx_v_source_minikind == 'a');
 
4281
  if (__pyx_5) {
 
4282
    __pyx_5 = __pyx_f_19_dirstate_helpers_c__versioned_minikind(__pyx_v_target_minikind);
 
4283
  }
 
4284
  if (__pyx_5) {
 
4285
 
 
4286
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1251 */
 
4287
    __pyx_6 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; goto __pyx_L1;}
 
4288
    __pyx_3 = __Pyx_GetItemInt(__pyx_6, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; goto __pyx_L1;}
 
4289
    Py_DECREF(__pyx_6); __pyx_6 = 0;
 
4290
    __pyx_7 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; goto __pyx_L1;}
 
4291
    __pyx_8 = __Pyx_GetItemInt(__pyx_7, 1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; goto __pyx_L1;}
 
4292
    Py_DECREF(__pyx_7); __pyx_7 = 0;
 
4293
    __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; goto __pyx_L1;}
 
4294
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
 
4295
    PyTuple_SET_ITEM(__pyx_4, 1, __pyx_8);
 
4296
    __pyx_3 = 0;
 
4297
    __pyx_8 = 0;
 
4298
    __pyx_10 = PyObject_CallObject(__pyx_v_self->pathjoin, __pyx_4); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; goto __pyx_L1;}
 
4299
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
4300
    Py_DECREF(__pyx_v_path);
 
4301
    __pyx_v_path = __pyx_10;
 
4302
    __pyx_10 = 0;
 
4303
 
 
4304
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1254 */
 
4305
    __pyx_1 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__get_entry); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; goto __pyx_L1;}
 
4306
    __pyx_9 = PyInt_FromLong(__pyx_v_self->target_index); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; goto __pyx_L1;}
 
4307
    __pyx_11 = PyTuple_New(1); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; goto __pyx_L1;}
 
4308
    PyTuple_SET_ITEM(__pyx_11, 0, __pyx_9);
 
4309
    __pyx_9 = 0;
 
4310
    __pyx_6 = PyDict_New(); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; goto __pyx_L1;}
 
4311
    __pyx_7 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1255; goto __pyx_L1;}
 
4312
    __pyx_3 = __Pyx_GetItemInt(__pyx_7, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1255; goto __pyx_L1;}
 
4313
    Py_DECREF(__pyx_7); __pyx_7 = 0;
 
4314
    if (PyDict_SetItem(__pyx_6, __pyx_n_path_utf8, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; goto __pyx_L1;}
 
4315
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
4316
    __pyx_8 = PyEval_CallObjectWithKeywords(__pyx_1, __pyx_11, __pyx_6); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; goto __pyx_L1;}
 
4317
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
4318
    Py_DECREF(__pyx_11); __pyx_11 = 0;
 
4319
    Py_DECREF(__pyx_6); __pyx_6 = 0;
 
4320
    Py_DECREF(__pyx_v_parent_entry);
 
4321
    __pyx_v_parent_entry = __pyx_8;
 
4322
    __pyx_8 = 0;
 
4323
 
 
4324
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1256 */
 
4325
    __pyx_2 = __pyx_v_parent_entry == Py_None;
 
4326
    if (__pyx_2) {
 
4327
      __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_errors); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; goto __pyx_L1;}
 
4328
      __pyx_10 = PyObject_GetAttr(__pyx_4, __pyx_n_DirstateCorrupt); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; goto __pyx_L1;}
 
4329
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
4330
      __pyx_9 = PyInt_FromLong(__pyx_v_self->target_index); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; goto __pyx_L1;}
 
4331
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; goto __pyx_L1;}
 
4332
      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; goto __pyx_L1;}
 
4333
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_9);
 
4334
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_7);
 
4335
      __pyx_9 = 0;
 
4336
      __pyx_7 = 0;
 
4337
      __pyx_1 = PyNumber_Remainder(__pyx_k71p, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1260; goto __pyx_L1;}
 
4338
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
4339
      __pyx_11 = PyTuple_New(2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; goto __pyx_L1;}
 
4340
      Py_INCREF(__pyx_v_self->state);
 
4341
      PyTuple_SET_ITEM(__pyx_11, 0, __pyx_v_self->state);
 
4342
      PyTuple_SET_ITEM(__pyx_11, 1, __pyx_1);
 
4343
      __pyx_1 = 0;
 
4344
      __pyx_6 = PyObject_CallObject(__pyx_10, __pyx_11); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; goto __pyx_L1;}
 
4345
      Py_DECREF(__pyx_10); __pyx_10 = 0;
 
4346
      Py_DECREF(__pyx_11); __pyx_11 = 0;
 
4347
      __Pyx_Raise(__pyx_6, 0, 0);
 
4348
      Py_DECREF(__pyx_6); __pyx_6 = 0;
 
4349
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1257; goto __pyx_L1;}
 
4350
      goto __pyx_L33;
 
4351
    }
 
4352
    __pyx_L33:;
 
4353
 
 
4354
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1261 */
 
4355
    __pyx_8 = __Pyx_GetItemInt(__pyx_v_parent_entry, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; goto __pyx_L1;}
 
4356
    __pyx_4 = __Pyx_GetItemInt(__pyx_8, 2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1261; goto __pyx_L1;}
 
4357
    Py_DECREF(__pyx_8); __pyx_8 = 0;
 
4358
    Py_DECREF(__pyx_v_parent_id);
 
4359
    __pyx_v_parent_id = __pyx_4;
 
4360
    __pyx_4 = 0;
 
4361
 
 
4362
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1262 */
 
4363
    __pyx_9 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; goto __pyx_L1;}
 
4364
    __pyx_7 = __Pyx_GetItemInt(__pyx_9, 2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; goto __pyx_L1;}
 
4365
    Py_DECREF(__pyx_9); __pyx_9 = 0;
 
4366
    if (PyObject_Cmp(__pyx_v_parent_id, __pyx_7, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; goto __pyx_L1;}
 
4367
    __pyx_5 = __pyx_5 == 0;
 
4368
    Py_DECREF(__pyx_7); __pyx_7 = 0;
 
4369
    if (__pyx_5) {
 
4370
      Py_INCREF(Py_None);
 
4371
      Py_DECREF(__pyx_v_parent_id);
 
4372
      __pyx_v_parent_id = Py_None;
 
4373
      goto __pyx_L34;
 
4374
    }
 
4375
    __pyx_L34:;
 
4376
 
 
4377
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1264 */
 
4378
    __pyx_2 = __pyx_v_path_info != Py_None;
 
4379
    if (__pyx_2) {
 
4380
 
 
4381
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1266 */
 
4382
      __pyx_5 = PyObject_IsTrue(__pyx_v_self->use_filesystem_for_exec); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; goto __pyx_L1;}
 
4383
      if (__pyx_5) {
 
4384
        __pyx_1 = __Pyx_GetItemInt(__pyx_v_path_info, 3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; goto __pyx_L1;}
 
4385
        __pyx_10 = PyObject_GetAttr(__pyx_1, __pyx_n_st_mode); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; goto __pyx_L1;}
 
4386
        Py_DECREF(__pyx_1); __pyx_1 = 0;
 
4387
        __pyx_2 = PyInt_AsLong(__pyx_10); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; goto __pyx_L1;}
 
4388
        Py_DECREF(__pyx_10); __pyx_10 = 0;
 
4389
        __pyx_3 = PyInt_FromLong(S_ISREG(__pyx_2)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1270; goto __pyx_L1;}
 
4390
        __pyx_5 = PyObject_IsTrue(__pyx_3); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;}
 
4391
        if (__pyx_5) {
 
4392
          Py_DECREF(__pyx_3); __pyx_3 = 0;
 
4393
          __pyx_11 = PyInt_FromLong(S_IXUSR); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;}
 
4394
          __pyx_6 = __Pyx_GetItemInt(__pyx_v_path_info, 3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;}
 
4395
          __pyx_8 = PyObject_GetAttr(__pyx_6, __pyx_n_st_mode); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;}
 
4396
          Py_DECREF(__pyx_6); __pyx_6 = 0;
 
4397
          __pyx_3 = PyNumber_And(__pyx_11, __pyx_8); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;}
 
4398
          Py_DECREF(__pyx_11); __pyx_11 = 0;
 
4399
          Py_DECREF(__pyx_8); __pyx_8 = 0;
 
4400
        }
 
4401
        __pyx_2 = PyObject_IsTrue(__pyx_3); if (__pyx_2 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; goto __pyx_L1;}
 
4402
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
4403
        __pyx_4 = PyInt_FromLong(__pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1269; goto __pyx_L1;}
 
4404
        Py_DECREF(__pyx_v_target_exec);
 
4405
        __pyx_v_target_exec = __pyx_4;
 
4406
        __pyx_4 = 0;
 
4407
        goto __pyx_L36;
 
4408
      }
 
4409
      /*else*/ {
 
4410
        __pyx_9 = __Pyx_GetItemInt(__pyx_v_target_details, 3); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; goto __pyx_L1;}
 
4411
        Py_DECREF(__pyx_v_target_exec);
 
4412
        __pyx_v_target_exec = __pyx_9;
 
4413
        __pyx_9 = 0;
 
4414
      }
 
4415
      __pyx_L36:;
 
4416
 
 
4417
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1274 */
 
4418
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; goto __pyx_L1;}
 
4419
      __pyx_1 = __Pyx_GetItemInt(__pyx_7, 2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; goto __pyx_L1;}
 
4420
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
4421
      __pyx_10 = PyTuple_New(1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; goto __pyx_L1;}
 
4422
      Py_INCREF(__pyx_v_path);
 
4423
      PyTuple_SET_ITEM(__pyx_10, 0, __pyx_v_path);
 
4424
      __pyx_6 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_10); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; goto __pyx_L1;}
 
4425
      Py_DECREF(__pyx_10); __pyx_10 = 0;
 
4426
      __pyx_11 = __Pyx_GetItemInt(__pyx_6, 0); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; goto __pyx_L1;}
 
4427
      Py_DECREF(__pyx_6); __pyx_6 = 0;
 
4428
      __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1275; goto __pyx_L1;}
 
4429
      Py_INCREF(Py_None);
 
4430
      PyTuple_SET_ITEM(__pyx_8, 0, Py_None);
 
4431
      PyTuple_SET_ITEM(__pyx_8, 1, __pyx_11);
 
4432
      __pyx_11 = 0;
 
4433
      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; goto __pyx_L1;}
 
4434
      Py_INCREF(Py_False);
 
4435
      PyTuple_SET_ITEM(__pyx_3, 0, Py_False);
 
4436
      Py_INCREF(Py_True);
 
4437
      PyTuple_SET_ITEM(__pyx_3, 1, Py_True);
 
4438
      __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; goto __pyx_L1;}
 
4439
      Py_INCREF(Py_None);
 
4440
      PyTuple_SET_ITEM(__pyx_4, 0, Py_None);
 
4441
      Py_INCREF(__pyx_v_parent_id);
 
4442
      PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_parent_id);
 
4443
      __pyx_9 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; goto __pyx_L1;}
 
4444
      __pyx_7 = __Pyx_GetItemInt(__pyx_9, 1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; goto __pyx_L1;}
 
4445
      Py_DECREF(__pyx_9); __pyx_9 = 0;
 
4446
      __pyx_10 = PyTuple_New(1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; goto __pyx_L1;}
 
4447
      PyTuple_SET_ITEM(__pyx_10, 0, __pyx_7);
 
4448
      __pyx_7 = 0;
 
4449
      __pyx_6 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_10); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; goto __pyx_L1;}
 
4450
      Py_DECREF(__pyx_10); __pyx_10 = 0;
 
4451
      __pyx_11 = __Pyx_GetItemInt(__pyx_6, 0); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; goto __pyx_L1;}
 
4452
      Py_DECREF(__pyx_6); __pyx_6 = 0;
 
4453
      __pyx_9 = PyTuple_New(2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; goto __pyx_L1;}
 
4454
      Py_INCREF(Py_None);
 
4455
      PyTuple_SET_ITEM(__pyx_9, 0, Py_None);
 
4456
      PyTuple_SET_ITEM(__pyx_9, 1, __pyx_11);
 
4457
      __pyx_11 = 0;
 
4458
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_path_info, 2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; goto __pyx_L1;}
 
4459
      __pyx_10 = PyTuple_New(2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; goto __pyx_L1;}
 
4460
      Py_INCREF(Py_None);
 
4461
      PyTuple_SET_ITEM(__pyx_10, 0, Py_None);
 
4462
      PyTuple_SET_ITEM(__pyx_10, 1, __pyx_7);
 
4463
      __pyx_7 = 0;
 
4464
      __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; goto __pyx_L1;}
 
4465
      Py_INCREF(Py_None);
 
4466
      PyTuple_SET_ITEM(__pyx_6, 0, Py_None);
 
4467
      Py_INCREF(__pyx_v_target_exec);
 
4468
      PyTuple_SET_ITEM(__pyx_6, 1, __pyx_v_target_exec);
 
4469
      __pyx_11 = PyTuple_New(8); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1274; goto __pyx_L1;}
 
4470
      PyTuple_SET_ITEM(__pyx_11, 0, __pyx_1);
 
4471
      PyTuple_SET_ITEM(__pyx_11, 1, __pyx_8);
 
4472
      Py_INCREF(Py_True);
 
4473
      PyTuple_SET_ITEM(__pyx_11, 2, Py_True);
 
4474
      PyTuple_SET_ITEM(__pyx_11, 3, __pyx_3);
 
4475
      PyTuple_SET_ITEM(__pyx_11, 4, __pyx_4);
 
4476
      PyTuple_SET_ITEM(__pyx_11, 5, __pyx_9);
 
4477
      PyTuple_SET_ITEM(__pyx_11, 6, __pyx_10);
 
4478
      PyTuple_SET_ITEM(__pyx_11, 7, __pyx_6);
 
4479
      __pyx_1 = 0;
 
4480
      __pyx_8 = 0;
 
4481
      __pyx_3 = 0;
 
4482
      __pyx_4 = 0;
 
4483
      __pyx_9 = 0;
 
4484
      __pyx_10 = 0;
 
4485
      __pyx_6 = 0;
 
4486
      __pyx_r = __pyx_11;
 
4487
      __pyx_11 = 0;
 
4488
      goto __pyx_L0;
 
4489
      goto __pyx_L35;
 
4490
    }
 
4491
    /*else*/ {
 
4492
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;}
 
4493
      __pyx_1 = __Pyx_GetItemInt(__pyx_7, 2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;}
 
4494
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
4495
      __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; goto __pyx_L1;}
 
4496
      Py_INCREF(__pyx_v_path);
 
4497
      PyTuple_SET_ITEM(__pyx_8, 0, __pyx_v_path);
 
4498
      __pyx_3 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_8); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; goto __pyx_L1;}
 
4499
      Py_DECREF(__pyx_8); __pyx_8 = 0;
 
4500
      __pyx_4 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; goto __pyx_L1;}
 
4501
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
4502
      __pyx_9 = PyTuple_New(2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; goto __pyx_L1;}
 
4503
      Py_INCREF(Py_None);
 
4504
      PyTuple_SET_ITEM(__pyx_9, 0, Py_None);
 
4505
      PyTuple_SET_ITEM(__pyx_9, 1, __pyx_4);
 
4506
      __pyx_4 = 0;
 
4507
      __pyx_10 = PyTuple_New(2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;}
 
4508
      Py_INCREF(Py_False);
 
4509
      PyTuple_SET_ITEM(__pyx_10, 0, Py_False);
 
4510
      Py_INCREF(Py_True);
 
4511
      PyTuple_SET_ITEM(__pyx_10, 1, Py_True);
 
4512
      __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;}
 
4513
      Py_INCREF(Py_None);
 
4514
      PyTuple_SET_ITEM(__pyx_6, 0, Py_None);
 
4515
      Py_INCREF(__pyx_v_parent_id);
 
4516
      PyTuple_SET_ITEM(__pyx_6, 1, __pyx_v_parent_id);
 
4517
      __pyx_11 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;}
 
4518
      __pyx_7 = __Pyx_GetItemInt(__pyx_11, 1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;}
 
4519
      Py_DECREF(__pyx_11); __pyx_11 = 0;
 
4520
      __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;}
 
4521
      PyTuple_SET_ITEM(__pyx_8, 0, __pyx_7);
 
4522
      __pyx_7 = 0;
 
4523
      __pyx_3 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_8); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;}
 
4524
      Py_DECREF(__pyx_8); __pyx_8 = 0;
 
4525
      __pyx_4 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;}
 
4526
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
4527
      __pyx_11 = PyTuple_New(2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;}
 
4528
      Py_INCREF(Py_None);
 
4529
      PyTuple_SET_ITEM(__pyx_11, 0, Py_None);
 
4530
      PyTuple_SET_ITEM(__pyx_11, 1, __pyx_4);
 
4531
      __pyx_4 = 0;
 
4532
      __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; goto __pyx_L1;}
 
4533
      Py_INCREF(Py_None);
 
4534
      PyTuple_SET_ITEM(__pyx_7, 0, Py_None);
 
4535
      Py_INCREF(Py_None);
 
4536
      PyTuple_SET_ITEM(__pyx_7, 1, Py_None);
 
4537
      __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; goto __pyx_L1;}
 
4538
      Py_INCREF(Py_None);
 
4539
      PyTuple_SET_ITEM(__pyx_8, 0, Py_None);
 
4540
      Py_INCREF(Py_False);
 
4541
      PyTuple_SET_ITEM(__pyx_8, 1, Py_False);
 
4542
      __pyx_3 = PyTuple_New(8); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; goto __pyx_L1;}
 
4543
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
 
4544
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_9);
 
4545
      Py_INCREF(Py_False);
 
4546
      PyTuple_SET_ITEM(__pyx_3, 2, Py_False);
 
4547
      PyTuple_SET_ITEM(__pyx_3, 3, __pyx_10);
 
4548
      PyTuple_SET_ITEM(__pyx_3, 4, __pyx_6);
 
4549
      PyTuple_SET_ITEM(__pyx_3, 5, __pyx_11);
 
4550
      PyTuple_SET_ITEM(__pyx_3, 6, __pyx_7);
 
4551
      PyTuple_SET_ITEM(__pyx_3, 7, __pyx_8);
 
4552
      __pyx_1 = 0;
 
4553
      __pyx_9 = 0;
 
4554
      __pyx_10 = 0;
 
4555
      __pyx_6 = 0;
 
4556
      __pyx_11 = 0;
 
4557
      __pyx_7 = 0;
 
4558
      __pyx_8 = 0;
 
4559
      __pyx_r = __pyx_3;
 
4560
      __pyx_3 = 0;
 
4561
      goto __pyx_L0;
 
4562
    }
 
4563
    __pyx_L35:;
 
4564
    goto __pyx_L5;
 
4565
  }
 
4566
  __pyx_5 = __pyx_f_19_dirstate_helpers_c__versioned_minikind(__pyx_v_source_minikind);
 
4567
  if (__pyx_5) {
 
4568
    __pyx_5 = (__pyx_v_target_minikind == 'a');
 
4569
  }
 
4570
  if (__pyx_5) {
 
4571
 
 
4572
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1297 */
 
4573
    __pyx_4 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; goto __pyx_L1;}
 
4574
    __pyx_1 = __Pyx_GetItemInt(__pyx_4, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; goto __pyx_L1;}
 
4575
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
4576
    __pyx_9 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; goto __pyx_L1;}
 
4577
    __pyx_10 = __Pyx_GetItemInt(__pyx_9, 1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; goto __pyx_L1;}
 
4578
    Py_DECREF(__pyx_9); __pyx_9 = 0;
 
4579
    __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; goto __pyx_L1;}
 
4580
    PyTuple_SET_ITEM(__pyx_6, 0, __pyx_1);
 
4581
    PyTuple_SET_ITEM(__pyx_6, 1, __pyx_10);
 
4582
    __pyx_1 = 0;
 
4583
    __pyx_10 = 0;
 
4584
    __pyx_11 = PyObject_CallObject(__pyx_v_self->pathjoin, __pyx_6); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; goto __pyx_L1;}
 
4585
    Py_DECREF(__pyx_6); __pyx_6 = 0;
 
4586
    Py_DECREF(__pyx_v_old_path);
 
4587
    __pyx_v_old_path = __pyx_11;
 
4588
    __pyx_11 = 0;
 
4589
 
 
4590
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1299 */
 
4591
    __pyx_7 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__get_entry); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; goto __pyx_L1;}
 
4592
    __pyx_8 = PyInt_FromLong(__pyx_v_self->source_index); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; goto __pyx_L1;}
 
4593
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; goto __pyx_L1;}
 
4594
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_8);
 
4595
    __pyx_8 = 0;
 
4596
    __pyx_4 = PyDict_New(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; goto __pyx_L1;}
 
4597
    __pyx_9 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; goto __pyx_L1;}
 
4598
    __pyx_1 = __Pyx_GetItemInt(__pyx_9, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; goto __pyx_L1;}
 
4599
    Py_DECREF(__pyx_9); __pyx_9 = 0;
 
4600
    if (PyDict_SetItem(__pyx_4, __pyx_n_path_utf8, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; goto __pyx_L1;}
 
4601
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
4602
    __pyx_10 = PyEval_CallObjectWithKeywords(__pyx_7, __pyx_3, __pyx_4); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; goto __pyx_L1;}
 
4603
    Py_DECREF(__pyx_7); __pyx_7 = 0;
 
4604
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
4605
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
4606
    __pyx_6 = __Pyx_GetItemInt(__pyx_10, 0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; goto __pyx_L1;}
 
4607
    Py_DECREF(__pyx_10); __pyx_10 = 0;
 
4608
    __pyx_11 = __Pyx_GetItemInt(__pyx_6, 2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; goto __pyx_L1;}
 
4609
    Py_DECREF(__pyx_6); __pyx_6 = 0;
 
4610
    Py_DECREF(__pyx_v_parent_id);
 
4611
    __pyx_v_parent_id = __pyx_11;
 
4612
    __pyx_11 = 0;
 
4613
 
 
4614
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1300 */
 
4615
    __pyx_8 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; goto __pyx_L1;}
 
4616
    __pyx_9 = __Pyx_GetItemInt(__pyx_8, 2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; goto __pyx_L1;}
 
4617
    Py_DECREF(__pyx_8); __pyx_8 = 0;
 
4618
    if (PyObject_Cmp(__pyx_v_parent_id, __pyx_9, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; goto __pyx_L1;}
 
4619
    __pyx_2 = __pyx_2 == 0;
 
4620
    Py_DECREF(__pyx_9); __pyx_9 = 0;
 
4621
    if (__pyx_2) {
 
4622
      Py_INCREF(Py_None);
 
4623
      Py_DECREF(__pyx_v_parent_id);
 
4624
      __pyx_v_parent_id = Py_None;
 
4625
      goto __pyx_L37;
 
4626
    }
 
4627
    __pyx_L37:;
 
4628
 
 
4629
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1302 */
 
4630
    __pyx_1 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; goto __pyx_L1;}
 
4631
    __pyx_7 = __Pyx_GetItemInt(__pyx_1, 2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; goto __pyx_L1;}
 
4632
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
4633
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; goto __pyx_L1;}
 
4634
    Py_INCREF(__pyx_v_old_path);
 
4635
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_old_path);
 
4636
    __pyx_4 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; goto __pyx_L1;}
 
4637
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
4638
    __pyx_10 = __Pyx_GetItemInt(__pyx_4, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; goto __pyx_L1;}
 
4639
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
4640
    __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; goto __pyx_L1;}
 
4641
    PyTuple_SET_ITEM(__pyx_6, 0, __pyx_10);
 
4642
    Py_INCREF(Py_None);
 
4643
    PyTuple_SET_ITEM(__pyx_6, 1, Py_None);
 
4644
    __pyx_10 = 0;
 
4645
    __pyx_11 = PyTuple_New(2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; goto __pyx_L1;}
 
4646
    Py_INCREF(Py_True);
 
4647
    PyTuple_SET_ITEM(__pyx_11, 0, Py_True);
 
4648
    Py_INCREF(Py_False);
 
4649
    PyTuple_SET_ITEM(__pyx_11, 1, Py_False);
 
4650
    __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;}
 
4651
    Py_INCREF(__pyx_v_parent_id);
 
4652
    PyTuple_SET_ITEM(__pyx_8, 0, __pyx_v_parent_id);
 
4653
    Py_INCREF(Py_None);
 
4654
    PyTuple_SET_ITEM(__pyx_8, 1, Py_None);
 
4655
    __pyx_9 = __Pyx_GetItemInt(__pyx_v_entry, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;}
 
4656
    __pyx_1 = __Pyx_GetItemInt(__pyx_9, 1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;}
 
4657
    Py_DECREF(__pyx_9); __pyx_9 = 0;
 
4658
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;}
 
4659
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
 
4660
    __pyx_1 = 0;
 
4661
    __pyx_4 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;}
 
4662
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
4663
    __pyx_10 = __Pyx_GetItemInt(__pyx_4, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;}
 
4664
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
4665
    __pyx_9 = PyTuple_New(2); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;}
 
4666
    PyTuple_SET_ITEM(__pyx_9, 0, __pyx_10);
 
4667
    Py_INCREF(Py_None);
 
4668
    PyTuple_SET_ITEM(__pyx_9, 1, Py_None);
 
4669
    __pyx_10 = 0;
 
4670
    __pyx_1 = __pyx_f_19_dirstate_helpers_c__minikind_to_kind(__pyx_v_source_minikind); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; goto __pyx_L1;}
 
4671
    __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; goto __pyx_L1;}
 
4672
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
 
4673
    Py_INCREF(Py_None);
 
4674
    PyTuple_SET_ITEM(__pyx_3, 1, Py_None);
 
4675
    __pyx_1 = 0;
 
4676
    __pyx_4 = __Pyx_GetItemInt(__pyx_v_source_details, 3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; goto __pyx_L1;}
 
4677
    __pyx_10 = PyTuple_New(2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; goto __pyx_L1;}
 
4678
    PyTuple_SET_ITEM(__pyx_10, 0, __pyx_4);
 
4679
    Py_INCREF(Py_None);
 
4680
    PyTuple_SET_ITEM(__pyx_10, 1, Py_None);
 
4681
    __pyx_4 = 0;
 
4682
    __pyx_1 = PyTuple_New(8); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; goto __pyx_L1;}
 
4683
    PyTuple_SET_ITEM(__pyx_1, 0, __pyx_7);
 
4684
    PyTuple_SET_ITEM(__pyx_1, 1, __pyx_6);
 
4685
    Py_INCREF(Py_True);
 
4686
    PyTuple_SET_ITEM(__pyx_1, 2, Py_True);
 
4687
    PyTuple_SET_ITEM(__pyx_1, 3, __pyx_11);
 
4688
    PyTuple_SET_ITEM(__pyx_1, 4, __pyx_8);
 
4689
    PyTuple_SET_ITEM(__pyx_1, 5, __pyx_9);
 
4690
    PyTuple_SET_ITEM(__pyx_1, 6, __pyx_3);
 
4691
    PyTuple_SET_ITEM(__pyx_1, 7, __pyx_10);
 
4692
    __pyx_7 = 0;
 
4693
    __pyx_6 = 0;
 
4694
    __pyx_11 = 0;
 
4695
    __pyx_8 = 0;
 
4696
    __pyx_9 = 0;
 
4697
    __pyx_3 = 0;
 
4698
    __pyx_10 = 0;
 
4699
    __pyx_r = __pyx_1;
 
4700
    __pyx_1 = 0;
 
4701
    goto __pyx_L0;
 
4702
    goto __pyx_L5;
 
4703
  }
 
4704
  __pyx_5 = __pyx_f_19_dirstate_helpers_c__versioned_minikind(__pyx_v_source_minikind);
 
4705
  if (__pyx_5) {
 
4706
    __pyx_5 = (__pyx_v_target_minikind == 'r');
 
4707
  }
 
4708
  if (__pyx_5) {
 
4709
    __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; goto __pyx_L1;}
 
4710
    __pyx_7 = PyObject_GetAttr(__pyx_4, __pyx_n_is_inside_any); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; goto __pyx_L1;}
 
4711
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
4712
    __pyx_6 = __Pyx_GetItemInt(__pyx_v_target_details, 1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; goto __pyx_L1;}
 
4713
    __pyx_11 = PyTuple_New(2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; goto __pyx_L1;}
 
4714
    Py_INCREF(__pyx_v_self->searched_specific_files);
 
4715
    PyTuple_SET_ITEM(__pyx_11, 0, __pyx_v_self->searched_specific_files);
 
4716
    PyTuple_SET_ITEM(__pyx_11, 1, __pyx_6);
 
4717
    __pyx_6 = 0;
 
4718
    __pyx_8 = PyObject_CallObject(__pyx_7, __pyx_11); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; goto __pyx_L1;}
 
4719
    Py_DECREF(__pyx_7); __pyx_7 = 0;
 
4720
    Py_DECREF(__pyx_11); __pyx_11 = 0;
 
4721
    __pyx_2 = PyObject_IsTrue(__pyx_8); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; goto __pyx_L1;}
 
4722
    Py_DECREF(__pyx_8); __pyx_8 = 0;
 
4723
    __pyx_5 = (!__pyx_2);
 
4724
    if (__pyx_5) {
 
4725
      __pyx_9 = PyObject_GetAttr(__pyx_v_self->search_specific_files, __pyx_n_add); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; goto __pyx_L1;}
 
4726
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_target_details, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; goto __pyx_L1;}
 
4727
      __pyx_10 = PyTuple_New(1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; goto __pyx_L1;}
 
4728
      PyTuple_SET_ITEM(__pyx_10, 0, __pyx_3);
 
4729
      __pyx_3 = 0;
 
4730
      __pyx_1 = PyObject_CallObject(__pyx_9, __pyx_10); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; goto __pyx_L1;}
 
4731
      Py_DECREF(__pyx_9); __pyx_9 = 0;
 
4732
      Py_DECREF(__pyx_10); __pyx_10 = 0;
 
4733
      Py_DECREF(__pyx_1); __pyx_1 = 0;
 
4734
      goto __pyx_L38;
 
4735
    }
 
4736
    __pyx_L38:;
 
4737
    goto __pyx_L5;
 
4738
  }
 
4739
  __pyx_2 = (__pyx_v_source_minikind == 'r');
 
4740
  if (!__pyx_2) {
 
4741
    __pyx_2 = (__pyx_v_source_minikind == 'a');
 
4742
  }
 
4743
  if (__pyx_2) {
 
4744
    __pyx_2 = (__pyx_v_target_minikind == 'r');
 
4745
    if (!__pyx_2) {
 
4746
      __pyx_2 = (__pyx_v_target_minikind == 'a');
 
4747
    }
 
4748
  }
 
4749
  if (__pyx_2) {
 
4750
    goto __pyx_L5;
 
4751
  }
 
4752
  /*else*/ {
 
4753
    __pyx_4 = PyInt_FromLong(__pyx_v_source_minikind); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; goto __pyx_L1;}
 
4754
    __pyx_6 = PyInt_FromLong(__pyx_v_target_minikind); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; goto __pyx_L1;}
 
4755
    __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; goto __pyx_L1;}
 
4756
    PyTuple_SET_ITEM(__pyx_7, 0, __pyx_4);
 
4757
    PyTuple_SET_ITEM(__pyx_7, 1, __pyx_6);
 
4758
    __pyx_4 = 0;
 
4759
    __pyx_6 = 0;
 
4760
    __pyx_11 = PyNumber_Remainder(__pyx_k73p, __pyx_7); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; goto __pyx_L1;}
 
4761
    Py_DECREF(__pyx_7); __pyx_7 = 0;
 
4762
    __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; goto __pyx_L1;}
 
4763
    PyTuple_SET_ITEM(__pyx_8, 0, __pyx_11);
 
4764
    __pyx_11 = 0;
 
4765
    __pyx_3 = PyObject_CallObject(PyExc_AssertionError, __pyx_8); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; goto __pyx_L1;}
 
4766
    Py_DECREF(__pyx_8); __pyx_8 = 0;
 
4767
    __Pyx_Raise(__pyx_3, 0, 0);
 
4768
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
4769
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1324; goto __pyx_L1;}
 
4770
  }
 
4771
  __pyx_L5:;
 
4772
 
 
4773
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1328 */
 
4774
  Py_INCREF(Py_None);
 
4775
  __pyx_r = Py_None;
 
4776
  goto __pyx_L0;
 
4777
 
 
4778
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
4779
  goto __pyx_L0;
 
4780
  __pyx_L1:;
 
4781
  Py_XDECREF(__pyx_1);
 
4782
  Py_XDECREF(__pyx_3);
 
4783
  Py_XDECREF(__pyx_4);
 
4784
  Py_XDECREF(__pyx_6);
 
4785
  Py_XDECREF(__pyx_7);
 
4786
  Py_XDECREF(__pyx_8);
 
4787
  Py_XDECREF(__pyx_9);
 
4788
  Py_XDECREF(__pyx_10);
 
4789
  Py_XDECREF(__pyx_11);
 
4790
  __Pyx_AddTraceback("_dirstate_helpers_c.ProcessEntryC._process_entry");
 
4791
  __pyx_r = 0;
 
4792
  __pyx_L0:;
 
4793
  Py_DECREF(__pyx_v_file_id);
 
4794
  Py_DECREF(__pyx_v_details_list);
 
4795
  Py_DECREF(__pyx_v_source_details);
 
4796
  Py_DECREF(__pyx_v_target_details);
 
4797
  Py_DECREF(__pyx_v_link_or_sha1);
 
4798
  Py_DECREF(__pyx_v_old_dirname);
 
4799
  Py_DECREF(__pyx_v_old_basename);
 
4800
  Py_DECREF(__pyx_v_old_path);
 
4801
  Py_DECREF(__pyx_v_path);
 
4802
  Py_DECREF(__pyx_v_old_entry);
 
4803
  Py_DECREF(__pyx_v_target_kind);
 
4804
  Py_DECREF(__pyx_v_target_exec);
 
4805
  Py_DECREF(__pyx_v_statvalue);
 
4806
  Py_DECREF(__pyx_v_source_parent_id);
 
4807
  Py_DECREF(__pyx_v_source_parent_entry);
 
4808
  Py_DECREF(__pyx_v_new_dirname);
 
4809
  Py_DECREF(__pyx_v_target_parent_id);
 
4810
  Py_DECREF(__pyx_v_target_parent_entry);
 
4811
  Py_DECREF(__pyx_v_source_exec);
 
4812
  Py_DECREF(__pyx_v_old_path_u);
 
4813
  Py_DECREF(__pyx_v_path_u);
 
4814
  Py_DECREF(__pyx_v_source_kind);
 
4815
  Py_DECREF(__pyx_v_parent_entry);
 
4816
  Py_DECREF(__pyx_v_parent_id);
 
4817
  Py_DECREF(__pyx_v_self);
 
4818
  Py_DECREF(__pyx_v_entry);
 
4819
  Py_DECREF(__pyx_v_path_info);
 
4820
  return __pyx_r;
 
4821
}
 
4822
 
 
4823
static PyObject *__pyx_f_19_dirstate_helpers_c_13ProcessEntryC___iter__(PyObject *__pyx_v_self); /*proto*/
 
4824
static PyObject *__pyx_f_19_dirstate_helpers_c_13ProcessEntryC___iter__(PyObject *__pyx_v_self) {
 
4825
  PyObject *__pyx_r;
 
4826
  Py_INCREF(__pyx_v_self);
 
4827
  Py_INCREF(__pyx_v_self);
 
4828
  __pyx_r = __pyx_v_self;
 
4829
  goto __pyx_L0;
 
4830
 
 
4831
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
4832
  __pyx_L0:;
 
4833
  Py_DECREF(__pyx_v_self);
 
4834
  return __pyx_r;
 
4835
}
 
4836
 
 
4837
static PyObject *__pyx_f_19_dirstate_helpers_c_13ProcessEntryC_iter_changes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
4838
static PyObject *__pyx_f_19_dirstate_helpers_c_13ProcessEntryC_iter_changes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
4839
  PyObject *__pyx_r;
 
4840
  static char *__pyx_argnames[] = {0};
 
4841
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
 
4842
  Py_INCREF(__pyx_v_self);
 
4843
  Py_INCREF(__pyx_v_self);
 
4844
  __pyx_r = __pyx_v_self;
 
4845
  goto __pyx_L0;
 
4846
 
 
4847
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
4848
  __pyx_L0:;
 
4849
  Py_DECREF(__pyx_v_self);
 
4850
  return __pyx_r;
 
4851
}
 
4852
 
 
4853
static PyObject *__pyx_n_is_inside;
 
4854
 
 
4855
static void __pyx_f_19_dirstate_helpers_c_13ProcessEntryC__update_current_block(struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *__pyx_v_self) {
 
4856
  PyObject *__pyx_1 = 0;
 
4857
  PyObject *__pyx_2 = 0;
 
4858
  Py_ssize_t __pyx_3;
 
4859
  int __pyx_4;
 
4860
  PyObject *__pyx_5 = 0;
 
4861
  PyObject *__pyx_6 = 0;
 
4862
  Py_INCREF(__pyx_v_self);
 
4863
  __pyx_2 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__dirblocks); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; goto __pyx_L1;}
 
4864
  __pyx_3 = PyObject_Length(__pyx_2); if (__pyx_3 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; goto __pyx_L1;}
 
4865
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
4866
  __pyx_1 = PyInt_FromLong((__pyx_v_self->block_index < __pyx_3)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; goto __pyx_L1;}
 
4867
  __pyx_4 = PyObject_IsTrue(__pyx_1); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; goto __pyx_L1;}
 
4868
  if (__pyx_4) {
 
4869
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
4870
    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;}
 
4871
    __pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_is_inside); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;}
 
4872
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
4873
    __pyx_2 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__dirblocks); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;}
 
4874
    __pyx_6 = __Pyx_GetItemInt(__pyx_2, __pyx_v_self->block_index); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;}
 
4875
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
4876
    __pyx_2 = __Pyx_GetItemInt(__pyx_6, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;}
 
4877
    Py_DECREF(__pyx_6); __pyx_6 = 0;
 
4878
    __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;}
 
4879
    Py_INCREF(__pyx_v_self->current_root);
 
4880
    PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_self->current_root);
 
4881
    PyTuple_SET_ITEM(__pyx_6, 1, __pyx_2);
 
4882
    __pyx_2 = 0;
 
4883
    __pyx_1 = PyObject_CallObject(__pyx_5, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; goto __pyx_L1;}
 
4884
    Py_DECREF(__pyx_5); __pyx_5 = 0;
 
4885
    Py_DECREF(__pyx_6); __pyx_6 = 0;
 
4886
  }
 
4887
  __pyx_4 = PyObject_IsTrue(__pyx_1); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; goto __pyx_L1;}
 
4888
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
4889
  if (__pyx_4) {
 
4890
 
 
4891
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1339 */
 
4892
    __pyx_2 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__dirblocks); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;}
 
4893
    __pyx_5 = __Pyx_GetItemInt(__pyx_2, __pyx_v_self->block_index); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; goto __pyx_L1;}
 
4894
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
4895
    Py_DECREF(__pyx_v_self->current_block);
 
4896
    __pyx_v_self->current_block = __pyx_5;
 
4897
    __pyx_5 = 0;
 
4898
 
 
4899
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1340 */
 
4900
    __pyx_6 = __Pyx_GetItemInt(__pyx_v_self->current_block, 1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; goto __pyx_L1;}
 
4901
    Py_DECREF(__pyx_v_self->current_block_list);
 
4902
    __pyx_v_self->current_block_list = __pyx_6;
 
4903
    __pyx_6 = 0;
 
4904
 
 
4905
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1341 */
 
4906
    __pyx_v_self->current_block_pos = 0;
 
4907
    goto __pyx_L2;
 
4908
  }
 
4909
  /*else*/ {
 
4910
 
 
4911
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1343 */
 
4912
    Py_INCREF(Py_None);
 
4913
    Py_DECREF(__pyx_v_self->current_block);
 
4914
    __pyx_v_self->current_block = Py_None;
 
4915
 
 
4916
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1344 */
 
4917
    Py_INCREF(Py_None);
 
4918
    Py_DECREF(__pyx_v_self->current_block_list);
 
4919
    __pyx_v_self->current_block_list = Py_None;
 
4920
  }
 
4921
  __pyx_L2:;
 
4922
 
 
4923
  goto __pyx_L0;
 
4924
  __pyx_L1:;
 
4925
  Py_XDECREF(__pyx_1);
 
4926
  Py_XDECREF(__pyx_2);
 
4927
  Py_XDECREF(__pyx_5);
 
4928
  Py_XDECREF(__pyx_6);
 
4929
  __Pyx_WriteUnraisable("_dirstate_helpers_c.ProcessEntryC._update_current_block");
 
4930
  __pyx_L0:;
 
4931
  Py_DECREF(__pyx_v_self);
 
4932
}
 
4933
 
 
4934
static PyObject *__pyx_f_19_dirstate_helpers_c_13ProcessEntryC___next__(PyObject *__pyx_v_self); /*proto*/
 
4935
static PyObject *__pyx_f_19_dirstate_helpers_c_13ProcessEntryC___next__(PyObject *__pyx_v_self) {
 
4936
  PyObject *__pyx_r;
 
4937
  PyObject *__pyx_1 = 0;
 
4938
  Py_INCREF(__pyx_v_self);
 
4939
  __pyx_1 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC *)((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)->__pyx_vtab)->_iter_next(((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; goto __pyx_L1;}
 
4940
  __pyx_r = __pyx_1;
 
4941
  __pyx_1 = 0;
 
4942
  goto __pyx_L0;
 
4943
 
 
4944
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
4945
  goto __pyx_L0;
 
4946
  __pyx_L1:;
 
4947
  Py_XDECREF(__pyx_1);
 
4948
  __Pyx_AddTraceback("_dirstate_helpers_c.ProcessEntryC.__next__");
 
4949
  __pyx_r = 0;
 
4950
  __pyx_L0:;
 
4951
  Py_DECREF(__pyx_v_self);
 
4952
  return __pyx_r;
 
4953
}
 
4954
 
 
4955
static PyObject *__pyx_n_pop;
 
4956
static PyObject *__pyx_n_decode;
 
4957
static PyObject *__pyx_n_utf8;
 
4958
static PyObject *__pyx_n__entries_for_path;
 
4959
static PyObject *__pyx_n_abspath;
 
4960
static PyObject *__pyx_n_lstat;
 
4961
static PyObject *__pyx_n_ENOENT;
 
4962
static PyObject *__pyx_n_file_kind_from_stat_mode;
 
4963
static PyObject *__pyx_n__directory_is_tree_reference;
 
4964
static PyObject *__pyx_n_S_ISREG;
 
4965
static PyObject *__pyx_n_S_IEXEC;
 
4966
static PyObject *__pyx_n__walkdirs_utf8;
 
4967
static PyObject *__pyx_n_prefix;
 
4968
static PyObject *__pyx_n_next;
 
4969
static PyObject *__pyx_n_ENOTDIR;
 
4970
static PyObject *__pyx_n_EINVAL;
 
4971
static PyObject *__pyx_n_platform;
 
4972
static PyObject *__pyx_n_win32;
 
4973
static PyObject *__pyx_n_winerror;
 
4974
static PyObject *__pyx_n_AttributeError;
 
4975
static PyObject *__pyx_n__find_block_index_from_key;
 
4976
 
 
4977
static PyObject *__pyx_k75p;
 
4978
static PyObject *__pyx_k77p;
 
4979
static PyObject *__pyx_k78p;
 
4980
static PyObject *__pyx_k81p;
 
4981
static PyObject *__pyx_k82p;
 
4982
static PyObject *__pyx_k83p;
 
4983
static PyObject *__pyx_k84p;
 
4984
static PyObject *__pyx_k85p;
 
4985
static PyObject *__pyx_k87p;
 
4986
static PyObject *__pyx_k89p;
 
4987
 
 
4988
static char __pyx_k75[] = "";
 
4989
static char __pyx_k77[] = "tree-reference";
 
4990
static char __pyx_k78[] = "tree-reference";
 
4991
static char __pyx_k81[] = "";
 
4992
static char __pyx_k82[] = ".bzr";
 
4993
static char __pyx_k83[] = ".bzr";
 
4994
static char __pyx_k84[] = "";
 
4995
static char __pyx_k85[] = "";
 
4996
static char __pyx_k87[] = "tree-reference";
 
4997
static char __pyx_k89[] = "tree-reference";
 
4998
 
 
4999
static PyObject *__pyx_f_19_dirstate_helpers_c_13ProcessEntryC__iter_next(struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *__pyx_v_self) {
 
5000
  PyObject *__pyx_v_current_dirname;
 
5001
  PyObject *__pyx_v_current_blockname;
 
5002
  char *__pyx_v_current_dirname_c;
 
5003
  char *__pyx_v_current_blockname_c;
 
5004
  int __pyx_v_path_handled;
 
5005
  PyObject *__pyx_v_uninteresting;
 
5006
  PyObject *__pyx_v_searched_specific_files;
 
5007
  PyObject *__pyx_v_entry;
 
5008
  PyObject *__pyx_v_result;
 
5009
  PyObject *__pyx_v_root_stat;
 
5010
  PyObject *__pyx_v_e;
 
5011
  PyObject *__pyx_v_new_executable;
 
5012
  PyObject *__pyx_v_e_winerror;
 
5013
  PyObject *__pyx_v_win_errors;
 
5014
  PyObject *__pyx_v_bzr_index;
 
5015
  PyObject *__pyx_v_initial_key;
 
5016
  PyObject *__pyx_v__;
 
5017
  PyObject *__pyx_v_current_path_info;
 
5018
  PyObject *__pyx_v_current_entry;
 
5019
  PyObject *__pyx_r;
 
5020
  int __pyx_1;
 
5021
  PyObject *__pyx_2 = 0;
 
5022
  PyObject *__pyx_3 = 0;
 
5023
  PyObject *__pyx_4 = 0;
 
5024
  PyObject *__pyx_5 = 0;
 
5025
  Py_ssize_t __pyx_6;
 
5026
  PyObject *__pyx_7 = 0;
 
5027
  PyObject *__pyx_8 = 0;
 
5028
  int __pyx_9;
 
5029
  PyObject *__pyx_10 = 0;
 
5030
  PyObject *__pyx_11 = 0;
 
5031
  Py_INCREF(__pyx_v_self);
 
5032
  __pyx_v_current_dirname = Py_None; Py_INCREF(Py_None);
 
5033
  __pyx_v_current_blockname = Py_None; Py_INCREF(Py_None);
 
5034
  __pyx_v_uninteresting = Py_None; Py_INCREF(Py_None);
 
5035
  __pyx_v_searched_specific_files = Py_None; Py_INCREF(Py_None);
 
5036
  __pyx_v_entry = Py_None; Py_INCREF(Py_None);
 
5037
  __pyx_v_result = Py_None; Py_INCREF(Py_None);
 
5038
  __pyx_v_root_stat = Py_None; Py_INCREF(Py_None);
 
5039
  __pyx_v_e = Py_None; Py_INCREF(Py_None);
 
5040
  __pyx_v_new_executable = Py_None; Py_INCREF(Py_None);
 
5041
  __pyx_v_e_winerror = Py_None; Py_INCREF(Py_None);
 
5042
  __pyx_v_win_errors = Py_None; Py_INCREF(Py_None);
 
5043
  __pyx_v_bzr_index = Py_None; Py_INCREF(Py_None);
 
5044
  __pyx_v_initial_key = Py_None; Py_INCREF(Py_None);
 
5045
  __pyx_v__ = Py_None; Py_INCREF(Py_None);
 
5046
  __pyx_v_current_path_info = Py_None; Py_INCREF(Py_None);
 
5047
  __pyx_v_current_entry = Py_None; Py_INCREF(Py_None);
 
5048
 
 
5049
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1402 */
 
5050
  Py_INCREF(__pyx_v_self->uninteresting);
 
5051
  Py_DECREF(__pyx_v_uninteresting);
 
5052
  __pyx_v_uninteresting = __pyx_v_self->uninteresting;
 
5053
 
 
5054
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1403 */
 
5055
  Py_INCREF(__pyx_v_self->searched_specific_files);
 
5056
  Py_DECREF(__pyx_v_searched_specific_files);
 
5057
  __pyx_v_searched_specific_files = __pyx_v_self->searched_specific_files;
 
5058
 
 
5059
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1405 */
 
5060
  while (1) {
 
5061
    __pyx_1 = (__pyx_v_self->root_entries_pos < __pyx_v_self->root_entries_len);
 
5062
    if (!__pyx_1) break;
 
5063
 
 
5064
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1406 */
 
5065
    __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 = 1406; goto __pyx_L1;}
 
5066
    Py_DECREF(__pyx_v_entry);
 
5067
    __pyx_v_entry = __pyx_2;
 
5068
    __pyx_2 = 0;
 
5069
 
 
5070
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1407 */
 
5071
    __pyx_v_self->root_entries_pos = (__pyx_v_self->root_entries_pos + 1);
 
5072
 
 
5073
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1408 */
 
5074
    __pyx_2 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_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 = 1408; goto __pyx_L1;}
 
5075
    Py_DECREF(__pyx_v_result);
 
5076
    __pyx_v_result = __pyx_2;
 
5077
    __pyx_2 = 0;
 
5078
 
 
5079
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1409 */
 
5080
    __pyx_1 = __pyx_v_result != Py_None;
 
5081
    if (__pyx_1) {
 
5082
      __pyx_1 = __pyx_v_result != __pyx_v_self->uninteresting;
 
5083
    }
 
5084
    if (__pyx_1) {
 
5085
      Py_INCREF(__pyx_v_result);
 
5086
      __pyx_r = __pyx_v_result;
 
5087
      goto __pyx_L0;
 
5088
      goto __pyx_L4;
 
5089
    }
 
5090
    __pyx_L4:;
 
5091
  }
 
5092
 
 
5093
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1412 */
 
5094
  __pyx_1 = __pyx_v_self->current_root == Py_None;
 
5095
  if (__pyx_1) {
 
5096
 
 
5097
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1415 */
 
5098
    /*try:*/ {
 
5099
      __pyx_2 = PyObject_GetAttr(__pyx_v_self->search_specific_files, __pyx_n_pop); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; goto __pyx_L6;}
 
5100
      __pyx_3 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; goto __pyx_L6;}
 
5101
      Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5102
      Py_DECREF(__pyx_v_self->current_root);
 
5103
      __pyx_v_self->current_root = __pyx_3;
 
5104
      __pyx_3 = 0;
 
5105
    }
 
5106
    goto __pyx_L7;
 
5107
    __pyx_L6:;
 
5108
    Py_XDECREF(__pyx_2); __pyx_2 = 0;
 
5109
    Py_XDECREF(__pyx_3); __pyx_3 = 0;
 
5110
 
 
5111
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1417 */
 
5112
    __pyx_1 = PyErr_ExceptionMatches(PyExc_KeyError);
 
5113
    if (__pyx_1) {
 
5114
      __Pyx_AddTraceback("_dirstate_helpers_c._iter_next");
 
5115
      if (__Pyx_GetException(&__pyx_2, &__pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1417; goto __pyx_L1;}
 
5116
      __pyx_5 = PyObject_CallObject(PyExc_StopIteration, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; goto __pyx_L1;}
 
5117
      __Pyx_Raise(__pyx_5, 0, 0);
 
5118
      Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5119
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1418; goto __pyx_L1;}
 
5120
      Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5121
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5122
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5123
      goto __pyx_L7;
 
5124
    }
 
5125
    goto __pyx_L1;
 
5126
    __pyx_L7:;
 
5127
 
 
5128
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1419 */
 
5129
    __pyx_5 = PyObject_GetAttr(__pyx_v_self->current_root, __pyx_n_decode); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; goto __pyx_L1;}
 
5130
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; goto __pyx_L1;}
 
5131
    Py_INCREF(__pyx_n_utf8);
 
5132
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_utf8);
 
5133
    __pyx_3 = PyObject_CallObject(__pyx_5, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; goto __pyx_L1;}
 
5134
    Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5135
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5136
    Py_DECREF(__pyx_v_self->current_root_unicode);
 
5137
    __pyx_v_self->current_root_unicode = __pyx_3;
 
5138
    __pyx_3 = 0;
 
5139
 
 
5140
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1420 */
 
5141
    __pyx_4 = PyObject_GetAttr(__pyx_v_self->searched_specific_files, __pyx_n_add); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; goto __pyx_L1;}
 
5142
    __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; goto __pyx_L1;}
 
5143
    Py_INCREF(__pyx_v_self->current_root);
 
5144
    PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_self->current_root);
 
5145
    __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; goto __pyx_L1;}
 
5146
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5147
    Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5148
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5149
 
 
5150
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1423 */
 
5151
    __pyx_3 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n__entries_for_path); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; goto __pyx_L1;}
 
5152
    __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; goto __pyx_L1;}
 
5153
    Py_INCREF(__pyx_v_self->current_root);
 
5154
    PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_self->current_root);
 
5155
    __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; goto __pyx_L1;}
 
5156
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5157
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5158
    Py_DECREF(__pyx_v_self->root_entries);
 
5159
    __pyx_v_self->root_entries = __pyx_5;
 
5160
    __pyx_5 = 0;
 
5161
 
 
5162
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1424 */
 
5163
    __pyx_6 = PyObject_Length(__pyx_v_self->root_entries); if (__pyx_6 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; goto __pyx_L1;}
 
5164
    __pyx_v_self->root_entries_len = __pyx_6;
 
5165
 
 
5166
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1425 */
 
5167
    __pyx_2 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n_abspath); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; goto __pyx_L1;}
 
5168
    __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; goto __pyx_L1;}
 
5169
    Py_INCREF(__pyx_v_self->current_root_unicode);
 
5170
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self->current_root_unicode);
 
5171
    __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1425; goto __pyx_L1;}
 
5172
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5173
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5174
    Py_DECREF(__pyx_v_self->root_abspath);
 
5175
    __pyx_v_self->root_abspath = __pyx_4;
 
5176
    __pyx_4 = 0;
 
5177
 
 
5178
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1426 */
 
5179
    /*try:*/ {
 
5180
      __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_os); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1427; goto __pyx_L8;}
 
5181
      __pyx_2 = PyObject_GetAttr(__pyx_5, __pyx_n_lstat); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1427; goto __pyx_L8;}
 
5182
      Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5183
      __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1427; goto __pyx_L8;}
 
5184
      Py_INCREF(__pyx_v_self->root_abspath);
 
5185
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self->root_abspath);
 
5186
      __pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1427; goto __pyx_L8;}
 
5187
      Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5188
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5189
      Py_DECREF(__pyx_v_root_stat);
 
5190
      __pyx_v_root_stat = __pyx_4;
 
5191
      __pyx_4 = 0;
 
5192
    }
 
5193
    /*else:*/ {
 
5194
 
 
5195
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1436 */
 
5196
      __pyx_7 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; goto __pyx_L1;}
 
5197
      __pyx_4 = PyObject_GetAttr(__pyx_7, __pyx_n_file_kind_from_stat_mode); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; goto __pyx_L1;}
 
5198
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5199
      __pyx_8 = PyObject_GetAttr(__pyx_v_root_stat, __pyx_n_st_mode); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; goto __pyx_L1;}
 
5200
      __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; goto __pyx_L1;}
 
5201
      PyTuple_SET_ITEM(__pyx_5, 0, __pyx_8);
 
5202
      __pyx_8 = 0;
 
5203
      __pyx_2 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1437; goto __pyx_L1;}
 
5204
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5205
      Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5206
      __pyx_3 = PyTuple_New(5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1436; goto __pyx_L1;}
 
5207
      Py_INCREF(__pyx_k75p);
 
5208
      PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k75p);
 
5209
      Py_INCREF(__pyx_v_self->current_root);
 
5210
      PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_self->current_root);
 
5211
      PyTuple_SET_ITEM(__pyx_3, 2, __pyx_2);
 
5212
      Py_INCREF(__pyx_v_root_stat);
 
5213
      PyTuple_SET_ITEM(__pyx_3, 3, __pyx_v_root_stat);
 
5214
      Py_INCREF(__pyx_v_self->root_abspath);
 
5215
      PyTuple_SET_ITEM(__pyx_3, 4, __pyx_v_self->root_abspath);
 
5216
      __pyx_2 = 0;
 
5217
      Py_DECREF(__pyx_v_self->root_dir_info);
 
5218
      __pyx_v_self->root_dir_info = __pyx_3;
 
5219
      __pyx_3 = 0;
 
5220
 
 
5221
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1439 */
 
5222
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; goto __pyx_L1;}
 
5223
      if (PyObject_Cmp(__pyx_7, __pyx_n_directory, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; goto __pyx_L1;}
 
5224
      __pyx_1 = __pyx_1 == 0;
 
5225
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5226
      if (__pyx_1) {
 
5227
        __pyx_8 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n__directory_is_tree_reference); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1440; goto __pyx_L1;}
 
5228
        __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1440; goto __pyx_L1;}
 
5229
        Py_INCREF(__pyx_v_self->current_root_unicode);
 
5230
        PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_self->current_root_unicode);
 
5231
        __pyx_5 = PyObject_CallObject(__pyx_8, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1440; goto __pyx_L1;}
 
5232
        Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5233
        Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5234
        __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1440; goto __pyx_L1;}
 
5235
        Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5236
        if (__pyx_1) {
 
5237
          __pyx_2 = PySequence_GetSlice(__pyx_v_self->root_dir_info, 0, 2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; goto __pyx_L1;}
 
5238
          __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; goto __pyx_L1;}
 
5239
          Py_INCREF(__pyx_k77p);
 
5240
          PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k77p);
 
5241
          __pyx_7 = PyNumber_Add(__pyx_2, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; goto __pyx_L1;}
 
5242
          Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5243
          Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5244
          __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 = 1443; goto __pyx_L1;}
 
5245
          __pyx_4 = PyNumber_Add(__pyx_7, __pyx_8); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; goto __pyx_L1;}
 
5246
          Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5247
          Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5248
          Py_DECREF(__pyx_v_self->root_dir_info);
 
5249
          __pyx_v_self->root_dir_info = __pyx_4;
 
5250
          __pyx_4 = 0;
 
5251
          goto __pyx_L11;
 
5252
        }
 
5253
        __pyx_L11:;
 
5254
        goto __pyx_L10;
 
5255
      }
 
5256
      __pyx_L10:;
 
5257
    }
 
5258
    goto __pyx_L9;
 
5259
    __pyx_L8:;
 
5260
    Py_XDECREF(__pyx_5); __pyx_5 = 0;
 
5261
    Py_XDECREF(__pyx_2); __pyx_2 = 0;
 
5262
    Py_XDECREF(__pyx_3); __pyx_3 = 0;
 
5263
    Py_XDECREF(__pyx_4); __pyx_4 = 0;
 
5264
 
 
5265
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1428 */
 
5266
    __pyx_1 = PyErr_ExceptionMatches(PyExc_OSError);
 
5267
    if (__pyx_1) {
 
5268
      __Pyx_AddTraceback("_dirstate_helpers_c._iter_next");
 
5269
      if (__Pyx_GetException(&__pyx_5, &__pyx_2, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1428; goto __pyx_L1;}
 
5270
      Py_INCREF(__pyx_2);
 
5271
      Py_DECREF(__pyx_v_e);
 
5272
      __pyx_v_e = __pyx_2;
 
5273
      __pyx_4 = PyObject_GetAttr(__pyx_v_e, __pyx_n_errno); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1429; goto __pyx_L1;}
 
5274
      __pyx_7 = __Pyx_GetName(__pyx_m, __pyx_n_errno); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1429; goto __pyx_L1;}
 
5275
      __pyx_8 = PyObject_GetAttr(__pyx_7, __pyx_n_ENOENT); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1429; goto __pyx_L1;}
 
5276
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5277
      if (PyObject_Cmp(__pyx_4, __pyx_8, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1429; goto __pyx_L1;}
 
5278
      __pyx_1 = __pyx_1 == 0;
 
5279
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5280
      Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5281
      if (__pyx_1) {
 
5282
        Py_INCREF(Py_None);
 
5283
        Py_DECREF(__pyx_v_self->root_dir_info);
 
5284
        __pyx_v_self->root_dir_info = Py_None;
 
5285
        goto __pyx_L12;
 
5286
      }
 
5287
      /*else*/ {
 
5288
        __Pyx_Raise(__pyx_5, __pyx_2, __pyx_3);
 
5289
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1434; goto __pyx_L1;}
 
5290
      }
 
5291
      __pyx_L12:;
 
5292
      Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5293
      Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5294
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5295
      goto __pyx_L9;
 
5296
    }
 
5297
    goto __pyx_L1;
 
5298
    __pyx_L9:;
 
5299
 
 
5300
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1444 */
 
5301
    __pyx_9 = PyObject_IsTrue(__pyx_v_self->root_entries); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; goto __pyx_L1;}
 
5302
    __pyx_1 = (!__pyx_9);
 
5303
    if (__pyx_1) {
 
5304
      __pyx_9 = PyObject_IsTrue(__pyx_v_self->root_dir_info); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; goto __pyx_L1;}
 
5305
      __pyx_1 = (!__pyx_9);
 
5306
    }
 
5307
    if (__pyx_1) {
 
5308
      __pyx_5 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_iter_next(__pyx_v_self); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; goto __pyx_L1;}
 
5309
      __pyx_r = __pyx_5;
 
5310
      __pyx_5 = 0;
 
5311
      goto __pyx_L0;
 
5312
      goto __pyx_L13;
 
5313
    }
 
5314
    __pyx_L13:;
 
5315
 
 
5316
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1449 */
 
5317
    __pyx_v_path_handled = 0;
 
5318
 
 
5319
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1450 */
 
5320
    __pyx_v_self->root_entries_pos = 0;
 
5321
 
 
5322
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1455 */
 
5323
    while (1) {
 
5324
      __pyx_9 = (__pyx_v_self->root_entries_pos < __pyx_v_self->root_entries_len);
 
5325
      if (!__pyx_9) break;
 
5326
 
 
5327
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1456 */
 
5328
      __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 = 1456; goto __pyx_L1;}
 
5329
      Py_DECREF(__pyx_v_entry);
 
5330
      __pyx_v_entry = __pyx_2;
 
5331
      __pyx_2 = 0;
 
5332
 
 
5333
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1457 */
 
5334
      __pyx_v_self->root_entries_pos = (__pyx_v_self->root_entries_pos + 1);
 
5335
 
 
5336
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1458 */
 
5337
      __pyx_3 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self,__pyx_v_entry,__pyx_v_self->root_dir_info); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1458; goto __pyx_L1;}
 
5338
      Py_DECREF(__pyx_v_result);
 
5339
      __pyx_v_result = __pyx_3;
 
5340
      __pyx_3 = 0;
 
5341
 
 
5342
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1459 */
 
5343
      __pyx_1 = __pyx_v_result != Py_None;
 
5344
      if (__pyx_1) {
 
5345
 
 
5346
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1460 */
 
5347
        __pyx_v_path_handled = (-1);
 
5348
 
 
5349
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1461 */
 
5350
        __pyx_9 = __pyx_v_result != __pyx_v_self->uninteresting;
 
5351
        if (__pyx_9) {
 
5352
          Py_INCREF(__pyx_v_result);
 
5353
          __pyx_r = __pyx_v_result;
 
5354
          goto __pyx_L0;
 
5355
          goto __pyx_L17;
 
5356
        }
 
5357
        __pyx_L17:;
 
5358
        goto __pyx_L16;
 
5359
      }
 
5360
      __pyx_L16:;
 
5361
    }
 
5362
 
 
5363
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1464 */
 
5364
    __pyx_7 = PyInt_FromLong(__pyx_v_self->want_unversioned); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; goto __pyx_L1;}
 
5365
    __pyx_1 = PyObject_IsTrue(__pyx_7); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; goto __pyx_L1;}
 
5366
    if (__pyx_1) {
 
5367
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5368
      __pyx_7 = PyInt_FromLong((!__pyx_v_path_handled)); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; goto __pyx_L1;}
 
5369
      __pyx_9 = PyObject_IsTrue(__pyx_7); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; goto __pyx_L1;}
 
5370
      if (__pyx_9) {
 
5371
        Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5372
        __pyx_7 = __pyx_v_self->root_dir_info;
 
5373
        Py_INCREF(__pyx_7);
 
5374
      }
 
5375
    }
 
5376
    __pyx_1 = PyObject_IsTrue(__pyx_7); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1464; goto __pyx_L1;}
 
5377
    Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5378
    if (__pyx_1) {
 
5379
 
 
5380
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1465 */
 
5381
      __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_stat); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; goto __pyx_L1;}
 
5382
      __pyx_5 = PyObject_GetAttr(__pyx_4, __pyx_n_S_ISREG); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; goto __pyx_L1;}
 
5383
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5384
      __pyx_2 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; goto __pyx_L1;}
 
5385
      __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_st_mode); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; goto __pyx_L1;}
 
5386
      Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5387
      __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; goto __pyx_L1;}
 
5388
      PyTuple_SET_ITEM(__pyx_7, 0, __pyx_3);
 
5389
      __pyx_3 = 0;
 
5390
      __pyx_8 = PyObject_CallObject(__pyx_5, __pyx_7); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1466; goto __pyx_L1;}
 
5391
      Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5392
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5393
      __pyx_9 = PyObject_IsTrue(__pyx_8); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; goto __pyx_L1;}
 
5394
      if (__pyx_9) {
 
5395
        Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5396
        __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_stat); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; goto __pyx_L1;}
 
5397
        __pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_S_IEXEC); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; goto __pyx_L1;}
 
5398
        Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5399
        __pyx_3 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; goto __pyx_L1;}
 
5400
        __pyx_5 = PyObject_GetAttr(__pyx_3, __pyx_n_st_mode); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; goto __pyx_L1;}
 
5401
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5402
        __pyx_8 = PyNumber_And(__pyx_2, __pyx_5); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; goto __pyx_L1;}
 
5403
        Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5404
        Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5405
      }
 
5406
      __pyx_1 = PyObject_IsTrue(__pyx_8); if (__pyx_1 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; goto __pyx_L1;}
 
5407
      Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5408
      __pyx_7 = PyInt_FromLong(__pyx_1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; goto __pyx_L1;}
 
5409
      Py_DECREF(__pyx_v_new_executable);
 
5410
      __pyx_v_new_executable = __pyx_7;
 
5411
      __pyx_7 = 0;
 
5412
 
 
5413
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1468 */
 
5414
      __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;}
 
5415
      Py_INCREF(Py_None);
 
5416
      PyTuple_SET_ITEM(__pyx_4, 0, Py_None);
 
5417
      Py_INCREF(__pyx_v_self->current_root_unicode);
 
5418
      PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_self->current_root_unicode);
 
5419
      __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1471; goto __pyx_L1;}
 
5420
      Py_INCREF(Py_False);
 
5421
      PyTuple_SET_ITEM(__pyx_3, 0, Py_False);
 
5422
      Py_INCREF(Py_False);
 
5423
      PyTuple_SET_ITEM(__pyx_3, 1, Py_False);
 
5424
      __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1472; goto __pyx_L1;}
 
5425
      Py_INCREF(Py_None);
 
5426
      PyTuple_SET_ITEM(__pyx_2, 0, Py_None);
 
5427
      Py_INCREF(Py_None);
 
5428
      PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
 
5429
      __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_splitpath); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; goto __pyx_L1;}
 
5430
      __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; goto __pyx_L1;}
 
5431
      Py_INCREF(__pyx_v_self->current_root_unicode);
 
5432
      PyTuple_SET_ITEM(__pyx_8, 0, __pyx_v_self->current_root_unicode);
 
5433
      __pyx_7 = PyObject_CallObject(__pyx_5, __pyx_8); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; goto __pyx_L1;}
 
5434
      Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5435
      Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5436
      __pyx_5 = __Pyx_GetItemInt(__pyx_7, (-1)); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; goto __pyx_L1;}
 
5437
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5438
      __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; goto __pyx_L1;}
 
5439
      Py_INCREF(Py_None);
 
5440
      PyTuple_SET_ITEM(__pyx_8, 0, Py_None);
 
5441
      PyTuple_SET_ITEM(__pyx_8, 1, __pyx_5);
 
5442
      __pyx_5 = 0;
 
5443
      __pyx_7 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; goto __pyx_L1;}
 
5444
      __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; goto __pyx_L1;}
 
5445
      Py_INCREF(Py_None);
 
5446
      PyTuple_SET_ITEM(__pyx_5, 0, Py_None);
 
5447
      PyTuple_SET_ITEM(__pyx_5, 1, __pyx_7);
 
5448
      __pyx_7 = 0;
 
5449
      __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; goto __pyx_L1;}
 
5450
      Py_INCREF(Py_None);
 
5451
      PyTuple_SET_ITEM(__pyx_7, 0, Py_None);
 
5452
      Py_INCREF(__pyx_v_new_executable);
 
5453
      PyTuple_SET_ITEM(__pyx_7, 1, __pyx_v_new_executable);
 
5454
      __pyx_10 = PyTuple_New(8); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; goto __pyx_L1;}
 
5455
      Py_INCREF(Py_None);
 
5456
      PyTuple_SET_ITEM(__pyx_10, 0, Py_None);
 
5457
      PyTuple_SET_ITEM(__pyx_10, 1, __pyx_4);
 
5458
      Py_INCREF(Py_True);
 
5459
      PyTuple_SET_ITEM(__pyx_10, 2, Py_True);
 
5460
      PyTuple_SET_ITEM(__pyx_10, 3, __pyx_3);
 
5461
      PyTuple_SET_ITEM(__pyx_10, 4, __pyx_2);
 
5462
      PyTuple_SET_ITEM(__pyx_10, 5, __pyx_8);
 
5463
      PyTuple_SET_ITEM(__pyx_10, 6, __pyx_5);
 
5464
      PyTuple_SET_ITEM(__pyx_10, 7, __pyx_7);
 
5465
      __pyx_4 = 0;
 
5466
      __pyx_3 = 0;
 
5467
      __pyx_2 = 0;
 
5468
      __pyx_8 = 0;
 
5469
      __pyx_5 = 0;
 
5470
      __pyx_7 = 0;
 
5471
      __pyx_r = __pyx_10;
 
5472
      __pyx_10 = 0;
 
5473
      goto __pyx_L0;
 
5474
      goto __pyx_L18;
 
5475
    }
 
5476
    __pyx_L18:;
 
5477
    goto __pyx_L5;
 
5478
  }
 
5479
  __pyx_L5:;
 
5480
 
 
5481
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1479 */
 
5482
  __pyx_9 = __pyx_v_self->current_dir_info == Py_None;
 
5483
  if (__pyx_9) {
 
5484
    __pyx_9 = __pyx_v_self->current_block == Py_None;
 
5485
  }
 
5486
  if (__pyx_9) {
 
5487
 
 
5488
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1481 */
 
5489
    Py_INCREF(Py_None);
 
5490
    Py_DECREF(__pyx_v_self->current_dir_list);
 
5491
    __pyx_v_self->current_dir_list = Py_None;
 
5492
 
 
5493
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1482 */
 
5494
    __pyx_4 = __pyx_v_self->root_dir_info;
 
5495
    Py_INCREF(__pyx_4);
 
5496
    __pyx_1 = PyObject_IsTrue(__pyx_4); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; goto __pyx_L1;}
 
5497
    if (__pyx_1) {
 
5498
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5499
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; goto __pyx_L1;}
 
5500
      if (PyObject_Cmp(__pyx_3, __pyx_k78p, &__pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; goto __pyx_L1;}
 
5501
      __pyx_9 = __pyx_9 == 0;
 
5502
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5503
      __pyx_4 = PyInt_FromLong(__pyx_9); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; goto __pyx_L1;}
 
5504
    }
 
5505
    __pyx_1 = PyObject_IsTrue(__pyx_4); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1482; goto __pyx_L1;}
 
5506
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5507
    if (__pyx_1) {
 
5508
      Py_INCREF(Py_None);
 
5509
      Py_DECREF(__pyx_v_self->current_dir_info);
 
5510
      __pyx_v_self->current_dir_info = Py_None;
 
5511
      goto __pyx_L20;
 
5512
    }
 
5513
    /*else*/ {
 
5514
 
 
5515
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1485 */
 
5516
      __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; goto __pyx_L1;}
 
5517
      __pyx_8 = PyObject_GetAttr(__pyx_2, __pyx_n__walkdirs_utf8); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; goto __pyx_L1;}
 
5518
      Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5519
      __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; goto __pyx_L1;}
 
5520
      Py_INCREF(__pyx_v_self->root_abspath);
 
5521
      PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_self->root_abspath);
 
5522
      __pyx_7 = PyDict_New(); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; goto __pyx_L1;}
 
5523
      if (PyDict_SetItem(__pyx_7, __pyx_n_prefix, __pyx_v_self->current_root) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; goto __pyx_L1;}
 
5524
      __pyx_10 = PyEval_CallObjectWithKeywords(__pyx_8, __pyx_5, __pyx_7); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; goto __pyx_L1;}
 
5525
      Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5526
      Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5527
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5528
      Py_DECREF(__pyx_v_self->dir_iterator);
 
5529
      __pyx_v_self->dir_iterator = __pyx_10;
 
5530
      __pyx_10 = 0;
 
5531
 
 
5532
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1487 */
 
5533
      __pyx_v_self->path_index = 0;
 
5534
 
 
5535
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1488 */
 
5536
      /*try:*/ {
 
5537
 
 
5538
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1489 */
 
5539
        __pyx_3 = PyObject_GetAttr(__pyx_v_self->dir_iterator, __pyx_n_next); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; goto __pyx_L21;}
 
5540
        __pyx_4 = PyObject_CallObject(__pyx_3, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; goto __pyx_L21;}
 
5541
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5542
        Py_DECREF(__pyx_v_self->current_dir_info);
 
5543
        __pyx_v_self->current_dir_info = __pyx_4;
 
5544
        __pyx_4 = 0;
 
5545
 
 
5546
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1490 */
 
5547
        __pyx_2 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; goto __pyx_L21;}
 
5548
        Py_DECREF(__pyx_v_self->current_dir_list);
 
5549
        __pyx_v_self->current_dir_list = __pyx_2;
 
5550
        __pyx_2 = 0;
 
5551
      }
 
5552
      /*else:*/ {
 
5553
        __pyx_3 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; goto __pyx_L1;}
 
5554
        __pyx_11 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; goto __pyx_L1;}
 
5555
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5556
        if (PyObject_Cmp(__pyx_11, __pyx_k81p, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1514; goto __pyx_L1;}
 
5557
        __pyx_1 = __pyx_1 == 0;
 
5558
        Py_DECREF(__pyx_11); __pyx_11 = 0;
 
5559
        if (__pyx_1) {
 
5560
 
 
5561
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1516 */
 
5562
          __pyx_10 = PyTuple_New(1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; goto __pyx_L1;}
 
5563
          Py_INCREF(__pyx_k82p);
 
5564
          PyTuple_SET_ITEM(__pyx_10, 0, __pyx_k82p);
 
5565
          __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; goto __pyx_L1;}
 
5566
          Py_INCREF(__pyx_v_self->current_dir_list);
 
5567
          PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self->current_dir_list);
 
5568
          PyTuple_SET_ITEM(__pyx_2, 1, __pyx_10);
 
5569
          __pyx_10 = 0;
 
5570
          __pyx_4 = PyObject_CallObject(__pyx_v_self->bisect_left, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1516; goto __pyx_L1;}
 
5571
          Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5572
          Py_DECREF(__pyx_v_bzr_index);
 
5573
          __pyx_v_bzr_index = __pyx_4;
 
5574
          __pyx_4 = 0;
 
5575
 
 
5576
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1517 */
 
5577
          __pyx_8 = PyObject_GetItem(__pyx_v_self->current_dir_list, __pyx_v_bzr_index); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; goto __pyx_L1;}
 
5578
          __pyx_5 = __Pyx_GetItemInt(__pyx_8, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; goto __pyx_L1;}
 
5579
          Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5580
          if (PyObject_Cmp(__pyx_5, __pyx_k83p, &__pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1517; goto __pyx_L1;}
 
5581
          __pyx_9 = __pyx_9 != 0;
 
5582
          Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5583
          if (__pyx_9) {
 
5584
            __pyx_7 = PyObject_CallObject(PyExc_AssertionError, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; goto __pyx_L1;}
 
5585
            __Pyx_Raise(__pyx_7, 0, 0);
 
5586
            Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5587
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; goto __pyx_L1;}
 
5588
            goto __pyx_L24;
 
5589
          }
 
5590
          __pyx_L24:;
 
5591
 
 
5592
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1519 */
 
5593
          if (PyObject_DelItem(__pyx_v_self->current_dir_list, __pyx_v_bzr_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; goto __pyx_L1;}
 
5594
          goto __pyx_L23;
 
5595
        }
 
5596
        __pyx_L23:;
 
5597
      }
 
5598
      goto __pyx_L22;
 
5599
      __pyx_L21:;
 
5600
      Py_XDECREF(__pyx_8); __pyx_8 = 0;
 
5601
      Py_XDECREF(__pyx_5); __pyx_5 = 0;
 
5602
      Py_XDECREF(__pyx_7); __pyx_7 = 0;
 
5603
      Py_XDECREF(__pyx_10); __pyx_10 = 0;
 
5604
      Py_XDECREF(__pyx_3); __pyx_3 = 0;
 
5605
      Py_XDECREF(__pyx_4); __pyx_4 = 0;
 
5606
      Py_XDECREF(__pyx_2); __pyx_2 = 0;
 
5607
 
 
5608
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1491 */
 
5609
      __pyx_9 = PyErr_ExceptionMatches(PyExc_OSError);
 
5610
      if (__pyx_9) {
 
5611
        __Pyx_AddTraceback("_dirstate_helpers_c._iter_next");
 
5612
        if (__Pyx_GetException(&__pyx_8, &__pyx_5, &__pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1491; goto __pyx_L1;}
 
5613
        Py_INCREF(__pyx_5);
 
5614
        Py_DECREF(__pyx_v_e);
 
5615
        __pyx_v_e = __pyx_5;
 
5616
        __pyx_10 = PyObject_GetAttr(__pyx_v_e, __pyx_n_errno); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; goto __pyx_L1;}
 
5617
        __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_errno); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; goto __pyx_L1;}
 
5618
        __pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_ENOENT); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; goto __pyx_L1;}
 
5619
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5620
        __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_errno); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; goto __pyx_L1;}
 
5621
        __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_ENOTDIR); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; goto __pyx_L1;}
 
5622
        Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5623
        __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_errno); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; goto __pyx_L1;}
 
5624
        __pyx_11 = PyObject_GetAttr(__pyx_2, __pyx_n_EINVAL); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; goto __pyx_L1;}
 
5625
        Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5626
        __pyx_2 = PyTuple_New(3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; goto __pyx_L1;}
 
5627
        PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4);
 
5628
        PyTuple_SET_ITEM(__pyx_2, 1, __pyx_3);
 
5629
        PyTuple_SET_ITEM(__pyx_2, 2, __pyx_11);
 
5630
        __pyx_4 = 0;
 
5631
        __pyx_3 = 0;
 
5632
        __pyx_11 = 0;
 
5633
        __pyx_1 = PySequence_Contains(__pyx_2, __pyx_10); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; goto __pyx_L1;}
 
5634
        Py_DECREF(__pyx_10); __pyx_10 = 0;
 
5635
        Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5636
        if (__pyx_1) {
 
5637
          Py_INCREF(Py_None);
 
5638
          Py_DECREF(__pyx_v_self->current_dir_info);
 
5639
          __pyx_v_self->current_dir_info = Py_None;
 
5640
          goto __pyx_L25;
 
5641
        }
 
5642
        __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_sys); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1497; goto __pyx_L1;}
 
5643
        __pyx_3 = PyObject_GetAttr(__pyx_4, __pyx_n_platform); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1497; goto __pyx_L1;}
 
5644
        Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5645
        if (PyObject_Cmp(__pyx_3, __pyx_n_win32, &__pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1497; goto __pyx_L1;}
 
5646
        __pyx_9 = __pyx_9 == 0;
 
5647
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5648
        if (__pyx_9) {
 
5649
 
 
5650
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1501 */
 
5651
          /*try:*/ {
 
5652
            __pyx_11 = PyObject_GetAttr(__pyx_v_e, __pyx_n_winerror); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1502; goto __pyx_L26;}
 
5653
            Py_DECREF(__pyx_v_e_winerror);
 
5654
            __pyx_v_e_winerror = __pyx_11;
 
5655
            __pyx_11 = 0;
 
5656
          }
 
5657
          goto __pyx_L27;
 
5658
          __pyx_L26:;
 
5659
          Py_XDECREF(__pyx_10); __pyx_10 = 0;
 
5660
          Py_XDECREF(__pyx_2); __pyx_2 = 0;
 
5661
          Py_XDECREF(__pyx_4); __pyx_4 = 0;
 
5662
          Py_XDECREF(__pyx_3); __pyx_3 = 0;
 
5663
          Py_XDECREF(__pyx_11); __pyx_11 = 0;
 
5664
 
 
5665
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1503 */
 
5666
          __pyx_10 = __Pyx_GetName(__pyx_b, __pyx_n_AttributeError); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1503; goto __pyx_L1;}
 
5667
          __pyx_1 = PyErr_ExceptionMatches(__pyx_10);
 
5668
          Py_DECREF(__pyx_10); __pyx_10 = 0;
 
5669
          if (__pyx_1) {
 
5670
            __Pyx_AddTraceback("_dirstate_helpers_c._iter_next");
 
5671
            if (__Pyx_GetException(&__pyx_2, &__pyx_4, &__pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1503; goto __pyx_L1;}
 
5672
            Py_INCREF(Py_None);
 
5673
            Py_DECREF(__pyx_v_e_winerror);
 
5674
            __pyx_v_e_winerror = Py_None;
 
5675
            Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5676
            Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5677
            Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5678
            goto __pyx_L27;
 
5679
          }
 
5680
          goto __pyx_L1;
 
5681
          __pyx_L27:;
 
5682
 
 
5683
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1505 */
 
5684
          __pyx_11 = PyInt_FromLong(__pyx_v_19_dirstate_helpers_c_ERROR_DIRECTORY); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; goto __pyx_L1;}
 
5685
          __pyx_10 = PyInt_FromLong(__pyx_v_19_dirstate_helpers_c_ERROR_PATH_NOT_FOUND); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; goto __pyx_L1;}
 
5686
          __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1505; goto __pyx_L1;}
 
5687
          PyTuple_SET_ITEM(__pyx_2, 0, __pyx_11);
 
5688
          PyTuple_SET_ITEM(__pyx_2, 1, __pyx_10);
 
5689
          __pyx_11 = 0;
 
5690
          __pyx_10 = 0;
 
5691
          Py_DECREF(__pyx_v_win_errors);
 
5692
          __pyx_v_win_errors = __pyx_2;
 
5693
          __pyx_2 = 0;
 
5694
 
 
5695
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1506 */
 
5696
          __pyx_4 = PyObject_GetAttr(__pyx_v_e, __pyx_n_errno); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; goto __pyx_L1;}
 
5697
          __pyx_9 = PySequence_Contains(__pyx_v_win_errors, __pyx_4); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; goto __pyx_L1;}
 
5698
          Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5699
          if (!__pyx_9) {
 
5700
            __pyx_9 = PySequence_Contains(__pyx_v_win_errors, __pyx_v_e_winerror); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; goto __pyx_L1;}
 
5701
          }
 
5702
          if (__pyx_9) {
 
5703
            Py_INCREF(Py_None);
 
5704
            Py_DECREF(__pyx_v_self->current_dir_info);
 
5705
            __pyx_v_self->current_dir_info = Py_None;
 
5706
            goto __pyx_L28;
 
5707
          }
 
5708
          /*else*/ {
 
5709
            __Pyx_Raise(__pyx_8, __pyx_5, __pyx_7);
 
5710
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; goto __pyx_L1;}
 
5711
          }
 
5712
          __pyx_L28:;
 
5713
          goto __pyx_L25;
 
5714
        }
 
5715
        /*else*/ {
 
5716
          __Pyx_Raise(__pyx_8, __pyx_5, __pyx_7);
 
5717
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1512; goto __pyx_L1;}
 
5718
        }
 
5719
        __pyx_L25:;
 
5720
        Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5721
        Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5722
        Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5723
        goto __pyx_L22;
 
5724
      }
 
5725
      goto __pyx_L1;
 
5726
      __pyx_L22:;
 
5727
    }
 
5728
    __pyx_L20:;
 
5729
 
 
5730
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1520 */
 
5731
    __pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1520; goto __pyx_L1;}
 
5732
    Py_INCREF(__pyx_v_self->current_root);
 
5733
    PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self->current_root);
 
5734
    Py_INCREF(__pyx_k84p);
 
5735
    PyTuple_SET_ITEM(__pyx_3, 1, __pyx_k84p);
 
5736
    Py_INCREF(__pyx_k85p);
 
5737
    PyTuple_SET_ITEM(__pyx_3, 2, __pyx_k85p);
 
5738
    Py_DECREF(__pyx_v_initial_key);
 
5739
    __pyx_v_initial_key = __pyx_3;
 
5740
    __pyx_3 = 0;
 
5741
 
 
5742
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1521 */
 
5743
    __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 = 1521; goto __pyx_L1;}
 
5744
    __pyx_10 = PyTuple_New(1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; goto __pyx_L1;}
 
5745
    Py_INCREF(__pyx_v_initial_key);
 
5746
    PyTuple_SET_ITEM(__pyx_10, 0, __pyx_v_initial_key);
 
5747
    __pyx_2 = PyObject_CallObject(__pyx_11, __pyx_10); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; goto __pyx_L1;}
 
5748
    Py_DECREF(__pyx_11); __pyx_11 = 0;
 
5749
    Py_DECREF(__pyx_10); __pyx_10 = 0;
 
5750
    __pyx_4 = PyObject_GetIter(__pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; goto __pyx_L1;}
 
5751
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5752
    __pyx_8 = __Pyx_UnpackItem(__pyx_4); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; goto __pyx_L1;}
 
5753
    __pyx_1 = PyInt_AsLong(__pyx_8); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; goto __pyx_L1;}
 
5754
    Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5755
    __pyx_v_self->block_index = __pyx_1;
 
5756
    __pyx_5 = __Pyx_UnpackItem(__pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; goto __pyx_L1;}
 
5757
    Py_DECREF(__pyx_v__);
 
5758
    __pyx_v__ = __pyx_5;
 
5759
    __pyx_5 = 0;
 
5760
    if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1521; goto __pyx_L1;}
 
5761
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5762
 
 
5763
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1522 */
 
5764
    __pyx_9 = (__pyx_v_self->block_index == 0);
 
5765
    if (__pyx_9) {
 
5766
      __pyx_v_self->block_index = (__pyx_v_self->block_index + 1);
 
5767
      goto __pyx_L29;
 
5768
    }
 
5769
    __pyx_L29:;
 
5770
 
 
5771
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1526 */
 
5772
    ((struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_update_current_block(__pyx_v_self);
 
5773
    goto __pyx_L19;
 
5774
  }
 
5775
  __pyx_L19:;
 
5776
 
 
5777
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1529 */
 
5778
  while (1) {
 
5779
    __pyx_1 = __pyx_v_self->current_dir_info != Py_None;
 
5780
    if (!__pyx_1) {
 
5781
      __pyx_1 = __pyx_v_self->current_block != Py_None;
 
5782
    }
 
5783
    if (!__pyx_1) break;
 
5784
 
 
5785
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1532 */
 
5786
    __pyx_7 = __pyx_v_self->current_dir_info;
 
5787
    Py_INCREF(__pyx_7);
 
5788
    __pyx_9 = PyObject_IsTrue(__pyx_7); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; goto __pyx_L1;}
 
5789
    if (__pyx_9) {
 
5790
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5791
      __pyx_7 = __pyx_v_self->current_block;
 
5792
      Py_INCREF(__pyx_7);
 
5793
      __pyx_1 = PyObject_IsTrue(__pyx_7); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; goto __pyx_L1;}
 
5794
      if (__pyx_1) {
 
5795
        Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5796
        __pyx_3 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; goto __pyx_L1;}
 
5797
        __pyx_11 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; goto __pyx_L1;}
 
5798
        Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5799
        __pyx_10 = __Pyx_GetItemInt(__pyx_v_self->current_block, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; goto __pyx_L1;}
 
5800
        if (PyObject_Cmp(__pyx_11, __pyx_10, &__pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; goto __pyx_L1;}
 
5801
        __pyx_9 = __pyx_9 != 0;
 
5802
        Py_DECREF(__pyx_11); __pyx_11 = 0;
 
5803
        Py_DECREF(__pyx_10); __pyx_10 = 0;
 
5804
        __pyx_7 = PyInt_FromLong(__pyx_9); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1533; goto __pyx_L1;}
 
5805
      }
 
5806
    }
 
5807
    __pyx_1 = PyObject_IsTrue(__pyx_7); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; goto __pyx_L1;}
 
5808
    Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5809
    if (__pyx_1) {
 
5810
 
 
5811
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1536 */
 
5812
      __pyx_2 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; goto __pyx_L1;}
 
5813
      __pyx_8 = __Pyx_GetItemInt(__pyx_2, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; goto __pyx_L1;}
 
5814
      Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5815
      Py_DECREF(__pyx_v_current_dirname);
 
5816
      __pyx_v_current_dirname = __pyx_8;
 
5817
      __pyx_8 = 0;
 
5818
 
 
5819
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1537 */
 
5820
      __pyx_v_current_dirname_c = PyString_AS_STRING(((void *)__pyx_v_current_dirname));
 
5821
 
 
5822
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1539 */
 
5823
      __pyx_5 = __Pyx_GetItemInt(__pyx_v_self->current_block, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; goto __pyx_L1;}
 
5824
      Py_DECREF(__pyx_v_current_blockname);
 
5825
      __pyx_v_current_blockname = __pyx_5;
 
5826
      __pyx_5 = 0;
 
5827
 
 
5828
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1540 */
 
5829
      __pyx_v_current_blockname_c = PyString_AS_STRING(((void *)__pyx_v_current_blockname));
 
5830
 
 
5831
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1546 */
 
5832
      __pyx_9 = (__pyx_f_19_dirstate_helpers_c__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);
 
5833
      if (__pyx_9) {
 
5834
 
 
5835
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1560 */
 
5836
        while (1) {
 
5837
          __pyx_6 = PyObject_Length(__pyx_v_self->current_dir_list); if (__pyx_6 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1560; goto __pyx_L1;}
 
5838
          __pyx_1 = (__pyx_v_self->path_index < __pyx_6);
 
5839
          if (!__pyx_1) break;
 
5840
 
 
5841
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1561 */
 
5842
          __pyx_4 = __Pyx_GetItemInt(__pyx_v_self->current_dir_list, __pyx_v_self->path_index); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; goto __pyx_L1;}
 
5843
          Py_DECREF(__pyx_v_current_path_info);
 
5844
          __pyx_v_current_path_info = __pyx_4;
 
5845
          __pyx_4 = 0;
 
5846
 
 
5847
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1564 */
 
5848
          __pyx_3 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; goto __pyx_L1;}
 
5849
          __pyx_11 = PyTuple_New(2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; goto __pyx_L1;}
 
5850
          Py_INCREF(__pyx_n_directory);
 
5851
          PyTuple_SET_ITEM(__pyx_11, 0, __pyx_n_directory);
 
5852
          Py_INCREF(__pyx_k87p);
 
5853
          PyTuple_SET_ITEM(__pyx_11, 1, __pyx_k87p);
 
5854
          __pyx_9 = PySequence_Contains(__pyx_11, __pyx_3); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; goto __pyx_L1;}
 
5855
          Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5856
          Py_DECREF(__pyx_11); __pyx_11 = 0;
 
5857
          if (__pyx_9) {
 
5858
 
 
5859
            /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1566 */
 
5860
            if (PySequence_DelItem(__pyx_v_self->current_dir_list, __pyx_v_self->path_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; goto __pyx_L1;}
 
5861
 
 
5862
            /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1567 */
 
5863
            __pyx_v_self->path_index = (__pyx_v_self->path_index - 1);
 
5864
            goto __pyx_L36;
 
5865
          }
 
5866
          __pyx_L36:;
 
5867
 
 
5868
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1568 */
 
5869
          __pyx_v_self->path_index = (__pyx_v_self->path_index + 1);
 
5870
 
 
5871
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1569 */
 
5872
          __pyx_1 = __pyx_v_self->want_unversioned;
 
5873
          if (__pyx_1) {
 
5874
 
 
5875
            /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1570 */
 
5876
            __pyx_10 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1570; goto __pyx_L1;}
 
5877
            if (PyObject_Cmp(__pyx_10, __pyx_n_directory, &__pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1570; goto __pyx_L1;}
 
5878
            __pyx_9 = __pyx_9 == 0;
 
5879
            Py_DECREF(__pyx_10); __pyx_10 = 0;
 
5880
            if (__pyx_9) {
 
5881
              __pyx_7 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n__directory_is_tree_reference); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; goto __pyx_L1;}
 
5882
              __pyx_2 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1572; goto __pyx_L1;}
 
5883
              __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1572; goto __pyx_L1;}
 
5884
              PyTuple_SET_ITEM(__pyx_8, 0, __pyx_2);
 
5885
              __pyx_2 = 0;
 
5886
              __pyx_5 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_8); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1572; goto __pyx_L1;}
 
5887
              Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5888
              __pyx_4 = __Pyx_GetItemInt(__pyx_5, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1572; goto __pyx_L1;}
 
5889
              Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5890
              __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; goto __pyx_L1;}
 
5891
              PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4);
 
5892
              __pyx_4 = 0;
 
5893
              __pyx_11 = PyObject_CallObject(__pyx_7, __pyx_3); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; goto __pyx_L1;}
 
5894
              Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5895
              Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5896
              __pyx_1 = PyObject_IsTrue(__pyx_11); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; goto __pyx_L1;}
 
5897
              Py_DECREF(__pyx_11); __pyx_11 = 0;
 
5898
              if (__pyx_1) {
 
5899
                __pyx_10 = PySequence_GetSlice(__pyx_v_current_path_info, 0, 2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1573; goto __pyx_L1;}
 
5900
                __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1574; goto __pyx_L1;}
 
5901
                Py_INCREF(__pyx_k89p);
 
5902
                PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k89p);
 
5903
                __pyx_8 = PyNumber_Add(__pyx_10, __pyx_2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1573; goto __pyx_L1;}
 
5904
                Py_DECREF(__pyx_10); __pyx_10 = 0;
 
5905
                Py_DECREF(__pyx_2); __pyx_2 = 0;
 
5906
                __pyx_5 = PySequence_GetSlice(__pyx_v_current_path_info, 3, PY_SSIZE_T_MAX); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1574; goto __pyx_L1;}
 
5907
                __pyx_4 = PyNumber_Add(__pyx_8, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1574; goto __pyx_L1;}
 
5908
                Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5909
                Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5910
                Py_DECREF(__pyx_v_current_path_info);
 
5911
                __pyx_v_current_path_info = __pyx_4;
 
5912
                __pyx_4 = 0;
 
5913
                goto __pyx_L39;
 
5914
              }
 
5915
              __pyx_L39:;
 
5916
              goto __pyx_L38;
 
5917
            }
 
5918
            __pyx_L38:;
 
5919
 
 
5920
            /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1575 */
 
5921
            __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_stat); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
 
5922
            __pyx_11 = PyObject_GetAttr(__pyx_3, __pyx_n_S_ISREG); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
 
5923
            Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5924
            __pyx_10 = __Pyx_GetItemInt(__pyx_v_current_path_info, 3); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
 
5925
            __pyx_2 = PyObject_GetAttr(__pyx_10, __pyx_n_st_mode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
 
5926
            Py_DECREF(__pyx_10); __pyx_10 = 0;
 
5927
            __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
 
5928
            PyTuple_SET_ITEM(__pyx_8, 0, __pyx_2);
 
5929
            __pyx_2 = 0;
 
5930
            __pyx_7 = PyObject_CallObject(__pyx_11, __pyx_8); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
 
5931
            Py_DECREF(__pyx_11); __pyx_11 = 0;
 
5932
            Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5933
            __pyx_9 = PyObject_IsTrue(__pyx_7); if (__pyx_9 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; goto __pyx_L1;}
 
5934
            if (__pyx_9) {
 
5935
              Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5936
              __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_stat); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; goto __pyx_L1;}
 
5937
              __pyx_4 = PyObject_GetAttr(__pyx_5, __pyx_n_S_IEXEC); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; goto __pyx_L1;}
 
5938
              Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5939
              __pyx_3 = __Pyx_GetItemInt(__pyx_v_current_path_info, 3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; goto __pyx_L1;}
 
5940
              __pyx_10 = PyObject_GetAttr(__pyx_3, __pyx_n_st_mode); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; goto __pyx_L1;}
 
5941
              Py_DECREF(__pyx_3); __pyx_3 = 0;
 
5942
              __pyx_7 = PyNumber_And(__pyx_4, __pyx_10); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; goto __pyx_L1;}
 
5943
              Py_DECREF(__pyx_4); __pyx_4 = 0;
 
5944
              Py_DECREF(__pyx_10); __pyx_10 = 0;
 
5945
            }
 
5946
            __pyx_1 = PyObject_IsTrue(__pyx_7); if (__pyx_1 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; goto __pyx_L1;}
 
5947
            Py_DECREF(__pyx_7); __pyx_7 = 0;
 
5948
            __pyx_2 = PyInt_FromLong(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; goto __pyx_L1;}
 
5949
            Py_DECREF(__pyx_v_new_executable);
 
5950
            __pyx_v_new_executable = __pyx_2;
 
5951
            __pyx_2 = 0;
 
5952
 
 
5953
            /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1578 */
 
5954
            __pyx_11 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; goto __pyx_L1;}
 
5955
            __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; goto __pyx_L1;}
 
5956
            PyTuple_SET_ITEM(__pyx_8, 0, __pyx_11);
 
5957
            __pyx_11 = 0;
 
5958
            __pyx_5 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_8); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; goto __pyx_L1;}
 
5959
            Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5960
            __pyx_3 = __Pyx_GetItemInt(__pyx_5, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; goto __pyx_L1;}
 
5961
            Py_DECREF(__pyx_5); __pyx_5 = 0;
 
5962
            __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; goto __pyx_L1;}
 
5963
            Py_INCREF(Py_None);
 
5964
            PyTuple_SET_ITEM(__pyx_4, 0, Py_None);
 
5965
            PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
 
5966
            __pyx_3 = 0;
 
5967
            __pyx_10 = PyTuple_New(2); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1581; goto __pyx_L1;}
 
5968
            Py_INCREF(Py_False);
 
5969
            PyTuple_SET_ITEM(__pyx_10, 0, Py_False);
 
5970
            Py_INCREF(Py_False);
 
5971
            PyTuple_SET_ITEM(__pyx_10, 1, Py_False);
 
5972
            __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; goto __pyx_L1;}
 
5973
            Py_INCREF(Py_None);
 
5974
            PyTuple_SET_ITEM(__pyx_7, 0, Py_None);
 
5975
            Py_INCREF(Py_None);
 
5976
            PyTuple_SET_ITEM(__pyx_7, 1, Py_None);
 
5977
            __pyx_2 = __Pyx_GetItemInt(__pyx_v_current_path_info, 1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; goto __pyx_L1;}
 
5978
            __pyx_11 = PyTuple_New(1); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; goto __pyx_L1;}
 
5979
            PyTuple_SET_ITEM(__pyx_11, 0, __pyx_2);
 
5980
            __pyx_2 = 0;
 
5981
            __pyx_8 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_11); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; goto __pyx_L1;}
 
5982
            Py_DECREF(__pyx_11); __pyx_11 = 0;
 
5983
            __pyx_5 = __Pyx_GetItemInt(__pyx_8, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; goto __pyx_L1;}
 
5984
            Py_DECREF(__pyx_8); __pyx_8 = 0;
 
5985
            __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; goto __pyx_L1;}
 
5986
            Py_INCREF(Py_None);
 
5987
            PyTuple_SET_ITEM(__pyx_3, 0, Py_None);
 
5988
            PyTuple_SET_ITEM(__pyx_3, 1, __pyx_5);
 
5989
            __pyx_5 = 0;
 
5990
            __pyx_2 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1584; goto __pyx_L1;}
 
5991
            __pyx_11 = PyTuple_New(2); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1584; goto __pyx_L1;}
 
5992
            Py_INCREF(Py_None);
 
5993
            PyTuple_SET_ITEM(__pyx_11, 0, Py_None);
 
5994
            PyTuple_SET_ITEM(__pyx_11, 1, __pyx_2);
 
5995
            __pyx_2 = 0;
 
5996
            __pyx_8 = PyTuple_New(2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1585; goto __pyx_L1;}
 
5997
            Py_INCREF(Py_None);
 
5998
            PyTuple_SET_ITEM(__pyx_8, 0, Py_None);
 
5999
            Py_INCREF(__pyx_v_new_executable);
 
6000
            PyTuple_SET_ITEM(__pyx_8, 1, __pyx_v_new_executable);
 
6001
            __pyx_5 = PyTuple_New(8); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; goto __pyx_L1;}
 
6002
            Py_INCREF(Py_None);
 
6003
            PyTuple_SET_ITEM(__pyx_5, 0, Py_None);
 
6004
            PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4);
 
6005
            Py_INCREF(Py_True);
 
6006
            PyTuple_SET_ITEM(__pyx_5, 2, Py_True);
 
6007
            PyTuple_SET_ITEM(__pyx_5, 3, __pyx_10);
 
6008
            PyTuple_SET_ITEM(__pyx_5, 4, __pyx_7);
 
6009
            PyTuple_SET_ITEM(__pyx_5, 5, __pyx_3);
 
6010
            PyTuple_SET_ITEM(__pyx_5, 6, __pyx_11);
 
6011
            PyTuple_SET_ITEM(__pyx_5, 7, __pyx_8);
 
6012
            __pyx_4 = 0;
 
6013
            __pyx_10 = 0;
 
6014
            __pyx_7 = 0;
 
6015
            __pyx_3 = 0;
 
6016
            __pyx_11 = 0;
 
6017
            __pyx_8 = 0;
 
6018
            __pyx_r = __pyx_5;
 
6019
            __pyx_5 = 0;
 
6020
            goto __pyx_L0;
 
6021
            goto __pyx_L37;
 
6022
          }
 
6023
          __pyx_L37:;
 
6024
        }
 
6025
 
 
6026
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1587 */
 
6027
        __pyx_v_self->path_index = 0;
 
6028
 
 
6029
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1588 */
 
6030
        Py_INCREF(Py_None);
 
6031
        Py_DECREF(__pyx_v_self->current_dir_list);
 
6032
        __pyx_v_self->current_dir_list = Py_None;
 
6033
 
 
6034
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1589 */
 
6035
        /*try:*/ {
 
6036
 
 
6037
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1590 */
 
6038
          __pyx_2 = PyObject_GetAttr(__pyx_v_self->dir_iterator, __pyx_n_next); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1590; goto __pyx_L40;}
 
6039
          __pyx_4 = PyObject_CallObject(__pyx_2, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1590; goto __pyx_L40;}
 
6040
          Py_DECREF(__pyx_2); __pyx_2 = 0;
 
6041
          Py_DECREF(__pyx_v_self->current_dir_info);
 
6042
          __pyx_v_self->current_dir_info = __pyx_4;
 
6043
          __pyx_4 = 0;
 
6044
 
 
6045
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1591 */
 
6046
          __pyx_10 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 1); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; goto __pyx_L40;}
 
6047
          Py_DECREF(__pyx_v_self->current_dir_list);
 
6048
          __pyx_v_self->current_dir_list = __pyx_10;
 
6049
          __pyx_10 = 0;
 
6050
        }
 
6051
        goto __pyx_L41;
 
6052
        __pyx_L40:;
 
6053
        Py_XDECREF(__pyx_7); __pyx_7 = 0;
 
6054
        Py_XDECREF(__pyx_3); __pyx_3 = 0;
 
6055
        Py_XDECREF(__pyx_11); __pyx_11 = 0;
 
6056
        Py_XDECREF(__pyx_8); __pyx_8 = 0;
 
6057
        Py_XDECREF(__pyx_5); __pyx_5 = 0;
 
6058
        Py_XDECREF(__pyx_2); __pyx_2 = 0;
 
6059
        Py_XDECREF(__pyx_4); __pyx_4 = 0;
 
6060
        Py_XDECREF(__pyx_10); __pyx_10 = 0;
 
6061
 
 
6062
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1592 */
 
6063
        __pyx_9 = PyErr_ExceptionMatches(PyExc_StopIteration);
 
6064
        if (__pyx_9) {
 
6065
          __Pyx_AddTraceback("_dirstate_helpers_c._iter_next");
 
6066
          if (__Pyx_GetException(&__pyx_7, &__pyx_3, &__pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1592; goto __pyx_L1;}
 
6067
          Py_INCREF(Py_None);
 
6068
          Py_DECREF(__pyx_v_self->current_dir_info);
 
6069
          __pyx_v_self->current_dir_info = Py_None;
 
6070
          Py_DECREF(__pyx_7); __pyx_7 = 0;
 
6071
          Py_DECREF(__pyx_3); __pyx_3 = 0;
 
6072
          Py_DECREF(__pyx_11); __pyx_11 = 0;
 
6073
          goto __pyx_L41;
 
6074
        }
 
6075
        goto __pyx_L1;
 
6076
        __pyx_L41:;
 
6077
        goto __pyx_L33;
 
6078
      }
 
6079
      /*else*/ {
 
6080
 
 
6081
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1602 */
 
6082
        while (1) {
 
6083
          __pyx_6 = PyObject_Length(__pyx_v_self->current_block_list); if (__pyx_6 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1602; goto __pyx_L1;}
 
6084
          __pyx_1 = (__pyx_v_self->current_block_pos < __pyx_6);
 
6085
          if (!__pyx_1) break;
 
6086
 
 
6087
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1603 */
 
6088
          __pyx_8 = __Pyx_GetItemInt(__pyx_v_self->current_block_list, __pyx_v_self->current_block_pos); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1603; goto __pyx_L1;}
 
6089
          Py_DECREF(__pyx_v_current_entry);
 
6090
          __pyx_v_current_entry = __pyx_8;
 
6091
          __pyx_8 = 0;
 
6092
 
 
6093
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1604 */
 
6094
          __pyx_v_self->current_block_pos = (__pyx_v_self->current_block_pos + 1);
 
6095
 
 
6096
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1607 */
 
6097
          __pyx_5 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self,__pyx_v_current_entry,Py_None); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; goto __pyx_L1;}
 
6098
          Py_DECREF(__pyx_v_result);
 
6099
          __pyx_v_result = __pyx_5;
 
6100
          __pyx_5 = 0;
 
6101
 
 
6102
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1608 */
 
6103
          __pyx_9 = __pyx_v_result != Py_None;
 
6104
          if (__pyx_9) {
 
6105
            __pyx_1 = __pyx_v_result != __pyx_v_self->uninteresting;
 
6106
            if (__pyx_1) {
 
6107
              Py_INCREF(__pyx_v_result);
 
6108
              __pyx_r = __pyx_v_result;
 
6109
              goto __pyx_L0;
 
6110
              goto __pyx_L45;
 
6111
            }
 
6112
            __pyx_L45:;
 
6113
            goto __pyx_L44;
 
6114
          }
 
6115
          __pyx_L44:;
 
6116
        }
 
6117
 
 
6118
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1611 */
 
6119
        __pyx_v_self->block_index = (__pyx_v_self->block_index + 1);
 
6120
 
 
6121
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1612 */
 
6122
        ((struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_update_current_block(__pyx_v_self);
 
6123
      }
 
6124
      __pyx_L33:;
 
6125
 
 
6126
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1613 */
 
6127
      goto __pyx_L30;
 
6128
      goto __pyx_L32;
 
6129
    }
 
6130
    __pyx_L32:;
 
6131
 
 
6132
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1614 */
 
6133
    __pyx_2 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_loop_one_block(__pyx_v_self); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; goto __pyx_L1;}
 
6134
    Py_DECREF(__pyx_v_result);
 
6135
    __pyx_v_result = __pyx_2;
 
6136
    __pyx_2 = 0;
 
6137
 
 
6138
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1615 */
 
6139
    __pyx_9 = __pyx_v_result != Py_None;
 
6140
    if (__pyx_9) {
 
6141
      Py_INCREF(__pyx_v_result);
 
6142
      __pyx_r = __pyx_v_result;
 
6143
      goto __pyx_L0;
 
6144
      goto __pyx_L46;
 
6145
    }
 
6146
    __pyx_L46:;
 
6147
    __pyx_L30:;
 
6148
  }
 
6149
 
 
6150
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1617 */
 
6151
  __pyx_6 = PyObject_Length(__pyx_v_self->search_specific_files); if (__pyx_6 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; goto __pyx_L1;}
 
6152
  if (__pyx_6) {
 
6153
 
 
6154
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1619 */
 
6155
    Py_INCREF(Py_None);
 
6156
    Py_DECREF(__pyx_v_self->current_root);
 
6157
    __pyx_v_self->current_root = Py_None;
 
6158
 
 
6159
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1620 */
 
6160
    __pyx_4 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_iter_next(__pyx_v_self); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; goto __pyx_L1;}
 
6161
    __pyx_r = __pyx_4;
 
6162
    __pyx_4 = 0;
 
6163
    goto __pyx_L0;
 
6164
    goto __pyx_L47;
 
6165
  }
 
6166
  __pyx_L47:;
 
6167
 
 
6168
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1621 */
 
6169
  __pyx_10 = PyObject_CallObject(PyExc_StopIteration, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; goto __pyx_L1;}
 
6170
  __Pyx_Raise(__pyx_10, 0, 0);
 
6171
  Py_DECREF(__pyx_10); __pyx_10 = 0;
 
6172
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; goto __pyx_L1;}
 
6173
 
 
6174
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
6175
  goto __pyx_L0;
 
6176
  __pyx_L1:;
 
6177
  Py_XDECREF(__pyx_2);
 
6178
  Py_XDECREF(__pyx_3);
 
6179
  Py_XDECREF(__pyx_4);
 
6180
  Py_XDECREF(__pyx_5);
 
6181
  Py_XDECREF(__pyx_7);
 
6182
  Py_XDECREF(__pyx_8);
 
6183
  Py_XDECREF(__pyx_10);
 
6184
  Py_XDECREF(__pyx_11);
 
6185
  __Pyx_AddTraceback("_dirstate_helpers_c.ProcessEntryC._iter_next");
 
6186
  __pyx_r = 0;
 
6187
  __pyx_L0:;
 
6188
  Py_DECREF(__pyx_v_current_dirname);
 
6189
  Py_DECREF(__pyx_v_current_blockname);
 
6190
  Py_DECREF(__pyx_v_uninteresting);
 
6191
  Py_DECREF(__pyx_v_searched_specific_files);
 
6192
  Py_DECREF(__pyx_v_entry);
 
6193
  Py_DECREF(__pyx_v_result);
 
6194
  Py_DECREF(__pyx_v_root_stat);
 
6195
  Py_DECREF(__pyx_v_e);
 
6196
  Py_DECREF(__pyx_v_new_executable);
 
6197
  Py_DECREF(__pyx_v_e_winerror);
 
6198
  Py_DECREF(__pyx_v_win_errors);
 
6199
  Py_DECREF(__pyx_v_bzr_index);
 
6200
  Py_DECREF(__pyx_v_initial_key);
 
6201
  Py_DECREF(__pyx_v__);
 
6202
  Py_DECREF(__pyx_v_current_path_info);
 
6203
  Py_DECREF(__pyx_v_current_entry);
 
6204
  Py_DECREF(__pyx_v_self);
 
6205
  return __pyx_r;
 
6206
}
 
6207
 
 
6208
static PyObject *__pyx_k90p;
 
6209
 
 
6210
static char __pyx_k90[] = "tree-reference";
 
6211
 
 
6212
static PyObject *__pyx_f_19_dirstate_helpers_c_13ProcessEntryC__maybe_tree_ref(struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *__pyx_v_self,PyObject *__pyx_v_current_path_info) {
 
6213
  PyObject *__pyx_r;
 
6214
  PyObject *__pyx_1 = 0;
 
6215
  PyObject *__pyx_2 = 0;
 
6216
  PyObject *__pyx_3 = 0;
 
6217
  int __pyx_4;
 
6218
  Py_INCREF(__pyx_v_self);
 
6219
  Py_INCREF(__pyx_v_current_path_info);
 
6220
  __pyx_1 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n__directory_is_tree_reference); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; goto __pyx_L1;}
 
6221
  __pyx_2 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; goto __pyx_L1;}
 
6222
  __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; goto __pyx_L1;}
 
6223
  PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
 
6224
  __pyx_2 = 0;
 
6225
  __pyx_2 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; goto __pyx_L1;}
 
6226
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
6227
  __pyx_3 = __Pyx_GetItemInt(__pyx_2, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; goto __pyx_L1;}
 
6228
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
6229
  __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; goto __pyx_L1;}
 
6230
  PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
 
6231
  __pyx_3 = 0;
 
6232
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; goto __pyx_L1;}
 
6233
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
6234
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
6235
  __pyx_4 = PyObject_IsTrue(__pyx_3); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; goto __pyx_L1;}
 
6236
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
6237
  if (__pyx_4) {
 
6238
    __pyx_1 = PySequence_GetSlice(__pyx_v_current_path_info, 0, 2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; goto __pyx_L1;}
 
6239
    __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; goto __pyx_L1;}
 
6240
    Py_INCREF(__pyx_k90p);
 
6241
    PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k90p);
 
6242
    __pyx_3 = PyNumber_Add(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; goto __pyx_L1;}
 
6243
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
6244
    Py_DECREF(__pyx_2); __pyx_2 = 0;
 
6245
    __pyx_1 = PySequence_GetSlice(__pyx_v_current_path_info, 3, PY_SSIZE_T_MAX); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; goto __pyx_L1;}
 
6246
    __pyx_2 = PyNumber_Add(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; goto __pyx_L1;}
 
6247
    Py_DECREF(__pyx_3); __pyx_3 = 0;
 
6248
    Py_DECREF(__pyx_1); __pyx_1 = 0;
 
6249
    __pyx_r = __pyx_2;
 
6250
    __pyx_2 = 0;
 
6251
    goto __pyx_L0;
 
6252
    goto __pyx_L2;
 
6253
  }
 
6254
  /*else*/ {
 
6255
    Py_INCREF(__pyx_v_current_path_info);
 
6256
    __pyx_r = __pyx_v_current_path_info;
 
6257
    goto __pyx_L0;
 
6258
  }
 
6259
  __pyx_L2:;
 
6260
 
 
6261
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
6262
  goto __pyx_L0;
 
6263
  __pyx_L1:;
 
6264
  Py_XDECREF(__pyx_1);
 
6265
  Py_XDECREF(__pyx_2);
 
6266
  Py_XDECREF(__pyx_3);
 
6267
  __Pyx_AddTraceback("_dirstate_helpers_c.ProcessEntryC._maybe_tree_ref");
 
6268
  __pyx_r = 0;
 
6269
  __pyx_L0:;
 
6270
  Py_DECREF(__pyx_v_self);
 
6271
  Py_DECREF(__pyx_v_current_path_info);
 
6272
  return __pyx_r;
 
6273
}
 
6274
 
 
6275
static PyObject *__pyx_n_cmp;
 
6276
static PyObject *__pyx_n_BadFilenameEncoding;
 
6277
static PyObject *__pyx_n__fs_enc;
 
6278
 
 
6279
static PyObject *__pyx_k92p;
 
6280
static PyObject *__pyx_k94p;
 
6281
 
 
6282
static char __pyx_k92[] = "result is not None: %r";
 
6283
static char __pyx_k94[] = "tree-reference";
 
6284
 
 
6285
static PyObject *__pyx_f_19_dirstate_helpers_c_13ProcessEntryC__loop_one_block(struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *__pyx_v_self) {
 
6286
  PyObject *__pyx_v_current_entry;
 
6287
  PyObject *__pyx_v_current_path_info;
 
6288
  int __pyx_v_path_handled;
 
6289
  char __pyx_v_minikind;
 
6290
  int __pyx_v_cmp_result;
 
6291
  PyObject *__pyx_v_disk_kind;
 
6292
  PyObject *__pyx_v_advance_entry;
 
6293
  PyObject *__pyx_v_advance_path;
 
6294
  PyObject *__pyx_v_result;
 
6295
  PyObject *__pyx_v_new_executable;
 
6296
  PyObject *__pyx_v_relpath_unicode;
 
6297
  PyObject *__pyx_r;
 
6298
  int __pyx_1;
 
6299
  PyObject *__pyx_2 = 0;
 
6300
  PyObject *__pyx_3 = 0;
 
6301
  PyObject *__pyx_4 = 0;
 
6302
  PyObject *__pyx_5 = 0;
 
6303
  PyObject *__pyx_6 = 0;
 
6304
  PyObject *__pyx_7 = 0;
 
6305
  PyObject *__pyx_8 = 0;
 
6306
  Py_ssize_t __pyx_9;
 
6307
  Py_INCREF(__pyx_v_self);
 
6308
  __pyx_v_current_entry = Py_None; Py_INCREF(Py_None);
 
6309
  __pyx_v_current_path_info = Py_None; Py_INCREF(Py_None);
 
6310
  __pyx_v_disk_kind = Py_None; Py_INCREF(Py_None);
 
6311
  __pyx_v_advance_entry = Py_None; Py_INCREF(Py_None);
 
6312
  __pyx_v_advance_path = Py_None; Py_INCREF(Py_None);
 
6313
  __pyx_v_result = Py_None; Py_INCREF(Py_None);
 
6314
  __pyx_v_new_executable = Py_None; Py_INCREF(Py_None);
 
6315
  __pyx_v_relpath_unicode = Py_None; Py_INCREF(Py_None);
 
6316
 
 
6317
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1644 */
 
6318
  __pyx_1 = __pyx_v_self->current_block != Py_None;
 
6319
  if (__pyx_1) {
 
6320
    __pyx_1 = (__pyx_v_self->current_block_pos < PyList_GET_SIZE(__pyx_v_self->current_block_list));
 
6321
  }
 
6322
  if (__pyx_1) {
 
6323
 
 
6324
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1646 */
 
6325
    __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 = 1646; goto __pyx_L1;}
 
6326
    Py_DECREF(__pyx_v_current_entry);
 
6327
    __pyx_v_current_entry = __pyx_2;
 
6328
    __pyx_2 = 0;
 
6329
 
 
6330
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1649 */
 
6331
    Py_INCREF(__pyx_v_current_entry);
 
6332
    goto __pyx_L2;
 
6333
  }
 
6334
  /*else*/ {
 
6335
    Py_INCREF(Py_None);
 
6336
    Py_DECREF(__pyx_v_current_entry);
 
6337
    __pyx_v_current_entry = Py_None;
 
6338
  }
 
6339
  __pyx_L2:;
 
6340
 
 
6341
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1652 */
 
6342
  __pyx_1 = __pyx_v_self->current_dir_info != Py_None;
 
6343
  if (__pyx_1) {
 
6344
    __pyx_1 = (__pyx_v_self->path_index < PyList_GET_SIZE(__pyx_v_self->current_dir_list));
 
6345
  }
 
6346
  if (__pyx_1) {
 
6347
 
 
6348
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1654 */
 
6349
    __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 = 1654; goto __pyx_L1;}
 
6350
    Py_DECREF(__pyx_v_current_path_info);
 
6351
    __pyx_v_current_path_info = __pyx_2;
 
6352
    __pyx_2 = 0;
 
6353
 
 
6354
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1657 */
 
6355
    Py_INCREF(__pyx_v_current_path_info);
 
6356
 
 
6357
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1658 */
 
6358
    __pyx_2 = PyTuple_GET_ITEM(__pyx_v_current_path_info,2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; goto __pyx_L1;}
 
6359
    Py_DECREF(__pyx_v_disk_kind);
 
6360
    __pyx_v_disk_kind = __pyx_2;
 
6361
    __pyx_2 = 0;
 
6362
 
 
6363
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1660 */
 
6364
    Py_INCREF(__pyx_v_disk_kind);
 
6365
 
 
6366
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1661 */
 
6367
    if (PyObject_Cmp(__pyx_v_disk_kind, __pyx_n_directory, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; goto __pyx_L1;}
 
6368
    __pyx_1 = __pyx_1 == 0;
 
6369
    if (__pyx_1) {
 
6370
      __pyx_2 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_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 = 1662; goto __pyx_L1;}
 
6371
      Py_DECREF(__pyx_v_current_path_info);
 
6372
      __pyx_v_current_path_info = __pyx_2;
 
6373
      __pyx_2 = 0;
 
6374
      goto __pyx_L4;
 
6375
    }
 
6376
    __pyx_L4:;
 
6377
    goto __pyx_L3;
 
6378
  }
 
6379
  /*else*/ {
 
6380
    Py_INCREF(Py_None);
 
6381
    Py_DECREF(__pyx_v_current_path_info);
 
6382
    __pyx_v_current_path_info = Py_None;
 
6383
  }
 
6384
  __pyx_L3:;
 
6385
 
 
6386
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1665 */
 
6387
  while (1) {
 
6388
    __pyx_1 = __pyx_v_current_entry != Py_None;
 
6389
    if (!__pyx_1) {
 
6390
      __pyx_1 = __pyx_v_current_path_info != Py_None;
 
6391
    }
 
6392
    if (!__pyx_1) break;
 
6393
 
 
6394
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1666 */
 
6395
    __pyx_2 = PyInt_FromLong((-1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; goto __pyx_L1;}
 
6396
    Py_DECREF(__pyx_v_advance_entry);
 
6397
    __pyx_v_advance_entry = __pyx_2;
 
6398
    __pyx_2 = 0;
 
6399
 
 
6400
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1667 */
 
6401
    __pyx_2 = PyInt_FromLong((-1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; goto __pyx_L1;}
 
6402
    Py_DECREF(__pyx_v_advance_path);
 
6403
    __pyx_v_advance_path = __pyx_2;
 
6404
    __pyx_2 = 0;
 
6405
 
 
6406
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1668 */
 
6407
    Py_INCREF(Py_None);
 
6408
    Py_DECREF(__pyx_v_result);
 
6409
    __pyx_v_result = Py_None;
 
6410
 
 
6411
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1669 */
 
6412
    __pyx_v_path_handled = 0;
 
6413
 
 
6414
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1670 */
 
6415
    __pyx_1 = __pyx_v_current_entry == Py_None;
 
6416
    if (__pyx_1) {
 
6417
      goto __pyx_L7;
 
6418
    }
 
6419
    __pyx_1 = __pyx_v_current_path_info == Py_None;
 
6420
    if (__pyx_1) {
 
6421
 
 
6422
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1676 */
 
6423
      __pyx_2 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_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 = 1676; goto __pyx_L1;}
 
6424
      Py_DECREF(__pyx_v_result);
 
6425
      __pyx_v_result = __pyx_2;
 
6426
      __pyx_2 = 0;
 
6427
 
 
6428
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1677 */
 
6429
      __pyx_1 = __pyx_v_result != Py_None;
 
6430
      if (__pyx_1) {
 
6431
        __pyx_1 = __pyx_v_result == __pyx_v_self->uninteresting;
 
6432
        if (__pyx_1) {
 
6433
          Py_INCREF(Py_None);
 
6434
          Py_DECREF(__pyx_v_result);
 
6435
          __pyx_v_result = Py_None;
 
6436
          goto __pyx_L9;
 
6437
        }
 
6438
        __pyx_L9:;
 
6439
        goto __pyx_L8;
 
6440
      }
 
6441
      __pyx_L8:;
 
6442
      goto __pyx_L7;
 
6443
    }
 
6444
    /*else*/ {
 
6445
 
 
6446
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1681 */
 
6447
      __pyx_2 = __Pyx_GetItemInt(__pyx_v_current_entry, 1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;}
 
6448
      __pyx_3 = __Pyx_GetItemInt(__pyx_2, __pyx_v_self->target_index); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;}
 
6449
      Py_DECREF(__pyx_2); __pyx_2 = 0;
 
6450
      __pyx_2 = __Pyx_GetItemInt(__pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;}
 
6451
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
6452
      __pyx_v_minikind = __pyx_f_19_dirstate_helpers_c__minikind_from_string(__pyx_2);
 
6453
      Py_DECREF(__pyx_2); __pyx_2 = 0;
 
6454
 
 
6455
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1683 */
 
6456
      __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_cmp); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;}
 
6457
      __pyx_2 = __Pyx_GetItemInt(__pyx_v_current_path_info, 1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;}
 
6458
      __pyx_4 = __Pyx_GetItemInt(__pyx_v_current_entry, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;}
 
6459
      __pyx_5 = __Pyx_GetItemInt(__pyx_4, 1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;}
 
6460
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
6461
      __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;}
 
6462
      PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
 
6463
      PyTuple_SET_ITEM(__pyx_4, 1, __pyx_5);
 
6464
      __pyx_2 = 0;
 
6465
      __pyx_5 = 0;
 
6466
      __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;}
 
6467
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
6468
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
6469
      __pyx_1 = PyInt_AsLong(__pyx_2); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;}
 
6470
      Py_DECREF(__pyx_2); __pyx_2 = 0;
 
6471
      __pyx_v_cmp_result = __pyx_1;
 
6472
 
 
6473
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1684 */
 
6474
      __pyx_1 = __pyx_v_cmp_result;
 
6475
      if (!__pyx_1) {
 
6476
        __pyx_1 = (__pyx_v_minikind == 'a');
 
6477
        if (!__pyx_1) {
 
6478
          __pyx_1 = (__pyx_v_minikind == 'r');
 
6479
        }
 
6480
      }
 
6481
      if (__pyx_1) {
 
6482
        __pyx_1 = (__pyx_v_cmp_result < 0);
 
6483
        if (__pyx_1) {
 
6484
          __pyx_5 = PyInt_FromLong(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; goto __pyx_L1;}
 
6485
          Py_DECREF(__pyx_v_advance_entry);
 
6486
          __pyx_v_advance_entry = __pyx_5;
 
6487
          __pyx_5 = 0;
 
6488
          goto __pyx_L11;
 
6489
        }
 
6490
        /*else*/ {
 
6491
 
 
6492
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1700 */
 
6493
          __pyx_3 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_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 = 1700; goto __pyx_L1;}
 
6494
          Py_DECREF(__pyx_v_result);
 
6495
          __pyx_v_result = __pyx_3;
 
6496
          __pyx_3 = 0;
 
6497
 
 
6498
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1701 */
 
6499
          __pyx_1 = __pyx_v_result != Py_None;
 
6500
          if (__pyx_1) {
 
6501
            __pyx_1 = __pyx_v_result == __pyx_v_self->uninteresting;
 
6502
            if (__pyx_1) {
 
6503
              Py_INCREF(Py_None);
 
6504
              Py_DECREF(__pyx_v_result);
 
6505
              __pyx_v_result = Py_None;
 
6506
              goto __pyx_L13;
 
6507
            }
 
6508
            __pyx_L13:;
 
6509
            goto __pyx_L12;
 
6510
          }
 
6511
          __pyx_L12:;
 
6512
 
 
6513
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1704 */
 
6514
          __pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; goto __pyx_L1;}
 
6515
          Py_DECREF(__pyx_v_advance_path);
 
6516
          __pyx_v_advance_path = __pyx_4;
 
6517
          __pyx_4 = 0;
 
6518
        }
 
6519
        __pyx_L11:;
 
6520
        goto __pyx_L10;
 
6521
      }
 
6522
      /*else*/ {
 
6523
 
 
6524
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1708 */
 
6525
        __pyx_2 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_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 = 1708; goto __pyx_L1;}
 
6526
        Py_DECREF(__pyx_v_result);
 
6527
        __pyx_v_result = __pyx_2;
 
6528
        __pyx_2 = 0;
 
6529
 
 
6530
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1709 */
 
6531
        __pyx_1 = __pyx_v_result != Py_None;
 
6532
        if (__pyx_1) {
 
6533
 
 
6534
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1710 */
 
6535
          __pyx_v_path_handled = (-1);
 
6536
 
 
6537
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1711 */
 
6538
          __pyx_1 = __pyx_v_result == __pyx_v_self->uninteresting;
 
6539
          if (__pyx_1) {
 
6540
            Py_INCREF(Py_None);
 
6541
            Py_DECREF(__pyx_v_result);
 
6542
            __pyx_v_result = Py_None;
 
6543
            goto __pyx_L15;
 
6544
          }
 
6545
          __pyx_L15:;
 
6546
          goto __pyx_L14;
 
6547
        }
 
6548
        __pyx_L14:;
 
6549
      }
 
6550
      __pyx_L10:;
 
6551
    }
 
6552
    __pyx_L7:;
 
6553
 
 
6554
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1715 */
 
6555
    __pyx_5 = __pyx_v_advance_entry;
 
6556
    Py_INCREF(__pyx_5);
 
6557
    __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; goto __pyx_L1;}
 
6558
    if (__pyx_1) {
 
6559
      Py_DECREF(__pyx_5); __pyx_5 = 0;
 
6560
      __pyx_1 = __pyx_v_current_entry != Py_None;
 
6561
      __pyx_5 = PyInt_FromLong(__pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; goto __pyx_L1;}
 
6562
    }
 
6563
    __pyx_1 = PyObject_IsTrue(__pyx_5); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1715; goto __pyx_L1;}
 
6564
    Py_DECREF(__pyx_5); __pyx_5 = 0;
 
6565
    if (__pyx_1) {
 
6566
 
 
6567
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1716 */
 
6568
      __pyx_v_self->current_block_pos = (__pyx_v_self->current_block_pos + 1);
 
6569
 
 
6570
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1717 */
 
6571
      __pyx_1 = (__pyx_v_self->current_block_pos < PyList_GET_SIZE(__pyx_v_self->current_block_list));
 
6572
      if (__pyx_1) {
 
6573
        __pyx_3 = __Pyx_GetItemInt(__pyx_v_self->current_block_list, __pyx_v_self->current_block_pos); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1718; goto __pyx_L1;}
 
6574
        Py_DECREF(__pyx_v_current_entry);
 
6575
        __pyx_v_current_entry = __pyx_3;
 
6576
        __pyx_3 = 0;
 
6577
        goto __pyx_L17;
 
6578
      }
 
6579
      /*else*/ {
 
6580
        Py_INCREF(Py_None);
 
6581
        Py_DECREF(__pyx_v_current_entry);
 
6582
        __pyx_v_current_entry = Py_None;
 
6583
      }
 
6584
      __pyx_L17:;
 
6585
      goto __pyx_L16;
 
6586
    }
 
6587
    __pyx_L16:;
 
6588
 
 
6589
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1722 */
 
6590
    __pyx_4 = __pyx_v_advance_path;
 
6591
    Py_INCREF(__pyx_4);
 
6592
    __pyx_1 = PyObject_IsTrue(__pyx_4); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; goto __pyx_L1;}
 
6593
    if (__pyx_1) {
 
6594
      Py_DECREF(__pyx_4); __pyx_4 = 0;
 
6595
      __pyx_1 = __pyx_v_current_path_info != Py_None;
 
6596
      __pyx_4 = PyInt_FromLong(__pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; goto __pyx_L1;}
 
6597
    }
 
6598
    __pyx_1 = PyObject_IsTrue(__pyx_4); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; goto __pyx_L1;}
 
6599
    Py_DECREF(__pyx_4); __pyx_4 = 0;
 
6600
    if (__pyx_1) {
 
6601
 
 
6602
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1723 */
 
6603
      __pyx_1 = (!__pyx_v_path_handled);
 
6604
      if (__pyx_1) {
 
6605
 
 
6606
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1725 */
 
6607
        __pyx_1 = __pyx_v_self->want_unversioned;
 
6608
        if (__pyx_1) {
 
6609
 
 
6610
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1726 */
 
6611
          __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_stat); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; goto __pyx_L1;}
 
6612
          __pyx_3 = PyObject_GetAttr(__pyx_5, __pyx_n_S_ISREG); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; goto __pyx_L1;}
 
6613
          Py_DECREF(__pyx_5); __pyx_5 = 0;
 
6614
          __pyx_4 = __Pyx_GetItemInt(__pyx_v_current_path_info, 3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; goto __pyx_L1;}
 
6615
          __pyx_5 = PyObject_GetAttr(__pyx_4, __pyx_n_st_mode); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; goto __pyx_L1;}
 
6616
          Py_DECREF(__pyx_4); __pyx_4 = 0;
 
6617
          __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; goto __pyx_L1;}
 
6618
          PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5);
 
6619
          __pyx_5 = 0;
 
6620
          __pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1727; goto __pyx_L1;}
 
6621
          Py_DECREF(__pyx_3); __pyx_3 = 0;
 
6622
          Py_DECREF(__pyx_4); __pyx_4 = 0;
 
6623
          __pyx_1 = PyObject_IsTrue(__pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; goto __pyx_L1;}
 
6624
          if (__pyx_1) {
 
6625
            Py_DECREF(__pyx_2); __pyx_2 = 0;
 
6626
            __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_stat); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; goto __pyx_L1;}
 
6627
            __pyx_3 = PyObject_GetAttr(__pyx_5, __pyx_n_S_IEXEC); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; goto __pyx_L1;}
 
6628
            Py_DECREF(__pyx_5); __pyx_5 = 0;
 
6629
            __pyx_4 = __Pyx_GetItemInt(__pyx_v_current_path_info, 3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; goto __pyx_L1;}
 
6630
            __pyx_5 = PyObject_GetAttr(__pyx_4, __pyx_n_st_mode); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; goto __pyx_L1;}
 
6631
            Py_DECREF(__pyx_4); __pyx_4 = 0;
 
6632
            __pyx_2 = PyNumber_And(__pyx_3, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; goto __pyx_L1;}
 
6633
            Py_DECREF(__pyx_3); __pyx_3 = 0;
 
6634
            Py_DECREF(__pyx_5); __pyx_5 = 0;
 
6635
          }
 
6636
          __pyx_1 = PyObject_IsTrue(__pyx_2); if (__pyx_1 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; goto __pyx_L1;}
 
6637
          Py_DECREF(__pyx_2); __pyx_2 = 0;
 
6638
          __pyx_4 = PyInt_FromLong(__pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; goto __pyx_L1;}
 
6639
          Py_DECREF(__pyx_v_new_executable);
 
6640
          __pyx_v_new_executable = __pyx_4;
 
6641
          __pyx_4 = 0;
 
6642
 
 
6643
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1729 */
 
6644
          /*try:*/ {
 
6645
            __pyx_3 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1730; goto __pyx_L21;}
 
6646
            __pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1730; goto __pyx_L21;}
 
6647
            PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
 
6648
            __pyx_3 = 0;
 
6649
            __pyx_2 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1730; goto __pyx_L21;}
 
6650
            Py_DECREF(__pyx_5); __pyx_5 = 0;
 
6651
            __pyx_4 = __Pyx_GetItemInt(__pyx_2, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1730; goto __pyx_L21;}
 
6652
            Py_DECREF(__pyx_2); __pyx_2 = 0;
 
6653
            Py_DECREF(__pyx_v_relpath_unicode);
 
6654
            __pyx_v_relpath_unicode = __pyx_4;
 
6655
            __pyx_4 = 0;
 
6656
          }
 
6657
          goto __pyx_L22;
 
6658
          __pyx_L21:;
 
6659
          Py_XDECREF(__pyx_3); __pyx_3 = 0;
 
6660
          Py_XDECREF(__pyx_5); __pyx_5 = 0;
 
6661
          Py_XDECREF(__pyx_2); __pyx_2 = 0;
 
6662
          Py_XDECREF(__pyx_4); __pyx_4 = 0;
 
6663
 
 
6664
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1731 */
 
6665
          __pyx_1 = PyErr_ExceptionMatches(PyExc_UnicodeDecodeError);
 
6666
          if (__pyx_1) {
 
6667
            __Pyx_AddTraceback("_dirstate_helpers_c._loop_one_block");
 
6668
            if (__Pyx_GetException(&__pyx_3, &__pyx_5, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; goto __pyx_L1;}
 
6669
            __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_errors); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1732; goto __pyx_L1;}
 
6670
            __pyx_6 = PyObject_GetAttr(__pyx_4, __pyx_n_BadFilenameEncoding); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1732; goto __pyx_L1;}
 
6671
            Py_DECREF(__pyx_4); __pyx_4 = 0;
 
6672
            __pyx_4 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; goto __pyx_L1;}
 
6673
            __pyx_7 = __Pyx_GetName(__pyx_m, __pyx_n_osutils); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; goto __pyx_L1;}
 
6674
            __pyx_8 = PyObject_GetAttr(__pyx_7, __pyx_n__fs_enc); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; goto __pyx_L1;}
 
6675
            Py_DECREF(__pyx_7); __pyx_7 = 0;
 
6676
            __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1732; goto __pyx_L1;}
 
6677
            PyTuple_SET_ITEM(__pyx_7, 0, __pyx_4);
 
6678
            PyTuple_SET_ITEM(__pyx_7, 1, __pyx_8);
 
6679
            __pyx_4 = 0;
 
6680
            __pyx_8 = 0;
 
6681
            __pyx_4 = PyObject_CallObject(__pyx_6, __pyx_7); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1732; goto __pyx_L1;}
 
6682
            Py_DECREF(__pyx_6); __pyx_6 = 0;
 
6683
            Py_DECREF(__pyx_7); __pyx_7 = 0;
 
6684
            __Pyx_Raise(__pyx_4, 0, 0);
 
6685
            Py_DECREF(__pyx_4); __pyx_4 = 0;
 
6686
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1732; goto __pyx_L1;}
 
6687
            Py_DECREF(__pyx_3); __pyx_3 = 0;
 
6688
            Py_DECREF(__pyx_5); __pyx_5 = 0;
 
6689
            Py_DECREF(__pyx_2); __pyx_2 = 0;
 
6690
            goto __pyx_L22;
 
6691
          }
 
6692
          goto __pyx_L1;
 
6693
          __pyx_L22:;
 
6694
 
 
6695
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1734 */
 
6696
          __pyx_1 = __pyx_v_result != Py_None;
 
6697
          if (__pyx_1) {
 
6698
            __pyx_8 = PyNumber_Remainder(__pyx_k92p, __pyx_v_result); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1736; goto __pyx_L1;}
 
6699
            __pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1735; goto __pyx_L1;}
 
6700
            PyTuple_SET_ITEM(__pyx_6, 0, __pyx_8);
 
6701
            __pyx_8 = 0;
 
6702
            __pyx_7 = PyObject_CallObject(PyExc_AssertionError, __pyx_6); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1735; goto __pyx_L1;}
 
6703
            Py_DECREF(__pyx_6); __pyx_6 = 0;
 
6704
            __Pyx_Raise(__pyx_7, 0, 0);
 
6705
            Py_DECREF(__pyx_7); __pyx_7 = 0;
 
6706
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1735; goto __pyx_L1;}
 
6707
            goto __pyx_L23;
 
6708
          }
 
6709
          __pyx_L23:;
 
6710
 
 
6711
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1737 */
 
6712
          __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; goto __pyx_L1;}
 
6713
          Py_INCREF(Py_None);
 
6714
          PyTuple_SET_ITEM(__pyx_4, 0, Py_None);
 
6715
          Py_INCREF(__pyx_v_relpath_unicode);
 
6716
          PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_relpath_unicode);
 
6717
          __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; goto __pyx_L1;}
 
6718
          Py_INCREF(Py_False);
 
6719
          PyTuple_SET_ITEM(__pyx_3, 0, Py_False);
 
6720
          Py_INCREF(Py_False);
 
6721
          PyTuple_SET_ITEM(__pyx_3, 1, Py_False);
 
6722
          __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; goto __pyx_L1;}
 
6723
          Py_INCREF(Py_None);
 
6724
          PyTuple_SET_ITEM(__pyx_5, 0, Py_None);
 
6725
          Py_INCREF(Py_None);
 
6726
          PyTuple_SET_ITEM(__pyx_5, 1, Py_None);
 
6727
          __pyx_2 = __Pyx_GetItemInt(__pyx_v_current_path_info, 1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; goto __pyx_L1;}
 
6728
          __pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; goto __pyx_L1;}
 
6729
          PyTuple_SET_ITEM(__pyx_8, 0, __pyx_2);
 
6730
          __pyx_2 = 0;
 
6731
          __pyx_6 = PyObject_CallObject(__pyx_v_self->utf8_decode, __pyx_8); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; goto __pyx_L1;}
 
6732
          Py_DECREF(__pyx_8); __pyx_8 = 0;
 
6733
          __pyx_7 = __Pyx_GetItemInt(__pyx_6, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; goto __pyx_L1;}
 
6734
          Py_DECREF(__pyx_6); __pyx_6 = 0;
 
6735
          __pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; goto __pyx_L1;}
 
6736
          Py_INCREF(Py_None);
 
6737
          PyTuple_SET_ITEM(__pyx_2, 0, Py_None);
 
6738
          PyTuple_SET_ITEM(__pyx_2, 1, __pyx_7);
 
6739
          __pyx_7 = 0;
 
6740
          __pyx_8 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; goto __pyx_L1;}
 
6741
          __pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; goto __pyx_L1;}
 
6742
          Py_INCREF(Py_None);
 
6743
          PyTuple_SET_ITEM(__pyx_6, 0, Py_None);
 
6744
          PyTuple_SET_ITEM(__pyx_6, 1, __pyx_8);
 
6745
          __pyx_8 = 0;
 
6746
          __pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; goto __pyx_L1;}
 
6747
          Py_INCREF(Py_None);
 
6748
          PyTuple_SET_ITEM(__pyx_7, 0, Py_None);
 
6749
          Py_INCREF(__pyx_v_new_executable);
 
6750
          PyTuple_SET_ITEM(__pyx_7, 1, __pyx_v_new_executable);
 
6751
          __pyx_8 = PyTuple_New(8); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1737; goto __pyx_L1;}
 
6752
          Py_INCREF(Py_None);
 
6753
          PyTuple_SET_ITEM(__pyx_8, 0, Py_None);
 
6754
          PyTuple_SET_ITEM(__pyx_8, 1, __pyx_4);
 
6755
          Py_INCREF(Py_True);
 
6756
          PyTuple_SET_ITEM(__pyx_8, 2, Py_True);
 
6757
          PyTuple_SET_ITEM(__pyx_8, 3, __pyx_3);
 
6758
          PyTuple_SET_ITEM(__pyx_8, 4, __pyx_5);
 
6759
          PyTuple_SET_ITEM(__pyx_8, 5, __pyx_2);
 
6760
          PyTuple_SET_ITEM(__pyx_8, 6, __pyx_6);
 
6761
          PyTuple_SET_ITEM(__pyx_8, 7, __pyx_7);
 
6762
          __pyx_4 = 0;
 
6763
          __pyx_3 = 0;
 
6764
          __pyx_5 = 0;
 
6765
          __pyx_2 = 0;
 
6766
          __pyx_6 = 0;
 
6767
          __pyx_7 = 0;
 
6768
          Py_DECREF(__pyx_v_result);
 
6769
          __pyx_v_result = __pyx_8;
 
6770
          __pyx_8 = 0;
 
6771
          goto __pyx_L20;
 
6772
        }
 
6773
        __pyx_L20:;
 
6774
 
 
6775
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1747 */
 
6776
        __pyx_4 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; goto __pyx_L1;}
 
6777
        __pyx_1 = PySequence_Contains(__pyx_n_directory, __pyx_4); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; goto __pyx_L1;}
 
6778
        Py_DECREF(__pyx_4); __pyx_4 = 0;
 
6779
        if (__pyx_1) {
 
6780
 
 
6781
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1748 */
 
6782
          if (PySequence_DelItem(__pyx_v_self->current_dir_list, __pyx_v_self->path_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; goto __pyx_L1;}
 
6783
 
 
6784
          /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1749 */
 
6785
          __pyx_v_self->path_index = (__pyx_v_self->path_index - 1);
 
6786
          goto __pyx_L24;
 
6787
        }
 
6788
        __pyx_L24:;
 
6789
        goto __pyx_L19;
 
6790
      }
 
6791
      __pyx_L19:;
 
6792
 
 
6793
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1752 */
 
6794
      __pyx_3 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; goto __pyx_L1;}
 
6795
      if (PyObject_Cmp(__pyx_3, __pyx_k94p, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; goto __pyx_L1;}
 
6796
      __pyx_1 = __pyx_1 == 0;
 
6797
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
6798
      if (__pyx_1) {
 
6799
 
 
6800
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1753 */
 
6801
        if (PySequence_DelItem(__pyx_v_self->current_dir_list, __pyx_v_self->path_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; goto __pyx_L1;}
 
6802
 
 
6803
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1754 */
 
6804
        __pyx_v_self->path_index = (__pyx_v_self->path_index - 1);
 
6805
        goto __pyx_L25;
 
6806
      }
 
6807
      __pyx_L25:;
 
6808
 
 
6809
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1755 */
 
6810
      __pyx_v_self->path_index = (__pyx_v_self->path_index + 1);
 
6811
 
 
6812
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1756 */
 
6813
      __pyx_9 = PyObject_Length(__pyx_v_self->current_dir_list); if (__pyx_9 == -1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; goto __pyx_L1;}
 
6814
      __pyx_1 = (__pyx_v_self->path_index < __pyx_9);
 
6815
      if (__pyx_1) {
 
6816
 
 
6817
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1757 */
 
6818
        __pyx_5 = __Pyx_GetItemInt(__pyx_v_self->current_dir_list, __pyx_v_self->path_index); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; goto __pyx_L1;}
 
6819
        Py_DECREF(__pyx_v_current_path_info);
 
6820
        __pyx_v_current_path_info = __pyx_5;
 
6821
        __pyx_5 = 0;
 
6822
 
 
6823
        /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1758 */
 
6824
        __pyx_2 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; goto __pyx_L1;}
 
6825
        if (PyObject_Cmp(__pyx_2, __pyx_n_directory, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; goto __pyx_L1;}
 
6826
        __pyx_1 = __pyx_1 == 0;
 
6827
        Py_DECREF(__pyx_2); __pyx_2 = 0;
 
6828
        if (__pyx_1) {
 
6829
          __pyx_6 = ((struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_maybe_tree_ref(__pyx_v_self,__pyx_v_current_path_info); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; goto __pyx_L1;}
 
6830
          Py_DECREF(__pyx_v_current_path_info);
 
6831
          __pyx_v_current_path_info = __pyx_6;
 
6832
          __pyx_6 = 0;
 
6833
          goto __pyx_L27;
 
6834
        }
 
6835
        __pyx_L27:;
 
6836
        goto __pyx_L26;
 
6837
      }
 
6838
      /*else*/ {
 
6839
        Py_INCREF(Py_None);
 
6840
        Py_DECREF(__pyx_v_current_path_info);
 
6841
        __pyx_v_current_path_info = Py_None;
 
6842
      }
 
6843
      __pyx_L26:;
 
6844
      goto __pyx_L18;
 
6845
    }
 
6846
    __pyx_L18:;
 
6847
 
 
6848
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1763 */
 
6849
    __pyx_1 = __pyx_v_result != Py_None;
 
6850
    if (__pyx_1) {
 
6851
      Py_INCREF(__pyx_v_result);
 
6852
      __pyx_r = __pyx_v_result;
 
6853
      goto __pyx_L0;
 
6854
      goto __pyx_L28;
 
6855
    }
 
6856
    __pyx_L28:;
 
6857
  }
 
6858
 
 
6859
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1766 */
 
6860
  __pyx_1 = __pyx_v_self->current_block != Py_None;
 
6861
  if (__pyx_1) {
 
6862
 
 
6863
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1767 */
 
6864
    __pyx_v_self->block_index = (__pyx_v_self->block_index + 1);
 
6865
 
 
6866
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1768 */
 
6867
    ((struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_update_current_block(__pyx_v_self);
 
6868
    goto __pyx_L29;
 
6869
  }
 
6870
  __pyx_L29:;
 
6871
 
 
6872
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1769 */
 
6873
  __pyx_1 = __pyx_v_self->current_dir_info != Py_None;
 
6874
  if (__pyx_1) {
 
6875
 
 
6876
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1770 */
 
6877
    __pyx_v_self->path_index = 0;
 
6878
 
 
6879
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1771 */
 
6880
    Py_INCREF(Py_None);
 
6881
    Py_DECREF(__pyx_v_self->current_dir_list);
 
6882
    __pyx_v_self->current_dir_list = Py_None;
 
6883
 
 
6884
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1772 */
 
6885
    /*try:*/ {
 
6886
 
 
6887
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1773 */
 
6888
      __pyx_7 = PyObject_GetAttr(__pyx_v_self->dir_iterator, __pyx_n_next); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1773; goto __pyx_L31;}
 
6889
      __pyx_8 = PyObject_CallObject(__pyx_7, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1773; goto __pyx_L31;}
 
6890
      Py_DECREF(__pyx_7); __pyx_7 = 0;
 
6891
      Py_DECREF(__pyx_v_self->current_dir_info);
 
6892
      __pyx_v_self->current_dir_info = __pyx_8;
 
6893
      __pyx_8 = 0;
 
6894
 
 
6895
      /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1774 */
 
6896
      __pyx_4 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1774; goto __pyx_L31;}
 
6897
      Py_DECREF(__pyx_v_self->current_dir_list);
 
6898
      __pyx_v_self->current_dir_list = __pyx_4;
 
6899
      __pyx_4 = 0;
 
6900
    }
 
6901
    goto __pyx_L32;
 
6902
    __pyx_L31:;
 
6903
    Py_XDECREF(__pyx_3); __pyx_3 = 0;
 
6904
    Py_XDECREF(__pyx_5); __pyx_5 = 0;
 
6905
    Py_XDECREF(__pyx_2); __pyx_2 = 0;
 
6906
    Py_XDECREF(__pyx_6); __pyx_6 = 0;
 
6907
    Py_XDECREF(__pyx_7); __pyx_7 = 0;
 
6908
    Py_XDECREF(__pyx_8); __pyx_8 = 0;
 
6909
    Py_XDECREF(__pyx_4); __pyx_4 = 0;
 
6910
 
 
6911
    /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1775 */
 
6912
    __pyx_1 = PyErr_ExceptionMatches(PyExc_StopIteration);
 
6913
    if (__pyx_1) {
 
6914
      __Pyx_AddTraceback("_dirstate_helpers_c._loop_one_block");
 
6915
      if (__Pyx_GetException(&__pyx_3, &__pyx_5, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1775; goto __pyx_L1;}
 
6916
      Py_INCREF(Py_None);
 
6917
      Py_DECREF(__pyx_v_self->current_dir_info);
 
6918
      __pyx_v_self->current_dir_info = Py_None;
 
6919
      Py_DECREF(__pyx_3); __pyx_3 = 0;
 
6920
      Py_DECREF(__pyx_5); __pyx_5 = 0;
 
6921
      Py_DECREF(__pyx_2); __pyx_2 = 0;
 
6922
      goto __pyx_L32;
 
6923
    }
 
6924
    goto __pyx_L1;
 
6925
    __pyx_L32:;
 
6926
    goto __pyx_L30;
 
6927
  }
 
6928
  __pyx_L30:;
 
6929
 
 
6930
  __pyx_r = Py_None; Py_INCREF(Py_None);
 
6931
  goto __pyx_L0;
 
6932
  __pyx_L1:;
 
6933
  Py_XDECREF(__pyx_2);
 
6934
  Py_XDECREF(__pyx_3);
 
6935
  Py_XDECREF(__pyx_4);
 
6936
  Py_XDECREF(__pyx_5);
 
6937
  Py_XDECREF(__pyx_6);
 
6938
  Py_XDECREF(__pyx_7);
 
6939
  Py_XDECREF(__pyx_8);
 
6940
  __Pyx_AddTraceback("_dirstate_helpers_c.ProcessEntryC._loop_one_block");
 
6941
  __pyx_r = 0;
 
6942
  __pyx_L0:;
 
6943
  Py_DECREF(__pyx_v_current_entry);
 
6944
  Py_DECREF(__pyx_v_current_path_info);
 
6945
  Py_DECREF(__pyx_v_disk_kind);
 
6946
  Py_DECREF(__pyx_v_advance_entry);
 
6947
  Py_DECREF(__pyx_v_advance_path);
 
6948
  Py_DECREF(__pyx_v_result);
 
6949
  Py_DECREF(__pyx_v_new_executable);
 
6950
  Py_DECREF(__pyx_v_relpath_unicode);
 
6951
  Py_DECREF(__pyx_v_self);
 
6952
  return __pyx_r;
 
6953
}
 
6954
 
 
6955
static __Pyx_InternTabEntry __pyx_intern_tab[] = {
 
6956
  {&__pyx_n_AttributeError, "AttributeError"},
 
6957
  {&__pyx_n_BadFilenameEncoding, "BadFilenameEncoding"},
 
6958
  {&__pyx_n_CorruptDirstate, "CorruptDirstate"},
 
6959
  {&__pyx_n_DirState, "DirState"},
 
6960
  {&__pyx_n_DirstateCorrupt, "DirstateCorrupt"},
 
6961
  {&__pyx_n_EINVAL, "EINVAL"},
 
6962
  {&__pyx_n_ENOENT, "ENOENT"},
 
6963
  {&__pyx_n_ENOTDIR, "ENOTDIR"},
 
6964
  {&__pyx_n_IN_MEMORY_MODIFIED, "IN_MEMORY_MODIFIED"},
 
6965
  {&__pyx_n_IN_MEMORY_UNMODIFIED, "IN_MEMORY_UNMODIFIED"},
 
6966
  {&__pyx_n_NULLSTAT, "NULLSTAT"},
 
6967
  {&__pyx_n_NULL_PARENT_DETAILS, "NULL_PARENT_DETAILS"},
 
6968
  {&__pyx_n_S_IEXEC, "S_IEXEC"},
 
6969
  {&__pyx_n_S_ISREG, "S_ISREG"},
 
6970
  {&__pyx_n__cutoff_time, "_cutoff_time"},
 
6971
  {&__pyx_n__dirblock_state, "_dirblock_state"},
 
6972
  {&__pyx_n__dirblocks, "_dirblocks"},
 
6973
  {&__pyx_n__directory_is_tree_reference, "_directory_is_tree_reference"},
 
6974
  {&__pyx_n__encode, "_encode"},
 
6975
  {&__pyx_n__end_of_header, "_end_of_header"},
 
6976
  {&__pyx_n__ensure_block, "_ensure_block"},
 
6977
  {&__pyx_n__entries_for_path, "_entries_for_path"},
 
6978
  {&__pyx_n__filename, "_filename"},
 
6979
  {&__pyx_n__find_block_index_from_key, "_find_block_index_from_key"},
 
6980
  {&__pyx_n__fs_enc, "_fs_enc"},
 
6981
  {&__pyx_n__get_block_entry_index, "_get_block_entry_index"},
 
6982
  {&__pyx_n__get_entry, "_get_entry"},
 
6983
  {&__pyx_n__is_executable, "_is_executable"},
 
6984
  {&__pyx_n__num_entries, "_num_entries"},
 
6985
  {&__pyx_n__num_present_parents, "_num_present_parents"},
 
6986
  {&__pyx_n__observed_sha1, "_observed_sha1"},
 
6987
  {&__pyx_n__parse_dirblocks, "_parse_dirblocks"},
 
6988
  {&__pyx_n__read_link, "_read_link"},
 
6989
  {&__pyx_n__sha1_file, "_sha1_file"},
 
6990
  {&__pyx_n__sha1_provider, "_sha1_provider"},
 
6991
  {&__pyx_n__sha_cutoff_time, "_sha_cutoff_time"},
 
6992
  {&__pyx_n__split_root_dirblock_into_contents, "_split_root_dirblock_into_contents"},
 
6993
  {&__pyx_n__state_file, "_state_file"},
 
6994
  {&__pyx_n__utf8_decode, "_utf8_decode"},
 
6995
  {&__pyx_n__walkdirs_utf8, "_walkdirs_utf8"},
 
6996
  {&__pyx_n_a, "a"},
 
6997
  {&__pyx_n_absent, "absent"},
 
6998
  {&__pyx_n_abspath, "abspath"},
 
6999
  {&__pyx_n_add, "add"},
 
7000
  {&__pyx_n_b2a_base64, "b2a_base64"},
 
7001
  {&__pyx_n_binascii, "binascii"},
 
7002
  {&__pyx_n_bisect, "bisect"},
 
7003
  {&__pyx_n_bisect_left, "bisect_left"},
 
7004
  {&__pyx_n_bzrlib, "bzrlib"},
 
7005
  {&__pyx_n_cache_utf8, "cache_utf8"},
 
7006
  {&__pyx_n_cmp, "cmp"},
 
7007
  {&__pyx_n_d, "d"},
 
7008
  {&__pyx_n_decode, "decode"},
 
7009
  {&__pyx_n_directory, "directory"},
 
7010
  {&__pyx_n_errno, "errno"},
 
7011
  {&__pyx_n_errors, "errors"},
 
7012
  {&__pyx_n_f, "f"},
 
7013
  {&__pyx_n_file, "file"},
 
7014
  {&__pyx_n_file_kind_from_stat_mode, "file_kind_from_stat_mode"},
 
7015
  {&__pyx_n_fstat, "fstat"},
 
7016
  {&__pyx_n_is_inside, "is_inside"},
 
7017
  {&__pyx_n_is_inside_any, "is_inside_any"},
 
7018
  {&__pyx_n_l, "l"},
 
7019
  {&__pyx_n_lstat, "lstat"},
 
7020
  {&__pyx_n_next, "next"},
 
7021
  {&__pyx_n_object, "object"},
 
7022
  {&__pyx_n_os, "os"},
 
7023
  {&__pyx_n_osutils, "osutils"},
 
7024
  {&__pyx_n_pack, "pack"},
 
7025
  {&__pyx_n_path, "path"},
 
7026
  {&__pyx_n_path_utf8, "path_utf8"},
 
7027
  {&__pyx_n_pathjoin, "pathjoin"},
 
7028
  {&__pyx_n_platform, "platform"},
 
7029
  {&__pyx_n_pop, "pop"},
 
7030
  {&__pyx_n_prefix, "prefix"},
 
7031
  {&__pyx_n_read, "read"},
 
7032
  {&__pyx_n_relocated, "relocated"},
 
7033
  {&__pyx_n_seek, "seek"},
 
7034
  {&__pyx_n_set, "set"},
 
7035
  {&__pyx_n_sha_file, "sha_file"},
 
7036
  {&__pyx_n_split, "split"},
 
7037
  {&__pyx_n_splitpath, "splitpath"},
 
7038
  {&__pyx_n_st_ctime, "st_ctime"},
 
7039
  {&__pyx_n_st_dev, "st_dev"},
 
7040
  {&__pyx_n_st_ino, "st_ino"},
 
7041
  {&__pyx_n_st_mode, "st_mode"},
 
7042
  {&__pyx_n_st_mtime, "st_mtime"},
 
7043
  {&__pyx_n_st_size, "st_size"},
 
7044
  {&__pyx_n_stat, "stat"},
 
7045
  {&__pyx_n_stat_and_sha1, "stat_and_sha1"},
 
7046
  {&__pyx_n_struct, "struct"},
 
7047
  {&__pyx_n_symlink, "symlink"},
 
7048
  {&__pyx_n_sys, "sys"},
 
7049
  {&__pyx_n_utf8, "utf8"},
 
7050
  {&__pyx_n_win32, "win32"},
 
7051
  {&__pyx_n_winerror, "winerror"},
 
7052
  {0, 0}
 
7053
};
 
7054
 
 
7055
static __Pyx_StringTabEntry __pyx_string_tab[] = {
 
7056
  {&__pyx_k11p, __pyx_k11, sizeof(__pyx_k11)},
 
7057
  {&__pyx_k13p, __pyx_k13, sizeof(__pyx_k13)},
 
7058
  {&__pyx_k26p, __pyx_k26, sizeof(__pyx_k26)},
 
7059
  {&__pyx_k27p, __pyx_k27, sizeof(__pyx_k27)},
 
7060
  {&__pyx_k28p, __pyx_k28, sizeof(__pyx_k28)},
 
7061
  {&__pyx_k29p, __pyx_k29, sizeof(__pyx_k29)},
 
7062
  {&__pyx_k30p, __pyx_k30, sizeof(__pyx_k30)},
 
7063
  {&__pyx_k31p, __pyx_k31, sizeof(__pyx_k31)},
 
7064
  {&__pyx_k32p, __pyx_k32, sizeof(__pyx_k32)},
 
7065
  {&__pyx_k35p, __pyx_k35, sizeof(__pyx_k35)},
 
7066
  {&__pyx_k36p, __pyx_k36, sizeof(__pyx_k36)},
 
7067
  {&__pyx_k37p, __pyx_k37, sizeof(__pyx_k37)},
 
7068
  {&__pyx_k38p, __pyx_k38, sizeof(__pyx_k38)},
 
7069
  {&__pyx_k39p, __pyx_k39, sizeof(__pyx_k39)},
 
7070
  {&__pyx_k40p, __pyx_k40, sizeof(__pyx_k40)},
 
7071
  {&__pyx_k41p, __pyx_k41, sizeof(__pyx_k41)},
 
7072
  {&__pyx_k42p, __pyx_k42, sizeof(__pyx_k42)},
 
7073
  {&__pyx_k43p, __pyx_k43, sizeof(__pyx_k43)},
 
7074
  {&__pyx_k44p, __pyx_k44, sizeof(__pyx_k44)},
 
7075
  {&__pyx_k45p, __pyx_k45, sizeof(__pyx_k45)},
 
7076
  {&__pyx_k46p, __pyx_k46, sizeof(__pyx_k46)},
 
7077
  {&__pyx_k47p, __pyx_k47, sizeof(__pyx_k47)},
 
7078
  {&__pyx_k48p, __pyx_k48, sizeof(__pyx_k48)},
 
7079
  {&__pyx_k49p, __pyx_k49, sizeof(__pyx_k49)},
 
7080
  {&__pyx_k53p, __pyx_k53, sizeof(__pyx_k53)},
 
7081
  {&__pyx_k55p, __pyx_k55, sizeof(__pyx_k55)},
 
7082
  {&__pyx_k58p, __pyx_k58, sizeof(__pyx_k58)},
 
7083
  {&__pyx_k59p, __pyx_k59, sizeof(__pyx_k59)},
 
7084
  {&__pyx_k61p, __pyx_k61, sizeof(__pyx_k61)},
 
7085
  {&__pyx_k65p, __pyx_k65, sizeof(__pyx_k65)},
 
7086
  {&__pyx_k66p, __pyx_k66, sizeof(__pyx_k66)},
 
7087
  {&__pyx_k69p, __pyx_k69, sizeof(__pyx_k69)},
 
7088
  {&__pyx_k71p, __pyx_k71, sizeof(__pyx_k71)},
 
7089
  {&__pyx_k73p, __pyx_k73, sizeof(__pyx_k73)},
 
7090
  {&__pyx_k75p, __pyx_k75, sizeof(__pyx_k75)},
 
7091
  {&__pyx_k77p, __pyx_k77, sizeof(__pyx_k77)},
 
7092
  {&__pyx_k78p, __pyx_k78, sizeof(__pyx_k78)},
 
7093
  {&__pyx_k81p, __pyx_k81, sizeof(__pyx_k81)},
 
7094
  {&__pyx_k82p, __pyx_k82, sizeof(__pyx_k82)},
 
7095
  {&__pyx_k83p, __pyx_k83, sizeof(__pyx_k83)},
 
7096
  {&__pyx_k84p, __pyx_k84, sizeof(__pyx_k84)},
 
7097
  {&__pyx_k85p, __pyx_k85, sizeof(__pyx_k85)},
 
7098
  {&__pyx_k87p, __pyx_k87, sizeof(__pyx_k87)},
 
7099
  {&__pyx_k89p, __pyx_k89, sizeof(__pyx_k89)},
 
7100
  {&__pyx_k90p, __pyx_k90, sizeof(__pyx_k90)},
 
7101
  {&__pyx_k92p, __pyx_k92, sizeof(__pyx_k92)},
 
7102
  {&__pyx_k94p, __pyx_k94, sizeof(__pyx_k94)},
 
7103
  {0, 0, 0}
 
7104
};
 
7105
static struct __pyx_vtabstruct_19_dirstate_helpers_c_Reader __pyx_vtable_19_dirstate_helpers_c_Reader;
 
7106
 
 
7107
static PyObject *__pyx_tp_new_19_dirstate_helpers_c_Reader(PyTypeObject *t, PyObject *a, PyObject *k) {
 
7108
  struct __pyx_obj_19_dirstate_helpers_c_Reader *p;
 
7109
  PyObject *o = (*t->tp_alloc)(t, 0);
 
7110
  if (!o) return 0;
 
7111
  p = ((struct __pyx_obj_19_dirstate_helpers_c_Reader *)o);
 
7112
  *(struct __pyx_vtabstruct_19_dirstate_helpers_c_Reader **)&p->__pyx_vtab = __pyx_vtabptr_19_dirstate_helpers_c_Reader;
 
7113
  p->state = Py_None; Py_INCREF(Py_None);
 
7114
  p->text = Py_None; Py_INCREF(Py_None);
 
7115
  return o;
 
7116
}
 
7117
 
 
7118
static void __pyx_tp_dealloc_19_dirstate_helpers_c_Reader(PyObject *o) {
 
7119
  struct __pyx_obj_19_dirstate_helpers_c_Reader *p = (struct __pyx_obj_19_dirstate_helpers_c_Reader *)o;
 
7120
  Py_XDECREF(p->state);
 
7121
  Py_XDECREF(p->text);
 
7122
  (*o->ob_type->tp_free)(o);
 
7123
}
 
7124
 
 
7125
static int __pyx_tp_traverse_19_dirstate_helpers_c_Reader(PyObject *o, visitproc v, void *a) {
 
7126
  int e;
 
7127
  struct __pyx_obj_19_dirstate_helpers_c_Reader *p = (struct __pyx_obj_19_dirstate_helpers_c_Reader *)o;
 
7128
  if (p->state) {
 
7129
    e = (*v)(p->state, a); if (e) return e;
 
7130
  }
 
7131
  if (p->text) {
 
7132
    e = (*v)(p->text, a); if (e) return e;
 
7133
  }
 
7134
  return 0;
 
7135
}
 
7136
 
 
7137
static int __pyx_tp_clear_19_dirstate_helpers_c_Reader(PyObject *o) {
 
7138
  struct __pyx_obj_19_dirstate_helpers_c_Reader *p = (struct __pyx_obj_19_dirstate_helpers_c_Reader *)o;
 
7139
  PyObject *t;
 
7140
  t = p->state; 
 
7141
  p->state = Py_None; Py_INCREF(Py_None);
 
7142
  Py_XDECREF(t);
 
7143
  t = p->text; 
 
7144
  p->text = Py_None; Py_INCREF(Py_None);
 
7145
  Py_XDECREF(t);
 
7146
  return 0;
 
7147
}
 
7148
 
 
7149
static struct PyMethodDef __pyx_methods_19_dirstate_helpers_c_Reader[] = {
 
7150
  {"_parse_dirblocks", (PyCFunction)__pyx_f_19_dirstate_helpers_c_6Reader__parse_dirblocks, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19_dirstate_helpers_c_6Reader__parse_dirblocks},
 
7151
  {0, 0, 0, 0}
 
7152
};
 
7153
 
 
7154
static PyNumberMethods __pyx_tp_as_number_Reader = {
 
7155
  0, /*nb_add*/
 
7156
  0, /*nb_subtract*/
 
7157
  0, /*nb_multiply*/
 
7158
  0, /*nb_divide*/
 
7159
  0, /*nb_remainder*/
 
7160
  0, /*nb_divmod*/
 
7161
  0, /*nb_power*/
 
7162
  0, /*nb_negative*/
 
7163
  0, /*nb_positive*/
 
7164
  0, /*nb_absolute*/
 
7165
  0, /*nb_nonzero*/
 
7166
  0, /*nb_invert*/
 
7167
  0, /*nb_lshift*/
 
7168
  0, /*nb_rshift*/
 
7169
  0, /*nb_and*/
 
7170
  0, /*nb_xor*/
 
7171
  0, /*nb_or*/
 
7172
  0, /*nb_coerce*/
 
7173
  0, /*nb_int*/
 
7174
  0, /*nb_long*/
 
7175
  0, /*nb_float*/
 
7176
  0, /*nb_oct*/
 
7177
  0, /*nb_hex*/
 
7178
  0, /*nb_inplace_add*/
 
7179
  0, /*nb_inplace_subtract*/
 
7180
  0, /*nb_inplace_multiply*/
 
7181
  0, /*nb_inplace_divide*/
 
7182
  0, /*nb_inplace_remainder*/
 
7183
  0, /*nb_inplace_power*/
 
7184
  0, /*nb_inplace_lshift*/
 
7185
  0, /*nb_inplace_rshift*/
 
7186
  0, /*nb_inplace_and*/
 
7187
  0, /*nb_inplace_xor*/
 
7188
  0, /*nb_inplace_or*/
 
7189
  0, /*nb_floor_divide*/
 
7190
  0, /*nb_true_divide*/
 
7191
  0, /*nb_inplace_floor_divide*/
 
7192
  0, /*nb_inplace_true_divide*/
 
7193
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
 
7194
  0, /*nb_index*/
 
7195
  #endif
 
7196
};
 
7197
 
 
7198
static PySequenceMethods __pyx_tp_as_sequence_Reader = {
 
7199
  0, /*sq_length*/
 
7200
  0, /*sq_concat*/
 
7201
  0, /*sq_repeat*/
 
7202
  0, /*sq_item*/
 
7203
  0, /*sq_slice*/
 
7204
  0, /*sq_ass_item*/
 
7205
  0, /*sq_ass_slice*/
 
7206
  0, /*sq_contains*/
 
7207
  0, /*sq_inplace_concat*/
 
7208
  0, /*sq_inplace_repeat*/
 
7209
};
 
7210
 
 
7211
static PyMappingMethods __pyx_tp_as_mapping_Reader = {
 
7212
  0, /*mp_length*/
 
7213
  0, /*mp_subscript*/
 
7214
  0, /*mp_ass_subscript*/
 
7215
};
 
7216
 
 
7217
static PyBufferProcs __pyx_tp_as_buffer_Reader = {
 
7218
  0, /*bf_getreadbuffer*/
 
7219
  0, /*bf_getwritebuffer*/
 
7220
  0, /*bf_getsegcount*/
 
7221
  0, /*bf_getcharbuffer*/
 
7222
};
 
7223
 
 
7224
PyTypeObject __pyx_type_19_dirstate_helpers_c_Reader = {
 
7225
  PyObject_HEAD_INIT(0)
 
7226
  0, /*ob_size*/
 
7227
  "_dirstate_helpers_c.Reader", /*tp_name*/
 
7228
  sizeof(struct __pyx_obj_19_dirstate_helpers_c_Reader), /*tp_basicsize*/
 
7229
  0, /*tp_itemsize*/
 
7230
  __pyx_tp_dealloc_19_dirstate_helpers_c_Reader, /*tp_dealloc*/
 
7231
  0, /*tp_print*/
 
7232
  0, /*tp_getattr*/
 
7233
  0, /*tp_setattr*/
 
7234
  0, /*tp_compare*/
 
7235
  0, /*tp_repr*/
 
7236
  &__pyx_tp_as_number_Reader, /*tp_as_number*/
 
7237
  &__pyx_tp_as_sequence_Reader, /*tp_as_sequence*/
 
7238
  &__pyx_tp_as_mapping_Reader, /*tp_as_mapping*/
 
7239
  0, /*tp_hash*/
 
7240
  0, /*tp_call*/
 
7241
  0, /*tp_str*/
 
7242
  0, /*tp_getattro*/
 
7243
  0, /*tp_setattro*/
 
7244
  &__pyx_tp_as_buffer_Reader, /*tp_as_buffer*/
 
7245
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
 
7246
  "Maintain the current location, and return fields as you parse them.", /*tp_doc*/
 
7247
  __pyx_tp_traverse_19_dirstate_helpers_c_Reader, /*tp_traverse*/
 
7248
  __pyx_tp_clear_19_dirstate_helpers_c_Reader, /*tp_clear*/
 
7249
  0, /*tp_richcompare*/
 
7250
  0, /*tp_weaklistoffset*/
 
7251
  0, /*tp_iter*/
 
7252
  0, /*tp_iternext*/
 
7253
  __pyx_methods_19_dirstate_helpers_c_Reader, /*tp_methods*/
 
7254
  0, /*tp_members*/
 
7255
  0, /*tp_getset*/
 
7256
  0, /*tp_base*/
 
7257
  0, /*tp_dict*/
 
7258
  0, /*tp_descr_get*/
 
7259
  0, /*tp_descr_set*/
 
7260
  0, /*tp_dictoffset*/
 
7261
  __pyx_f_19_dirstate_helpers_c_6Reader___init__, /*tp_init*/
 
7262
  0, /*tp_alloc*/
 
7263
  __pyx_tp_new_19_dirstate_helpers_c_Reader, /*tp_new*/
 
7264
  0, /*tp_free*/
 
7265
  0, /*tp_is_gc*/
 
7266
  0, /*tp_bases*/
 
7267
  0, /*tp_mro*/
 
7268
  0, /*tp_cache*/
 
7269
  0, /*tp_subclasses*/
 
7270
  0, /*tp_weaklist*/
 
7271
};
 
7272
static struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC __pyx_vtable_19_dirstate_helpers_c_ProcessEntryC;
 
7273
 
 
7274
static PyObject *__pyx_tp_new_19_dirstate_helpers_c_ProcessEntryC(PyTypeObject *t, PyObject *a, PyObject *k) {
 
7275
  struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *p;
 
7276
  PyObject *o = (*t->tp_alloc)(t, 0);
 
7277
  if (!o) return 0;
 
7278
  p = ((struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)o);
 
7279
  *(struct __pyx_vtabstruct_19_dirstate_helpers_c_ProcessEntryC **)&p->__pyx_vtab = __pyx_vtabptr_19_dirstate_helpers_c_ProcessEntryC;
 
7280
  p->old_dirname_to_file_id = Py_None; Py_INCREF(Py_None);
 
7281
  p->new_dirname_to_file_id = Py_None; Py_INCREF(Py_None);
 
7282
  p->uninteresting = Py_None; Py_INCREF(Py_None);
 
7283
  p->last_source_parent = Py_None; Py_INCREF(Py_None);
 
7284
  p->last_target_parent = Py_None; Py_INCREF(Py_None);
 
7285
  p->include_unchanged = Py_None; Py_INCREF(Py_None);
 
7286
  p->use_filesystem_for_exec = Py_None; Py_INCREF(Py_None);
 
7287
  p->utf8_decode = Py_None; Py_INCREF(Py_None);
 
7288
  p->searched_specific_files = Py_None; Py_INCREF(Py_None);
 
7289
  p->search_specific_files = Py_None; Py_INCREF(Py_None);
 
7290
  p->state = Py_None; Py_INCREF(Py_None);
 
7291
  p->current_root = Py_None; Py_INCREF(Py_None);
 
7292
  p->current_root_unicode = Py_None; Py_INCREF(Py_None);
 
7293
  p->root_entries = Py_None; Py_INCREF(Py_None);
 
7294
  p->root_abspath = Py_None; Py_INCREF(Py_None);
 
7295
  p->tree = Py_None; Py_INCREF(Py_None);
 
7296
  p->dir_iterator = Py_None; Py_INCREF(Py_None);
 
7297
  p->current_block = Py_None; Py_INCREF(Py_None);
 
7298
  p->current_block_list = Py_None; Py_INCREF(Py_None);
 
7299
  p->current_dir_info = Py_None; Py_INCREF(Py_None);
 
7300
  p->current_dir_list = Py_None; Py_INCREF(Py_None);
 
7301
  p->root_dir_info = Py_None; Py_INCREF(Py_None);
 
7302
  p->bisect_left = Py_None; Py_INCREF(Py_None);
 
7303
  p->pathjoin = Py_None; Py_INCREF(Py_None);
 
7304
  p->fstat = Py_None; Py_INCREF(Py_None);
 
7305
  p->sha_file = Py_None; Py_INCREF(Py_None);
 
7306
  return o;
 
7307
}
 
7308
 
 
7309
static void __pyx_tp_dealloc_19_dirstate_helpers_c_ProcessEntryC(PyObject *o) {
 
7310
  struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *p = (struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)o;
 
7311
  Py_XDECREF(p->old_dirname_to_file_id);
 
7312
  Py_XDECREF(p->new_dirname_to_file_id);
 
7313
  Py_XDECREF(p->uninteresting);
 
7314
  Py_XDECREF(p->last_source_parent);
 
7315
  Py_XDECREF(p->last_target_parent);
 
7316
  Py_XDECREF(p->include_unchanged);
 
7317
  Py_XDECREF(p->use_filesystem_for_exec);
 
7318
  Py_XDECREF(p->utf8_decode);
 
7319
  Py_XDECREF(p->searched_specific_files);
 
7320
  Py_XDECREF(p->search_specific_files);
 
7321
  Py_XDECREF(p->state);
 
7322
  Py_XDECREF(p->current_root);
 
7323
  Py_XDECREF(p->current_root_unicode);
 
7324
  Py_XDECREF(p->root_entries);
 
7325
  Py_XDECREF(p->root_abspath);
 
7326
  Py_XDECREF(p->tree);
 
7327
  Py_XDECREF(p->dir_iterator);
 
7328
  Py_XDECREF(p->current_block);
 
7329
  Py_XDECREF(p->current_block_list);
 
7330
  Py_XDECREF(p->current_dir_info);
 
7331
  Py_XDECREF(p->current_dir_list);
 
7332
  Py_XDECREF(p->root_dir_info);
 
7333
  Py_XDECREF(p->bisect_left);
 
7334
  Py_XDECREF(p->pathjoin);
 
7335
  Py_XDECREF(p->fstat);
 
7336
  Py_XDECREF(p->sha_file);
 
7337
  (*o->ob_type->tp_free)(o);
 
7338
}
 
7339
 
 
7340
static int __pyx_tp_traverse_19_dirstate_helpers_c_ProcessEntryC(PyObject *o, visitproc v, void *a) {
 
7341
  int e;
 
7342
  struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *p = (struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)o;
 
7343
  if (p->old_dirname_to_file_id) {
 
7344
    e = (*v)(p->old_dirname_to_file_id, a); if (e) return e;
 
7345
  }
 
7346
  if (p->new_dirname_to_file_id) {
 
7347
    e = (*v)(p->new_dirname_to_file_id, a); if (e) return e;
 
7348
  }
 
7349
  if (p->uninteresting) {
 
7350
    e = (*v)(p->uninteresting, a); if (e) return e;
 
7351
  }
 
7352
  if (p->last_source_parent) {
 
7353
    e = (*v)(p->last_source_parent, a); if (e) return e;
 
7354
  }
 
7355
  if (p->last_target_parent) {
 
7356
    e = (*v)(p->last_target_parent, a); if (e) return e;
 
7357
  }
 
7358
  if (p->include_unchanged) {
 
7359
    e = (*v)(p->include_unchanged, a); if (e) return e;
 
7360
  }
 
7361
  if (p->use_filesystem_for_exec) {
 
7362
    e = (*v)(p->use_filesystem_for_exec, a); if (e) return e;
 
7363
  }
 
7364
  if (p->utf8_decode) {
 
7365
    e = (*v)(p->utf8_decode, a); if (e) return e;
 
7366
  }
 
7367
  if (p->searched_specific_files) {
 
7368
    e = (*v)(p->searched_specific_files, a); if (e) return e;
 
7369
  }
 
7370
  if (p->search_specific_files) {
 
7371
    e = (*v)(p->search_specific_files, a); if (e) return e;
 
7372
  }
 
7373
  if (p->state) {
 
7374
    e = (*v)(p->state, a); if (e) return e;
 
7375
  }
 
7376
  if (p->current_root) {
 
7377
    e = (*v)(p->current_root, a); if (e) return e;
 
7378
  }
 
7379
  if (p->current_root_unicode) {
 
7380
    e = (*v)(p->current_root_unicode, a); if (e) return e;
 
7381
  }
 
7382
  if (p->root_entries) {
 
7383
    e = (*v)(p->root_entries, a); if (e) return e;
 
7384
  }
 
7385
  if (p->root_abspath) {
 
7386
    e = (*v)(p->root_abspath, a); if (e) return e;
 
7387
  }
 
7388
  if (p->tree) {
 
7389
    e = (*v)(p->tree, a); if (e) return e;
 
7390
  }
 
7391
  if (p->dir_iterator) {
 
7392
    e = (*v)(p->dir_iterator, a); if (e) return e;
 
7393
  }
 
7394
  if (p->current_block) {
 
7395
    e = (*v)(p->current_block, a); if (e) return e;
 
7396
  }
 
7397
  if (p->current_block_list) {
 
7398
    e = (*v)(p->current_block_list, a); if (e) return e;
 
7399
  }
 
7400
  if (p->current_dir_info) {
 
7401
    e = (*v)(p->current_dir_info, a); if (e) return e;
 
7402
  }
 
7403
  if (p->current_dir_list) {
 
7404
    e = (*v)(p->current_dir_list, a); if (e) return e;
 
7405
  }
 
7406
  if (p->root_dir_info) {
 
7407
    e = (*v)(p->root_dir_info, a); if (e) return e;
 
7408
  }
 
7409
  if (p->bisect_left) {
 
7410
    e = (*v)(p->bisect_left, a); if (e) return e;
 
7411
  }
 
7412
  if (p->pathjoin) {
 
7413
    e = (*v)(p->pathjoin, a); if (e) return e;
 
7414
  }
 
7415
  if (p->fstat) {
 
7416
    e = (*v)(p->fstat, a); if (e) return e;
 
7417
  }
 
7418
  if (p->sha_file) {
 
7419
    e = (*v)(p->sha_file, a); if (e) return e;
 
7420
  }
 
7421
  return 0;
 
7422
}
 
7423
 
 
7424
static int __pyx_tp_clear_19_dirstate_helpers_c_ProcessEntryC(PyObject *o) {
 
7425
  struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *p = (struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC *)o;
 
7426
  PyObject *t;
 
7427
  t = p->old_dirname_to_file_id; 
 
7428
  p->old_dirname_to_file_id = Py_None; Py_INCREF(Py_None);
 
7429
  Py_XDECREF(t);
 
7430
  t = p->new_dirname_to_file_id; 
 
7431
  p->new_dirname_to_file_id = Py_None; Py_INCREF(Py_None);
 
7432
  Py_XDECREF(t);
 
7433
  t = p->uninteresting; 
 
7434
  p->uninteresting = Py_None; Py_INCREF(Py_None);
 
7435
  Py_XDECREF(t);
 
7436
  t = p->last_source_parent; 
 
7437
  p->last_source_parent = Py_None; Py_INCREF(Py_None);
 
7438
  Py_XDECREF(t);
 
7439
  t = p->last_target_parent; 
 
7440
  p->last_target_parent = Py_None; Py_INCREF(Py_None);
 
7441
  Py_XDECREF(t);
 
7442
  t = p->include_unchanged; 
 
7443
  p->include_unchanged = Py_None; Py_INCREF(Py_None);
 
7444
  Py_XDECREF(t);
 
7445
  t = p->use_filesystem_for_exec; 
 
7446
  p->use_filesystem_for_exec = Py_None; Py_INCREF(Py_None);
 
7447
  Py_XDECREF(t);
 
7448
  t = p->utf8_decode; 
 
7449
  p->utf8_decode = Py_None; Py_INCREF(Py_None);
 
7450
  Py_XDECREF(t);
 
7451
  t = p->searched_specific_files; 
 
7452
  p->searched_specific_files = Py_None; Py_INCREF(Py_None);
 
7453
  Py_XDECREF(t);
 
7454
  t = p->search_specific_files; 
 
7455
  p->search_specific_files = Py_None; Py_INCREF(Py_None);
 
7456
  Py_XDECREF(t);
 
7457
  t = p->state; 
 
7458
  p->state = Py_None; Py_INCREF(Py_None);
 
7459
  Py_XDECREF(t);
 
7460
  t = p->current_root; 
 
7461
  p->current_root = Py_None; Py_INCREF(Py_None);
 
7462
  Py_XDECREF(t);
 
7463
  t = p->current_root_unicode; 
 
7464
  p->current_root_unicode = Py_None; Py_INCREF(Py_None);
 
7465
  Py_XDECREF(t);
 
7466
  t = p->root_entries; 
 
7467
  p->root_entries = Py_None; Py_INCREF(Py_None);
 
7468
  Py_XDECREF(t);
 
7469
  t = p->root_abspath; 
 
7470
  p->root_abspath = Py_None; Py_INCREF(Py_None);
 
7471
  Py_XDECREF(t);
 
7472
  t = p->tree; 
 
7473
  p->tree = Py_None; Py_INCREF(Py_None);
 
7474
  Py_XDECREF(t);
 
7475
  t = p->dir_iterator; 
 
7476
  p->dir_iterator = Py_None; Py_INCREF(Py_None);
 
7477
  Py_XDECREF(t);
 
7478
  t = p->current_block; 
 
7479
  p->current_block = Py_None; Py_INCREF(Py_None);
 
7480
  Py_XDECREF(t);
 
7481
  t = p->current_block_list; 
 
7482
  p->current_block_list = Py_None; Py_INCREF(Py_None);
 
7483
  Py_XDECREF(t);
 
7484
  t = p->current_dir_info; 
 
7485
  p->current_dir_info = Py_None; Py_INCREF(Py_None);
 
7486
  Py_XDECREF(t);
 
7487
  t = p->current_dir_list; 
 
7488
  p->current_dir_list = Py_None; Py_INCREF(Py_None);
 
7489
  Py_XDECREF(t);
 
7490
  t = p->root_dir_info; 
 
7491
  p->root_dir_info = Py_None; Py_INCREF(Py_None);
 
7492
  Py_XDECREF(t);
 
7493
  t = p->bisect_left; 
 
7494
  p->bisect_left = Py_None; Py_INCREF(Py_None);
 
7495
  Py_XDECREF(t);
 
7496
  t = p->pathjoin; 
 
7497
  p->pathjoin = Py_None; Py_INCREF(Py_None);
 
7498
  Py_XDECREF(t);
 
7499
  t = p->fstat; 
 
7500
  p->fstat = Py_None; Py_INCREF(Py_None);
 
7501
  Py_XDECREF(t);
 
7502
  t = p->sha_file; 
 
7503
  p->sha_file = Py_None; Py_INCREF(Py_None);
 
7504
  Py_XDECREF(t);
 
7505
  return 0;
 
7506
}
 
7507
 
 
7508
static struct PyMethodDef __pyx_methods_19_dirstate_helpers_c_ProcessEntryC[] = {
 
7509
  {"iter_changes", (PyCFunction)__pyx_f_19_dirstate_helpers_c_13ProcessEntryC_iter_changes, METH_VARARGS|METH_KEYWORDS, 0},
 
7510
  {0, 0, 0, 0}
 
7511
};
 
7512
 
 
7513
static struct PyMemberDef __pyx_members_19_dirstate_helpers_c_ProcessEntryC[] = {
 
7514
  {"uninteresting", T_OBJECT, offsetof(struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC, uninteresting), READONLY, 0},
 
7515
  {"searched_specific_files", T_OBJECT, offsetof(struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC, searched_specific_files), READONLY, 0},
 
7516
  {0, 0, 0, 0, 0}
 
7517
};
 
7518
 
 
7519
static PyNumberMethods __pyx_tp_as_number_ProcessEntryC = {
 
7520
  0, /*nb_add*/
 
7521
  0, /*nb_subtract*/
 
7522
  0, /*nb_multiply*/
 
7523
  0, /*nb_divide*/
 
7524
  0, /*nb_remainder*/
 
7525
  0, /*nb_divmod*/
 
7526
  0, /*nb_power*/
 
7527
  0, /*nb_negative*/
 
7528
  0, /*nb_positive*/
 
7529
  0, /*nb_absolute*/
 
7530
  0, /*nb_nonzero*/
 
7531
  0, /*nb_invert*/
 
7532
  0, /*nb_lshift*/
 
7533
  0, /*nb_rshift*/
 
7534
  0, /*nb_and*/
 
7535
  0, /*nb_xor*/
 
7536
  0, /*nb_or*/
 
7537
  0, /*nb_coerce*/
 
7538
  0, /*nb_int*/
 
7539
  0, /*nb_long*/
 
7540
  0, /*nb_float*/
 
7541
  0, /*nb_oct*/
 
7542
  0, /*nb_hex*/
 
7543
  0, /*nb_inplace_add*/
 
7544
  0, /*nb_inplace_subtract*/
 
7545
  0, /*nb_inplace_multiply*/
 
7546
  0, /*nb_inplace_divide*/
 
7547
  0, /*nb_inplace_remainder*/
 
7548
  0, /*nb_inplace_power*/
 
7549
  0, /*nb_inplace_lshift*/
 
7550
  0, /*nb_inplace_rshift*/
 
7551
  0, /*nb_inplace_and*/
 
7552
  0, /*nb_inplace_xor*/
 
7553
  0, /*nb_inplace_or*/
 
7554
  0, /*nb_floor_divide*/
 
7555
  0, /*nb_true_divide*/
 
7556
  0, /*nb_inplace_floor_divide*/
 
7557
  0, /*nb_inplace_true_divide*/
 
7558
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
 
7559
  0, /*nb_index*/
 
7560
  #endif
 
7561
};
 
7562
 
 
7563
static PySequenceMethods __pyx_tp_as_sequence_ProcessEntryC = {
 
7564
  0, /*sq_length*/
 
7565
  0, /*sq_concat*/
 
7566
  0, /*sq_repeat*/
 
7567
  0, /*sq_item*/
 
7568
  0, /*sq_slice*/
 
7569
  0, /*sq_ass_item*/
 
7570
  0, /*sq_ass_slice*/
 
7571
  0, /*sq_contains*/
 
7572
  0, /*sq_inplace_concat*/
 
7573
  0, /*sq_inplace_repeat*/
 
7574
};
 
7575
 
 
7576
static PyMappingMethods __pyx_tp_as_mapping_ProcessEntryC = {
 
7577
  0, /*mp_length*/
 
7578
  0, /*mp_subscript*/
 
7579
  0, /*mp_ass_subscript*/
 
7580
};
 
7581
 
 
7582
static PyBufferProcs __pyx_tp_as_buffer_ProcessEntryC = {
 
7583
  0, /*bf_getreadbuffer*/
 
7584
  0, /*bf_getwritebuffer*/
 
7585
  0, /*bf_getsegcount*/
 
7586
  0, /*bf_getcharbuffer*/
 
7587
};
 
7588
 
 
7589
PyTypeObject __pyx_type_19_dirstate_helpers_c_ProcessEntryC = {
 
7590
  PyObject_HEAD_INIT(0)
 
7591
  0, /*ob_size*/
 
7592
  "_dirstate_helpers_c.ProcessEntryC", /*tp_name*/
 
7593
  sizeof(struct __pyx_obj_19_dirstate_helpers_c_ProcessEntryC), /*tp_basicsize*/
 
7594
  0, /*tp_itemsize*/
 
7595
  __pyx_tp_dealloc_19_dirstate_helpers_c_ProcessEntryC, /*tp_dealloc*/
 
7596
  0, /*tp_print*/
 
7597
  0, /*tp_getattr*/
 
7598
  0, /*tp_setattr*/
 
7599
  0, /*tp_compare*/
 
7600
  0, /*tp_repr*/
 
7601
  &__pyx_tp_as_number_ProcessEntryC, /*tp_as_number*/
 
7602
  &__pyx_tp_as_sequence_ProcessEntryC, /*tp_as_sequence*/
 
7603
  &__pyx_tp_as_mapping_ProcessEntryC, /*tp_as_mapping*/
 
7604
  0, /*tp_hash*/
 
7605
  0, /*tp_call*/
 
7606
  0, /*tp_str*/
 
7607
  0, /*tp_getattro*/
 
7608
  0, /*tp_setattro*/
 
7609
  &__pyx_tp_as_buffer_ProcessEntryC, /*tp_as_buffer*/
 
7610
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
 
7611
  0, /*tp_doc*/
 
7612
  __pyx_tp_traverse_19_dirstate_helpers_c_ProcessEntryC, /*tp_traverse*/
 
7613
  __pyx_tp_clear_19_dirstate_helpers_c_ProcessEntryC, /*tp_clear*/
 
7614
  0, /*tp_richcompare*/
 
7615
  0, /*tp_weaklistoffset*/
 
7616
  __pyx_f_19_dirstate_helpers_c_13ProcessEntryC___iter__, /*tp_iter*/
 
7617
  __pyx_f_19_dirstate_helpers_c_13ProcessEntryC___next__, /*tp_iternext*/
 
7618
  __pyx_methods_19_dirstate_helpers_c_ProcessEntryC, /*tp_methods*/
 
7619
  __pyx_members_19_dirstate_helpers_c_ProcessEntryC, /*tp_members*/
 
7620
  0, /*tp_getset*/
 
7621
  0, /*tp_base*/
 
7622
  0, /*tp_dict*/
 
7623
  0, /*tp_descr_get*/
 
7624
  0, /*tp_descr_set*/
 
7625
  0, /*tp_dictoffset*/
 
7626
  __pyx_f_19_dirstate_helpers_c_13ProcessEntryC___init__, /*tp_init*/
 
7627
  0, /*tp_alloc*/
 
7628
  __pyx_tp_new_19_dirstate_helpers_c_ProcessEntryC, /*tp_new*/
 
7629
  0, /*tp_free*/
 
7630
  0, /*tp_is_gc*/
 
7631
  0, /*tp_bases*/
 
7632
  0, /*tp_mro*/
 
7633
  0, /*tp_cache*/
 
7634
  0, /*tp_subclasses*/
 
7635
  0, /*tp_weaklist*/
 
7636
};
 
7637
 
 
7638
static struct PyMethodDef __pyx_methods[] = {
 
7639
  {"_py_memrchr", (PyCFunction)__pyx_f_19_dirstate_helpers_c__py_memrchr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19_dirstate_helpers_c__py_memrchr},
 
7640
  {"cmp_by_dirs_c", (PyCFunction)__pyx_f_19_dirstate_helpers_c_cmp_by_dirs_c, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19_dirstate_helpers_c_cmp_by_dirs_c},
 
7641
  {"_cmp_path_by_dirblock_c", (PyCFunction)__pyx_f_19_dirstate_helpers_c__cmp_path_by_dirblock_c, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19_dirstate_helpers_c__cmp_path_by_dirblock_c},
 
7642
  {"_bisect_path_left_c", (PyCFunction)__pyx_f_19_dirstate_helpers_c__bisect_path_left_c, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19_dirstate_helpers_c__bisect_path_left_c},
 
7643
  {"_bisect_path_right_c", (PyCFunction)__pyx_f_19_dirstate_helpers_c__bisect_path_right_c, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19_dirstate_helpers_c__bisect_path_right_c},
 
7644
  {"bisect_dirblock_c", (PyCFunction)__pyx_f_19_dirstate_helpers_c_bisect_dirblock_c, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19_dirstate_helpers_c_bisect_dirblock_c},
 
7645
  {"_read_dirblocks_c", (PyCFunction)__pyx_f_19_dirstate_helpers_c__read_dirblocks_c, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19_dirstate_helpers_c__read_dirblocks_c},
 
7646
  {"update_entry", (PyCFunction)__pyx_f_19_dirstate_helpers_c_update_entry, METH_VARARGS|METH_KEYWORDS, __pyx_doc_19_dirstate_helpers_c_update_entry},
 
7647
  {0, 0, 0, 0}
 
7648
};
 
7649
 
 
7650
static void __pyx_init_filenames(void); /*proto*/
 
7651
 
 
7652
PyMODINIT_FUNC init_dirstate_helpers_c(void); /*proto*/
 
7653
PyMODINIT_FUNC init_dirstate_helpers_c(void) {
 
7654
  PyObject *__pyx_1 = 0;
 
7655
  PyObject *__pyx_2 = 0;
 
7656
  PyObject *__pyx_3 = 0;
 
7657
  __pyx_init_filenames();
 
7658
  __pyx_m = Py_InitModule4("_dirstate_helpers_c", __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION);
 
7659
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;};
 
7660
  Py_INCREF(__pyx_m);
 
7661
  __pyx_b = PyImport_AddModule("__builtin__");
 
7662
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;};
 
7663
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;};
 
7664
  if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;};
 
7665
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; goto __pyx_L1;};
 
7666
  __pyx_v_19_dirstate_helpers_c__kind_absent = Py_None; Py_INCREF(Py_None);
 
7667
  __pyx_v_19_dirstate_helpers_c__kind_file = Py_None; Py_INCREF(Py_None);
 
7668
  __pyx_v_19_dirstate_helpers_c__kind_directory = Py_None; Py_INCREF(Py_None);
 
7669
  __pyx_v_19_dirstate_helpers_c__kind_symlink = Py_None; Py_INCREF(Py_None);
 
7670
  __pyx_v_19_dirstate_helpers_c__kind_relocated = Py_None; Py_INCREF(Py_None);
 
7671
  __pyx_v_19_dirstate_helpers_c__kind_tree_reference = Py_None; Py_INCREF(Py_None);
 
7672
  __pyx_vtabptr_19_dirstate_helpers_c_Reader = &__pyx_vtable_19_dirstate_helpers_c_Reader;
 
7673
  *(void(**)(void))&__pyx_vtable_19_dirstate_helpers_c_Reader.get_next = (void(*)(void))__pyx_f_19_dirstate_helpers_c_6Reader_get_next;
 
7674
  *(void(**)(void))&__pyx_vtable_19_dirstate_helpers_c_Reader.get_next_str = (void(*)(void))__pyx_f_19_dirstate_helpers_c_6Reader_get_next_str;
 
7675
  *(void(**)(void))&__pyx_vtable_19_dirstate_helpers_c_Reader._init = (void(*)(void))__pyx_f_19_dirstate_helpers_c_6Reader__init;
 
7676
  *(void(**)(void))&__pyx_vtable_19_dirstate_helpers_c_Reader._get_entry = (void(*)(void))__pyx_f_19_dirstate_helpers_c_6Reader__get_entry;
 
7677
  __pyx_type_19_dirstate_helpers_c_Reader.tp_free = _PyObject_GC_Del;
 
7678
  if (PyType_Ready(&__pyx_type_19_dirstate_helpers_c_Reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; goto __pyx_L1;}
 
7679
  if (__Pyx_SetVtable(__pyx_type_19_dirstate_helpers_c_Reader.tp_dict, __pyx_vtabptr_19_dirstate_helpers_c_Reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; goto __pyx_L1;}
 
7680
  if (PyObject_SetAttrString(__pyx_m, "Reader", (PyObject *)&__pyx_type_19_dirstate_helpers_c_Reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; goto __pyx_L1;}
 
7681
  __pyx_ptype_19_dirstate_helpers_c_Reader = &__pyx_type_19_dirstate_helpers_c_Reader;
 
7682
  __pyx_vtabptr_19_dirstate_helpers_c_ProcessEntryC = &__pyx_vtable_19_dirstate_helpers_c_ProcessEntryC;
 
7683
  *(void(**)(void))&__pyx_vtable_19_dirstate_helpers_c_ProcessEntryC._process_entry = (void(*)(void))__pyx_f_19_dirstate_helpers_c_13ProcessEntryC__process_entry;
 
7684
  *(void(**)(void))&__pyx_vtable_19_dirstate_helpers_c_ProcessEntryC._update_current_block = (void(*)(void))__pyx_f_19_dirstate_helpers_c_13ProcessEntryC__update_current_block;
 
7685
  *(void(**)(void))&__pyx_vtable_19_dirstate_helpers_c_ProcessEntryC._iter_next = (void(*)(void))__pyx_f_19_dirstate_helpers_c_13ProcessEntryC__iter_next;
 
7686
  *(void(**)(void))&__pyx_vtable_19_dirstate_helpers_c_ProcessEntryC._maybe_tree_ref = (void(*)(void))__pyx_f_19_dirstate_helpers_c_13ProcessEntryC__maybe_tree_ref;
 
7687
  *(void(**)(void))&__pyx_vtable_19_dirstate_helpers_c_ProcessEntryC._loop_one_block = (void(*)(void))__pyx_f_19_dirstate_helpers_c_13ProcessEntryC__loop_one_block;
 
7688
  __pyx_type_19_dirstate_helpers_c_ProcessEntryC.tp_free = _PyObject_GC_Del;
 
7689
  if (PyType_Ready(&__pyx_type_19_dirstate_helpers_c_ProcessEntryC) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; goto __pyx_L1;}
 
7690
  if (__Pyx_SetVtable(__pyx_type_19_dirstate_helpers_c_ProcessEntryC.tp_dict, __pyx_vtabptr_19_dirstate_helpers_c_ProcessEntryC) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; goto __pyx_L1;}
 
7691
  if (PyObject_SetAttrString(__pyx_m, "ProcessEntryC", (PyObject *)&__pyx_type_19_dirstate_helpers_c_ProcessEntryC) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; goto __pyx_L1;}
 
7692
  __pyx_ptype_19_dirstate_helpers_c_ProcessEntryC = &__pyx_type_19_dirstate_helpers_c_ProcessEntryC;
 
7693
 
 
7694
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":22 */
 
7695
  __pyx_1 = __Pyx_Import(__pyx_n_binascii, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
 
7696
  if (PyObject_SetAttr(__pyx_m, __pyx_n_binascii, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
 
7697
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7698
 
 
7699
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":23 */
 
7700
  __pyx_1 = __Pyx_Import(__pyx_n_bisect, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}
 
7701
  if (PyObject_SetAttr(__pyx_m, __pyx_n_bisect, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}
 
7702
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7703
 
 
7704
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":24 */
 
7705
  __pyx_1 = __Pyx_Import(__pyx_n_errno, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; goto __pyx_L1;}
 
7706
  if (PyObject_SetAttr(__pyx_m, __pyx_n_errno, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; goto __pyx_L1;}
 
7707
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7708
 
 
7709
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":25 */
 
7710
  __pyx_1 = __Pyx_Import(__pyx_n_os, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;}
 
7711
  if (PyObject_SetAttr(__pyx_m, __pyx_n_os, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;}
 
7712
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7713
 
 
7714
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":26 */
 
7715
  __pyx_1 = __Pyx_Import(__pyx_n_stat, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}
 
7716
  if (PyObject_SetAttr(__pyx_m, __pyx_n_stat, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}
 
7717
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7718
 
 
7719
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":27 */
 
7720
  __pyx_1 = __Pyx_Import(__pyx_n_sys, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;}
 
7721
  if (PyObject_SetAttr(__pyx_m, __pyx_n_sys, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;}
 
7722
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7723
 
 
7724
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":29 */
 
7725
  __pyx_1 = PyList_New(3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
 
7726
  Py_INCREF(__pyx_n_cache_utf8);
 
7727
  PyList_SET_ITEM(__pyx_1, 0, __pyx_n_cache_utf8);
 
7728
  Py_INCREF(__pyx_n_errors);
 
7729
  PyList_SET_ITEM(__pyx_1, 1, __pyx_n_errors);
 
7730
  Py_INCREF(__pyx_n_osutils);
 
7731
  PyList_SET_ITEM(__pyx_1, 2, __pyx_n_osutils);
 
7732
  __pyx_2 = __Pyx_Import(__pyx_n_bzrlib, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
 
7733
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7734
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_cache_utf8); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
 
7735
  if (PyObject_SetAttr(__pyx_m, __pyx_n_cache_utf8, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
 
7736
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7737
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_errors); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
 
7738
  if (PyObject_SetAttr(__pyx_m, __pyx_n_errors, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
 
7739
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7740
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_osutils); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
 
7741
  if (PyObject_SetAttr(__pyx_m, __pyx_n_osutils, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
 
7742
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7743
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
7744
 
 
7745
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":30 */
 
7746
  __pyx_2 = PyList_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
 
7747
  Py_INCREF(__pyx_n_DirState);
 
7748
  PyList_SET_ITEM(__pyx_2, 0, __pyx_n_DirState);
 
7749
  __pyx_1 = __Pyx_Import(__pyx_k11p, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
 
7750
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
7751
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_DirState); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
 
7752
  if (PyObject_SetAttr(__pyx_m, __pyx_n_DirState, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
 
7753
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
7754
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7755
 
 
7756
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":31 */
 
7757
  __pyx_1 = PyList_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
 
7758
  Py_INCREF(__pyx_n_pathjoin);
 
7759
  PyList_SET_ITEM(__pyx_1, 0, __pyx_n_pathjoin);
 
7760
  Py_INCREF(__pyx_n_splitpath);
 
7761
  PyList_SET_ITEM(__pyx_1, 1, __pyx_n_splitpath);
 
7762
  __pyx_2 = __Pyx_Import(__pyx_k13p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
 
7763
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7764
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_pathjoin); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
 
7765
  if (PyObject_SetAttr(__pyx_m, __pyx_n_pathjoin, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
 
7766
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7767
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_splitpath); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
 
7768
  if (PyObject_SetAttr(__pyx_m, __pyx_n_splitpath, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
 
7769
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7770
  Py_DECREF(__pyx_2); __pyx_2 = 0;
 
7771
 
 
7772
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":39 */
 
7773
  __pyx_v_19_dirstate_helpers_c_ERROR_PATH_NOT_FOUND = 3;
 
7774
 
 
7775
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":41 */
 
7776
  __pyx_v_19_dirstate_helpers_c_ERROR_DIRECTORY = 267;
 
7777
 
 
7778
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":475 */
 
7779
  __pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; goto __pyx_L1;}
 
7780
  __pyx_k16 = __pyx_2;
 
7781
  __pyx_2 = 0;
 
7782
  Py_INCREF(Py_None);
 
7783
  __pyx_k17 = Py_None;
 
7784
  Py_INCREF(Py_None);
 
7785
  __pyx_k18 = Py_None;
 
7786
 
 
7787
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":780 */
 
7788
  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_binascii); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;}
 
7789
  __pyx_3 = PyObject_GetAttr(__pyx_1, __pyx_n_b2a_base64); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;}
 
7790
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7791
  if (PyObject_SetAttr(__pyx_m, __pyx_n__encode, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;}
 
7792
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
7793
 
 
7794
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":783 */
 
7795
  __pyx_1 = PyList_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; goto __pyx_L1;}
 
7796
  Py_INCREF(__pyx_n_pack);
 
7797
  PyList_SET_ITEM(__pyx_1, 0, __pyx_n_pack);
 
7798
  __pyx_3 = __Pyx_Import(__pyx_n_struct, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; goto __pyx_L1;}
 
7799
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7800
  __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_pack); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; goto __pyx_L1;}
 
7801
  if (PyObject_SetAttr(__pyx_m, __pyx_n_pack, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; goto __pyx_L1;}
 
7802
  Py_DECREF(__pyx_1); __pyx_1 = 0;
 
7803
  Py_DECREF(__pyx_3); __pyx_3 = 0;
 
7804
 
 
7805
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":927 */
 
7806
  Py_INCREF(__pyx_n_absent);
 
7807
  Py_DECREF(__pyx_v_19_dirstate_helpers_c__kind_absent);
 
7808
  __pyx_v_19_dirstate_helpers_c__kind_absent = __pyx_n_absent;
 
7809
 
 
7810
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":928 */
 
7811
  Py_INCREF(__pyx_n_file);
 
7812
  Py_DECREF(__pyx_v_19_dirstate_helpers_c__kind_file);
 
7813
  __pyx_v_19_dirstate_helpers_c__kind_file = __pyx_n_file;
 
7814
 
 
7815
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":929 */
 
7816
  Py_INCREF(__pyx_n_directory);
 
7817
  Py_DECREF(__pyx_v_19_dirstate_helpers_c__kind_directory);
 
7818
  __pyx_v_19_dirstate_helpers_c__kind_directory = __pyx_n_directory;
 
7819
 
 
7820
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":930 */
 
7821
  Py_INCREF(__pyx_n_symlink);
 
7822
  Py_DECREF(__pyx_v_19_dirstate_helpers_c__kind_symlink);
 
7823
  __pyx_v_19_dirstate_helpers_c__kind_symlink = __pyx_n_symlink;
 
7824
 
 
7825
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":931 */
 
7826
  Py_INCREF(__pyx_n_relocated);
 
7827
  Py_DECREF(__pyx_v_19_dirstate_helpers_c__kind_relocated);
 
7828
  __pyx_v_19_dirstate_helpers_c__kind_relocated = __pyx_n_relocated;
 
7829
 
 
7830
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":932 */
 
7831
  Py_INCREF(__pyx_k26p);
 
7832
  Py_DECREF(__pyx_v_19_dirstate_helpers_c__kind_tree_reference);
 
7833
  __pyx_v_19_dirstate_helpers_c__kind_tree_reference = __pyx_k26p;
 
7834
 
 
7835
  /* "/home/jml/src/bzr/bzr.1.16/bzrlib/_dirstate_helpers_c.pyx":1631 */
 
7836
  return;
 
7837
  __pyx_L1:;
 
7838
  Py_XDECREF(__pyx_1);
 
7839
  Py_XDECREF(__pyx_2);
 
7840
  Py_XDECREF(__pyx_3);
 
7841
  __Pyx_AddTraceback("_dirstate_helpers_c");
 
7842
}
 
7843
 
 
7844
static char *__pyx_filenames[] = {
 
7845
  "_dirstate_helpers_c.pyx",
 
7846
};
 
7847
 
 
7848
/* Runtime support code */
 
7849
 
 
7850
static void __pyx_init_filenames(void) {
 
7851
  __pyx_f = __pyx_filenames;
 
7852
}
 
7853
 
 
7854
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
 
7855
    PyObject *__import__ = 0;
 
7856
    PyObject *empty_list = 0;
 
7857
    PyObject *module = 0;
 
7858
    PyObject *global_dict = 0;
 
7859
    PyObject *empty_dict = 0;
 
7860
    PyObject *list;
 
7861
    __import__ = PyObject_GetAttrString(__pyx_b, "__import__");
 
7862
    if (!__import__)
 
7863
        goto bad;
 
7864
    if (from_list)
 
7865
        list = from_list;
 
7866
    else {
 
7867
        empty_list = PyList_New(0);
 
7868
        if (!empty_list)
 
7869
            goto bad;
 
7870
        list = empty_list;
 
7871
    }
 
7872
    global_dict = PyModule_GetDict(__pyx_m);
 
7873
    if (!global_dict)
 
7874
        goto bad;
 
7875
    empty_dict = PyDict_New();
 
7876
    if (!empty_dict)
 
7877
        goto bad;
 
7878
    module = PyObject_CallFunction(__import__, "OOOO",
 
7879
        name, global_dict, empty_dict, list);
 
7880
bad:
 
7881
    Py_XDECREF(empty_list);
 
7882
    Py_XDECREF(__import__);
 
7883
    Py_XDECREF(empty_dict);
 
7884
    return module;
 
7885
}
 
7886
 
 
7887
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
 
7888
    PyObject *result;
 
7889
    result = PyObject_GetAttr(dict, name);
 
7890
    if (!result)
 
7891
        PyErr_SetObject(PyExc_NameError, name);
 
7892
    return result;
 
7893
}
 
7894
 
 
7895
static PyObject *__Pyx_GetItemInt(PyObject *o, Py_ssize_t i) {
 
7896
    PyTypeObject *t = o->ob_type;
 
7897
    PyObject *r;
 
7898
    if (t->tp_as_sequence && t->tp_as_sequence->sq_item)
 
7899
        r = PySequence_GetItem(o, i);
 
7900
    else {
 
7901
        PyObject *j = PyInt_FromLong(i);
 
7902
        if (!j)
 
7903
            return 0;
 
7904
        r = PyObject_GetItem(o, j);
 
7905
        Py_DECREF(j);
 
7906
    }
 
7907
    return r;
 
7908
}
 
7909
 
 
7910
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
 
7911
    Py_XINCREF(type);
 
7912
    Py_XINCREF(value);
 
7913
    Py_XINCREF(tb);
 
7914
    /* First, check the traceback argument, replacing None with NULL. */
 
7915
    if (tb == Py_None) {
 
7916
        Py_DECREF(tb);
 
7917
        tb = 0;
 
7918
    }
 
7919
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
 
7920
        PyErr_SetString(PyExc_TypeError,
 
7921
            "raise: arg 3 must be a traceback or None");
 
7922
        goto raise_error;
 
7923
    }
 
7924
    /* Next, replace a missing value with None */
 
7925
    if (value == NULL) {
 
7926
        value = Py_None;
 
7927
        Py_INCREF(value);
 
7928
    }
 
7929
    #if PY_VERSION_HEX < 0x02050000
 
7930
    if (!PyClass_Check(type))
 
7931
    #else
 
7932
    if (!PyType_Check(type))
 
7933
    #endif
 
7934
    {
 
7935
        /* Raising an instance.  The value should be a dummy. */
 
7936
        if (value != Py_None) {
 
7937
            PyErr_SetString(PyExc_TypeError,
 
7938
                "instance exception may not have a separate value");
 
7939
            goto raise_error;
 
7940
        }
 
7941
        /* Normalize to raise <class>, <instance> */
 
7942
        Py_DECREF(value);
 
7943
        value = type;
 
7944
        #if PY_VERSION_HEX < 0x02050000
 
7945
            if (PyInstance_Check(type)) {
 
7946
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
 
7947
                Py_INCREF(type);
 
7948
            }
 
7949
            else {
 
7950
                PyErr_SetString(PyExc_TypeError,
 
7951
                    "raise: exception must be an old-style class or instance");
 
7952
                goto raise_error;
 
7953
            }
 
7954
        #else
 
7955
            type = (PyObject*) type->ob_type;
 
7956
            Py_INCREF(type);
 
7957
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
 
7958
                PyErr_SetString(PyExc_TypeError,
 
7959
                    "raise: exception class must be a subclass of BaseException");
 
7960
                goto raise_error;
 
7961
            }
 
7962
        #endif
 
7963
    }
 
7964
    PyErr_Restore(type, value, tb);
 
7965
    return;
 
7966
raise_error:
 
7967
    Py_XDECREF(value);
 
7968
    Py_XDECREF(type);
 
7969
    Py_XDECREF(tb);
 
7970
    return;
 
7971
}
 
7972
 
 
7973
static int __Pyx_SetItemInt(PyObject *o, Py_ssize_t i, PyObject *v) {
 
7974
    PyTypeObject *t = o->ob_type;
 
7975
    int r;
 
7976
    if (t->tp_as_sequence && t->tp_as_sequence->sq_item)
 
7977
        r = PySequence_SetItem(o, i, v);
 
7978
    else {
 
7979
        PyObject *j = PyInt_FromLong(i);
 
7980
        if (!j)
 
7981
            return -1;
 
7982
        r = PyObject_SetItem(o, j, v);
 
7983
        Py_DECREF(j);
 
7984
    }
 
7985
    return r;
 
7986
}
 
7987
 
 
7988
static void __Pyx_UnpackError(void) {
 
7989
    PyErr_SetString(PyExc_ValueError, "unpack sequence of wrong size");
 
7990
}
 
7991
 
 
7992
static PyObject *__Pyx_UnpackItem(PyObject *iter) {
 
7993
    PyObject *item;
 
7994
    if (!(item = PyIter_Next(iter))) {
 
7995
        if (!PyErr_Occurred())
 
7996
            __Pyx_UnpackError();
 
7997
    }
 
7998
    return item;
 
7999
}
 
8000
 
 
8001
static int __Pyx_EndUnpack(PyObject *iter) {
 
8002
    PyObject *item;
 
8003
    if ((item = PyIter_Next(iter))) {
 
8004
        Py_DECREF(item);
 
8005
        __Pyx_UnpackError();
 
8006
        return -1;
 
8007
    }
 
8008
    else if (!PyErr_Occurred())
 
8009
        return 0;
 
8010
    else
 
8011
        return -1;
 
8012
}
 
8013
 
 
8014
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
 
8015
    PyThreadState *tstate = PyThreadState_Get();
 
8016
    PyErr_Fetch(type, value, tb);
 
8017
    PyErr_NormalizeException(type, value, tb);
 
8018
    if (PyErr_Occurred())
 
8019
        goto bad;
 
8020
    Py_INCREF(*type);
 
8021
    Py_INCREF(*value);
 
8022
    Py_INCREF(*tb);
 
8023
    Py_XDECREF(tstate->exc_type);
 
8024
    Py_XDECREF(tstate->exc_value);
 
8025
    Py_XDECREF(tstate->exc_traceback);
 
8026
    tstate->exc_type = *type;
 
8027
    tstate->exc_value = *value;
 
8028
    tstate->exc_traceback = *tb;
 
8029
    return 0;
 
8030
bad:
 
8031
    Py_XDECREF(*type);
 
8032
    Py_XDECREF(*value);
 
8033
    Py_XDECREF(*tb);
 
8034
    return -1;
 
8035
}
 
8036
 
 
8037
static void __Pyx_WriteUnraisable(char *name) {
 
8038
    PyObject *old_exc, *old_val, *old_tb;
 
8039
    PyObject *ctx;
 
8040
    PyErr_Fetch(&old_exc, &old_val, &old_tb);
 
8041
    ctx = PyString_FromString(name);
 
8042
    PyErr_Restore(old_exc, old_val, old_tb);
 
8043
    if (!ctx)
 
8044
        ctx = Py_None;
 
8045
    PyErr_WriteUnraisable(ctx);
 
8046
}
 
8047
 
 
8048
static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) {
 
8049
    while (t->p) {
 
8050
        *t->p = PyString_InternFromString(t->s);
 
8051
        if (!*t->p)
 
8052
            return -1;
 
8053
        ++t;
 
8054
    }
 
8055
    return 0;
 
8056
}
 
8057
 
 
8058
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
 
8059
    while (t->p) {
 
8060
        *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
 
8061
        if (!*t->p)
 
8062
            return -1;
 
8063
        ++t;
 
8064
    }
 
8065
    return 0;
 
8066
}
 
8067
 
 
8068
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
 
8069
    PyObject *pycobj = 0;
 
8070
    int result;
 
8071
    
 
8072
    pycobj = PyCObject_FromVoidPtr(vtable, 0);
 
8073
    if (!pycobj)
 
8074
        goto bad;
 
8075
    if (PyDict_SetItemString(dict, "__pyx_vtable__", pycobj) < 0)
 
8076
        goto bad;
 
8077
    result = 0;
 
8078
    goto done;
 
8079
 
 
8080
bad:
 
8081
    result = -1;
 
8082
done:
 
8083
    Py_XDECREF(pycobj);
 
8084
    return result;
 
8085
}
 
8086
 
 
8087
#include "compile.h"
 
8088
#include "frameobject.h"
 
8089
#include "traceback.h"
 
8090
 
 
8091
static void __Pyx_AddTraceback(char *funcname) {
 
8092
    PyObject *py_srcfile = 0;
 
8093
    PyObject *py_funcname = 0;
 
8094
    PyObject *py_globals = 0;
 
8095
    PyObject *empty_tuple = 0;
 
8096
    PyObject *empty_string = 0;
 
8097
    PyCodeObject *py_code = 0;
 
8098
    PyFrameObject *py_frame = 0;
 
8099
    
 
8100
    py_srcfile = PyString_FromString(__pyx_filename);
 
8101
    if (!py_srcfile) goto bad;
 
8102
    py_funcname = PyString_FromString(funcname);
 
8103
    if (!py_funcname) goto bad;
 
8104
    py_globals = PyModule_GetDict(__pyx_m);
 
8105
    if (!py_globals) goto bad;
 
8106
    empty_tuple = PyTuple_New(0);
 
8107
    if (!empty_tuple) goto bad;
 
8108
    empty_string = PyString_FromString("");
 
8109
    if (!empty_string) goto bad;
 
8110
    py_code = PyCode_New(
 
8111
        0,            /*int argcount,*/
 
8112
        0,            /*int nlocals,*/
 
8113
        0,            /*int stacksize,*/
 
8114
        0,            /*int flags,*/
 
8115
        empty_string, /*PyObject *code,*/
 
8116
        empty_tuple,  /*PyObject *consts,*/
 
8117
        empty_tuple,  /*PyObject *names,*/
 
8118
        empty_tuple,  /*PyObject *varnames,*/
 
8119
        empty_tuple,  /*PyObject *freevars,*/
 
8120
        empty_tuple,  /*PyObject *cellvars,*/
 
8121
        py_srcfile,   /*PyObject *filename,*/
 
8122
        py_funcname,  /*PyObject *name,*/
 
8123
        __pyx_lineno,   /*int firstlineno,*/
 
8124
        empty_string  /*PyObject *lnotab*/
 
8125
    );
 
8126
    if (!py_code) goto bad;
 
8127
    py_frame = PyFrame_New(
 
8128
        PyThreadState_Get(), /*PyThreadState *tstate,*/
 
8129
        py_code,             /*PyCodeObject *code,*/
 
8130
        py_globals,          /*PyObject *globals,*/
 
8131
        0                    /*PyObject *locals*/
 
8132
    );
 
8133
    if (!py_frame) goto bad;
 
8134
    py_frame->f_lineno = __pyx_lineno;
 
8135
    PyTraceBack_Here(py_frame);
 
8136
bad:
 
8137
    Py_XDECREF(py_srcfile);
 
8138
    Py_XDECREF(py_funcname);
 
8139
    Py_XDECREF(empty_tuple);
 
8140
    Py_XDECREF(empty_string);
 
8141
    Py_XDECREF(py_code);
 
8142
    Py_XDECREF(py_frame);
 
8143
}