~ubuntu-branches/ubuntu/vivid/bzr/vivid

« back to all changes in this revision

Viewing changes to bzrlib/_dirstate_helpers_pyx.c

  • Committer: Jelmer Vernooij
  • Date: 2012-02-25 15:54:11 UTC
  • mfrom: (3930.3.71 unstable-2.5)
  • Revision ID: jelmer@samba.org-20120225155411-7nkz73y3xmshn2n8
Tags: 2.5.0-1ubuntu1
releasing version 2.5.0-1ubuntu1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Generated by Cython 0.14.1 on Mon Jan 16 15:59:29 2012 */
 
2
 
 
3
#define PY_SSIZE_T_CLEAN
 
4
#include "Python.h"
 
5
#ifndef Py_PYTHON_H
 
6
    #error Python headers needed to compile C extensions, please install development version of Python.
 
7
#else
 
8
 
 
9
#include <stddef.h> /* For offsetof */
 
10
#ifndef offsetof
 
11
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
 
12
#endif
 
13
 
 
14
#if !defined(WIN32) && !defined(MS_WINDOWS)
 
15
  #ifndef __stdcall
 
16
    #define __stdcall
 
17
  #endif
 
18
  #ifndef __cdecl
 
19
    #define __cdecl
 
20
  #endif
 
21
  #ifndef __fastcall
 
22
    #define __fastcall
 
23
  #endif
 
24
#endif
 
25
 
 
26
#ifndef DL_IMPORT
 
27
  #define DL_IMPORT(t) t
 
28
#endif
 
29
#ifndef DL_EXPORT
 
30
  #define DL_EXPORT(t) t
 
31
#endif
 
32
 
 
33
#ifndef PY_LONG_LONG
 
34
  #define PY_LONG_LONG LONG_LONG
 
35
#endif
 
36
 
 
37
#if PY_VERSION_HEX < 0x02040000
 
38
  #define METH_COEXIST 0
 
39
  #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
 
40
  #define PyDict_Contains(d,o)   PySequence_Contains(d,o)
 
41
#endif
 
42
 
 
43
#if PY_VERSION_HEX < 0x02050000
 
44
  typedef int Py_ssize_t;
 
45
  #define PY_SSIZE_T_MAX INT_MAX
 
46
  #define PY_SSIZE_T_MIN INT_MIN
 
47
  #define PY_FORMAT_SIZE_T ""
 
48
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
 
49
  #define PyInt_AsSsize_t(o)   PyInt_AsLong(o)
 
50
  #define PyNumber_Index(o)    PyNumber_Int(o)
 
51
  #define PyIndex_Check(o)     PyNumber_Check(o)
 
52
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
 
53
#endif
 
54
 
 
55
#if PY_VERSION_HEX < 0x02060000
 
56
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
 
57
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
 
58
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
 
59
  #define PyVarObject_HEAD_INIT(type, size) \
 
60
          PyObject_HEAD_INIT(type) size,
 
61
  #define PyType_Modified(t)
 
62
 
 
63
  typedef struct {
 
64
     void *buf;
 
65
     PyObject *obj;
 
66
     Py_ssize_t len;
 
67
     Py_ssize_t itemsize;
 
68
     int readonly;
 
69
     int ndim;
 
70
     char *format;
 
71
     Py_ssize_t *shape;
 
72
     Py_ssize_t *strides;
 
73
     Py_ssize_t *suboffsets;
 
74
     void *internal;
 
75
  } Py_buffer;
 
76
 
 
77
  #define PyBUF_SIMPLE 0
 
78
  #define PyBUF_WRITABLE 0x0001
 
79
  #define PyBUF_FORMAT 0x0004
 
80
  #define PyBUF_ND 0x0008
 
81
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
 
82
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
 
83
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
 
84
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
 
85
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
 
86
 
 
87
#endif
 
88
 
 
89
#if PY_MAJOR_VERSION < 3
 
90
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
 
91
#else
 
92
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
 
93
#endif
 
94
 
 
95
#if PY_MAJOR_VERSION >= 3
 
96
  #define Py_TPFLAGS_CHECKTYPES 0
 
97
  #define Py_TPFLAGS_HAVE_INDEX 0
 
98
#endif
 
99
 
 
100
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
 
101
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
 
102
#endif
 
103
 
 
104
#if PY_MAJOR_VERSION >= 3
 
105
  #define PyBaseString_Type            PyUnicode_Type
 
106
  #define PyStringObject               PyUnicodeObject
 
107
  #define PyString_Type                PyUnicode_Type
 
108
  #define PyString_Check               PyUnicode_Check
 
109
  #define PyString_CheckExact          PyUnicode_CheckExact
 
110
#endif
 
111
 
 
112
#if PY_VERSION_HEX < 0x02060000
 
113
  #define PyBytesObject                PyStringObject
 
114
  #define PyBytes_Type                 PyString_Type
 
115
  #define PyBytes_Check                PyString_Check
 
116
  #define PyBytes_CheckExact           PyString_CheckExact
 
117
  #define PyBytes_FromString           PyString_FromString
 
118
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
 
119
  #define PyBytes_FromFormat           PyString_FromFormat
 
120
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
 
121
  #define PyBytes_AsString             PyString_AsString
 
122
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
 
123
  #define PyBytes_Size                 PyString_Size
 
124
  #define PyBytes_AS_STRING            PyString_AS_STRING
 
125
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
 
126
  #define PyBytes_Repr                 PyString_Repr
 
127
  #define PyBytes_Concat               PyString_Concat
 
128
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
 
129
#endif
 
130
 
 
131
#if PY_VERSION_HEX < 0x02060000
 
132
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
 
133
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
 
134
#endif
 
135
#ifndef PySet_CheckExact
 
136
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
 
137
#endif
 
138
 
 
139
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
 
140
 
 
141
#if PY_MAJOR_VERSION >= 3
 
142
  #define PyIntObject                  PyLongObject
 
143
  #define PyInt_Type                   PyLong_Type
 
144
  #define PyInt_Check(op)              PyLong_Check(op)
 
145
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
 
146
  #define PyInt_FromString             PyLong_FromString
 
147
  #define PyInt_FromUnicode            PyLong_FromUnicode
 
148
  #define PyInt_FromLong               PyLong_FromLong
 
149
  #define PyInt_FromSize_t             PyLong_FromSize_t
 
150
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
 
151
  #define PyInt_AsLong                 PyLong_AsLong
 
152
  #define PyInt_AS_LONG                PyLong_AS_LONG
 
153
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
 
154
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
 
155
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
 
156
#endif
 
157
 
 
158
#if PY_MAJOR_VERSION >= 3
 
159
  #define PyBoolObject                 PyLongObject
 
160
#endif
 
161
 
 
162
 
 
163
#if PY_MAJOR_VERSION >= 3
 
164
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
 
165
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
 
166
#else
 
167
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
 
168
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
 
169
#endif
 
170
 
 
171
#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
 
172
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
 
173
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
 
174
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
 
175
#else
 
176
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
 
177
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
 
178
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
 
179
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
 
180
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
 
181
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
 
182
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
 
183
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
 
184
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
 
185
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
 
186
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
 
187
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
 
188
#endif
 
189
 
 
190
#if PY_MAJOR_VERSION >= 3
 
191
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
 
192
#endif
 
193
 
 
194
#if PY_VERSION_HEX < 0x02050000
 
195
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
 
196
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
 
197
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
 
198
#else
 
199
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
 
200
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
 
201
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
 
202
#endif
 
203
 
 
204
#if PY_VERSION_HEX < 0x02050000
 
205
  #define __Pyx_NAMESTR(n) ((char *)(n))
 
206
  #define __Pyx_DOCSTR(n)  ((char *)(n))
 
207
#else
 
208
  #define __Pyx_NAMESTR(n) (n)
 
209
  #define __Pyx_DOCSTR(n)  (n)
 
210
#endif
 
211
 
 
212
#ifdef __cplusplus
 
213
#define __PYX_EXTERN_C extern "C"
 
214
#else
 
215
#define __PYX_EXTERN_C extern
 
216
#endif
 
217
 
 
218
#if defined(WIN32) || defined(MS_WINDOWS)
 
219
#define _USE_MATH_DEFINES
 
220
#endif
 
221
#include <math.h>
 
222
#define __PYX_HAVE_API__bzrlib___dirstate_helpers_pyx
 
223
#include "python-compat.h"
 
224
#include "_dirstate_helpers_pyx.h"
 
225
#include "stdlib.h"
 
226
#include "sys/stat.h"
 
227
#include "string.h"
 
228
#include "_static_tuple_c.h"
 
229
 
 
230
#ifdef PYREX_WITHOUT_ASSERTIONS
 
231
#define CYTHON_WITHOUT_ASSERTIONS
 
232
#endif
 
233
 
 
234
 
 
235
/* inline attribute */
 
236
#ifndef CYTHON_INLINE
 
237
  #if defined(__GNUC__)
 
238
    #define CYTHON_INLINE __inline__
 
239
  #elif defined(_MSC_VER)
 
240
    #define CYTHON_INLINE __inline
 
241
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 
242
    #define CYTHON_INLINE inline
 
243
  #else
 
244
    #define CYTHON_INLINE
 
245
  #endif
 
246
#endif
 
247
 
 
248
/* unused attribute */
 
249
#ifndef CYTHON_UNUSED
 
250
# if defined(__GNUC__)
 
251
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
 
252
#     define CYTHON_UNUSED __attribute__ ((__unused__))
 
253
#   else
 
254
#     define CYTHON_UNUSED
 
255
#   endif
 
256
# elif defined(__ICC) || defined(__INTEL_COMPILER)
 
257
#   define CYTHON_UNUSED __attribute__ ((__unused__))
 
258
# else
 
259
#   define CYTHON_UNUSED
 
260
# endif
 
261
#endif
 
262
 
 
263
typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
 
264
 
 
265
 
 
266
/* Type Conversion Predeclarations */
 
267
 
 
268
#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
 
269
#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))
 
270
 
 
271
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
 
272
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
 
273
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
 
274
 
 
275
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
 
276
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
 
277
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
 
278
 
 
279
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
 
280
 
 
281
 
 
282
#ifdef __GNUC__
 
283
/* Test for GCC > 2.95 */
 
284
#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
 
285
#define likely(x)   __builtin_expect(!!(x), 1)
 
286
#define unlikely(x) __builtin_expect(!!(x), 0)
 
287
#else /* __GNUC__ > 2 ... */
 
288
#define likely(x)   (x)
 
289
#define unlikely(x) (x)
 
290
#endif /* __GNUC__ > 2 ... */
 
291
#else /* __GNUC__ */
 
292
#define likely(x)   (x)
 
293
#define unlikely(x) (x)
 
294
#endif /* __GNUC__ */
 
295
    
 
296
static PyObject *__pyx_m;
 
297
static PyObject *__pyx_b;
 
298
static PyObject *__pyx_empty_tuple;
 
299
static PyObject *__pyx_empty_bytes;
 
300
static int __pyx_lineno;
 
301
static int __pyx_clineno = 0;
 
302
static const char * __pyx_cfilenm= __FILE__;
 
303
static const char *__pyx_filename;
 
304
 
 
305
 
 
306
static const char *__pyx_f[] = {
 
307
  "_dirstate_helpers_pyx.pyx",
 
308
  "_static_tuple_c.pxd",
 
309
};
 
310
 
 
311
/* Type declarations */
 
312
 
 
313
/* "bzrlib/_dirstate_helpers_pyx.pyx":1020
 
314
 * 
 
315
 * 
 
316
 * cdef class ProcessEntryC:             # <<<<<<<<<<<<<<
 
317
 * 
 
318
 *     cdef int doing_consistency_expansion
 
319
 */
 
320
 
 
321
struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC {
 
322
  PyObject_HEAD
 
323
  struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_vtab;
 
324
  int doing_consistency_expansion;
 
325
  PyObject *old_dirname_to_file_id;
 
326
  PyObject *new_dirname_to_file_id;
 
327
  PyObject *last_source_parent;
 
328
  PyObject *last_target_parent;
 
329
  int include_unchanged;
 
330
  int partial;
 
331
  PyObject *use_filesystem_for_exec;
 
332
  PyObject *utf8_decode;
 
333
  PyObject *searched_specific_files;
 
334
  PyObject *searched_exact_paths;
 
335
  PyObject *search_specific_files;
 
336
  PyObject *search_specific_file_parents;
 
337
  PyObject *state;
 
338
  PyObject *current_root;
 
339
  PyObject *current_root_unicode;
 
340
  PyObject *root_entries;
 
341
  int root_entries_pos;
 
342
  int root_entries_len;
 
343
  PyObject *root_abspath;
 
344
  int source_index;
 
345
  int target_index;
 
346
  int want_unversioned;
 
347
  PyObject *tree;
 
348
  PyObject *dir_iterator;
 
349
  int block_index;
 
350
  PyObject *current_block;
 
351
  int current_block_pos;
 
352
  PyObject *current_block_list;
 
353
  PyObject *current_dir_info;
 
354
  PyObject *current_dir_list;
 
355
  PyObject *_pending_consistent_entries;
 
356
  int path_index;
 
357
  PyObject *root_dir_info;
 
358
  PyObject *bisect_left;
 
359
  PyObject *pathjoin;
 
360
  PyObject *fstat;
 
361
  PyObject *seen_ids;
 
362
  PyObject *sha_file;
 
363
};
 
364
 
 
365
/* "bzrlib/_dirstate_helpers_pyx.pyx":532
 
366
 * 
 
367
 * 
 
368
 * cdef class Reader:             # <<<<<<<<<<<<<<
 
369
 *     """Maintain the current location, and return fields as you parse them."""
 
370
 * 
 
371
 */
 
372
 
 
373
struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader {
 
374
  PyObject_HEAD
 
375
  struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *__pyx_vtab;
 
376
  PyObject *state;
 
377
  PyObject *text;
 
378
  char *text_cstr;
 
379
  int text_size;
 
380
  char *end_cstr;
 
381
  char *cur_cstr;
 
382
  char *next;
 
383
};
 
384
 
 
385
 
 
386
/* "bzrlib/_dirstate_helpers_pyx.pyx":1020
 
387
 * 
 
388
 * 
 
389
 * cdef class ProcessEntryC:             # <<<<<<<<<<<<<<
 
390
 * 
 
391
 *     cdef int doing_consistency_expansion
 
392
 */
 
393
 
 
394
struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC {
 
395
  PyObject *(*_process_entry)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *, PyObject *, PyObject *);
 
396
  int (*_gather_result_for_consistency)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *, PyObject *);
 
397
  int (*_update_current_block)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *);
 
398
  PyObject *(*_iter_next)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *);
 
399
  PyObject *(*_maybe_tree_ref)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *, PyObject *);
 
400
  PyObject *(*_loop_one_block)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *);
 
401
  PyObject *(*_next_consistent_entries)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *);
 
402
  PyObject *(*_path_info)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *, PyObject *, PyObject *);
 
403
};
 
404
static struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC;
 
405
 
 
406
 
 
407
/* "bzrlib/_dirstate_helpers_pyx.pyx":532
 
408
 * 
 
409
 * 
 
410
 * cdef class Reader:             # <<<<<<<<<<<<<<
 
411
 *     """Maintain the current location, and return fields as you parse them."""
 
412
 * 
 
413
 */
 
414
 
 
415
struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader {
 
416
  char *(*get_next)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *, int *);
 
417
  PyObject *(*get_next_str)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *);
 
418
  int (*_init)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *);
 
419
  PyObject *(*_get_entry)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *, int, void **, int *);
 
420
};
 
421
static struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *__pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_Reader;
 
422
 
 
423
#ifndef CYTHON_REFNANNY
 
424
  #define CYTHON_REFNANNY 0
 
425
#endif
 
426
 
 
427
#if CYTHON_REFNANNY
 
428
  typedef struct {
 
429
    void (*INCREF)(void*, PyObject*, int);
 
430
    void (*DECREF)(void*, PyObject*, int);
 
431
    void (*GOTREF)(void*, PyObject*, int);
 
432
    void (*GIVEREF)(void*, PyObject*, int);
 
433
    void* (*SetupContext)(const char*, int, const char*);
 
434
    void (*FinishContext)(void**);
 
435
  } __Pyx_RefNannyAPIStruct;
 
436
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
 
437
  static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) {
 
438
    PyObject *m = NULL, *p = NULL;
 
439
    void *r = NULL;
 
440
    m = PyImport_ImportModule((char *)modname);
 
441
    if (!m) goto end;
 
442
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
 
443
    if (!p) goto end;
 
444
    r = PyLong_AsVoidPtr(p);
 
445
  end:
 
446
    Py_XDECREF(p);
 
447
    Py_XDECREF(m);
 
448
    return (__Pyx_RefNannyAPIStruct *)r;
 
449
  }
 
450
  #define __Pyx_RefNannySetupContext(name)           void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
 
451
  #define __Pyx_RefNannyFinishContext()           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
 
452
  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
 
453
  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
 
454
  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
 
455
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
 
456
  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
 
457
#else
 
458
  #define __Pyx_RefNannySetupContext(name)
 
459
  #define __Pyx_RefNannyFinishContext()
 
460
  #define __Pyx_INCREF(r) Py_INCREF(r)
 
461
  #define __Pyx_DECREF(r) Py_DECREF(r)
 
462
  #define __Pyx_GOTREF(r)
 
463
  #define __Pyx_GIVEREF(r)
 
464
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
 
465
#endif /* CYTHON_REFNANNY */
 
466
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
 
467
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
 
468
 
 
469
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
 
470
 
 
471
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
 
472
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
 
473
 
 
474
static void __Pyx_RaiseDoubleKeywordsError(
 
475
    const char* func_name, PyObject* kw_name); /*proto*/
 
476
 
 
477
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/
 
478
 
 
479
static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 
480
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
481
 
 
482
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 
483
 
 
484
static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */
 
485
 
 
486
 
 
487
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
 
488
    PyObject *r;
 
489
    if (!j) return NULL;
 
490
    r = PyObject_GetItem(o, j);
 
491
    Py_DECREF(j);
 
492
    return r;
 
493
}
 
494
 
 
495
 
 
496
#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
 
497
                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
 
498
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
 
499
 
 
500
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
 
501
    if (likely(o != Py_None)) {
 
502
        if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
 
503
            PyObject *r = PyList_GET_ITEM(o, i);
 
504
            Py_INCREF(r);
 
505
            return r;
 
506
        }
 
507
        else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
 
508
            PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
 
509
            Py_INCREF(r);
 
510
            return r;
 
511
        }
 
512
    }
 
513
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
 
514
}
 
515
 
 
516
#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
 
517
                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
 
518
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
 
519
 
 
520
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
 
521
    if (likely(o != Py_None)) {
 
522
        if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
 
523
            PyObject *r = PyTuple_GET_ITEM(o, i);
 
524
            Py_INCREF(r);
 
525
            return r;
 
526
        }
 
527
        else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
 
528
            PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
 
529
            Py_INCREF(r);
 
530
            return r;
 
531
        }
 
532
    }
 
533
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
 
534
}
 
535
 
 
536
 
 
537
#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
 
538
                                                    __Pyx_GetItemInt_Fast(o, i) : \
 
539
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
 
540
 
 
541
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
 
542
    PyObject *r;
 
543
    if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
 
544
        r = PyList_GET_ITEM(o, i);
 
545
        Py_INCREF(r);
 
546
    }
 
547
    else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
 
548
        r = PyTuple_GET_ITEM(o, i);
 
549
        Py_INCREF(r);
 
550
    }
 
551
    else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
 
552
        r = PySequence_GetItem(o, i);
 
553
    }
 
554
    else {
 
555
        r = __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
 
556
    }
 
557
    return r;
 
558
}
 
559
 
 
560
#define __Pyx_SetItemInt(o, i, v, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
 
561
                                                    __Pyx_SetItemInt_Fast(o, i, v) : \
 
562
                                                    __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
 
563
 
 
564
static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
 
565
    int r;
 
566
    if (!j) return -1;
 
567
    r = PyObject_SetItem(o, j, v);
 
568
    Py_DECREF(j);
 
569
    return r;
 
570
}
 
571
 
 
572
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v) {
 
573
    if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
 
574
        Py_INCREF(v);
 
575
        Py_DECREF(PyList_GET_ITEM(o, i));
 
576
        PyList_SET_ITEM(o, i, v);
 
577
        return 1;
 
578
    }
 
579
    else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_ass_item && (likely(i >= 0)))
 
580
        return PySequence_SetItem(o, i, v);
 
581
    else {
 
582
        PyObject *j = PyInt_FromSsize_t(i);
 
583
        return __Pyx_SetItemInt_Generic(o, j, v);
 
584
    }
 
585
}
 
586
 
 
587
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
 
588
 
 
589
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
 
590
 
 
591
static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
 
592
static int __Pyx_EndUnpack(PyObject *, Py_ssize_t expected); /*proto*/
 
593
 
 
594
#if PY_VERSION_HEX < 0x02050000
 
595
#ifndef PyAnySet_CheckExact
 
596
 
 
597
#define PyAnySet_CheckExact(ob) \
 
598
    ((ob)->ob_type == &PySet_Type || \
 
599
     (ob)->ob_type == &PyFrozenSet_Type)
 
600
 
 
601
#define PySet_New(iterable) \
 
602
    PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL)
 
603
 
 
604
#define Pyx_PyFrozenSet_New(iterable) \
 
605
    PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL)
 
606
 
 
607
#define PySet_Size(anyset) \
 
608
    PyObject_Size((anyset))
 
609
 
 
610
#define PySet_Contains(anyset, key) \
 
611
    PySequence_Contains((anyset), (key))
 
612
 
 
613
#define PySet_Pop(set) \
 
614
    PyObject_CallMethod(set, (char *)"pop", NULL)
 
615
 
 
616
static CYTHON_INLINE int PySet_Clear(PyObject *set) {
 
617
    PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL);
 
618
    if (!ret) return -1;
 
619
    Py_DECREF(ret); return 0;
 
620
}
 
621
 
 
622
static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) {
 
623
    PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key);
 
624
    if (!ret) return -1;
 
625
    Py_DECREF(ret); return 0;
 
626
}
 
627
 
 
628
static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) {
 
629
    PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key);
 
630
    if (!ret) return -1;
 
631
    Py_DECREF(ret); return 0;
 
632
}
 
633
 
 
634
#endif /* PyAnySet_CheckExact (<= Py2.4) */
 
635
 
 
636
#if PY_VERSION_HEX < 0x02040000
 
637
#ifndef Py_SETOBJECT_H
 
638
#define Py_SETOBJECT_H
 
639
 
 
640
static PyTypeObject *__Pyx_PySet_Type = NULL;
 
641
static PyTypeObject *__Pyx_PyFrozenSet_Type = NULL;
 
642
 
 
643
#define PySet_Type (*__Pyx_PySet_Type)
 
644
#define PyFrozenSet_Type (*__Pyx_PyFrozenSet_Type)
 
645
 
 
646
#define PyAnySet_Check(ob) \
 
647
    (PyAnySet_CheckExact(ob) || \
 
648
     PyType_IsSubtype((ob)->ob_type, &PySet_Type) || \
 
649
     PyType_IsSubtype((ob)->ob_type, &PyFrozenSet_Type))
 
650
 
 
651
#define PyFrozenSet_CheckExact(ob) ((ob)->ob_type == &PyFrozenSet_Type)
 
652
 
 
653
static int __Pyx_Py23SetsImport(void) {
 
654
    PyObject *sets=0, *Set=0, *ImmutableSet=0;
 
655
 
 
656
    sets = PyImport_ImportModule((char *)"sets");
 
657
    if (!sets) goto bad;
 
658
    Set = PyObject_GetAttrString(sets, (char *)"Set");
 
659
    if (!Set) goto bad;
 
660
    ImmutableSet = PyObject_GetAttrString(sets, (char *)"ImmutableSet");
 
661
    if (!ImmutableSet) goto bad;
 
662
    Py_DECREF(sets);
 
663
 
 
664
    __Pyx_PySet_Type       = (PyTypeObject*) Set;
 
665
    __Pyx_PyFrozenSet_Type = (PyTypeObject*) ImmutableSet;
 
666
 
 
667
    return 0;
 
668
 
 
669
 bad:
 
670
    Py_XDECREF(sets);
 
671
    Py_XDECREF(Set);
 
672
    Py_XDECREF(ImmutableSet);
 
673
    return -1;
 
674
}
 
675
 
 
676
#else
 
677
static int __Pyx_Py23SetsImport(void) { return 0; }
 
678
#endif /* !Py_SETOBJECT_H */
 
679
#endif /* < Py2.4  */
 
680
#endif /* < Py2.5  */
 
681
 
 
682
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
683
 
 
684
static CYTHON_INLINE PyObject* __Pyx_PyObject_Pop(PyObject* L) {
 
685
    PyObject *r, *m;
 
686
#if PY_VERSION_HEX >= 0x02040000
 
687
    if (likely(PyList_CheckExact(L))
 
688
            /* Check that both the size is positive and no reallocation shrinking needs to be done. */
 
689
            && likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) {
 
690
        Py_SIZE(L) -= 1;
 
691
        return PyList_GET_ITEM(L, PyList_GET_SIZE(L));
 
692
    }
 
693
#endif
 
694
    m = __Pyx_GetAttrString(L, "pop");
 
695
    if (!m) return NULL;
 
696
    r = PyObject_CallObject(m, NULL);
 
697
    Py_DECREF(m);
 
698
    return r;
 
699
}
 
700
 
 
701
static CYTHON_INLINE long __Pyx_NegateNonNeg(long b) { return unlikely(b < 0) ? b : !b; }
 
702
static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
 
703
    return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b);
 
704
}
 
705
 
 
706
#define __Pyx_DelItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
 
707
                                                    __Pyx_DelItemInt_Fast(o, i) : \
 
708
                                                    __Pyx_DelItem_Generic(o, to_py_func(i)))
 
709
 
 
710
static CYTHON_INLINE int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
 
711
    int r;
 
712
    if (!j) return -1;
 
713
    r = PyObject_DelItem(o, j);
 
714
    Py_DECREF(j);
 
715
    return r;
 
716
}
 
717
 
 
718
static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i) {
 
719
    if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_ass_item && likely(i >= 0))
 
720
        return PySequence_DelItem(o, i);
 
721
    else {
 
722
        PyObject *j = PyInt_FromSsize_t(i);
 
723
        return __Pyx_DelItem_Generic(o, j);
 
724
    }
 
725
}
 
726
 
 
727
static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
 
728
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
 
729
 
 
730
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
 
731
 
 
732
static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
 
733
 
 
734
static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
 
735
 
 
736
static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
 
737
 
 
738
static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
 
739
 
 
740
static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
 
741
 
 
742
static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
 
743
 
 
744
static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
 
745
 
 
746
static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
 
747
 
 
748
static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
 
749
 
 
750
static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);
 
751
 
 
752
static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
 
753
 
 
754
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
 
755
 
 
756
static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
 
757
 
 
758
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
 
759
 
 
760
static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
 
761
 
 
762
static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
 
763
 
 
764
static void __Pyx_WriteUnraisable(const char *name); /*proto*/
 
765
 
 
766
static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
 
767
 
 
768
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict);  /*proto*/
 
769
 
 
770
static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
 
771
 
 
772
static void __Pyx_AddTraceback(const char *funcname); /*proto*/
 
773
 
 
774
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
 
775
/* Module declarations from bzrlib._static_tuple_c */
 
776
 
 
777
/* Module declarations from bzrlib._static_tuple_c */
 
778
 
 
779
static PyTypeObject *__pyx_ptype_6bzrlib_15_static_tuple_c_StaticTuple = 0;
 
780
/* Module declarations from bzrlib._dirstate_helpers_pyx */
 
781
 
 
782
static PyTypeObject *__pyx_ptype_6bzrlib_21_dirstate_helpers_pyx_Reader = 0;
 
783
static PyTypeObject *__pyx_ptype_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC = 0;
 
784
static int __pyx_v_6bzrlib_21_dirstate_helpers_pyx_ERROR_PATH_NOT_FOUND;
 
785
static int __pyx_v_6bzrlib_21_dirstate_helpers_pyx_ERROR_DIRECTORY;
 
786
static PyObject *__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_absent = 0;
 
787
static PyObject *__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_file = 0;
 
788
static PyObject *__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_directory = 0;
 
789
static PyObject *__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_symlink = 0;
 
790
static PyObject *__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_relocated = 0;
 
791
static PyObject *__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_tree_reference = 0;
 
792
static void *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__my_memrchr(void *, int, size_t); /*proto*/
 
793
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_safe_string_from_size(char *, Py_ssize_t); /*proto*/
 
794
static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__is_aligned(void *); /*proto*/
 
795
static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_by_dirs(char *, int, char *, int); /*proto*/
 
796
static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock_intern(char *, int, char *, int); /*proto*/
 
797
static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx_minikind_from_mode(int); /*proto*/
 
798
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__pack_stat(PyObject *); /*proto*/
 
799
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__update_entry(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
 
800
static char __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_from_string(PyObject *); /*proto*/
 
801
static PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_to_kind(char); /*proto*/
 
802
static int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(char); /*proto*/
 
803
#define __Pyx_MODULE_NAME "bzrlib._dirstate_helpers_pyx"
 
804
static int __pyx_module_is_main_bzrlib___dirstate_helpers_pyx = 0;
 
805
 
 
806
/* Implementation of bzrlib._dirstate_helpers_pyx */
 
807
static PyObject *__pyx_builtin_AssertionError;
 
808
static PyObject *__pyx_builtin_TypeError;
 
809
static PyObject *__pyx_builtin_KeyError;
 
810
static PyObject *__pyx_builtin_StopIteration;
 
811
static PyObject *__pyx_builtin_OSError;
 
812
static PyObject *__pyx_builtin_AttributeError;
 
813
static PyObject *__pyx_builtin_cmp;
 
814
static PyObject *__pyx_builtin_UnicodeDecodeError;
 
815
static char __pyx_k_1[] = "Must be a single character string, not %s";
 
816
static char __pyx_k_2[] = "tried to create a string with an invalid size: %d";
 
817
static char __pyx_k_3[] = "'path1' must be a plain string, not %s: %r";
 
818
static char __pyx_k_4[] = "'path2' must be a plain string, not %s: %r";
 
819
static char __pyx_k_5[] = "";
 
820
static char __pyx_k_6[] = "you must pass a python list for 'paths' not: %s %r";
 
821
static char __pyx_k_7[] = "you must pass a string for 'path' not: %s %r";
 
822
static char __pyx_k_8[] = "you must pass a python list for 'dirblocks' not: %s %r";
 
823
static char __pyx_k_9[] = "you must pass a string for dirname not: %s %r";
 
824
static char __pyx_k_10[] = "get_next() called when cur_str is NULL";
 
825
static char __pyx_k_12[] = "get_next() called when there are no chars left";
 
826
static char __pyx_k_14[] = "failed to find trailing NULL (\\0). Trailing garbage: %r";
 
827
static char __pyx_k_15[] = "First character should be null not: %s";
 
828
static char __pyx_k_16[] = "Bad parse, we expected to end on \\n, not: %d %s: %s";
 
829
static char __pyx_k_17[] = "_num_present_parents";
 
830
static char __pyx_k_18[] = "We read the wrong number of entries. We expected to read %s, but read %s";
 
831
static char __pyx_k_19[] = "_split_root_dirblock_into_contents";
 
832
static char __pyx_k_20[] = "IN_MEMORY_UNMODIFIED";
 
833
static char __pyx_k_21[] = "_get_block_entry_index";
 
834
static char __pyx_k_22[] = "use_filesystem_for_exec";
 
835
static char __pyx_k_23[] = "search_specific_files";
 
836
static char __pyx_k_24[] = "doing_consistency_expansion";
 
837
static char __pyx_k_25[] = "old_dirname_to_file_id";
 
838
static char __pyx_k_26[] = "new_dirname_to_file_id";
 
839
static char __pyx_k_27[] = "searched_specific_files";
 
840
static char __pyx_k_28[] = "searched_exact_paths";
 
841
static char __pyx_k_29[] = "search_specific_file_parents";
 
842
static char __pyx_k_30[] = "current_root_unicode";
 
843
static char __pyx_k_31[] = "_pending_consistent_entries";
 
844
static char __pyx_k_32[] = "unsupported target index";
 
845
static char __pyx_k_34[] = "Unsupported target index %d";
 
846
static char __pyx_k_36[] = "entry '%s/%s' is considered renamed from %r but source does not exist\nentry: %s";
 
847
static char __pyx_k_37[] = "tree-reference";
 
848
static char __pyx_k_39[] = "Could not find target parent in wt: %s\nparent of: %s";
 
849
static char __pyx_k_40[] = "We could not find the parent entry in index %d for the entry: %s";
 
850
static char __pyx_k_42[] = "don't know how to compare source_minikind=%r, target_minikind=%r";
 
851
static char __pyx_k_46[] = "_gather_result_for_consistency";
 
852
static char __pyx_k_48[] = "file_kind_from_stat_mode";
 
853
static char __pyx_k_49[] = "_directory_is_tree_reference";
 
854
static char __pyx_k_52[] = ".bzr";
 
855
static char __pyx_k_54[] = "_find_block_index_from_key";
 
856
static char __pyx_k_55[] = "_update_current_block";
 
857
static char __pyx_k_58[] = "_next_consistent_entries";
 
858
static char __pyx_k_60[] = "result is not None: %r";
 
859
static char __pyx_k_62[] = "Missing entry for specific path parent %r, %r";
 
860
static char __pyx_k_64[] = "Got entry<->path mismatch for specific path %r entry %r path_info %r ";
 
861
static char __pyx_k_65[] = "/";
 
862
static char __pyx_k_68[] = "Helper functions for DirState.\n\nThis is the python implementation for DirState functions.\n";
 
863
static char __pyx_k_69[] = "bzrlib.dirstate";
 
864
static char __pyx_k_70[] = "bzrlib.osutils";
 
865
static char __pyx_k_71[] = "bzrlib._dirstate_helpers_pyx";
 
866
static char __pyx_k_72[] = "_cmp_path_by_dirblock";
 
867
static char __pyx_k__a[] = "a";
 
868
static char __pyx_k__c[] = "c";
 
869
static char __pyx_k__d[] = "d";
 
870
static char __pyx_k__f[] = "f";
 
871
static char __pyx_k__l[] = "l";
 
872
static char __pyx_k__r[] = "r";
 
873
static char __pyx_k__s[] = "s";
 
874
static char __pyx_k__ar[] = "ar";
 
875
static char __pyx_k__hi[] = "hi";
 
876
static char __pyx_k__lo[] = "lo";
 
877
static char __pyx_k__os[] = "os";
 
878
static char __pyx_k__add[] = "add";
 
879
static char __pyx_k__cmp[] = "cmp";
 
880
static char __pyx_k__sys[] = "sys";
 
881
static char __pyx_k__file[] = "file";
 
882
static char __pyx_k__next[] = "next";
 
883
static char __pyx_k__path[] = "path";
 
884
static char __pyx_k__read[] = "read";
 
885
static char __pyx_k__seek[] = "seek";
 
886
static char __pyx_k__self[] = "self";
 
887
static char __pyx_k__stat[] = "stat";
 
888
static char __pyx_k__text[] = "text";
 
889
static char __pyx_k__tree[] = "tree";
 
890
static char __pyx_k__utf8[] = "utf8";
 
891
static char __pyx_k___init[] = "_init";
 
892
static char __pyx_k__cache[] = "cache";
 
893
static char __pyx_k__entry[] = "entry";
 
894
static char __pyx_k__errno[] = "errno";
 
895
static char __pyx_k__fstat[] = "fstat";
 
896
static char __pyx_k__lstat[] = "lstat";
 
897
static char __pyx_k__path1[] = "path1";
 
898
static char __pyx_k__path2[] = "path2";
 
899
static char __pyx_k__paths[] = "paths";
 
900
static char __pyx_k__split[] = "split";
 
901
static char __pyx_k__state[] = "state";
 
902
static char __pyx_k__win32[] = "win32";
 
903
static char __pyx_k__EINVAL[] = "EINVAL";
 
904
static char __pyx_k__ENOENT[] = "ENOENT";
 
905
static char __pyx_k____ne__[] = "__ne__";
 
906
static char __pyx_k__absent[] = "absent";
 
907
static char __pyx_k__append[] = "append";
 
908
static char __pyx_k__bisect[] = "bisect";
 
909
static char __pyx_k__bzrlib[] = "bzrlib";
 
910
static char __pyx_k__decode[] = "decode";
 
911
static char __pyx_k__encode[] = "encode";
 
912
static char __pyx_k__errors[] = "errors";
 
913
static char __pyx_k__prefix[] = "prefix";
 
914
static char __pyx_k__rsplit[] = "rsplit";
 
915
static char __pyx_k__st_dev[] = "st_dev";
 
916
static char __pyx_k__st_ino[] = "st_ino";
 
917
static char __pyx_k__update[] = "update";
 
918
static char __pyx_k__ENOTDIR[] = "ENOTDIR";
 
919
static char __pyx_k__OSError[] = "OSError";
 
920
static char __pyx_k__S_IEXEC[] = "S_IEXEC";
 
921
static char __pyx_k__S_ISREG[] = "S_ISREG";
 
922
static char __pyx_k___encode[] = "_encode";
 
923
static char __pyx_k___fs_enc[] = "_fs_enc";
 
924
static char __pyx_k__abspath[] = "abspath";
 
925
static char __pyx_k__dirname[] = "dirname";
 
926
static char __pyx_k__osutils[] = "osutils";
 
927
static char __pyx_k__partial[] = "partial";
 
928
static char __pyx_k__st_mode[] = "st_mode";
 
929
static char __pyx_k__st_size[] = "st_size";
 
930
static char __pyx_k__symlink[] = "symlink";
 
931
static char __pyx_k__BzrError[] = "BzrError";
 
932
static char __pyx_k__DirState[] = "DirState";
 
933
static char __pyx_k__KeyError[] = "KeyError";
 
934
static char __pyx_k__NULLSTAT[] = "NULLSTAT";
 
935
static char __pyx_k____main__[] = "__main__";
 
936
static char __pyx_k____test__[] = "__test__";
 
937
static char __pyx_k__binascii[] = "binascii";
 
938
static char __pyx_k__cur_cstr[] = "cur_cstr";
 
939
static char __pyx_k__end_cstr[] = "end_cstr";
 
940
static char __pyx_k__get_next[] = "get_next";
 
941
static char __pyx_k__pathjoin[] = "pathjoin";
 
942
static char __pyx_k__platform[] = "platform";
 
943
static char __pyx_k__seen_ids[] = "seen_ids";
 
944
static char __pyx_k__sha_file[] = "sha_file";
 
945
static char __pyx_k__st_ctime[] = "st_ctime";
 
946
static char __pyx_k__st_mtime[] = "st_mtime";
 
947
static char __pyx_k__winerror[] = "winerror";
 
948
static char __pyx_k__TypeError[] = "TypeError";
 
949
static char __pyx_k___filename[] = "_filename";
 
950
static char __pyx_k__dirblocks[] = "dirblocks";
 
951
static char __pyx_k__directory[] = "directory";
 
952
static char __pyx_k__is_inside[] = "is_inside";
 
953
static char __pyx_k__pack_stat[] = "pack_stat";
 
954
static char __pyx_k__path_utf8[] = "path_utf8";
 
955
static char __pyx_k__relocated[] = "relocated";
 
956
static char __pyx_k__splitpath[] = "splitpath";
 
957
static char __pyx_k__text_cstr[] = "text_cstr";
 
958
static char __pyx_k__text_size[] = "text_size";
 
959
static char __pyx_k___dirblocks[] = "_dirblocks";
 
960
static char __pyx_k___get_entry[] = "_get_entry";
 
961
static char __pyx_k___iter_next[] = "_iter_next";
 
962
static char __pyx_k___path_info[] = "_path_info";
 
963
static char __pyx_k___read_link[] = "_read_link";
 
964
static char __pyx_k___sha1_file[] = "_sha1_file";
 
965
static char __pyx_k__b2a_base64[] = "b2a_base64";
 
966
static char __pyx_k__cache_utf8[] = "cache_utf8";
 
967
static char __pyx_k__path_index[] = "path_index";
 
968
static char __pyx_k__stat_value[] = "stat_value";
 
969
static char __pyx_k___py_memrchr[] = "_py_memrchr";
 
970
static char __pyx_k___state_file[] = "_state_file";
 
971
static char __pyx_k__bisect_left[] = "bisect_left";
 
972
static char __pyx_k__block_index[] = "block_index";
 
973
static char __pyx_k__cmp_by_dirs[] = "cmp_by_dirs";
 
974
static char __pyx_k__utf8_decode[] = "utf8_decode";
 
975
static char __pyx_k___cutoff_time[] = "_cutoff_time";
 
976
static char __pyx_k___num_entries[] = "_num_entries";
 
977
static char __pyx_k___utf8_decode[] = "_utf8_decode";
 
978
static char __pyx_k__current_root[] = "current_root";
 
979
static char __pyx_k__dir_iterator[] = "dir_iterator";
 
980
static char __pyx_k__get_next_str[] = "get_next_str";
 
981
static char __pyx_k__root_abspath[] = "root_abspath";
 
982
static char __pyx_k__root_entries[] = "root_entries";
 
983
static char __pyx_k__source_index[] = "source_index";
 
984
static char __pyx_k__target_index[] = "target_index";
 
985
static char __pyx_k__update_entry[] = "update_entry";
 
986
static char __pyx_k__StopIteration[] = "StopIteration";
 
987
static char __pyx_k___ensure_block[] = "_ensure_block";
 
988
static char __pyx_k__current_block[] = "current_block";
 
989
static char __pyx_k__is_inside_any[] = "is_inside_any";
 
990
static char __pyx_k__root_dir_info[] = "root_dir_info";
 
991
static char __pyx_k__stat_and_sha1[] = "stat_and_sha1";
 
992
static char __pyx_k__AssertionError[] = "AssertionError";
 
993
static char __pyx_k__AttributeError[] = "AttributeError";
 
994
static char __pyx_k___end_of_header[] = "_end_of_header";
 
995
static char __pyx_k___is_executable[] = "_is_executable";
 
996
static char __pyx_k___mark_modified[] = "_mark_modified";
 
997
static char __pyx_k___observed_sha1[] = "_observed_sha1";
 
998
static char __pyx_k___process_entry[] = "_process_entry";
 
999
static char __pyx_k___sha1_provider[] = "_sha1_provider";
 
1000
static char __pyx_k___walkdirs_utf8[] = "_walkdirs_utf8";
 
1001
static char __pyx_k__CorruptDirstate[] = "CorruptDirstate";
 
1002
static char __pyx_k__DirstateCorrupt[] = "DirstateCorrupt";
 
1003
static char __pyx_k___dirblock_state[] = "_dirblock_state";
 
1004
static char __pyx_k___loop_one_block[] = "_loop_one_block";
 
1005
static char __pyx_k___maybe_tree_ref[] = "_maybe_tree_ref";
 
1006
static char __pyx_k___read_dirblocks[] = "_read_dirblocks";
 
1007
static char __pyx_k__bisect_dirblock[] = "bisect_dirblock";
 
1008
static char __pyx_k__BadFileKindError[] = "BadFileKindError";
 
1009
static char __pyx_k___parse_dirblocks[] = "_parse_dirblocks";
 
1010
static char __pyx_k___sha_cutoff_time[] = "_sha_cutoff_time";
 
1011
static char __pyx_k__current_dir_info[] = "current_dir_info";
 
1012
static char __pyx_k__current_dir_list[] = "current_dir_list";
 
1013
static char __pyx_k__root_entries_len[] = "root_entries_len";
 
1014
static char __pyx_k__root_entries_pos[] = "root_entries_pos";
 
1015
static char __pyx_k__want_unversioned[] = "want_unversioned";
 
1016
static char __pyx_k___bisect_path_left[] = "_bisect_path_left";
 
1017
static char __pyx_k___entries_for_path[] = "_entries_for_path";
 
1018
static char __pyx_k__current_block_pos[] = "current_block_pos";
 
1019
static char __pyx_k__include_unchanged[] = "include_unchanged";
 
1020
static char __pyx_k__UnicodeDecodeError[] = "UnicodeDecodeError";
 
1021
static char __pyx_k___bisect_path_right[] = "_bisect_path_right";
 
1022
static char __pyx_k__current_block_list[] = "current_block_list";
 
1023
static char __pyx_k__last_source_parent[] = "last_source_parent";
 
1024
static char __pyx_k__last_target_parent[] = "last_target_parent";
 
1025
static char __pyx_k__parent_directories[] = "parent_directories";
 
1026
static char __pyx_k__BadFilenameEncoding[] = "BadFilenameEncoding";
 
1027
static char __pyx_k__NULL_PARENT_DETAILS[] = "NULL_PARENT_DETAILS";
 
1028
static PyObject *__pyx_kp_s_1;
 
1029
static PyObject *__pyx_kp_s_10;
 
1030
static PyObject *__pyx_kp_s_12;
 
1031
static PyObject *__pyx_kp_s_14;
 
1032
static PyObject *__pyx_kp_s_15;
 
1033
static PyObject *__pyx_kp_s_16;
 
1034
static PyObject *__pyx_n_s_17;
 
1035
static PyObject *__pyx_kp_s_18;
 
1036
static PyObject *__pyx_n_s_19;
 
1037
static PyObject *__pyx_kp_s_2;
 
1038
static PyObject *__pyx_n_s_20;
 
1039
static PyObject *__pyx_n_s_21;
 
1040
static PyObject *__pyx_n_s_22;
 
1041
static PyObject *__pyx_n_s_23;
 
1042
static PyObject *__pyx_n_s_24;
 
1043
static PyObject *__pyx_n_s_25;
 
1044
static PyObject *__pyx_n_s_26;
 
1045
static PyObject *__pyx_n_s_27;
 
1046
static PyObject *__pyx_n_s_28;
 
1047
static PyObject *__pyx_n_s_29;
 
1048
static PyObject *__pyx_kp_s_3;
 
1049
static PyObject *__pyx_n_s_30;
 
1050
static PyObject *__pyx_n_s_31;
 
1051
static PyObject *__pyx_kp_s_32;
 
1052
static PyObject *__pyx_kp_s_34;
 
1053
static PyObject *__pyx_kp_s_36;
 
1054
static PyObject *__pyx_kp_s_37;
 
1055
static PyObject *__pyx_kp_s_39;
 
1056
static PyObject *__pyx_kp_s_4;
 
1057
static PyObject *__pyx_kp_s_40;
 
1058
static PyObject *__pyx_kp_s_42;
 
1059
static PyObject *__pyx_n_s_46;
 
1060
static PyObject *__pyx_n_s_48;
 
1061
static PyObject *__pyx_n_s_49;
 
1062
static PyObject *__pyx_kp_s_5;
 
1063
static PyObject *__pyx_kp_s_52;
 
1064
static PyObject *__pyx_n_s_54;
 
1065
static PyObject *__pyx_n_s_55;
 
1066
static PyObject *__pyx_n_s_58;
 
1067
static PyObject *__pyx_kp_s_6;
 
1068
static PyObject *__pyx_kp_s_60;
 
1069
static PyObject *__pyx_kp_s_62;
 
1070
static PyObject *__pyx_kp_s_64;
 
1071
static PyObject *__pyx_kp_s_65;
 
1072
static PyObject *__pyx_n_s_69;
 
1073
static PyObject *__pyx_kp_s_7;
 
1074
static PyObject *__pyx_n_s_70;
 
1075
static PyObject *__pyx_n_s_71;
 
1076
static PyObject *__pyx_n_s_72;
 
1077
static PyObject *__pyx_kp_s_8;
 
1078
static PyObject *__pyx_kp_s_9;
 
1079
static PyObject *__pyx_n_s__AssertionError;
 
1080
static PyObject *__pyx_n_s__AttributeError;
 
1081
static PyObject *__pyx_n_s__BadFileKindError;
 
1082
static PyObject *__pyx_n_s__BadFilenameEncoding;
 
1083
static PyObject *__pyx_n_s__BzrError;
 
1084
static PyObject *__pyx_n_s__CorruptDirstate;
 
1085
static PyObject *__pyx_n_s__DirState;
 
1086
static PyObject *__pyx_n_s__DirstateCorrupt;
 
1087
static PyObject *__pyx_n_s__EINVAL;
 
1088
static PyObject *__pyx_n_s__ENOENT;
 
1089
static PyObject *__pyx_n_s__ENOTDIR;
 
1090
static PyObject *__pyx_n_s__KeyError;
 
1091
static PyObject *__pyx_n_s__NULLSTAT;
 
1092
static PyObject *__pyx_n_s__NULL_PARENT_DETAILS;
 
1093
static PyObject *__pyx_n_s__OSError;
 
1094
static PyObject *__pyx_n_s__S_IEXEC;
 
1095
static PyObject *__pyx_n_s__S_ISREG;
 
1096
static PyObject *__pyx_n_s__StopIteration;
 
1097
static PyObject *__pyx_n_s__TypeError;
 
1098
static PyObject *__pyx_n_s__UnicodeDecodeError;
 
1099
static PyObject *__pyx_n_s____main__;
 
1100
static PyObject *__pyx_n_s____ne__;
 
1101
static PyObject *__pyx_n_s____test__;
 
1102
static PyObject *__pyx_n_s___bisect_path_left;
 
1103
static PyObject *__pyx_n_s___bisect_path_right;
 
1104
static PyObject *__pyx_n_s___cutoff_time;
 
1105
static PyObject *__pyx_n_s___dirblock_state;
 
1106
static PyObject *__pyx_n_s___dirblocks;
 
1107
static PyObject *__pyx_n_s___encode;
 
1108
static PyObject *__pyx_n_s___end_of_header;
 
1109
static PyObject *__pyx_n_s___ensure_block;
 
1110
static PyObject *__pyx_n_s___entries_for_path;
 
1111
static PyObject *__pyx_n_s___filename;
 
1112
static PyObject *__pyx_n_s___fs_enc;
 
1113
static PyObject *__pyx_n_s___get_entry;
 
1114
static PyObject *__pyx_n_s___init;
 
1115
static PyObject *__pyx_n_s___is_executable;
 
1116
static PyObject *__pyx_n_s___iter_next;
 
1117
static PyObject *__pyx_n_s___loop_one_block;
 
1118
static PyObject *__pyx_n_s___mark_modified;
 
1119
static PyObject *__pyx_n_s___maybe_tree_ref;
 
1120
static PyObject *__pyx_n_s___num_entries;
 
1121
static PyObject *__pyx_n_s___observed_sha1;
 
1122
static PyObject *__pyx_n_s___parse_dirblocks;
 
1123
static PyObject *__pyx_n_s___path_info;
 
1124
static PyObject *__pyx_n_s___process_entry;
 
1125
static PyObject *__pyx_n_s___py_memrchr;
 
1126
static PyObject *__pyx_n_s___read_dirblocks;
 
1127
static PyObject *__pyx_n_s___read_link;
 
1128
static PyObject *__pyx_n_s___sha1_file;
 
1129
static PyObject *__pyx_n_s___sha1_provider;
 
1130
static PyObject *__pyx_n_s___sha_cutoff_time;
 
1131
static PyObject *__pyx_n_s___state_file;
 
1132
static PyObject *__pyx_n_s___utf8_decode;
 
1133
static PyObject *__pyx_n_s___walkdirs_utf8;
 
1134
static PyObject *__pyx_n_s__a;
 
1135
static PyObject *__pyx_n_s__absent;
 
1136
static PyObject *__pyx_n_s__abspath;
 
1137
static PyObject *__pyx_n_s__add;
 
1138
static PyObject *__pyx_n_s__append;
 
1139
static PyObject *__pyx_n_s__ar;
 
1140
static PyObject *__pyx_n_s__b2a_base64;
 
1141
static PyObject *__pyx_n_s__binascii;
 
1142
static PyObject *__pyx_n_s__bisect;
 
1143
static PyObject *__pyx_n_s__bisect_dirblock;
 
1144
static PyObject *__pyx_n_s__bisect_left;
 
1145
static PyObject *__pyx_n_s__block_index;
 
1146
static PyObject *__pyx_n_s__bzrlib;
 
1147
static PyObject *__pyx_n_s__c;
 
1148
static PyObject *__pyx_n_s__cache;
 
1149
static PyObject *__pyx_n_s__cache_utf8;
 
1150
static PyObject *__pyx_n_s__cmp;
 
1151
static PyObject *__pyx_n_s__cmp_by_dirs;
 
1152
static PyObject *__pyx_n_s__cur_cstr;
 
1153
static PyObject *__pyx_n_s__current_block;
 
1154
static PyObject *__pyx_n_s__current_block_list;
 
1155
static PyObject *__pyx_n_s__current_block_pos;
 
1156
static PyObject *__pyx_n_s__current_dir_info;
 
1157
static PyObject *__pyx_n_s__current_dir_list;
 
1158
static PyObject *__pyx_n_s__current_root;
 
1159
static PyObject *__pyx_n_s__d;
 
1160
static PyObject *__pyx_n_s__decode;
 
1161
static PyObject *__pyx_n_s__dir_iterator;
 
1162
static PyObject *__pyx_n_s__dirblocks;
 
1163
static PyObject *__pyx_n_s__directory;
 
1164
static PyObject *__pyx_n_s__dirname;
 
1165
static PyObject *__pyx_n_s__encode;
 
1166
static PyObject *__pyx_n_s__end_cstr;
 
1167
static PyObject *__pyx_n_s__entry;
 
1168
static PyObject *__pyx_n_s__errno;
 
1169
static PyObject *__pyx_n_s__errors;
 
1170
static PyObject *__pyx_n_s__f;
 
1171
static PyObject *__pyx_n_s__file;
 
1172
static PyObject *__pyx_n_s__fstat;
 
1173
static PyObject *__pyx_n_s__get_next;
 
1174
static PyObject *__pyx_n_s__get_next_str;
 
1175
static PyObject *__pyx_n_s__hi;
 
1176
static PyObject *__pyx_n_s__include_unchanged;
 
1177
static PyObject *__pyx_n_s__is_inside;
 
1178
static PyObject *__pyx_n_s__is_inside_any;
 
1179
static PyObject *__pyx_n_s__l;
 
1180
static PyObject *__pyx_n_s__last_source_parent;
 
1181
static PyObject *__pyx_n_s__last_target_parent;
 
1182
static PyObject *__pyx_n_s__lo;
 
1183
static PyObject *__pyx_n_s__lstat;
 
1184
static PyObject *__pyx_n_s__next;
 
1185
static PyObject *__pyx_n_s__os;
 
1186
static PyObject *__pyx_n_s__osutils;
 
1187
static PyObject *__pyx_n_s__pack_stat;
 
1188
static PyObject *__pyx_n_s__parent_directories;
 
1189
static PyObject *__pyx_n_s__partial;
 
1190
static PyObject *__pyx_n_s__path;
 
1191
static PyObject *__pyx_n_s__path1;
 
1192
static PyObject *__pyx_n_s__path2;
 
1193
static PyObject *__pyx_n_s__path_index;
 
1194
static PyObject *__pyx_n_s__path_utf8;
 
1195
static PyObject *__pyx_n_s__pathjoin;
 
1196
static PyObject *__pyx_n_s__paths;
 
1197
static PyObject *__pyx_n_s__platform;
 
1198
static PyObject *__pyx_n_s__prefix;
 
1199
static PyObject *__pyx_n_s__r;
 
1200
static PyObject *__pyx_n_s__read;
 
1201
static PyObject *__pyx_n_s__relocated;
 
1202
static PyObject *__pyx_n_s__root_abspath;
 
1203
static PyObject *__pyx_n_s__root_dir_info;
 
1204
static PyObject *__pyx_n_s__root_entries;
 
1205
static PyObject *__pyx_n_s__root_entries_len;
 
1206
static PyObject *__pyx_n_s__root_entries_pos;
 
1207
static PyObject *__pyx_n_s__rsplit;
 
1208
static PyObject *__pyx_n_s__s;
 
1209
static PyObject *__pyx_n_s__seek;
 
1210
static PyObject *__pyx_n_s__seen_ids;
 
1211
static PyObject *__pyx_n_s__self;
 
1212
static PyObject *__pyx_n_s__sha_file;
 
1213
static PyObject *__pyx_n_s__source_index;
 
1214
static PyObject *__pyx_n_s__split;
 
1215
static PyObject *__pyx_n_s__splitpath;
 
1216
static PyObject *__pyx_n_s__st_ctime;
 
1217
static PyObject *__pyx_n_s__st_dev;
 
1218
static PyObject *__pyx_n_s__st_ino;
 
1219
static PyObject *__pyx_n_s__st_mode;
 
1220
static PyObject *__pyx_n_s__st_mtime;
 
1221
static PyObject *__pyx_n_s__st_size;
 
1222
static PyObject *__pyx_n_s__stat;
 
1223
static PyObject *__pyx_n_s__stat_and_sha1;
 
1224
static PyObject *__pyx_n_s__stat_value;
 
1225
static PyObject *__pyx_n_s__state;
 
1226
static PyObject *__pyx_n_s__symlink;
 
1227
static PyObject *__pyx_n_s__sys;
 
1228
static PyObject *__pyx_n_s__target_index;
 
1229
static PyObject *__pyx_n_s__text;
 
1230
static PyObject *__pyx_n_s__text_cstr;
 
1231
static PyObject *__pyx_n_s__text_size;
 
1232
static PyObject *__pyx_n_s__tree;
 
1233
static PyObject *__pyx_n_s__update;
 
1234
static PyObject *__pyx_n_s__update_entry;
 
1235
static PyObject *__pyx_n_s__utf8;
 
1236
static PyObject *__pyx_n_s__utf8_decode;
 
1237
static PyObject *__pyx_n_s__want_unversioned;
 
1238
static PyObject *__pyx_n_s__win32;
 
1239
static PyObject *__pyx_n_s__winerror;
 
1240
static PyObject *__pyx_int_0;
 
1241
static PyObject *__pyx_int_1;
 
1242
static PyObject *__pyx_k_tuple_11;
 
1243
static PyObject *__pyx_k_tuple_13;
 
1244
static PyObject *__pyx_k_tuple_33;
 
1245
static PyObject *__pyx_k_tuple_35;
 
1246
static PyObject *__pyx_k_tuple_38;
 
1247
static PyObject *__pyx_k_tuple_41;
 
1248
static PyObject *__pyx_k_tuple_43;
 
1249
static PyObject *__pyx_k_tuple_44;
 
1250
static PyObject *__pyx_k_tuple_45;
 
1251
static PyObject *__pyx_k_tuple_47;
 
1252
static PyObject *__pyx_k_tuple_50;
 
1253
static PyObject *__pyx_k_tuple_51;
 
1254
static PyObject *__pyx_k_tuple_53;
 
1255
static PyObject *__pyx_k_tuple_56;
 
1256
static PyObject *__pyx_k_tuple_57;
 
1257
static PyObject *__pyx_k_tuple_59;
 
1258
static PyObject *__pyx_k_tuple_61;
 
1259
static PyObject *__pyx_k_tuple_63;
 
1260
static PyObject *__pyx_k_tuple_66;
 
1261
static PyObject *__pyx_k_tuple_67;
 
1262
 
 
1263
/* "bzrlib/_dirstate_helpers_pyx.pyx":128
 
1264
 * import_static_tuple_c()
 
1265
 * 
 
1266
 * cdef void* _my_memrchr(void *s, int c, size_t n): # cannot_raise             # <<<<<<<<<<<<<<
 
1267
 *     # memrchr seems to be a GNU extension, so we have to implement it ourselves
 
1268
 *     cdef char *pos
 
1269
 */
 
1270
 
 
1271
static  void *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__my_memrchr(void *__pyx_v_s, int __pyx_v_c, size_t __pyx_v_n) {
 
1272
  char *__pyx_v_pos;
 
1273
  char *__pyx_v_start;
 
1274
  void *__pyx_r;
 
1275
  int __pyx_t_1;
 
1276
  __Pyx_RefNannySetupContext("_my_memrchr");
 
1277
 
 
1278
  /* "bzrlib/_dirstate_helpers_pyx.pyx":133
 
1279
 *     cdef char *start
 
1280
 * 
 
1281
 *     start = <char*>s             # <<<<<<<<<<<<<<
 
1282
 *     pos = start + n - 1
 
1283
 *     while pos >= start:
 
1284
 */
 
1285
  __pyx_v_start = ((char *)__pyx_v_s);
 
1286
 
 
1287
  /* "bzrlib/_dirstate_helpers_pyx.pyx":134
 
1288
 * 
 
1289
 *     start = <char*>s
 
1290
 *     pos = start + n - 1             # <<<<<<<<<<<<<<
 
1291
 *     while pos >= start:
 
1292
 *         if pos[0] == c:
 
1293
 */
 
1294
  __pyx_v_pos = ((__pyx_v_start + __pyx_v_n) - 1);
 
1295
 
 
1296
  /* "bzrlib/_dirstate_helpers_pyx.pyx":135
 
1297
 *     start = <char*>s
 
1298
 *     pos = start + n - 1
 
1299
 *     while pos >= start:             # <<<<<<<<<<<<<<
 
1300
 *         if pos[0] == c:
 
1301
 *             return <void*>pos
 
1302
 */
 
1303
  while (1) {
 
1304
    __pyx_t_1 = (__pyx_v_pos >= __pyx_v_start);
 
1305
    if (!__pyx_t_1) break;
 
1306
 
 
1307
    /* "bzrlib/_dirstate_helpers_pyx.pyx":136
 
1308
 *     pos = start + n - 1
 
1309
 *     while pos >= start:
 
1310
 *         if pos[0] == c:             # <<<<<<<<<<<<<<
 
1311
 *             return <void*>pos
 
1312
 *         pos = pos - 1
 
1313
 */
 
1314
    __pyx_t_1 = ((__pyx_v_pos[0]) == __pyx_v_c);
 
1315
    if (__pyx_t_1) {
 
1316
 
 
1317
      /* "bzrlib/_dirstate_helpers_pyx.pyx":137
 
1318
 *     while pos >= start:
 
1319
 *         if pos[0] == c:
 
1320
 *             return <void*>pos             # <<<<<<<<<<<<<<
 
1321
 *         pos = pos - 1
 
1322
 *     return NULL
 
1323
 */
 
1324
      __pyx_r = ((void *)__pyx_v_pos);
 
1325
      goto __pyx_L0;
 
1326
      goto __pyx_L5;
 
1327
    }
 
1328
    __pyx_L5:;
 
1329
 
 
1330
    /* "bzrlib/_dirstate_helpers_pyx.pyx":138
 
1331
 *         if pos[0] == c:
 
1332
 *             return <void*>pos
 
1333
 *         pos = pos - 1             # <<<<<<<<<<<<<<
 
1334
 *     return NULL
 
1335
 * 
 
1336
 */
 
1337
    __pyx_v_pos = (__pyx_v_pos - 1);
 
1338
  }
 
1339
 
 
1340
  /* "bzrlib/_dirstate_helpers_pyx.pyx":139
 
1341
 *             return <void*>pos
 
1342
 *         pos = pos - 1
 
1343
 *     return NULL             # <<<<<<<<<<<<<<
 
1344
 * 
 
1345
 * 
 
1346
 */
 
1347
  __pyx_r = NULL;
 
1348
  goto __pyx_L0;
 
1349
 
 
1350
  __pyx_r = 0;
 
1351
  __pyx_L0:;
 
1352
  __Pyx_RefNannyFinishContext();
 
1353
  return __pyx_r;
 
1354
}
 
1355
 
 
1356
/* "bzrlib/_dirstate_helpers_pyx.pyx":142
 
1357
 * 
 
1358
 * 
 
1359
 * def _py_memrchr(s, c):             # <<<<<<<<<<<<<<
 
1360
 *     """Just to expose _my_memrchr for testing.
 
1361
 * 
 
1362
 */
 
1363
 
 
1364
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx__py_memrchr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
1365
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx__py_memrchr[] = "Just to expose _my_memrchr for testing.\n\n    :param s: The Python string to search\n    :param c: The character to search for\n    :return: The offset to the last instance of 'c' in s\n    ";
 
1366
static PyMethodDef __pyx_mdef_6bzrlib_21_dirstate_helpers_pyx__py_memrchr = {__Pyx_NAMESTR("_py_memrchr"), (PyCFunction)__pyx_pf_6bzrlib_21_dirstate_helpers_pyx__py_memrchr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6bzrlib_21_dirstate_helpers_pyx__py_memrchr)};
 
1367
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx__py_memrchr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
1368
  PyObject *__pyx_v_s = 0;
 
1369
  PyObject *__pyx_v_c = 0;
 
1370
  void *__pyx_v__s;
 
1371
  void *__pyx_v_found;
 
1372
  int __pyx_v_length;
 
1373
  char *__pyx_v__c;
 
1374
  PyObject *__pyx_r = NULL;
 
1375
  PyObject *__pyx_t_1 = NULL;
 
1376
  PyObject *__pyx_t_2 = NULL;
 
1377
  int __pyx_t_3;
 
1378
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__s,&__pyx_n_s__c,0};
 
1379
  __Pyx_RefNannySetupContext("_py_memrchr");
 
1380
  __pyx_self = __pyx_self;
 
1381
  if (unlikely(__pyx_kwds)) {
 
1382
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
1383
    PyObject* values[2] = {0,0};
 
1384
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1385
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
1386
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
1387
      case  0: break;
 
1388
      default: goto __pyx_L5_argtuple_error;
 
1389
    }
 
1390
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
1391
      case  0:
 
1392
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__s);
 
1393
      if (likely(values[0])) kw_args--;
 
1394
      else goto __pyx_L5_argtuple_error;
 
1395
      case  1:
 
1396
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__c);
 
1397
      if (likely(values[1])) kw_args--;
 
1398
      else {
 
1399
        __Pyx_RaiseArgtupleInvalid("_py_memrchr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1400
      }
 
1401
    }
 
1402
    if (unlikely(kw_args > 0)) {
 
1403
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_py_memrchr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1404
    }
 
1405
    __pyx_v_s = values[0];
 
1406
    __pyx_v_c = values[1];
 
1407
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
 
1408
    goto __pyx_L5_argtuple_error;
 
1409
  } else {
 
1410
    __pyx_v_s = PyTuple_GET_ITEM(__pyx_args, 0);
 
1411
    __pyx_v_c = PyTuple_GET_ITEM(__pyx_args, 1);
 
1412
  }
 
1413
  goto __pyx_L4_argument_unpacking_done;
 
1414
  __pyx_L5_argtuple_error:;
 
1415
  __Pyx_RaiseArgtupleInvalid("_py_memrchr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
1416
  __pyx_L3_error:;
 
1417
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._py_memrchr");
 
1418
  __Pyx_RefNannyFinishContext();
 
1419
  return NULL;
 
1420
  __pyx_L4_argument_unpacking_done:;
 
1421
 
 
1422
  /* "bzrlib/_dirstate_helpers_pyx.pyx":154
 
1423
 *     cdef char *_c
 
1424
 * 
 
1425
 *     _s = PyString_AsString(s)             # <<<<<<<<<<<<<<
 
1426
 *     length = PyString_Size(s)
 
1427
 * 
 
1428
 */
 
1429
  __pyx_v__s = PyString_AsString(__pyx_v_s);
 
1430
 
 
1431
  /* "bzrlib/_dirstate_helpers_pyx.pyx":155
 
1432
 * 
 
1433
 *     _s = PyString_AsString(s)
 
1434
 *     length = PyString_Size(s)             # <<<<<<<<<<<<<<
 
1435
 * 
 
1436
 *     _c = PyString_AsString(c)
 
1437
 */
 
1438
  __pyx_v_length = PyString_Size(__pyx_v_s);
 
1439
 
 
1440
  /* "bzrlib/_dirstate_helpers_pyx.pyx":157
 
1441
 *     length = PyString_Size(s)
 
1442
 * 
 
1443
 *     _c = PyString_AsString(c)             # <<<<<<<<<<<<<<
 
1444
 *     assert PyString_Size(c) == 1,\
 
1445
 *         'Must be a single character string, not %s' % (c,)
 
1446
 */
 
1447
  __pyx_v__c = PyString_AsString(__pyx_v_c);
 
1448
 
 
1449
  /* "bzrlib/_dirstate_helpers_pyx.pyx":158
 
1450
 * 
 
1451
 *     _c = PyString_AsString(c)
 
1452
 *     assert PyString_Size(c) == 1,\             # <<<<<<<<<<<<<<
 
1453
 *         'Must be a single character string, not %s' % (c,)
 
1454
 *     found = _my_memrchr(_s, _c[0], length)
 
1455
 */
 
1456
  #ifndef CYTHON_WITHOUT_ASSERTIONS
 
1457
  if (unlikely(!(PyString_Size(__pyx_v_c) == 1))) {
 
1458
 
 
1459
    /* "bzrlib/_dirstate_helpers_pyx.pyx":159
 
1460
 *     _c = PyString_AsString(c)
 
1461
 *     assert PyString_Size(c) == 1,\
 
1462
 *         'Must be a single character string, not %s' % (c,)             # <<<<<<<<<<<<<<
 
1463
 *     found = _my_memrchr(_s, _c[0], length)
 
1464
 *     if found == NULL:
 
1465
 */
 
1466
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1467
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
1468
    __Pyx_INCREF(__pyx_v_c);
 
1469
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_c);
 
1470
    __Pyx_GIVEREF(__pyx_v_c);
 
1471
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_1), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1472
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
1473
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
1474
    PyErr_SetObject(PyExc_AssertionError, ((PyObject *)__pyx_t_2));
 
1475
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
1476
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1477
  }
 
1478
  #endif
 
1479
 
 
1480
  /* "bzrlib/_dirstate_helpers_pyx.pyx":160
 
1481
 *     assert PyString_Size(c) == 1,\
 
1482
 *         'Must be a single character string, not %s' % (c,)
 
1483
 *     found = _my_memrchr(_s, _c[0], length)             # <<<<<<<<<<<<<<
 
1484
 *     if found == NULL:
 
1485
 *         return None
 
1486
 */
 
1487
  __pyx_v_found = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__my_memrchr(__pyx_v__s, (__pyx_v__c[0]), __pyx_v_length);
 
1488
 
 
1489
  /* "bzrlib/_dirstate_helpers_pyx.pyx":161
 
1490
 *         'Must be a single character string, not %s' % (c,)
 
1491
 *     found = _my_memrchr(_s, _c[0], length)
 
1492
 *     if found == NULL:             # <<<<<<<<<<<<<<
 
1493
 *         return None
 
1494
 *     return <char*>found - <char*>_s
 
1495
 */
 
1496
  __pyx_t_3 = (__pyx_v_found == NULL);
 
1497
  if (__pyx_t_3) {
 
1498
 
 
1499
    /* "bzrlib/_dirstate_helpers_pyx.pyx":162
 
1500
 *     found = _my_memrchr(_s, _c[0], length)
 
1501
 *     if found == NULL:
 
1502
 *         return None             # <<<<<<<<<<<<<<
 
1503
 *     return <char*>found - <char*>_s
 
1504
 * 
 
1505
 */
 
1506
    __Pyx_XDECREF(__pyx_r);
 
1507
    __Pyx_INCREF(Py_None);
 
1508
    __pyx_r = Py_None;
 
1509
    goto __pyx_L0;
 
1510
    goto __pyx_L6;
 
1511
  }
 
1512
  __pyx_L6:;
 
1513
 
 
1514
  /* "bzrlib/_dirstate_helpers_pyx.pyx":163
 
1515
 *     if found == NULL:
 
1516
 *         return None
 
1517
 *     return <char*>found - <char*>_s             # <<<<<<<<<<<<<<
 
1518
 * 
 
1519
 * 
 
1520
 */
 
1521
  __Pyx_XDECREF(__pyx_r);
 
1522
  __pyx_t_2 = PyInt_FromLong((((char *)__pyx_v_found) - ((char *)__pyx_v__s))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1523
  __Pyx_GOTREF(__pyx_t_2);
 
1524
  __pyx_r = __pyx_t_2;
 
1525
  __pyx_t_2 = 0;
 
1526
  goto __pyx_L0;
 
1527
 
 
1528
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1529
  goto __pyx_L0;
 
1530
  __pyx_L1_error:;
 
1531
  __Pyx_XDECREF(__pyx_t_1);
 
1532
  __Pyx_XDECREF(__pyx_t_2);
 
1533
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._py_memrchr");
 
1534
  __pyx_r = NULL;
 
1535
  __pyx_L0:;
 
1536
  __Pyx_XGIVEREF(__pyx_r);
 
1537
  __Pyx_RefNannyFinishContext();
 
1538
  return __pyx_r;
 
1539
}
 
1540
 
 
1541
/* "bzrlib/_dirstate_helpers_pyx.pyx":166
 
1542
 * 
 
1543
 * 
 
1544
 * cdef object safe_string_from_size(char *s, Py_ssize_t size):             # <<<<<<<<<<<<<<
 
1545
 *     if size < 0:
 
1546
 *         raise AssertionError(
 
1547
 */
 
1548
 
 
1549
static  PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_safe_string_from_size(char *__pyx_v_s, Py_ssize_t __pyx_v_size) {
 
1550
  PyObject *__pyx_r = NULL;
 
1551
  int __pyx_t_1;
 
1552
  PyObject *__pyx_t_2 = NULL;
 
1553
  PyObject *__pyx_t_3 = NULL;
 
1554
  __Pyx_RefNannySetupContext("safe_string_from_size");
 
1555
 
 
1556
  /* "bzrlib/_dirstate_helpers_pyx.pyx":167
 
1557
 * 
 
1558
 * cdef object safe_string_from_size(char *s, Py_ssize_t size):
 
1559
 *     if size < 0:             # <<<<<<<<<<<<<<
 
1560
 *         raise AssertionError(
 
1561
 *             'tried to create a string with an invalid size: %d'
 
1562
 */
 
1563
  __pyx_t_1 = (__pyx_v_size < 0);
 
1564
  if (__pyx_t_1) {
 
1565
 
 
1566
    /* "bzrlib/_dirstate_helpers_pyx.pyx":170
 
1567
 *         raise AssertionError(
 
1568
 *             'tried to create a string with an invalid size: %d'
 
1569
 *             % (size))             # <<<<<<<<<<<<<<
 
1570
 *     return PyString_FromStringAndSize(s, size)
 
1571
 * 
 
1572
 */
 
1573
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1574
    __Pyx_GOTREF(__pyx_t_2);
 
1575
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_2), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1576
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
1577
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
1578
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1579
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
1580
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
 
1581
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
1582
    __pyx_t_3 = 0;
 
1583
    __pyx_t_3 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1584
    __Pyx_GOTREF(__pyx_t_3);
 
1585
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
1586
    __Pyx_Raise(__pyx_t_3, 0, 0);
 
1587
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
1588
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1589
    goto __pyx_L3;
 
1590
  }
 
1591
  __pyx_L3:;
 
1592
 
 
1593
  /* "bzrlib/_dirstate_helpers_pyx.pyx":171
 
1594
 *             'tried to create a string with an invalid size: %d'
 
1595
 *             % (size))
 
1596
 *     return PyString_FromStringAndSize(s, size)             # <<<<<<<<<<<<<<
 
1597
 * 
 
1598
 * 
 
1599
 */
 
1600
  __Pyx_XDECREF(__pyx_r);
 
1601
  __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_s, __pyx_v_size); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1602
  __Pyx_GOTREF(__pyx_t_3);
 
1603
  __pyx_r = __pyx_t_3;
 
1604
  __pyx_t_3 = 0;
 
1605
  goto __pyx_L0;
 
1606
 
 
1607
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
1608
  goto __pyx_L0;
 
1609
  __pyx_L1_error:;
 
1610
  __Pyx_XDECREF(__pyx_t_2);
 
1611
  __Pyx_XDECREF(__pyx_t_3);
 
1612
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.safe_string_from_size");
 
1613
  __pyx_r = 0;
 
1614
  __pyx_L0:;
 
1615
  __Pyx_XGIVEREF(__pyx_r);
 
1616
  __Pyx_RefNannyFinishContext();
 
1617
  return __pyx_r;
 
1618
}
 
1619
 
 
1620
/* "bzrlib/_dirstate_helpers_pyx.pyx":174
 
1621
 * 
 
1622
 * 
 
1623
 * cdef int _is_aligned(void *ptr): # cannot_raise             # <<<<<<<<<<<<<<
 
1624
 *     """Is this pointer aligned to an integer size offset?
 
1625
 * 
 
1626
 */
 
1627
 
 
1628
static  int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__is_aligned(void *__pyx_v_ptr) {
 
1629
  int __pyx_r;
 
1630
  __Pyx_RefNannySetupContext("_is_aligned");
 
1631
 
 
1632
  /* "bzrlib/_dirstate_helpers_pyx.pyx":179
 
1633
 *     :return: 1 if this pointer is aligned, 0 otherwise.
 
1634
 *     """
 
1635
 *     return ((<intptr_t>ptr) & ((sizeof(int))-1)) == 0             # <<<<<<<<<<<<<<
 
1636
 * 
 
1637
 * 
 
1638
 */
 
1639
  __pyx_r = ((((intptr_t)__pyx_v_ptr) & ((sizeof(int)) - 1)) == 0);
 
1640
  goto __pyx_L0;
 
1641
 
 
1642
  __pyx_r = 0;
 
1643
  __pyx_L0:;
 
1644
  __Pyx_RefNannyFinishContext();
 
1645
  return __pyx_r;
 
1646
}
 
1647
 
 
1648
/* "bzrlib/_dirstate_helpers_pyx.pyx":182
 
1649
 * 
 
1650
 * 
 
1651
 * cdef int _cmp_by_dirs(char *path1, int size1, char *path2, int size2): # cannot_raise             # <<<<<<<<<<<<<<
 
1652
 *     cdef unsigned char *cur1
 
1653
 *     cdef unsigned char *cur2
 
1654
 */
 
1655
 
 
1656
static  int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_by_dirs(char *__pyx_v_path1, int __pyx_v_size1, char *__pyx_v_path2, int __pyx_v_size2) {
 
1657
  unsigned char *__pyx_v_cur1;
 
1658
  unsigned char *__pyx_v_cur2;
 
1659
  unsigned char *__pyx_v_end1;
 
1660
  unsigned char *__pyx_v_end2;
 
1661
  int *__pyx_v_cur_int1;
 
1662
  int *__pyx_v_cur_int2;
 
1663
  int *__pyx_v_end_int1;
 
1664
  int *__pyx_v_end_int2;
 
1665
  int __pyx_r;
 
1666
  int __pyx_t_1;
 
1667
  int __pyx_t_2;
 
1668
  int __pyx_t_3;
 
1669
  int __pyx_t_4;
 
1670
  int __pyx_t_5;
 
1671
  size_t __pyx_t_6;
 
1672
  __Pyx_RefNannySetupContext("_cmp_by_dirs");
 
1673
 
 
1674
  /* "bzrlib/_dirstate_helpers_pyx.pyx":192
 
1675
 *     cdef int *end_int2
 
1676
 * 
 
1677
 *     if path1 == path2 and size1 == size2:             # <<<<<<<<<<<<<<
 
1678
 *         return 0
 
1679
 * 
 
1680
 */
 
1681
  __pyx_t_1 = (__pyx_v_path1 == __pyx_v_path2);
 
1682
  if (__pyx_t_1) {
 
1683
    __pyx_t_2 = (__pyx_v_size1 == __pyx_v_size2);
 
1684
    __pyx_t_3 = __pyx_t_2;
 
1685
  } else {
 
1686
    __pyx_t_3 = __pyx_t_1;
 
1687
  }
 
1688
  if (__pyx_t_3) {
 
1689
 
 
1690
    /* "bzrlib/_dirstate_helpers_pyx.pyx":193
 
1691
 * 
 
1692
 *     if path1 == path2 and size1 == size2:
 
1693
 *         return 0             # <<<<<<<<<<<<<<
 
1694
 * 
 
1695
 *     end1 = <unsigned char*>path1+size1
 
1696
 */
 
1697
    __pyx_r = 0;
 
1698
    goto __pyx_L0;
 
1699
    goto __pyx_L3;
 
1700
  }
 
1701
  __pyx_L3:;
 
1702
 
 
1703
  /* "bzrlib/_dirstate_helpers_pyx.pyx":195
 
1704
 *         return 0
 
1705
 * 
 
1706
 *     end1 = <unsigned char*>path1+size1             # <<<<<<<<<<<<<<
 
1707
 *     end2 = <unsigned char*>path2+size2
 
1708
 * 
 
1709
 */
 
1710
  __pyx_v_end1 = (((unsigned char *)__pyx_v_path1) + __pyx_v_size1);
 
1711
 
 
1712
  /* "bzrlib/_dirstate_helpers_pyx.pyx":196
 
1713
 * 
 
1714
 *     end1 = <unsigned char*>path1+size1
 
1715
 *     end2 = <unsigned char*>path2+size2             # <<<<<<<<<<<<<<
 
1716
 * 
 
1717
 *     # Use 32-bit comparisons for the matching portion of the string.
 
1718
 */
 
1719
  __pyx_v_end2 = (((unsigned char *)__pyx_v_path2) + __pyx_v_size2);
 
1720
 
 
1721
  /* "bzrlib/_dirstate_helpers_pyx.pyx":203
 
1722
 *     # 99% of the time, these will be aligned, but in case they aren't just skip
 
1723
 *     # this loop
 
1724
 *     if _is_aligned(path1) and _is_aligned(path2):             # <<<<<<<<<<<<<<
 
1725
 *         cur_int1 = <int*>path1
 
1726
 *         cur_int2 = <int*>path2
 
1727
 */
 
1728
  __pyx_t_4 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__is_aligned(__pyx_v_path1);
 
1729
  if (__pyx_t_4) {
 
1730
    __pyx_t_5 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__is_aligned(__pyx_v_path2);
 
1731
    __pyx_t_3 = __pyx_t_5;
 
1732
  } else {
 
1733
    __pyx_t_3 = __pyx_t_4;
 
1734
  }
 
1735
  if (__pyx_t_3) {
 
1736
 
 
1737
    /* "bzrlib/_dirstate_helpers_pyx.pyx":204
 
1738
 *     # this loop
 
1739
 *     if _is_aligned(path1) and _is_aligned(path2):
 
1740
 *         cur_int1 = <int*>path1             # <<<<<<<<<<<<<<
 
1741
 *         cur_int2 = <int*>path2
 
1742
 *         end_int1 = <int*>(path1 + size1 - (size1 % sizeof(int)))
 
1743
 */
 
1744
    __pyx_v_cur_int1 = ((int *)__pyx_v_path1);
 
1745
 
 
1746
    /* "bzrlib/_dirstate_helpers_pyx.pyx":205
 
1747
 *     if _is_aligned(path1) and _is_aligned(path2):
 
1748
 *         cur_int1 = <int*>path1
 
1749
 *         cur_int2 = <int*>path2             # <<<<<<<<<<<<<<
 
1750
 *         end_int1 = <int*>(path1 + size1 - (size1 % sizeof(int)))
 
1751
 *         end_int2 = <int*>(path2 + size2 - (size2 % sizeof(int)))
 
1752
 */
 
1753
    __pyx_v_cur_int2 = ((int *)__pyx_v_path2);
 
1754
 
 
1755
    /* "bzrlib/_dirstate_helpers_pyx.pyx":206
 
1756
 *         cur_int1 = <int*>path1
 
1757
 *         cur_int2 = <int*>path2
 
1758
 *         end_int1 = <int*>(path1 + size1 - (size1 % sizeof(int)))             # <<<<<<<<<<<<<<
 
1759
 *         end_int2 = <int*>(path2 + size2 - (size2 % sizeof(int)))
 
1760
 * 
 
1761
 */
 
1762
    __pyx_t_6 = (sizeof(int));
 
1763
    if (unlikely(__pyx_t_6 == 0)) {
 
1764
      PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
 
1765
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1766
    }
 
1767
    __pyx_v_end_int1 = ((int *)((__pyx_v_path1 + __pyx_v_size1) - (__pyx_v_size1 % __pyx_t_6)));
 
1768
 
 
1769
    /* "bzrlib/_dirstate_helpers_pyx.pyx":207
 
1770
 *         cur_int2 = <int*>path2
 
1771
 *         end_int1 = <int*>(path1 + size1 - (size1 % sizeof(int)))
 
1772
 *         end_int2 = <int*>(path2 + size2 - (size2 % sizeof(int)))             # <<<<<<<<<<<<<<
 
1773
 * 
 
1774
 *         while cur_int1 < end_int1 and cur_int2 < end_int2:
 
1775
 */
 
1776
    __pyx_t_6 = (sizeof(int));
 
1777
    if (unlikely(__pyx_t_6 == 0)) {
 
1778
      PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
 
1779
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
1780
    }
 
1781
    __pyx_v_end_int2 = ((int *)((__pyx_v_path2 + __pyx_v_size2) - (__pyx_v_size2 % __pyx_t_6)));
 
1782
 
 
1783
    /* "bzrlib/_dirstate_helpers_pyx.pyx":209
 
1784
 *         end_int2 = <int*>(path2 + size2 - (size2 % sizeof(int)))
 
1785
 * 
 
1786
 *         while cur_int1 < end_int1 and cur_int2 < end_int2:             # <<<<<<<<<<<<<<
 
1787
 *             if cur_int1[0] != cur_int2[0]:
 
1788
 *                 break
 
1789
 */
 
1790
    while (1) {
 
1791
      __pyx_t_3 = (__pyx_v_cur_int1 < __pyx_v_end_int1);
 
1792
      if (__pyx_t_3) {
 
1793
        __pyx_t_1 = (__pyx_v_cur_int2 < __pyx_v_end_int2);
 
1794
        __pyx_t_2 = __pyx_t_1;
 
1795
      } else {
 
1796
        __pyx_t_2 = __pyx_t_3;
 
1797
      }
 
1798
      if (!__pyx_t_2) break;
 
1799
 
 
1800
      /* "bzrlib/_dirstate_helpers_pyx.pyx":210
 
1801
 * 
 
1802
 *         while cur_int1 < end_int1 and cur_int2 < end_int2:
 
1803
 *             if cur_int1[0] != cur_int2[0]:             # <<<<<<<<<<<<<<
 
1804
 *                 break
 
1805
 *             cur_int1 = cur_int1 + 1
 
1806
 */
 
1807
      __pyx_t_2 = ((__pyx_v_cur_int1[0]) != (__pyx_v_cur_int2[0]));
 
1808
      if (__pyx_t_2) {
 
1809
 
 
1810
        /* "bzrlib/_dirstate_helpers_pyx.pyx":211
 
1811
 *         while cur_int1 < end_int1 and cur_int2 < end_int2:
 
1812
 *             if cur_int1[0] != cur_int2[0]:
 
1813
 *                 break             # <<<<<<<<<<<<<<
 
1814
 *             cur_int1 = cur_int1 + 1
 
1815
 *             cur_int2 = cur_int2 + 1
 
1816
 */
 
1817
        goto __pyx_L6_break;
 
1818
        goto __pyx_L7;
 
1819
      }
 
1820
      __pyx_L7:;
 
1821
 
 
1822
      /* "bzrlib/_dirstate_helpers_pyx.pyx":212
 
1823
 *             if cur_int1[0] != cur_int2[0]:
 
1824
 *                 break
 
1825
 *             cur_int1 = cur_int1 + 1             # <<<<<<<<<<<<<<
 
1826
 *             cur_int2 = cur_int2 + 1
 
1827
 * 
 
1828
 */
 
1829
      __pyx_v_cur_int1 = (__pyx_v_cur_int1 + 1);
 
1830
 
 
1831
      /* "bzrlib/_dirstate_helpers_pyx.pyx":213
 
1832
 *                 break
 
1833
 *             cur_int1 = cur_int1 + 1
 
1834
 *             cur_int2 = cur_int2 + 1             # <<<<<<<<<<<<<<
 
1835
 * 
 
1836
 *         cur1 = <unsigned char*>cur_int1
 
1837
 */
 
1838
      __pyx_v_cur_int2 = (__pyx_v_cur_int2 + 1);
 
1839
    }
 
1840
    __pyx_L6_break:;
 
1841
 
 
1842
    /* "bzrlib/_dirstate_helpers_pyx.pyx":215
 
1843
 *             cur_int2 = cur_int2 + 1
 
1844
 * 
 
1845
 *         cur1 = <unsigned char*>cur_int1             # <<<<<<<<<<<<<<
 
1846
 *         cur2 = <unsigned char*>cur_int2
 
1847
 *     else:
 
1848
 */
 
1849
    __pyx_v_cur1 = ((unsigned char *)__pyx_v_cur_int1);
 
1850
 
 
1851
    /* "bzrlib/_dirstate_helpers_pyx.pyx":216
 
1852
 * 
 
1853
 *         cur1 = <unsigned char*>cur_int1
 
1854
 *         cur2 = <unsigned char*>cur_int2             # <<<<<<<<<<<<<<
 
1855
 *     else:
 
1856
 *         cur1 = <unsigned char*>path1
 
1857
 */
 
1858
    __pyx_v_cur2 = ((unsigned char *)__pyx_v_cur_int2);
 
1859
    goto __pyx_L4;
 
1860
  }
 
1861
  /*else*/ {
 
1862
 
 
1863
    /* "bzrlib/_dirstate_helpers_pyx.pyx":218
 
1864
 *         cur2 = <unsigned char*>cur_int2
 
1865
 *     else:
 
1866
 *         cur1 = <unsigned char*>path1             # <<<<<<<<<<<<<<
 
1867
 *         cur2 = <unsigned char*>path2
 
1868
 * 
 
1869
 */
 
1870
    __pyx_v_cur1 = ((unsigned char *)__pyx_v_path1);
 
1871
 
 
1872
    /* "bzrlib/_dirstate_helpers_pyx.pyx":219
 
1873
 *     else:
 
1874
 *         cur1 = <unsigned char*>path1
 
1875
 *         cur2 = <unsigned char*>path2             # <<<<<<<<<<<<<<
 
1876
 * 
 
1877
 *     while cur1 < end1 and cur2 < end2:
 
1878
 */
 
1879
    __pyx_v_cur2 = ((unsigned char *)__pyx_v_path2);
 
1880
  }
 
1881
  __pyx_L4:;
 
1882
 
 
1883
  /* "bzrlib/_dirstate_helpers_pyx.pyx":221
 
1884
 *         cur2 = <unsigned char*>path2
 
1885
 * 
 
1886
 *     while cur1 < end1 and cur2 < end2:             # <<<<<<<<<<<<<<
 
1887
 *         if cur1[0] == cur2[0]:
 
1888
 *             # This character matches, just go to the next one
 
1889
 */
 
1890
  while (1) {
 
1891
    __pyx_t_2 = (__pyx_v_cur1 < __pyx_v_end1);
 
1892
    if (__pyx_t_2) {
 
1893
      __pyx_t_3 = (__pyx_v_cur2 < __pyx_v_end2);
 
1894
      __pyx_t_1 = __pyx_t_3;
 
1895
    } else {
 
1896
      __pyx_t_1 = __pyx_t_2;
 
1897
    }
 
1898
    if (!__pyx_t_1) break;
 
1899
 
 
1900
    /* "bzrlib/_dirstate_helpers_pyx.pyx":222
 
1901
 * 
 
1902
 *     while cur1 < end1 and cur2 < end2:
 
1903
 *         if cur1[0] == cur2[0]:             # <<<<<<<<<<<<<<
 
1904
 *             # This character matches, just go to the next one
 
1905
 *             cur1 = cur1 + 1
 
1906
 */
 
1907
    __pyx_t_1 = ((__pyx_v_cur1[0]) == (__pyx_v_cur2[0]));
 
1908
    if (__pyx_t_1) {
 
1909
 
 
1910
      /* "bzrlib/_dirstate_helpers_pyx.pyx":224
 
1911
 *         if cur1[0] == cur2[0]:
 
1912
 *             # This character matches, just go to the next one
 
1913
 *             cur1 = cur1 + 1             # <<<<<<<<<<<<<<
 
1914
 *             cur2 = cur2 + 1
 
1915
 *             continue
 
1916
 */
 
1917
      __pyx_v_cur1 = (__pyx_v_cur1 + 1);
 
1918
 
 
1919
      /* "bzrlib/_dirstate_helpers_pyx.pyx":225
 
1920
 *             # This character matches, just go to the next one
 
1921
 *             cur1 = cur1 + 1
 
1922
 *             cur2 = cur2 + 1             # <<<<<<<<<<<<<<
 
1923
 *             continue
 
1924
 *         # The current characters do not match
 
1925
 */
 
1926
      __pyx_v_cur2 = (__pyx_v_cur2 + 1);
 
1927
 
 
1928
      /* "bzrlib/_dirstate_helpers_pyx.pyx":226
 
1929
 *             cur1 = cur1 + 1
 
1930
 *             cur2 = cur2 + 1
 
1931
 *             continue             # <<<<<<<<<<<<<<
 
1932
 *         # The current characters do not match
 
1933
 *         if cur1[0] == c'/':
 
1934
 */
 
1935
      goto __pyx_L8_continue;
 
1936
      goto __pyx_L10;
 
1937
    }
 
1938
    __pyx_L10:;
 
1939
 
 
1940
    /* "bzrlib/_dirstate_helpers_pyx.pyx":228
 
1941
 *             continue
 
1942
 *         # The current characters do not match
 
1943
 *         if cur1[0] == c'/':             # <<<<<<<<<<<<<<
 
1944
 *             return -1 # Reached the end of path1 segment first
 
1945
 *         elif cur2[0] == c'/':
 
1946
 */
 
1947
    __pyx_t_1 = ((__pyx_v_cur1[0]) == '/');
 
1948
    if (__pyx_t_1) {
 
1949
 
 
1950
      /* "bzrlib/_dirstate_helpers_pyx.pyx":229
 
1951
 *         # The current characters do not match
 
1952
 *         if cur1[0] == c'/':
 
1953
 *             return -1 # Reached the end of path1 segment first             # <<<<<<<<<<<<<<
 
1954
 *         elif cur2[0] == c'/':
 
1955
 *             return 1 # Reached the end of path2 segment first
 
1956
 */
 
1957
      __pyx_r = -1;
 
1958
      goto __pyx_L0;
 
1959
      goto __pyx_L11;
 
1960
    }
 
1961
 
 
1962
    /* "bzrlib/_dirstate_helpers_pyx.pyx":230
 
1963
 *         if cur1[0] == c'/':
 
1964
 *             return -1 # Reached the end of path1 segment first
 
1965
 *         elif cur2[0] == c'/':             # <<<<<<<<<<<<<<
 
1966
 *             return 1 # Reached the end of path2 segment first
 
1967
 *         elif cur1[0] < cur2[0]:
 
1968
 */
 
1969
    __pyx_t_1 = ((__pyx_v_cur2[0]) == '/');
 
1970
    if (__pyx_t_1) {
 
1971
 
 
1972
      /* "bzrlib/_dirstate_helpers_pyx.pyx":231
 
1973
 *             return -1 # Reached the end of path1 segment first
 
1974
 *         elif cur2[0] == c'/':
 
1975
 *             return 1 # Reached the end of path2 segment first             # <<<<<<<<<<<<<<
 
1976
 *         elif cur1[0] < cur2[0]:
 
1977
 *             return -1
 
1978
 */
 
1979
      __pyx_r = 1;
 
1980
      goto __pyx_L0;
 
1981
      goto __pyx_L11;
 
1982
    }
 
1983
 
 
1984
    /* "bzrlib/_dirstate_helpers_pyx.pyx":232
 
1985
 *         elif cur2[0] == c'/':
 
1986
 *             return 1 # Reached the end of path2 segment first
 
1987
 *         elif cur1[0] < cur2[0]:             # <<<<<<<<<<<<<<
 
1988
 *             return -1
 
1989
 *         else:
 
1990
 */
 
1991
    __pyx_t_1 = ((__pyx_v_cur1[0]) < (__pyx_v_cur2[0]));
 
1992
    if (__pyx_t_1) {
 
1993
 
 
1994
      /* "bzrlib/_dirstate_helpers_pyx.pyx":233
 
1995
 *             return 1 # Reached the end of path2 segment first
 
1996
 *         elif cur1[0] < cur2[0]:
 
1997
 *             return -1             # <<<<<<<<<<<<<<
 
1998
 *         else:
 
1999
 *             return 1
 
2000
 */
 
2001
      __pyx_r = -1;
 
2002
      goto __pyx_L0;
 
2003
      goto __pyx_L11;
 
2004
    }
 
2005
    /*else*/ {
 
2006
 
 
2007
      /* "bzrlib/_dirstate_helpers_pyx.pyx":235
 
2008
 *             return -1
 
2009
 *         else:
 
2010
 *             return 1             # <<<<<<<<<<<<<<
 
2011
 * 
 
2012
 *     # We reached the end of at least one of the strings
 
2013
 */
 
2014
      __pyx_r = 1;
 
2015
      goto __pyx_L0;
 
2016
    }
 
2017
    __pyx_L11:;
 
2018
    __pyx_L8_continue:;
 
2019
  }
 
2020
 
 
2021
  /* "bzrlib/_dirstate_helpers_pyx.pyx":238
 
2022
 * 
 
2023
 *     # We reached the end of at least one of the strings
 
2024
 *     if cur1 < end1:             # <<<<<<<<<<<<<<
 
2025
 *         return 1 # Not at the end of cur1, must be at the end of cur2
 
2026
 *     if cur2 < end2:
 
2027
 */
 
2028
  __pyx_t_1 = (__pyx_v_cur1 < __pyx_v_end1);
 
2029
  if (__pyx_t_1) {
 
2030
 
 
2031
    /* "bzrlib/_dirstate_helpers_pyx.pyx":239
 
2032
 *     # We reached the end of at least one of the strings
 
2033
 *     if cur1 < end1:
 
2034
 *         return 1 # Not at the end of cur1, must be at the end of cur2             # <<<<<<<<<<<<<<
 
2035
 *     if cur2 < end2:
 
2036
 *         return -1 # At the end of cur1, but not at cur2
 
2037
 */
 
2038
    __pyx_r = 1;
 
2039
    goto __pyx_L0;
 
2040
    goto __pyx_L12;
 
2041
  }
 
2042
  __pyx_L12:;
 
2043
 
 
2044
  /* "bzrlib/_dirstate_helpers_pyx.pyx":240
 
2045
 *     if cur1 < end1:
 
2046
 *         return 1 # Not at the end of cur1, must be at the end of cur2
 
2047
 *     if cur2 < end2:             # <<<<<<<<<<<<<<
 
2048
 *         return -1 # At the end of cur1, but not at cur2
 
2049
 *     # We reached the end of both strings
 
2050
 */
 
2051
  __pyx_t_1 = (__pyx_v_cur2 < __pyx_v_end2);
 
2052
  if (__pyx_t_1) {
 
2053
 
 
2054
    /* "bzrlib/_dirstate_helpers_pyx.pyx":241
 
2055
 *         return 1 # Not at the end of cur1, must be at the end of cur2
 
2056
 *     if cur2 < end2:
 
2057
 *         return -1 # At the end of cur1, but not at cur2             # <<<<<<<<<<<<<<
 
2058
 *     # We reached the end of both strings
 
2059
 *     return 0
 
2060
 */
 
2061
    __pyx_r = -1;
 
2062
    goto __pyx_L0;
 
2063
    goto __pyx_L13;
 
2064
  }
 
2065
  __pyx_L13:;
 
2066
 
 
2067
  /* "bzrlib/_dirstate_helpers_pyx.pyx":243
 
2068
 *         return -1 # At the end of cur1, but not at cur2
 
2069
 *     # We reached the end of both strings
 
2070
 *     return 0             # <<<<<<<<<<<<<<
 
2071
 * 
 
2072
 * 
 
2073
 */
 
2074
  __pyx_r = 0;
 
2075
  goto __pyx_L0;
 
2076
 
 
2077
  __pyx_r = 0;
 
2078
  goto __pyx_L0;
 
2079
  __pyx_L1_error:;
 
2080
  __Pyx_WriteUnraisable("bzrlib._dirstate_helpers_pyx._cmp_by_dirs");
 
2081
  __pyx_r = 0;
 
2082
  __pyx_L0:;
 
2083
  __Pyx_RefNannyFinishContext();
 
2084
  return __pyx_r;
 
2085
}
 
2086
 
 
2087
/* "bzrlib/_dirstate_helpers_pyx.pyx":246
 
2088
 * 
 
2089
 * 
 
2090
 * def cmp_by_dirs(path1, path2):             # <<<<<<<<<<<<<<
 
2091
 *     """Compare two paths directory by directory.
 
2092
 * 
 
2093
 */
 
2094
 
 
2095
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_1cmp_by_dirs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
2096
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_1cmp_by_dirs[] = "Compare two paths directory by directory.\n\n    This is equivalent to doing::\n\n       cmp(path1.split('/'), path2.split('/'))\n\n    The idea is that you should compare path components separately. This\n    differs from plain ``cmp(path1, path2)`` for paths like ``'a-b'`` and\n    ``a/b``. \"a-b\" comes after \"a\" but would come before \"a/b\" lexically.\n\n    :param path1: first path\n    :param path2: second path\n    :return: negative number if ``path1`` comes first,\n        0 if paths are equal,\n        and positive number if ``path2`` sorts first\n    ";
 
2097
static PyMethodDef __pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_1cmp_by_dirs = {__Pyx_NAMESTR("cmp_by_dirs"), (PyCFunction)__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_1cmp_by_dirs, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6bzrlib_21_dirstate_helpers_pyx_1cmp_by_dirs)};
 
2098
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_1cmp_by_dirs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
2099
  PyObject *__pyx_v_path1 = 0;
 
2100
  PyObject *__pyx_v_path2 = 0;
 
2101
  PyObject *__pyx_r = NULL;
 
2102
  int __pyx_t_1;
 
2103
  PyObject *__pyx_t_2 = NULL;
 
2104
  PyObject *__pyx_t_3 = NULL;
 
2105
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__path1,&__pyx_n_s__path2,0};
 
2106
  __Pyx_RefNannySetupContext("cmp_by_dirs");
 
2107
  __pyx_self = __pyx_self;
 
2108
  if (unlikely(__pyx_kwds)) {
 
2109
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
2110
    PyObject* values[2] = {0,0};
 
2111
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2112
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
2113
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
2114
      case  0: break;
 
2115
      default: goto __pyx_L5_argtuple_error;
 
2116
    }
 
2117
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2118
      case  0:
 
2119
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path1);
 
2120
      if (likely(values[0])) kw_args--;
 
2121
      else goto __pyx_L5_argtuple_error;
 
2122
      case  1:
 
2123
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path2);
 
2124
      if (likely(values[1])) kw_args--;
 
2125
      else {
 
2126
        __Pyx_RaiseArgtupleInvalid("cmp_by_dirs", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2127
      }
 
2128
    }
 
2129
    if (unlikely(kw_args > 0)) {
 
2130
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "cmp_by_dirs") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2131
    }
 
2132
    __pyx_v_path1 = values[0];
 
2133
    __pyx_v_path2 = values[1];
 
2134
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
 
2135
    goto __pyx_L5_argtuple_error;
 
2136
  } else {
 
2137
    __pyx_v_path1 = PyTuple_GET_ITEM(__pyx_args, 0);
 
2138
    __pyx_v_path2 = PyTuple_GET_ITEM(__pyx_args, 1);
 
2139
  }
 
2140
  goto __pyx_L4_argument_unpacking_done;
 
2141
  __pyx_L5_argtuple_error:;
 
2142
  __Pyx_RaiseArgtupleInvalid("cmp_by_dirs", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2143
  __pyx_L3_error:;
 
2144
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.cmp_by_dirs");
 
2145
  __Pyx_RefNannyFinishContext();
 
2146
  return NULL;
 
2147
  __pyx_L4_argument_unpacking_done:;
 
2148
 
 
2149
  /* "bzrlib/_dirstate_helpers_pyx.pyx":263
 
2150
 *         and positive number if ``path2`` sorts first
 
2151
 *     """
 
2152
 *     if not PyString_CheckExact(path1):             # <<<<<<<<<<<<<<
 
2153
 *         raise TypeError("'path1' must be a plain string, not %s: %r"
 
2154
 *                         % (type(path1), path1))
 
2155
 */
 
2156
  __pyx_t_1 = (!PyString_CheckExact(__pyx_v_path1));
 
2157
  if (__pyx_t_1) {
 
2158
 
 
2159
    /* "bzrlib/_dirstate_helpers_pyx.pyx":265
 
2160
 *     if not PyString_CheckExact(path1):
 
2161
 *         raise TypeError("'path1' must be a plain string, not %s: %r"
 
2162
 *                         % (type(path1), path1))             # <<<<<<<<<<<<<<
 
2163
 *     if not PyString_CheckExact(path2):
 
2164
 *         raise TypeError("'path2' must be a plain string, not %s: %r"
 
2165
 */
 
2166
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2167
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
2168
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_path1)));
 
2169
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(__pyx_v_path1)));
 
2170
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_path1)));
 
2171
    __Pyx_INCREF(__pyx_v_path1);
 
2172
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_path1);
 
2173
    __Pyx_GIVEREF(__pyx_v_path1);
 
2174
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2175
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
2176
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
2177
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2178
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
2179
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
 
2180
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
2181
    __pyx_t_3 = 0;
 
2182
    __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2183
    __Pyx_GOTREF(__pyx_t_3);
 
2184
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
2185
    __Pyx_Raise(__pyx_t_3, 0, 0);
 
2186
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
2187
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2188
    goto __pyx_L6;
 
2189
  }
 
2190
  __pyx_L6:;
 
2191
 
 
2192
  /* "bzrlib/_dirstate_helpers_pyx.pyx":266
 
2193
 *         raise TypeError("'path1' must be a plain string, not %s: %r"
 
2194
 *                         % (type(path1), path1))
 
2195
 *     if not PyString_CheckExact(path2):             # <<<<<<<<<<<<<<
 
2196
 *         raise TypeError("'path2' must be a plain string, not %s: %r"
 
2197
 *                         % (type(path2), path2))
 
2198
 */
 
2199
  __pyx_t_1 = (!PyString_CheckExact(__pyx_v_path2));
 
2200
  if (__pyx_t_1) {
 
2201
 
 
2202
    /* "bzrlib/_dirstate_helpers_pyx.pyx":268
 
2203
 *     if not PyString_CheckExact(path2):
 
2204
 *         raise TypeError("'path2' must be a plain string, not %s: %r"
 
2205
 *                         % (type(path2), path2))             # <<<<<<<<<<<<<<
 
2206
 *     return _cmp_by_dirs(PyString_AsString(path1),
 
2207
 *                         PyString_Size(path1),
 
2208
 */
 
2209
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2210
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
2211
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_path2)));
 
2212
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(__pyx_v_path2)));
 
2213
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_path2)));
 
2214
    __Pyx_INCREF(__pyx_v_path2);
 
2215
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_path2);
 
2216
    __Pyx_GIVEREF(__pyx_v_path2);
 
2217
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2218
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
2219
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
2220
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2221
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
2222
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
 
2223
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
 
2224
    __pyx_t_2 = 0;
 
2225
    __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2226
    __Pyx_GOTREF(__pyx_t_2);
 
2227
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
2228
    __Pyx_Raise(__pyx_t_2, 0, 0);
 
2229
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
2230
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2231
    goto __pyx_L7;
 
2232
  }
 
2233
  __pyx_L7:;
 
2234
 
 
2235
  /* "bzrlib/_dirstate_helpers_pyx.pyx":269
 
2236
 *         raise TypeError("'path2' must be a plain string, not %s: %r"
 
2237
 *                         % (type(path2), path2))
 
2238
 *     return _cmp_by_dirs(PyString_AsString(path1),             # <<<<<<<<<<<<<<
 
2239
 *                         PyString_Size(path1),
 
2240
 *                         PyString_AsString(path2),
 
2241
 */
 
2242
  __Pyx_XDECREF(__pyx_r);
 
2243
 
 
2244
  /* "bzrlib/_dirstate_helpers_pyx.pyx":272
 
2245
 *                         PyString_Size(path1),
 
2246
 *                         PyString_AsString(path2),
 
2247
 *                         PyString_Size(path2))             # <<<<<<<<<<<<<<
 
2248
 * 
 
2249
 * 
 
2250
 */
 
2251
  __pyx_t_2 = PyInt_FromLong(__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_by_dirs(PyString_AsString(__pyx_v_path1), PyString_Size(__pyx_v_path1), PyString_AsString(__pyx_v_path2), PyString_Size(__pyx_v_path2))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2252
  __Pyx_GOTREF(__pyx_t_2);
 
2253
  __pyx_r = __pyx_t_2;
 
2254
  __pyx_t_2 = 0;
 
2255
  goto __pyx_L0;
 
2256
 
 
2257
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2258
  goto __pyx_L0;
 
2259
  __pyx_L1_error:;
 
2260
  __Pyx_XDECREF(__pyx_t_2);
 
2261
  __Pyx_XDECREF(__pyx_t_3);
 
2262
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.cmp_by_dirs");
 
2263
  __pyx_r = NULL;
 
2264
  __pyx_L0:;
 
2265
  __Pyx_XGIVEREF(__pyx_r);
 
2266
  __Pyx_RefNannyFinishContext();
 
2267
  return __pyx_r;
 
2268
}
 
2269
 
 
2270
/* "bzrlib/_dirstate_helpers_pyx.pyx":275
 
2271
 * 
 
2272
 * 
 
2273
 * def _cmp_path_by_dirblock(path1, path2):             # <<<<<<<<<<<<<<
 
2274
 *     """Compare two paths based on what directory they are in.
 
2275
 * 
 
2276
 */
 
2277
 
 
2278
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_2_cmp_path_by_dirblock(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
2279
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_2_cmp_path_by_dirblock[] = "Compare two paths based on what directory they are in.\n\n    This generates a sort order, such that all children of a directory are\n    sorted together, and grandchildren are in the same order as the\n    children appear. But all grandchildren come after all children.\n\n    In other words, all entries in a directory are sorted together, and\n    directorys are sorted in cmp_by_dirs order.\n\n    :param path1: first path\n    :param path2: the second path\n    :return: negative number if ``path1`` comes first,\n        0 if paths are equal\n        and a positive number if ``path2`` sorts first\n    ";
 
2280
static PyMethodDef __pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_2_cmp_path_by_dirblock = {__Pyx_NAMESTR("_cmp_path_by_dirblock"), (PyCFunction)__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_2_cmp_path_by_dirblock, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6bzrlib_21_dirstate_helpers_pyx_2_cmp_path_by_dirblock)};
 
2281
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_2_cmp_path_by_dirblock(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
2282
  PyObject *__pyx_v_path1 = 0;
 
2283
  PyObject *__pyx_v_path2 = 0;
 
2284
  PyObject *__pyx_r = NULL;
 
2285
  int __pyx_t_1;
 
2286
  PyObject *__pyx_t_2 = NULL;
 
2287
  PyObject *__pyx_t_3 = NULL;
 
2288
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__path1,&__pyx_n_s__path2,0};
 
2289
  __Pyx_RefNannySetupContext("_cmp_path_by_dirblock");
 
2290
  __pyx_self = __pyx_self;
 
2291
  if (unlikely(__pyx_kwds)) {
 
2292
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
2293
    PyObject* values[2] = {0,0};
 
2294
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2295
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
2296
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
2297
      case  0: break;
 
2298
      default: goto __pyx_L5_argtuple_error;
 
2299
    }
 
2300
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2301
      case  0:
 
2302
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path1);
 
2303
      if (likely(values[0])) kw_args--;
 
2304
      else goto __pyx_L5_argtuple_error;
 
2305
      case  1:
 
2306
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path2);
 
2307
      if (likely(values[1])) kw_args--;
 
2308
      else {
 
2309
        __Pyx_RaiseArgtupleInvalid("_cmp_path_by_dirblock", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2310
      }
 
2311
    }
 
2312
    if (unlikely(kw_args > 0)) {
 
2313
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_cmp_path_by_dirblock") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2314
    }
 
2315
    __pyx_v_path1 = values[0];
 
2316
    __pyx_v_path2 = values[1];
 
2317
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
 
2318
    goto __pyx_L5_argtuple_error;
 
2319
  } else {
 
2320
    __pyx_v_path1 = PyTuple_GET_ITEM(__pyx_args, 0);
 
2321
    __pyx_v_path2 = PyTuple_GET_ITEM(__pyx_args, 1);
 
2322
  }
 
2323
  goto __pyx_L4_argument_unpacking_done;
 
2324
  __pyx_L5_argtuple_error:;
 
2325
  __Pyx_RaiseArgtupleInvalid("_cmp_path_by_dirblock", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2326
  __pyx_L3_error:;
 
2327
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._cmp_path_by_dirblock");
 
2328
  __Pyx_RefNannyFinishContext();
 
2329
  return NULL;
 
2330
  __pyx_L4_argument_unpacking_done:;
 
2331
 
 
2332
  /* "bzrlib/_dirstate_helpers_pyx.pyx":291
 
2333
 *         and a positive number if ``path2`` sorts first
 
2334
 *     """
 
2335
 *     if not PyString_CheckExact(path1):             # <<<<<<<<<<<<<<
 
2336
 *         raise TypeError("'path1' must be a plain string, not %s: %r"
 
2337
 *                         % (type(path1), path1))
 
2338
 */
 
2339
  __pyx_t_1 = (!PyString_CheckExact(__pyx_v_path1));
 
2340
  if (__pyx_t_1) {
 
2341
 
 
2342
    /* "bzrlib/_dirstate_helpers_pyx.pyx":293
 
2343
 *     if not PyString_CheckExact(path1):
 
2344
 *         raise TypeError("'path1' must be a plain string, not %s: %r"
 
2345
 *                         % (type(path1), path1))             # <<<<<<<<<<<<<<
 
2346
 *     if not PyString_CheckExact(path2):
 
2347
 *         raise TypeError("'path2' must be a plain string, not %s: %r"
 
2348
 */
 
2349
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2350
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
2351
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_path1)));
 
2352
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(__pyx_v_path1)));
 
2353
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_path1)));
 
2354
    __Pyx_INCREF(__pyx_v_path1);
 
2355
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_path1);
 
2356
    __Pyx_GIVEREF(__pyx_v_path1);
 
2357
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2358
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
2359
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
2360
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2361
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
2362
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
 
2363
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
2364
    __pyx_t_3 = 0;
 
2365
    __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2366
    __Pyx_GOTREF(__pyx_t_3);
 
2367
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
2368
    __Pyx_Raise(__pyx_t_3, 0, 0);
 
2369
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
2370
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2371
    goto __pyx_L6;
 
2372
  }
 
2373
  __pyx_L6:;
 
2374
 
 
2375
  /* "bzrlib/_dirstate_helpers_pyx.pyx":294
 
2376
 *         raise TypeError("'path1' must be a plain string, not %s: %r"
 
2377
 *                         % (type(path1), path1))
 
2378
 *     if not PyString_CheckExact(path2):             # <<<<<<<<<<<<<<
 
2379
 *         raise TypeError("'path2' must be a plain string, not %s: %r"
 
2380
 *                         % (type(path2), path2))
 
2381
 */
 
2382
  __pyx_t_1 = (!PyString_CheckExact(__pyx_v_path2));
 
2383
  if (__pyx_t_1) {
 
2384
 
 
2385
    /* "bzrlib/_dirstate_helpers_pyx.pyx":296
 
2386
 *     if not PyString_CheckExact(path2):
 
2387
 *         raise TypeError("'path2' must be a plain string, not %s: %r"
 
2388
 *                         % (type(path2), path2))             # <<<<<<<<<<<<<<
 
2389
 *     return _cmp_path_by_dirblock_intern(PyString_AsString(path1),
 
2390
 *                                         PyString_Size(path1),
 
2391
 */
 
2392
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2393
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
2394
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_path2)));
 
2395
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(__pyx_v_path2)));
 
2396
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_path2)));
 
2397
    __Pyx_INCREF(__pyx_v_path2);
 
2398
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_path2);
 
2399
    __Pyx_GIVEREF(__pyx_v_path2);
 
2400
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2401
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
2402
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
2403
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2404
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
2405
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
 
2406
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
 
2407
    __pyx_t_2 = 0;
 
2408
    __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2409
    __Pyx_GOTREF(__pyx_t_2);
 
2410
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
2411
    __Pyx_Raise(__pyx_t_2, 0, 0);
 
2412
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
2413
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2414
    goto __pyx_L7;
 
2415
  }
 
2416
  __pyx_L7:;
 
2417
 
 
2418
  /* "bzrlib/_dirstate_helpers_pyx.pyx":297
 
2419
 *         raise TypeError("'path2' must be a plain string, not %s: %r"
 
2420
 *                         % (type(path2), path2))
 
2421
 *     return _cmp_path_by_dirblock_intern(PyString_AsString(path1),             # <<<<<<<<<<<<<<
 
2422
 *                                         PyString_Size(path1),
 
2423
 *                                         PyString_AsString(path2),
 
2424
 */
 
2425
  __Pyx_XDECREF(__pyx_r);
 
2426
 
 
2427
  /* "bzrlib/_dirstate_helpers_pyx.pyx":300
 
2428
 *                                         PyString_Size(path1),
 
2429
 *                                         PyString_AsString(path2),
 
2430
 *                                         PyString_Size(path2))             # <<<<<<<<<<<<<<
 
2431
 * 
 
2432
 * 
 
2433
 */
 
2434
  __pyx_t_2 = PyInt_FromLong(__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock_intern(PyString_AsString(__pyx_v_path1), PyString_Size(__pyx_v_path1), PyString_AsString(__pyx_v_path2), PyString_Size(__pyx_v_path2))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
2435
  __Pyx_GOTREF(__pyx_t_2);
 
2436
  __pyx_r = __pyx_t_2;
 
2437
  __pyx_t_2 = 0;
 
2438
  goto __pyx_L0;
 
2439
 
 
2440
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
2441
  goto __pyx_L0;
 
2442
  __pyx_L1_error:;
 
2443
  __Pyx_XDECREF(__pyx_t_2);
 
2444
  __Pyx_XDECREF(__pyx_t_3);
 
2445
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._cmp_path_by_dirblock");
 
2446
  __pyx_r = NULL;
 
2447
  __pyx_L0:;
 
2448
  __Pyx_XGIVEREF(__pyx_r);
 
2449
  __Pyx_RefNannyFinishContext();
 
2450
  return __pyx_r;
 
2451
}
 
2452
 
 
2453
/* "bzrlib/_dirstate_helpers_pyx.pyx":303
 
2454
 * 
 
2455
 * 
 
2456
 * cdef int _cmp_path_by_dirblock_intern(char *path1, int path1_len,             # <<<<<<<<<<<<<<
 
2457
 *                                       char *path2, int path2_len): # cannot_raise
 
2458
 *     """Compare two paths by what directory they are in.
 
2459
 */
 
2460
 
 
2461
static  int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock_intern(char *__pyx_v_path1, int __pyx_v_path1_len, char *__pyx_v_path2, int __pyx_v_path2_len) {
 
2462
  char *__pyx_v_dirname1;
 
2463
  int __pyx_v_dirname1_len;
 
2464
  char *__pyx_v_dirname2;
 
2465
  int __pyx_v_dirname2_len;
 
2466
  char *__pyx_v_basename1;
 
2467
  int __pyx_v_basename1_len;
 
2468
  char *__pyx_v_basename2;
 
2469
  int __pyx_v_basename2_len;
 
2470
  int __pyx_v_cur_len;
 
2471
  int __pyx_v_cmp_val;
 
2472
  int __pyx_r;
 
2473
  int __pyx_t_1;
 
2474
  int __pyx_t_2;
 
2475
  int __pyx_t_3;
 
2476
  __Pyx_RefNannySetupContext("_cmp_path_by_dirblock_intern");
 
2477
 
 
2478
  /* "bzrlib/_dirstate_helpers_pyx.pyx":320
 
2479
 *     cdef int cmp_val
 
2480
 * 
 
2481
 *     if path1_len == 0 and path2_len == 0:             # <<<<<<<<<<<<<<
 
2482
 *         return 0
 
2483
 * 
 
2484
 */
 
2485
  __pyx_t_1 = (__pyx_v_path1_len == 0);
 
2486
  if (__pyx_t_1) {
 
2487
    __pyx_t_2 = (__pyx_v_path2_len == 0);
 
2488
    __pyx_t_3 = __pyx_t_2;
 
2489
  } else {
 
2490
    __pyx_t_3 = __pyx_t_1;
 
2491
  }
 
2492
  if (__pyx_t_3) {
 
2493
 
 
2494
    /* "bzrlib/_dirstate_helpers_pyx.pyx":321
 
2495
 * 
 
2496
 *     if path1_len == 0 and path2_len == 0:
 
2497
 *         return 0             # <<<<<<<<<<<<<<
 
2498
 * 
 
2499
 *     if path1 == path2 and path1_len == path2_len:
 
2500
 */
 
2501
    __pyx_r = 0;
 
2502
    goto __pyx_L0;
 
2503
    goto __pyx_L3;
 
2504
  }
 
2505
  __pyx_L3:;
 
2506
 
 
2507
  /* "bzrlib/_dirstate_helpers_pyx.pyx":323
 
2508
 *         return 0
 
2509
 * 
 
2510
 *     if path1 == path2 and path1_len == path2_len:             # <<<<<<<<<<<<<<
 
2511
 *         return 0
 
2512
 * 
 
2513
 */
 
2514
  __pyx_t_3 = (__pyx_v_path1 == __pyx_v_path2);
 
2515
  if (__pyx_t_3) {
 
2516
    __pyx_t_1 = (__pyx_v_path1_len == __pyx_v_path2_len);
 
2517
    __pyx_t_2 = __pyx_t_1;
 
2518
  } else {
 
2519
    __pyx_t_2 = __pyx_t_3;
 
2520
  }
 
2521
  if (__pyx_t_2) {
 
2522
 
 
2523
    /* "bzrlib/_dirstate_helpers_pyx.pyx":324
 
2524
 * 
 
2525
 *     if path1 == path2 and path1_len == path2_len:
 
2526
 *         return 0             # <<<<<<<<<<<<<<
 
2527
 * 
 
2528
 *     if path1_len == 0:
 
2529
 */
 
2530
    __pyx_r = 0;
 
2531
    goto __pyx_L0;
 
2532
    goto __pyx_L4;
 
2533
  }
 
2534
  __pyx_L4:;
 
2535
 
 
2536
  /* "bzrlib/_dirstate_helpers_pyx.pyx":326
 
2537
 *         return 0
 
2538
 * 
 
2539
 *     if path1_len == 0:             # <<<<<<<<<<<<<<
 
2540
 *         return -1
 
2541
 * 
 
2542
 */
 
2543
  __pyx_t_2 = (__pyx_v_path1_len == 0);
 
2544
  if (__pyx_t_2) {
 
2545
 
 
2546
    /* "bzrlib/_dirstate_helpers_pyx.pyx":327
 
2547
 * 
 
2548
 *     if path1_len == 0:
 
2549
 *         return -1             # <<<<<<<<<<<<<<
 
2550
 * 
 
2551
 *     if path2_len == 0:
 
2552
 */
 
2553
    __pyx_r = -1;
 
2554
    goto __pyx_L0;
 
2555
    goto __pyx_L5;
 
2556
  }
 
2557
  __pyx_L5:;
 
2558
 
 
2559
  /* "bzrlib/_dirstate_helpers_pyx.pyx":329
 
2560
 *         return -1
 
2561
 * 
 
2562
 *     if path2_len == 0:             # <<<<<<<<<<<<<<
 
2563
 *         return 1
 
2564
 * 
 
2565
 */
 
2566
  __pyx_t_2 = (__pyx_v_path2_len == 0);
 
2567
  if (__pyx_t_2) {
 
2568
 
 
2569
    /* "bzrlib/_dirstate_helpers_pyx.pyx":330
 
2570
 * 
 
2571
 *     if path2_len == 0:
 
2572
 *         return 1             # <<<<<<<<<<<<<<
 
2573
 * 
 
2574
 *     basename1 = <char*>_my_memrchr(path1, c'/', path1_len)
 
2575
 */
 
2576
    __pyx_r = 1;
 
2577
    goto __pyx_L0;
 
2578
    goto __pyx_L6;
 
2579
  }
 
2580
  __pyx_L6:;
 
2581
 
 
2582
  /* "bzrlib/_dirstate_helpers_pyx.pyx":332
 
2583
 *         return 1
 
2584
 * 
 
2585
 *     basename1 = <char*>_my_memrchr(path1, c'/', path1_len)             # <<<<<<<<<<<<<<
 
2586
 * 
 
2587
 *     if basename1 == NULL:
 
2588
 */
 
2589
  __pyx_v_basename1 = ((char *)__pyx_f_6bzrlib_21_dirstate_helpers_pyx__my_memrchr(__pyx_v_path1, '/', __pyx_v_path1_len));
 
2590
 
 
2591
  /* "bzrlib/_dirstate_helpers_pyx.pyx":334
 
2592
 *     basename1 = <char*>_my_memrchr(path1, c'/', path1_len)
 
2593
 * 
 
2594
 *     if basename1 == NULL:             # <<<<<<<<<<<<<<
 
2595
 *         basename1 = path1
 
2596
 *         basename1_len = path1_len
 
2597
 */
 
2598
  __pyx_t_2 = (__pyx_v_basename1 == NULL);
 
2599
  if (__pyx_t_2) {
 
2600
 
 
2601
    /* "bzrlib/_dirstate_helpers_pyx.pyx":335
 
2602
 * 
 
2603
 *     if basename1 == NULL:
 
2604
 *         basename1 = path1             # <<<<<<<<<<<<<<
 
2605
 *         basename1_len = path1_len
 
2606
 *         dirname1 = ''
 
2607
 */
 
2608
    __pyx_v_basename1 = __pyx_v_path1;
 
2609
 
 
2610
    /* "bzrlib/_dirstate_helpers_pyx.pyx":336
 
2611
 *     if basename1 == NULL:
 
2612
 *         basename1 = path1
 
2613
 *         basename1_len = path1_len             # <<<<<<<<<<<<<<
 
2614
 *         dirname1 = ''
 
2615
 *         dirname1_len = 0
 
2616
 */
 
2617
    __pyx_v_basename1_len = __pyx_v_path1_len;
 
2618
 
 
2619
    /* "bzrlib/_dirstate_helpers_pyx.pyx":337
 
2620
 *         basename1 = path1
 
2621
 *         basename1_len = path1_len
 
2622
 *         dirname1 = ''             # <<<<<<<<<<<<<<
 
2623
 *         dirname1_len = 0
 
2624
 *     else:
 
2625
 */
 
2626
    __pyx_v_dirname1 = __pyx_k_5;
 
2627
 
 
2628
    /* "bzrlib/_dirstate_helpers_pyx.pyx":338
 
2629
 *         basename1_len = path1_len
 
2630
 *         dirname1 = ''
 
2631
 *         dirname1_len = 0             # <<<<<<<<<<<<<<
 
2632
 *     else:
 
2633
 *         dirname1 = path1
 
2634
 */
 
2635
    __pyx_v_dirname1_len = 0;
 
2636
    goto __pyx_L7;
 
2637
  }
 
2638
  /*else*/ {
 
2639
 
 
2640
    /* "bzrlib/_dirstate_helpers_pyx.pyx":340
 
2641
 *         dirname1_len = 0
 
2642
 *     else:
 
2643
 *         dirname1 = path1             # <<<<<<<<<<<<<<
 
2644
 *         dirname1_len = basename1 - path1
 
2645
 *         basename1 = basename1 + 1
 
2646
 */
 
2647
    __pyx_v_dirname1 = __pyx_v_path1;
 
2648
 
 
2649
    /* "bzrlib/_dirstate_helpers_pyx.pyx":341
 
2650
 *     else:
 
2651
 *         dirname1 = path1
 
2652
 *         dirname1_len = basename1 - path1             # <<<<<<<<<<<<<<
 
2653
 *         basename1 = basename1 + 1
 
2654
 *         basename1_len = path1_len - dirname1_len - 1
 
2655
 */
 
2656
    __pyx_v_dirname1_len = (__pyx_v_basename1 - __pyx_v_path1);
 
2657
 
 
2658
    /* "bzrlib/_dirstate_helpers_pyx.pyx":342
 
2659
 *         dirname1 = path1
 
2660
 *         dirname1_len = basename1 - path1
 
2661
 *         basename1 = basename1 + 1             # <<<<<<<<<<<<<<
 
2662
 *         basename1_len = path1_len - dirname1_len - 1
 
2663
 * 
 
2664
 */
 
2665
    __pyx_v_basename1 = (__pyx_v_basename1 + 1);
 
2666
 
 
2667
    /* "bzrlib/_dirstate_helpers_pyx.pyx":343
 
2668
 *         dirname1_len = basename1 - path1
 
2669
 *         basename1 = basename1 + 1
 
2670
 *         basename1_len = path1_len - dirname1_len - 1             # <<<<<<<<<<<<<<
 
2671
 * 
 
2672
 *     basename2 = <char*>_my_memrchr(path2, c'/', path2_len)
 
2673
 */
 
2674
    __pyx_v_basename1_len = ((__pyx_v_path1_len - __pyx_v_dirname1_len) - 1);
 
2675
  }
 
2676
  __pyx_L7:;
 
2677
 
 
2678
  /* "bzrlib/_dirstate_helpers_pyx.pyx":345
 
2679
 *         basename1_len = path1_len - dirname1_len - 1
 
2680
 * 
 
2681
 *     basename2 = <char*>_my_memrchr(path2, c'/', path2_len)             # <<<<<<<<<<<<<<
 
2682
 * 
 
2683
 *     if basename2 == NULL:
 
2684
 */
 
2685
  __pyx_v_basename2 = ((char *)__pyx_f_6bzrlib_21_dirstate_helpers_pyx__my_memrchr(__pyx_v_path2, '/', __pyx_v_path2_len));
 
2686
 
 
2687
  /* "bzrlib/_dirstate_helpers_pyx.pyx":347
 
2688
 *     basename2 = <char*>_my_memrchr(path2, c'/', path2_len)
 
2689
 * 
 
2690
 *     if basename2 == NULL:             # <<<<<<<<<<<<<<
 
2691
 *         basename2 = path2
 
2692
 *         basename2_len = path2_len
 
2693
 */
 
2694
  __pyx_t_2 = (__pyx_v_basename2 == NULL);
 
2695
  if (__pyx_t_2) {
 
2696
 
 
2697
    /* "bzrlib/_dirstate_helpers_pyx.pyx":348
 
2698
 * 
 
2699
 *     if basename2 == NULL:
 
2700
 *         basename2 = path2             # <<<<<<<<<<<<<<
 
2701
 *         basename2_len = path2_len
 
2702
 *         dirname2 = ''
 
2703
 */
 
2704
    __pyx_v_basename2 = __pyx_v_path2;
 
2705
 
 
2706
    /* "bzrlib/_dirstate_helpers_pyx.pyx":349
 
2707
 *     if basename2 == NULL:
 
2708
 *         basename2 = path2
 
2709
 *         basename2_len = path2_len             # <<<<<<<<<<<<<<
 
2710
 *         dirname2 = ''
 
2711
 *         dirname2_len = 0
 
2712
 */
 
2713
    __pyx_v_basename2_len = __pyx_v_path2_len;
 
2714
 
 
2715
    /* "bzrlib/_dirstate_helpers_pyx.pyx":350
 
2716
 *         basename2 = path2
 
2717
 *         basename2_len = path2_len
 
2718
 *         dirname2 = ''             # <<<<<<<<<<<<<<
 
2719
 *         dirname2_len = 0
 
2720
 *     else:
 
2721
 */
 
2722
    __pyx_v_dirname2 = __pyx_k_5;
 
2723
 
 
2724
    /* "bzrlib/_dirstate_helpers_pyx.pyx":351
 
2725
 *         basename2_len = path2_len
 
2726
 *         dirname2 = ''
 
2727
 *         dirname2_len = 0             # <<<<<<<<<<<<<<
 
2728
 *     else:
 
2729
 *         dirname2 = path2
 
2730
 */
 
2731
    __pyx_v_dirname2_len = 0;
 
2732
    goto __pyx_L8;
 
2733
  }
 
2734
  /*else*/ {
 
2735
 
 
2736
    /* "bzrlib/_dirstate_helpers_pyx.pyx":353
 
2737
 *         dirname2_len = 0
 
2738
 *     else:
 
2739
 *         dirname2 = path2             # <<<<<<<<<<<<<<
 
2740
 *         dirname2_len = basename2 - path2
 
2741
 *         basename2 = basename2 + 1
 
2742
 */
 
2743
    __pyx_v_dirname2 = __pyx_v_path2;
 
2744
 
 
2745
    /* "bzrlib/_dirstate_helpers_pyx.pyx":354
 
2746
 *     else:
 
2747
 *         dirname2 = path2
 
2748
 *         dirname2_len = basename2 - path2             # <<<<<<<<<<<<<<
 
2749
 *         basename2 = basename2 + 1
 
2750
 *         basename2_len = path2_len - dirname2_len - 1
 
2751
 */
 
2752
    __pyx_v_dirname2_len = (__pyx_v_basename2 - __pyx_v_path2);
 
2753
 
 
2754
    /* "bzrlib/_dirstate_helpers_pyx.pyx":355
 
2755
 *         dirname2 = path2
 
2756
 *         dirname2_len = basename2 - path2
 
2757
 *         basename2 = basename2 + 1             # <<<<<<<<<<<<<<
 
2758
 *         basename2_len = path2_len - dirname2_len - 1
 
2759
 * 
 
2760
 */
 
2761
    __pyx_v_basename2 = (__pyx_v_basename2 + 1);
 
2762
 
 
2763
    /* "bzrlib/_dirstate_helpers_pyx.pyx":356
 
2764
 *         dirname2_len = basename2 - path2
 
2765
 *         basename2 = basename2 + 1
 
2766
 *         basename2_len = path2_len - dirname2_len - 1             # <<<<<<<<<<<<<<
 
2767
 * 
 
2768
 *     cmp_val = _cmp_by_dirs(dirname1, dirname1_len,
 
2769
 */
 
2770
    __pyx_v_basename2_len = ((__pyx_v_path2_len - __pyx_v_dirname2_len) - 1);
 
2771
  }
 
2772
  __pyx_L8:;
 
2773
 
 
2774
  /* "bzrlib/_dirstate_helpers_pyx.pyx":359
 
2775
 * 
 
2776
 *     cmp_val = _cmp_by_dirs(dirname1, dirname1_len,
 
2777
 *                            dirname2, dirname2_len)             # <<<<<<<<<<<<<<
 
2778
 *     if cmp_val != 0:
 
2779
 *         return cmp_val
 
2780
 */
 
2781
  __pyx_v_cmp_val = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_by_dirs(__pyx_v_dirname1, __pyx_v_dirname1_len, __pyx_v_dirname2, __pyx_v_dirname2_len);
 
2782
 
 
2783
  /* "bzrlib/_dirstate_helpers_pyx.pyx":360
 
2784
 *     cmp_val = _cmp_by_dirs(dirname1, dirname1_len,
 
2785
 *                            dirname2, dirname2_len)
 
2786
 *     if cmp_val != 0:             # <<<<<<<<<<<<<<
 
2787
 *         return cmp_val
 
2788
 * 
 
2789
 */
 
2790
  __pyx_t_2 = (__pyx_v_cmp_val != 0);
 
2791
  if (__pyx_t_2) {
 
2792
 
 
2793
    /* "bzrlib/_dirstate_helpers_pyx.pyx":361
 
2794
 *                            dirname2, dirname2_len)
 
2795
 *     if cmp_val != 0:
 
2796
 *         return cmp_val             # <<<<<<<<<<<<<<
 
2797
 * 
 
2798
 *     cur_len = basename1_len
 
2799
 */
 
2800
    __pyx_r = __pyx_v_cmp_val;
 
2801
    goto __pyx_L0;
 
2802
    goto __pyx_L9;
 
2803
  }
 
2804
  __pyx_L9:;
 
2805
 
 
2806
  /* "bzrlib/_dirstate_helpers_pyx.pyx":363
 
2807
 *         return cmp_val
 
2808
 * 
 
2809
 *     cur_len = basename1_len             # <<<<<<<<<<<<<<
 
2810
 *     if basename2_len < basename1_len:
 
2811
 *         cur_len = basename2_len
 
2812
 */
 
2813
  __pyx_v_cur_len = __pyx_v_basename1_len;
 
2814
 
 
2815
  /* "bzrlib/_dirstate_helpers_pyx.pyx":364
 
2816
 * 
 
2817
 *     cur_len = basename1_len
 
2818
 *     if basename2_len < basename1_len:             # <<<<<<<<<<<<<<
 
2819
 *         cur_len = basename2_len
 
2820
 * 
 
2821
 */
 
2822
  __pyx_t_2 = (__pyx_v_basename2_len < __pyx_v_basename1_len);
 
2823
  if (__pyx_t_2) {
 
2824
 
 
2825
    /* "bzrlib/_dirstate_helpers_pyx.pyx":365
 
2826
 *     cur_len = basename1_len
 
2827
 *     if basename2_len < basename1_len:
 
2828
 *         cur_len = basename2_len             # <<<<<<<<<<<<<<
 
2829
 * 
 
2830
 *     cmp_val = memcmp(basename1, basename2, cur_len)
 
2831
 */
 
2832
    __pyx_v_cur_len = __pyx_v_basename2_len;
 
2833
    goto __pyx_L10;
 
2834
  }
 
2835
  __pyx_L10:;
 
2836
 
 
2837
  /* "bzrlib/_dirstate_helpers_pyx.pyx":367
 
2838
 *         cur_len = basename2_len
 
2839
 * 
 
2840
 *     cmp_val = memcmp(basename1, basename2, cur_len)             # <<<<<<<<<<<<<<
 
2841
 *     if cmp_val != 0:
 
2842
 *         return cmp_val
 
2843
 */
 
2844
  __pyx_v_cmp_val = memcmp(__pyx_v_basename1, __pyx_v_basename2, __pyx_v_cur_len);
 
2845
 
 
2846
  /* "bzrlib/_dirstate_helpers_pyx.pyx":368
 
2847
 * 
 
2848
 *     cmp_val = memcmp(basename1, basename2, cur_len)
 
2849
 *     if cmp_val != 0:             # <<<<<<<<<<<<<<
 
2850
 *         return cmp_val
 
2851
 *     if basename1_len == basename2_len:
 
2852
 */
 
2853
  __pyx_t_2 = (__pyx_v_cmp_val != 0);
 
2854
  if (__pyx_t_2) {
 
2855
 
 
2856
    /* "bzrlib/_dirstate_helpers_pyx.pyx":369
 
2857
 *     cmp_val = memcmp(basename1, basename2, cur_len)
 
2858
 *     if cmp_val != 0:
 
2859
 *         return cmp_val             # <<<<<<<<<<<<<<
 
2860
 *     if basename1_len == basename2_len:
 
2861
 *         return 0
 
2862
 */
 
2863
    __pyx_r = __pyx_v_cmp_val;
 
2864
    goto __pyx_L0;
 
2865
    goto __pyx_L11;
 
2866
  }
 
2867
  __pyx_L11:;
 
2868
 
 
2869
  /* "bzrlib/_dirstate_helpers_pyx.pyx":370
 
2870
 *     if cmp_val != 0:
 
2871
 *         return cmp_val
 
2872
 *     if basename1_len == basename2_len:             # <<<<<<<<<<<<<<
 
2873
 *         return 0
 
2874
 *     if basename1_len < basename2_len:
 
2875
 */
 
2876
  __pyx_t_2 = (__pyx_v_basename1_len == __pyx_v_basename2_len);
 
2877
  if (__pyx_t_2) {
 
2878
 
 
2879
    /* "bzrlib/_dirstate_helpers_pyx.pyx":371
 
2880
 *         return cmp_val
 
2881
 *     if basename1_len == basename2_len:
 
2882
 *         return 0             # <<<<<<<<<<<<<<
 
2883
 *     if basename1_len < basename2_len:
 
2884
 *         return -1
 
2885
 */
 
2886
    __pyx_r = 0;
 
2887
    goto __pyx_L0;
 
2888
    goto __pyx_L12;
 
2889
  }
 
2890
  __pyx_L12:;
 
2891
 
 
2892
  /* "bzrlib/_dirstate_helpers_pyx.pyx":372
 
2893
 *     if basename1_len == basename2_len:
 
2894
 *         return 0
 
2895
 *     if basename1_len < basename2_len:             # <<<<<<<<<<<<<<
 
2896
 *         return -1
 
2897
 *     return 1
 
2898
 */
 
2899
  __pyx_t_2 = (__pyx_v_basename1_len < __pyx_v_basename2_len);
 
2900
  if (__pyx_t_2) {
 
2901
 
 
2902
    /* "bzrlib/_dirstate_helpers_pyx.pyx":373
 
2903
 *         return 0
 
2904
 *     if basename1_len < basename2_len:
 
2905
 *         return -1             # <<<<<<<<<<<<<<
 
2906
 *     return 1
 
2907
 * 
 
2908
 */
 
2909
    __pyx_r = -1;
 
2910
    goto __pyx_L0;
 
2911
    goto __pyx_L13;
 
2912
  }
 
2913
  __pyx_L13:;
 
2914
 
 
2915
  /* "bzrlib/_dirstate_helpers_pyx.pyx":374
 
2916
 *     if basename1_len < basename2_len:
 
2917
 *         return -1
 
2918
 *     return 1             # <<<<<<<<<<<<<<
 
2919
 * 
 
2920
 * 
 
2921
 */
 
2922
  __pyx_r = 1;
 
2923
  goto __pyx_L0;
 
2924
 
 
2925
  __pyx_r = 0;
 
2926
  __pyx_L0:;
 
2927
  __Pyx_RefNannyFinishContext();
 
2928
  return __pyx_r;
 
2929
}
 
2930
 
 
2931
/* "bzrlib/_dirstate_helpers_pyx.pyx":377
 
2932
 * 
 
2933
 * 
 
2934
 * def _bisect_path_left(paths, path):             # <<<<<<<<<<<<<<
 
2935
 *     """Return the index where to insert path into paths.
 
2936
 * 
 
2937
 */
 
2938
 
 
2939
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_3_bisect_path_left(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
2940
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_3_bisect_path_left[] = "Return the index where to insert path into paths.\n\n    This uses a path-wise comparison so we get::\n        a\n        a-b\n        a=b\n        a/b\n    Rather than::\n        a\n        a-b\n        a/b\n        a=b\n    :param paths: A list of paths to search through\n    :param path: A single path to insert\n    :return: An offset where 'path' can be inserted.\n    :seealso: bisect.bisect_left\n    ";
 
2941
static PyMethodDef __pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_3_bisect_path_left = {__Pyx_NAMESTR("_bisect_path_left"), (PyCFunction)__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_3_bisect_path_left, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6bzrlib_21_dirstate_helpers_pyx_3_bisect_path_left)};
 
2942
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_3_bisect_path_left(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
2943
  PyObject *__pyx_v_paths = 0;
 
2944
  PyObject *__pyx_v_path = 0;
 
2945
  int __pyx_v__lo;
 
2946
  int __pyx_v__hi;
 
2947
  int __pyx_v__mid;
 
2948
  char *__pyx_v_path_cstr;
 
2949
  int __pyx_v_path_size;
 
2950
  char *__pyx_v_cur_cstr;
 
2951
  int __pyx_v_cur_size;
 
2952
  void *__pyx_v_cur;
 
2953
  PyObject *__pyx_r = NULL;
 
2954
  int __pyx_t_1;
 
2955
  PyObject *__pyx_t_2 = NULL;
 
2956
  PyObject *__pyx_t_3 = NULL;
 
2957
  Py_ssize_t __pyx_t_4;
 
2958
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__paths,&__pyx_n_s__path,0};
 
2959
  __Pyx_RefNannySetupContext("_bisect_path_left");
 
2960
  __pyx_self = __pyx_self;
 
2961
  if (unlikely(__pyx_kwds)) {
 
2962
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
2963
    PyObject* values[2] = {0,0};
 
2964
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2965
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
2966
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
2967
      case  0: break;
 
2968
      default: goto __pyx_L5_argtuple_error;
 
2969
    }
 
2970
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
2971
      case  0:
 
2972
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__paths);
 
2973
      if (likely(values[0])) kw_args--;
 
2974
      else goto __pyx_L5_argtuple_error;
 
2975
      case  1:
 
2976
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path);
 
2977
      if (likely(values[1])) kw_args--;
 
2978
      else {
 
2979
        __Pyx_RaiseArgtupleInvalid("_bisect_path_left", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2980
      }
 
2981
    }
 
2982
    if (unlikely(kw_args > 0)) {
 
2983
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_bisect_path_left") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2984
    }
 
2985
    __pyx_v_paths = values[0];
 
2986
    __pyx_v_path = values[1];
 
2987
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
 
2988
    goto __pyx_L5_argtuple_error;
 
2989
  } else {
 
2990
    __pyx_v_paths = PyTuple_GET_ITEM(__pyx_args, 0);
 
2991
    __pyx_v_path = PyTuple_GET_ITEM(__pyx_args, 1);
 
2992
  }
 
2993
  goto __pyx_L4_argument_unpacking_done;
 
2994
  __pyx_L5_argtuple_error:;
 
2995
  __Pyx_RaiseArgtupleInvalid("_bisect_path_left", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
2996
  __pyx_L3_error:;
 
2997
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._bisect_path_left");
 
2998
  __Pyx_RefNannyFinishContext();
 
2999
  return NULL;
 
3000
  __pyx_L4_argument_unpacking_done:;
 
3001
 
 
3002
  /* "bzrlib/_dirstate_helpers_pyx.pyx":404
 
3003
 *     cdef void *cur
 
3004
 * 
 
3005
 *     if not PyList_CheckExact(paths):             # <<<<<<<<<<<<<<
 
3006
 *         raise TypeError("you must pass a python list for 'paths' not: %s %r"
 
3007
 *                         % (type(paths), paths))
 
3008
 */
 
3009
  __pyx_t_1 = (!PyList_CheckExact(__pyx_v_paths));
 
3010
  if (__pyx_t_1) {
 
3011
 
 
3012
    /* "bzrlib/_dirstate_helpers_pyx.pyx":406
 
3013
 *     if not PyList_CheckExact(paths):
 
3014
 *         raise TypeError("you must pass a python list for 'paths' not: %s %r"
 
3015
 *                         % (type(paths), paths))             # <<<<<<<<<<<<<<
 
3016
 *     if not PyString_CheckExact(path):
 
3017
 *         raise TypeError("you must pass a string for 'path' not: %s %r"
 
3018
 */
 
3019
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3020
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
3021
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_paths)));
 
3022
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(__pyx_v_paths)));
 
3023
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_paths)));
 
3024
    __Pyx_INCREF(__pyx_v_paths);
 
3025
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_paths);
 
3026
    __Pyx_GIVEREF(__pyx_v_paths);
 
3027
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_6), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3028
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
3029
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
3030
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3031
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
3032
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
 
3033
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
3034
    __pyx_t_3 = 0;
 
3035
    __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3036
    __Pyx_GOTREF(__pyx_t_3);
 
3037
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
3038
    __Pyx_Raise(__pyx_t_3, 0, 0);
 
3039
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
3040
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3041
    goto __pyx_L6;
 
3042
  }
 
3043
  __pyx_L6:;
 
3044
 
 
3045
  /* "bzrlib/_dirstate_helpers_pyx.pyx":407
 
3046
 *         raise TypeError("you must pass a python list for 'paths' not: %s %r"
 
3047
 *                         % (type(paths), paths))
 
3048
 *     if not PyString_CheckExact(path):             # <<<<<<<<<<<<<<
 
3049
 *         raise TypeError("you must pass a string for 'path' not: %s %r"
 
3050
 *                         % (type(path), path))
 
3051
 */
 
3052
  __pyx_t_1 = (!PyString_CheckExact(__pyx_v_path));
 
3053
  if (__pyx_t_1) {
 
3054
 
 
3055
    /* "bzrlib/_dirstate_helpers_pyx.pyx":409
 
3056
 *     if not PyString_CheckExact(path):
 
3057
 *         raise TypeError("you must pass a string for 'path' not: %s %r"
 
3058
 *                         % (type(path), path))             # <<<<<<<<<<<<<<
 
3059
 * 
 
3060
 *     _hi = len(paths)
 
3061
 */
 
3062
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3063
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
3064
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_path)));
 
3065
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(__pyx_v_path)));
 
3066
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_path)));
 
3067
    __Pyx_INCREF(__pyx_v_path);
 
3068
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_path);
 
3069
    __Pyx_GIVEREF(__pyx_v_path);
 
3070
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3071
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
3072
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
3073
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3074
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
3075
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
 
3076
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
 
3077
    __pyx_t_2 = 0;
 
3078
    __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3079
    __Pyx_GOTREF(__pyx_t_2);
 
3080
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
3081
    __Pyx_Raise(__pyx_t_2, 0, 0);
 
3082
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3083
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3084
    goto __pyx_L7;
 
3085
  }
 
3086
  __pyx_L7:;
 
3087
 
 
3088
  /* "bzrlib/_dirstate_helpers_pyx.pyx":411
 
3089
 *                         % (type(path), path))
 
3090
 * 
 
3091
 *     _hi = len(paths)             # <<<<<<<<<<<<<<
 
3092
 *     _lo = 0
 
3093
 * 
 
3094
 */
 
3095
  __pyx_t_4 = PyObject_Length(__pyx_v_paths); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3096
  __pyx_v__hi = __pyx_t_4;
 
3097
 
 
3098
  /* "bzrlib/_dirstate_helpers_pyx.pyx":412
 
3099
 * 
 
3100
 *     _hi = len(paths)
 
3101
 *     _lo = 0             # <<<<<<<<<<<<<<
 
3102
 * 
 
3103
 *     path_cstr = PyString_AsString(path)
 
3104
 */
 
3105
  __pyx_v__lo = 0;
 
3106
 
 
3107
  /* "bzrlib/_dirstate_helpers_pyx.pyx":414
 
3108
 *     _lo = 0
 
3109
 * 
 
3110
 *     path_cstr = PyString_AsString(path)             # <<<<<<<<<<<<<<
 
3111
 *     path_size = PyString_Size(path)
 
3112
 * 
 
3113
 */
 
3114
  __pyx_v_path_cstr = PyString_AsString(__pyx_v_path);
 
3115
 
 
3116
  /* "bzrlib/_dirstate_helpers_pyx.pyx":415
 
3117
 * 
 
3118
 *     path_cstr = PyString_AsString(path)
 
3119
 *     path_size = PyString_Size(path)             # <<<<<<<<<<<<<<
 
3120
 * 
 
3121
 *     while _lo < _hi:
 
3122
 */
 
3123
  __pyx_v_path_size = PyString_Size(__pyx_v_path);
 
3124
 
 
3125
  /* "bzrlib/_dirstate_helpers_pyx.pyx":417
 
3126
 *     path_size = PyString_Size(path)
 
3127
 * 
 
3128
 *     while _lo < _hi:             # <<<<<<<<<<<<<<
 
3129
 *         _mid = (_lo + _hi) / 2
 
3130
 *         cur = PyList_GetItem_object_void(paths, _mid)
 
3131
 */
 
3132
  while (1) {
 
3133
    __pyx_t_1 = (__pyx_v__lo < __pyx_v__hi);
 
3134
    if (!__pyx_t_1) break;
 
3135
 
 
3136
    /* "bzrlib/_dirstate_helpers_pyx.pyx":418
 
3137
 * 
 
3138
 *     while _lo < _hi:
 
3139
 *         _mid = (_lo + _hi) / 2             # <<<<<<<<<<<<<<
 
3140
 *         cur = PyList_GetItem_object_void(paths, _mid)
 
3141
 *         cur_cstr = PyString_AS_STRING_void(cur)
 
3142
 */
 
3143
    __pyx_v__mid = __Pyx_div_long((__pyx_v__lo + __pyx_v__hi), 2);
 
3144
 
 
3145
    /* "bzrlib/_dirstate_helpers_pyx.pyx":419
 
3146
 *     while _lo < _hi:
 
3147
 *         _mid = (_lo + _hi) / 2
 
3148
 *         cur = PyList_GetItem_object_void(paths, _mid)             # <<<<<<<<<<<<<<
 
3149
 *         cur_cstr = PyString_AS_STRING_void(cur)
 
3150
 *         cur_size = PyString_GET_SIZE_void(cur)
 
3151
 */
 
3152
    __pyx_v_cur = PyList_GET_ITEM(__pyx_v_paths, __pyx_v__mid);
 
3153
 
 
3154
    /* "bzrlib/_dirstate_helpers_pyx.pyx":420
 
3155
 *         _mid = (_lo + _hi) / 2
 
3156
 *         cur = PyList_GetItem_object_void(paths, _mid)
 
3157
 *         cur_cstr = PyString_AS_STRING_void(cur)             # <<<<<<<<<<<<<<
 
3158
 *         cur_size = PyString_GET_SIZE_void(cur)
 
3159
 *         if _cmp_path_by_dirblock_intern(cur_cstr, cur_size,
 
3160
 */
 
3161
    __pyx_v_cur_cstr = PyString_AS_STRING(__pyx_v_cur);
 
3162
 
 
3163
    /* "bzrlib/_dirstate_helpers_pyx.pyx":421
 
3164
 *         cur = PyList_GetItem_object_void(paths, _mid)
 
3165
 *         cur_cstr = PyString_AS_STRING_void(cur)
 
3166
 *         cur_size = PyString_GET_SIZE_void(cur)             # <<<<<<<<<<<<<<
 
3167
 *         if _cmp_path_by_dirblock_intern(cur_cstr, cur_size,
 
3168
 *                                         path_cstr, path_size) < 0:
 
3169
 */
 
3170
    __pyx_v_cur_size = PyString_GET_SIZE(__pyx_v_cur);
 
3171
 
 
3172
    /* "bzrlib/_dirstate_helpers_pyx.pyx":423
 
3173
 *         cur_size = PyString_GET_SIZE_void(cur)
 
3174
 *         if _cmp_path_by_dirblock_intern(cur_cstr, cur_size,
 
3175
 *                                         path_cstr, path_size) < 0:             # <<<<<<<<<<<<<<
 
3176
 *             _lo = _mid + 1
 
3177
 *         else:
 
3178
 */
 
3179
    __pyx_t_1 = (__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock_intern(__pyx_v_cur_cstr, __pyx_v_cur_size, __pyx_v_path_cstr, __pyx_v_path_size) < 0);
 
3180
    if (__pyx_t_1) {
 
3181
 
 
3182
      /* "bzrlib/_dirstate_helpers_pyx.pyx":424
 
3183
 *         if _cmp_path_by_dirblock_intern(cur_cstr, cur_size,
 
3184
 *                                         path_cstr, path_size) < 0:
 
3185
 *             _lo = _mid + 1             # <<<<<<<<<<<<<<
 
3186
 *         else:
 
3187
 *             _hi = _mid
 
3188
 */
 
3189
      __pyx_v__lo = (__pyx_v__mid + 1);
 
3190
      goto __pyx_L10;
 
3191
    }
 
3192
    /*else*/ {
 
3193
 
 
3194
      /* "bzrlib/_dirstate_helpers_pyx.pyx":426
 
3195
 *             _lo = _mid + 1
 
3196
 *         else:
 
3197
 *             _hi = _mid             # <<<<<<<<<<<<<<
 
3198
 *     return _lo
 
3199
 * 
 
3200
 */
 
3201
      __pyx_v__hi = __pyx_v__mid;
 
3202
    }
 
3203
    __pyx_L10:;
 
3204
  }
 
3205
 
 
3206
  /* "bzrlib/_dirstate_helpers_pyx.pyx":427
 
3207
 *         else:
 
3208
 *             _hi = _mid
 
3209
 *     return _lo             # <<<<<<<<<<<<<<
 
3210
 * 
 
3211
 * 
 
3212
 */
 
3213
  __Pyx_XDECREF(__pyx_r);
 
3214
  __pyx_t_2 = PyInt_FromLong(__pyx_v__lo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3215
  __Pyx_GOTREF(__pyx_t_2);
 
3216
  __pyx_r = __pyx_t_2;
 
3217
  __pyx_t_2 = 0;
 
3218
  goto __pyx_L0;
 
3219
 
 
3220
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
3221
  goto __pyx_L0;
 
3222
  __pyx_L1_error:;
 
3223
  __Pyx_XDECREF(__pyx_t_2);
 
3224
  __Pyx_XDECREF(__pyx_t_3);
 
3225
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._bisect_path_left");
 
3226
  __pyx_r = NULL;
 
3227
  __pyx_L0:;
 
3228
  __Pyx_XGIVEREF(__pyx_r);
 
3229
  __Pyx_RefNannyFinishContext();
 
3230
  return __pyx_r;
 
3231
}
 
3232
 
 
3233
/* "bzrlib/_dirstate_helpers_pyx.pyx":430
 
3234
 * 
 
3235
 * 
 
3236
 * def _bisect_path_right(paths, path):             # <<<<<<<<<<<<<<
 
3237
 *     """Return the index where to insert path into paths.
 
3238
 * 
 
3239
 */
 
3240
 
 
3241
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_4_bisect_path_right(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
3242
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_4_bisect_path_right[] = "Return the index where to insert path into paths.\n\n    This uses a path-wise comparison so we get::\n        a\n        a-b\n        a=b\n        a/b\n    Rather than::\n        a\n        a-b\n        a/b\n        a=b\n    :param paths: A list of paths to search through\n    :param path: A single path to insert\n    :return: An offset where 'path' can be inserted.\n    :seealso: bisect.bisect_right\n    ";
 
3243
static PyMethodDef __pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_4_bisect_path_right = {__Pyx_NAMESTR("_bisect_path_right"), (PyCFunction)__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_4_bisect_path_right, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6bzrlib_21_dirstate_helpers_pyx_4_bisect_path_right)};
 
3244
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_4_bisect_path_right(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
3245
  PyObject *__pyx_v_paths = 0;
 
3246
  PyObject *__pyx_v_path = 0;
 
3247
  int __pyx_v__lo;
 
3248
  int __pyx_v__hi;
 
3249
  int __pyx_v__mid;
 
3250
  char *__pyx_v_path_cstr;
 
3251
  int __pyx_v_path_size;
 
3252
  char *__pyx_v_cur_cstr;
 
3253
  int __pyx_v_cur_size;
 
3254
  void *__pyx_v_cur;
 
3255
  PyObject *__pyx_r = NULL;
 
3256
  int __pyx_t_1;
 
3257
  PyObject *__pyx_t_2 = NULL;
 
3258
  PyObject *__pyx_t_3 = NULL;
 
3259
  Py_ssize_t __pyx_t_4;
 
3260
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__paths,&__pyx_n_s__path,0};
 
3261
  __Pyx_RefNannySetupContext("_bisect_path_right");
 
3262
  __pyx_self = __pyx_self;
 
3263
  if (unlikely(__pyx_kwds)) {
 
3264
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
3265
    PyObject* values[2] = {0,0};
 
3266
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
3267
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
3268
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
3269
      case  0: break;
 
3270
      default: goto __pyx_L5_argtuple_error;
 
3271
    }
 
3272
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
3273
      case  0:
 
3274
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__paths);
 
3275
      if (likely(values[0])) kw_args--;
 
3276
      else goto __pyx_L5_argtuple_error;
 
3277
      case  1:
 
3278
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path);
 
3279
      if (likely(values[1])) kw_args--;
 
3280
      else {
 
3281
        __Pyx_RaiseArgtupleInvalid("_bisect_path_right", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
3282
      }
 
3283
    }
 
3284
    if (unlikely(kw_args > 0)) {
 
3285
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_bisect_path_right") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
3286
    }
 
3287
    __pyx_v_paths = values[0];
 
3288
    __pyx_v_path = values[1];
 
3289
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
 
3290
    goto __pyx_L5_argtuple_error;
 
3291
  } else {
 
3292
    __pyx_v_paths = PyTuple_GET_ITEM(__pyx_args, 0);
 
3293
    __pyx_v_path = PyTuple_GET_ITEM(__pyx_args, 1);
 
3294
  }
 
3295
  goto __pyx_L4_argument_unpacking_done;
 
3296
  __pyx_L5_argtuple_error:;
 
3297
  __Pyx_RaiseArgtupleInvalid("_bisect_path_right", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
3298
  __pyx_L3_error:;
 
3299
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._bisect_path_right");
 
3300
  __Pyx_RefNannyFinishContext();
 
3301
  return NULL;
 
3302
  __pyx_L4_argument_unpacking_done:;
 
3303
 
 
3304
  /* "bzrlib/_dirstate_helpers_pyx.pyx":457
 
3305
 *     cdef void *cur
 
3306
 * 
 
3307
 *     if not PyList_CheckExact(paths):             # <<<<<<<<<<<<<<
 
3308
 *         raise TypeError("you must pass a python list for 'paths' not: %s %r"
 
3309
 *                         % (type(paths), paths))
 
3310
 */
 
3311
  __pyx_t_1 = (!PyList_CheckExact(__pyx_v_paths));
 
3312
  if (__pyx_t_1) {
 
3313
 
 
3314
    /* "bzrlib/_dirstate_helpers_pyx.pyx":459
 
3315
 *     if not PyList_CheckExact(paths):
 
3316
 *         raise TypeError("you must pass a python list for 'paths' not: %s %r"
 
3317
 *                         % (type(paths), paths))             # <<<<<<<<<<<<<<
 
3318
 *     if not PyString_CheckExact(path):
 
3319
 *         raise TypeError("you must pass a string for 'path' not: %s %r"
 
3320
 */
 
3321
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3322
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
3323
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_paths)));
 
3324
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(__pyx_v_paths)));
 
3325
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_paths)));
 
3326
    __Pyx_INCREF(__pyx_v_paths);
 
3327
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_paths);
 
3328
    __Pyx_GIVEREF(__pyx_v_paths);
 
3329
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_6), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3330
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
3331
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
3332
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3333
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
3334
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
 
3335
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
3336
    __pyx_t_3 = 0;
 
3337
    __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3338
    __Pyx_GOTREF(__pyx_t_3);
 
3339
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
3340
    __Pyx_Raise(__pyx_t_3, 0, 0);
 
3341
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
3342
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3343
    goto __pyx_L6;
 
3344
  }
 
3345
  __pyx_L6:;
 
3346
 
 
3347
  /* "bzrlib/_dirstate_helpers_pyx.pyx":460
 
3348
 *         raise TypeError("you must pass a python list for 'paths' not: %s %r"
 
3349
 *                         % (type(paths), paths))
 
3350
 *     if not PyString_CheckExact(path):             # <<<<<<<<<<<<<<
 
3351
 *         raise TypeError("you must pass a string for 'path' not: %s %r"
 
3352
 *                         % (type(path), path))
 
3353
 */
 
3354
  __pyx_t_1 = (!PyString_CheckExact(__pyx_v_path));
 
3355
  if (__pyx_t_1) {
 
3356
 
 
3357
    /* "bzrlib/_dirstate_helpers_pyx.pyx":462
 
3358
 *     if not PyString_CheckExact(path):
 
3359
 *         raise TypeError("you must pass a string for 'path' not: %s %r"
 
3360
 *                         % (type(path), path))             # <<<<<<<<<<<<<<
 
3361
 * 
 
3362
 *     _hi = len(paths)
 
3363
 */
 
3364
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3365
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
3366
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_path)));
 
3367
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(__pyx_v_path)));
 
3368
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_path)));
 
3369
    __Pyx_INCREF(__pyx_v_path);
 
3370
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_path);
 
3371
    __Pyx_GIVEREF(__pyx_v_path);
 
3372
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3373
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
3374
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
3375
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3376
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
3377
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
 
3378
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
 
3379
    __pyx_t_2 = 0;
 
3380
    __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3381
    __Pyx_GOTREF(__pyx_t_2);
 
3382
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
3383
    __Pyx_Raise(__pyx_t_2, 0, 0);
 
3384
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3385
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3386
    goto __pyx_L7;
 
3387
  }
 
3388
  __pyx_L7:;
 
3389
 
 
3390
  /* "bzrlib/_dirstate_helpers_pyx.pyx":464
 
3391
 *                         % (type(path), path))
 
3392
 * 
 
3393
 *     _hi = len(paths)             # <<<<<<<<<<<<<<
 
3394
 *     _lo = 0
 
3395
 * 
 
3396
 */
 
3397
  __pyx_t_4 = PyObject_Length(__pyx_v_paths); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3398
  __pyx_v__hi = __pyx_t_4;
 
3399
 
 
3400
  /* "bzrlib/_dirstate_helpers_pyx.pyx":465
 
3401
 * 
 
3402
 *     _hi = len(paths)
 
3403
 *     _lo = 0             # <<<<<<<<<<<<<<
 
3404
 * 
 
3405
 *     path_cstr = PyString_AsString(path)
 
3406
 */
 
3407
  __pyx_v__lo = 0;
 
3408
 
 
3409
  /* "bzrlib/_dirstate_helpers_pyx.pyx":467
 
3410
 *     _lo = 0
 
3411
 * 
 
3412
 *     path_cstr = PyString_AsString(path)             # <<<<<<<<<<<<<<
 
3413
 *     path_size = PyString_Size(path)
 
3414
 * 
 
3415
 */
 
3416
  __pyx_v_path_cstr = PyString_AsString(__pyx_v_path);
 
3417
 
 
3418
  /* "bzrlib/_dirstate_helpers_pyx.pyx":468
 
3419
 * 
 
3420
 *     path_cstr = PyString_AsString(path)
 
3421
 *     path_size = PyString_Size(path)             # <<<<<<<<<<<<<<
 
3422
 * 
 
3423
 *     while _lo < _hi:
 
3424
 */
 
3425
  __pyx_v_path_size = PyString_Size(__pyx_v_path);
 
3426
 
 
3427
  /* "bzrlib/_dirstate_helpers_pyx.pyx":470
 
3428
 *     path_size = PyString_Size(path)
 
3429
 * 
 
3430
 *     while _lo < _hi:             # <<<<<<<<<<<<<<
 
3431
 *         _mid = (_lo + _hi) / 2
 
3432
 *         cur = PyList_GetItem_object_void(paths, _mid)
 
3433
 */
 
3434
  while (1) {
 
3435
    __pyx_t_1 = (__pyx_v__lo < __pyx_v__hi);
 
3436
    if (!__pyx_t_1) break;
 
3437
 
 
3438
    /* "bzrlib/_dirstate_helpers_pyx.pyx":471
 
3439
 * 
 
3440
 *     while _lo < _hi:
 
3441
 *         _mid = (_lo + _hi) / 2             # <<<<<<<<<<<<<<
 
3442
 *         cur = PyList_GetItem_object_void(paths, _mid)
 
3443
 *         cur_cstr = PyString_AS_STRING_void(cur)
 
3444
 */
 
3445
    __pyx_v__mid = __Pyx_div_long((__pyx_v__lo + __pyx_v__hi), 2);
 
3446
 
 
3447
    /* "bzrlib/_dirstate_helpers_pyx.pyx":472
 
3448
 *     while _lo < _hi:
 
3449
 *         _mid = (_lo + _hi) / 2
 
3450
 *         cur = PyList_GetItem_object_void(paths, _mid)             # <<<<<<<<<<<<<<
 
3451
 *         cur_cstr = PyString_AS_STRING_void(cur)
 
3452
 *         cur_size = PyString_GET_SIZE_void(cur)
 
3453
 */
 
3454
    __pyx_v_cur = PyList_GET_ITEM(__pyx_v_paths, __pyx_v__mid);
 
3455
 
 
3456
    /* "bzrlib/_dirstate_helpers_pyx.pyx":473
 
3457
 *         _mid = (_lo + _hi) / 2
 
3458
 *         cur = PyList_GetItem_object_void(paths, _mid)
 
3459
 *         cur_cstr = PyString_AS_STRING_void(cur)             # <<<<<<<<<<<<<<
 
3460
 *         cur_size = PyString_GET_SIZE_void(cur)
 
3461
 *         if _cmp_path_by_dirblock_intern(path_cstr, path_size,
 
3462
 */
 
3463
    __pyx_v_cur_cstr = PyString_AS_STRING(__pyx_v_cur);
 
3464
 
 
3465
    /* "bzrlib/_dirstate_helpers_pyx.pyx":474
 
3466
 *         cur = PyList_GetItem_object_void(paths, _mid)
 
3467
 *         cur_cstr = PyString_AS_STRING_void(cur)
 
3468
 *         cur_size = PyString_GET_SIZE_void(cur)             # <<<<<<<<<<<<<<
 
3469
 *         if _cmp_path_by_dirblock_intern(path_cstr, path_size,
 
3470
 *                                         cur_cstr, cur_size) < 0:
 
3471
 */
 
3472
    __pyx_v_cur_size = PyString_GET_SIZE(__pyx_v_cur);
 
3473
 
 
3474
    /* "bzrlib/_dirstate_helpers_pyx.pyx":476
 
3475
 *         cur_size = PyString_GET_SIZE_void(cur)
 
3476
 *         if _cmp_path_by_dirblock_intern(path_cstr, path_size,
 
3477
 *                                         cur_cstr, cur_size) < 0:             # <<<<<<<<<<<<<<
 
3478
 *             _hi = _mid
 
3479
 *         else:
 
3480
 */
 
3481
    __pyx_t_1 = (__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_path_by_dirblock_intern(__pyx_v_path_cstr, __pyx_v_path_size, __pyx_v_cur_cstr, __pyx_v_cur_size) < 0);
 
3482
    if (__pyx_t_1) {
 
3483
 
 
3484
      /* "bzrlib/_dirstate_helpers_pyx.pyx":477
 
3485
 *         if _cmp_path_by_dirblock_intern(path_cstr, path_size,
 
3486
 *                                         cur_cstr, cur_size) < 0:
 
3487
 *             _hi = _mid             # <<<<<<<<<<<<<<
 
3488
 *         else:
 
3489
 *             _lo = _mid + 1
 
3490
 */
 
3491
      __pyx_v__hi = __pyx_v__mid;
 
3492
      goto __pyx_L10;
 
3493
    }
 
3494
    /*else*/ {
 
3495
 
 
3496
      /* "bzrlib/_dirstate_helpers_pyx.pyx":479
 
3497
 *             _hi = _mid
 
3498
 *         else:
 
3499
 *             _lo = _mid + 1             # <<<<<<<<<<<<<<
 
3500
 *     return _lo
 
3501
 * 
 
3502
 */
 
3503
      __pyx_v__lo = (__pyx_v__mid + 1);
 
3504
    }
 
3505
    __pyx_L10:;
 
3506
  }
 
3507
 
 
3508
  /* "bzrlib/_dirstate_helpers_pyx.pyx":480
 
3509
 *         else:
 
3510
 *             _lo = _mid + 1
 
3511
 *     return _lo             # <<<<<<<<<<<<<<
 
3512
 * 
 
3513
 * 
 
3514
 */
 
3515
  __Pyx_XDECREF(__pyx_r);
 
3516
  __pyx_t_2 = PyInt_FromLong(__pyx_v__lo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3517
  __Pyx_GOTREF(__pyx_t_2);
 
3518
  __pyx_r = __pyx_t_2;
 
3519
  __pyx_t_2 = 0;
 
3520
  goto __pyx_L0;
 
3521
 
 
3522
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
3523
  goto __pyx_L0;
 
3524
  __pyx_L1_error:;
 
3525
  __Pyx_XDECREF(__pyx_t_2);
 
3526
  __Pyx_XDECREF(__pyx_t_3);
 
3527
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._bisect_path_right");
 
3528
  __pyx_r = NULL;
 
3529
  __pyx_L0:;
 
3530
  __Pyx_XGIVEREF(__pyx_r);
 
3531
  __Pyx_RefNannyFinishContext();
 
3532
  return __pyx_r;
 
3533
}
 
3534
 
 
3535
/* "bzrlib/_dirstate_helpers_pyx.pyx":483
 
3536
 * 
 
3537
 * 
 
3538
 * def bisect_dirblock(dirblocks, dirname, lo=0, hi=None, cache=None):             # <<<<<<<<<<<<<<
 
3539
 *     """Return the index where to insert dirname into the dirblocks.
 
3540
 * 
 
3541
 */
 
3542
 
 
3543
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_5bisect_dirblock(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
3544
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_5bisect_dirblock[] = "Return the index where to insert dirname into the dirblocks.\n\n    The return value idx is such that all directories blocks in dirblock[:idx]\n    have names < dirname, and all blocks in dirblock[idx:] have names >=\n    dirname.\n\n    Optional args lo (default 0) and hi (default len(dirblocks)) bound the\n    slice of a to be searched.\n    ";
 
3545
static PyMethodDef __pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_5bisect_dirblock = {__Pyx_NAMESTR("bisect_dirblock"), (PyCFunction)__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_5bisect_dirblock, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6bzrlib_21_dirstate_helpers_pyx_5bisect_dirblock)};
 
3546
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_5bisect_dirblock(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
3547
  PyObject *__pyx_v_dirblocks = 0;
 
3548
  PyObject *__pyx_v_dirname = 0;
 
3549
  PyObject *__pyx_v_lo = 0;
 
3550
  PyObject *__pyx_v_hi = 0;
 
3551
  PyObject *__pyx_v_cache = 0;
 
3552
  int __pyx_v__lo;
 
3553
  int __pyx_v__hi;
 
3554
  int __pyx_v__mid;
 
3555
  char *__pyx_v_dirname_cstr;
 
3556
  int __pyx_v_dirname_size;
 
3557
  char *__pyx_v_cur_cstr;
 
3558
  int __pyx_v_cur_size;
 
3559
  void *__pyx_v_cur;
 
3560
  PyObject *__pyx_r = NULL;
 
3561
  int __pyx_t_1;
 
3562
  PyObject *__pyx_t_2 = NULL;
 
3563
  PyObject *__pyx_t_3 = NULL;
 
3564
  Py_ssize_t __pyx_t_4;
 
3565
  int __pyx_t_5;
 
3566
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dirblocks,&__pyx_n_s__dirname,&__pyx_n_s__lo,&__pyx_n_s__hi,&__pyx_n_s__cache,0};
 
3567
  __Pyx_RefNannySetupContext("bisect_dirblock");
 
3568
  __pyx_self = __pyx_self;
 
3569
  if (unlikely(__pyx_kwds)) {
 
3570
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
3571
    PyObject* values[5] = {0,0,0,0,0};
 
3572
    values[2] = ((PyObject *)__pyx_int_0);
 
3573
    values[3] = ((PyObject *)Py_None);
 
3574
    values[4] = ((PyObject *)Py_None);
 
3575
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
3576
      case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
 
3577
      case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
 
3578
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
3579
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
3580
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
3581
      case  0: break;
 
3582
      default: goto __pyx_L5_argtuple_error;
 
3583
    }
 
3584
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
3585
      case  0:
 
3586
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dirblocks);
 
3587
      if (likely(values[0])) kw_args--;
 
3588
      else goto __pyx_L5_argtuple_error;
 
3589
      case  1:
 
3590
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dirname);
 
3591
      if (likely(values[1])) kw_args--;
 
3592
      else {
 
3593
        __Pyx_RaiseArgtupleInvalid("bisect_dirblock", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
3594
      }
 
3595
      case  2:
 
3596
      if (kw_args > 0) {
 
3597
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lo);
 
3598
        if (value) { values[2] = value; kw_args--; }
 
3599
      }
 
3600
      case  3:
 
3601
      if (kw_args > 0) {
 
3602
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__hi);
 
3603
        if (value) { values[3] = value; kw_args--; }
 
3604
      }
 
3605
      case  4:
 
3606
      if (kw_args > 0) {
 
3607
        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cache);
 
3608
        if (value) { values[4] = value; kw_args--; }
 
3609
      }
 
3610
    }
 
3611
    if (unlikely(kw_args > 0)) {
 
3612
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "bisect_dirblock") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
3613
    }
 
3614
    __pyx_v_dirblocks = values[0];
 
3615
    __pyx_v_dirname = values[1];
 
3616
    __pyx_v_lo = values[2];
 
3617
    __pyx_v_hi = values[3];
 
3618
    __pyx_v_cache = values[4];
 
3619
  } else {
 
3620
    __pyx_v_lo = ((PyObject *)__pyx_int_0);
 
3621
    __pyx_v_hi = ((PyObject *)Py_None);
 
3622
    __pyx_v_cache = ((PyObject *)Py_None);
 
3623
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
3624
      case  5:
 
3625
      __pyx_v_cache = PyTuple_GET_ITEM(__pyx_args, 4);
 
3626
      case  4:
 
3627
      __pyx_v_hi = PyTuple_GET_ITEM(__pyx_args, 3);
 
3628
      case  3:
 
3629
      __pyx_v_lo = PyTuple_GET_ITEM(__pyx_args, 2);
 
3630
      case  2:
 
3631
      __pyx_v_dirname = PyTuple_GET_ITEM(__pyx_args, 1);
 
3632
      __pyx_v_dirblocks = PyTuple_GET_ITEM(__pyx_args, 0);
 
3633
      break;
 
3634
      default: goto __pyx_L5_argtuple_error;
 
3635
    }
 
3636
  }
 
3637
  goto __pyx_L4_argument_unpacking_done;
 
3638
  __pyx_L5_argtuple_error:;
 
3639
  __Pyx_RaiseArgtupleInvalid("bisect_dirblock", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
3640
  __pyx_L3_error:;
 
3641
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.bisect_dirblock");
 
3642
  __Pyx_RefNannyFinishContext();
 
3643
  return NULL;
 
3644
  __pyx_L4_argument_unpacking_done:;
 
3645
 
 
3646
  /* "bzrlib/_dirstate_helpers_pyx.pyx":502
 
3647
 *     cdef void *cur
 
3648
 * 
 
3649
 *     if not PyList_CheckExact(dirblocks):             # <<<<<<<<<<<<<<
 
3650
 *         raise TypeError("you must pass a python list for 'dirblocks' not: %s %r"
 
3651
 *                         % (type(dirblocks), dirblocks))
 
3652
 */
 
3653
  __pyx_t_1 = (!PyList_CheckExact(__pyx_v_dirblocks));
 
3654
  if (__pyx_t_1) {
 
3655
 
 
3656
    /* "bzrlib/_dirstate_helpers_pyx.pyx":504
 
3657
 *     if not PyList_CheckExact(dirblocks):
 
3658
 *         raise TypeError("you must pass a python list for 'dirblocks' not: %s %r"
 
3659
 *                         % (type(dirblocks), dirblocks))             # <<<<<<<<<<<<<<
 
3660
 *     if not PyString_CheckExact(dirname):
 
3661
 *         raise TypeError("you must pass a string for dirname not: %s %r"
 
3662
 */
 
3663
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3664
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
3665
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_dirblocks)));
 
3666
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(__pyx_v_dirblocks)));
 
3667
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_dirblocks)));
 
3668
    __Pyx_INCREF(__pyx_v_dirblocks);
 
3669
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_dirblocks);
 
3670
    __Pyx_GIVEREF(__pyx_v_dirblocks);
 
3671
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3672
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
3673
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
3674
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3675
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
3676
    PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
 
3677
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
3678
    __pyx_t_3 = 0;
 
3679
    __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3680
    __Pyx_GOTREF(__pyx_t_3);
 
3681
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
3682
    __Pyx_Raise(__pyx_t_3, 0, 0);
 
3683
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
3684
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3685
    goto __pyx_L6;
 
3686
  }
 
3687
  __pyx_L6:;
 
3688
 
 
3689
  /* "bzrlib/_dirstate_helpers_pyx.pyx":505
 
3690
 *         raise TypeError("you must pass a python list for 'dirblocks' not: %s %r"
 
3691
 *                         % (type(dirblocks), dirblocks))
 
3692
 *     if not PyString_CheckExact(dirname):             # <<<<<<<<<<<<<<
 
3693
 *         raise TypeError("you must pass a string for dirname not: %s %r"
 
3694
 *                         % (type(dirname), dirname))
 
3695
 */
 
3696
  __pyx_t_1 = (!PyString_CheckExact(__pyx_v_dirname));
 
3697
  if (__pyx_t_1) {
 
3698
 
 
3699
    /* "bzrlib/_dirstate_helpers_pyx.pyx":507
 
3700
 *     if not PyString_CheckExact(dirname):
 
3701
 *         raise TypeError("you must pass a string for dirname not: %s %r"
 
3702
 *                         % (type(dirname), dirname))             # <<<<<<<<<<<<<<
 
3703
 *     if hi is None:
 
3704
 *         _hi = len(dirblocks)
 
3705
 */
 
3706
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3707
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
3708
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_dirname)));
 
3709
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(__pyx_v_dirname)));
 
3710
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_dirname)));
 
3711
    __Pyx_INCREF(__pyx_v_dirname);
 
3712
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_dirname);
 
3713
    __Pyx_GIVEREF(__pyx_v_dirname);
 
3714
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3715
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
3716
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
3717
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3718
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
3719
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
 
3720
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
 
3721
    __pyx_t_2 = 0;
 
3722
    __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3723
    __Pyx_GOTREF(__pyx_t_2);
 
3724
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
3725
    __Pyx_Raise(__pyx_t_2, 0, 0);
 
3726
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
3727
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3728
    goto __pyx_L7;
 
3729
  }
 
3730
  __pyx_L7:;
 
3731
 
 
3732
  /* "bzrlib/_dirstate_helpers_pyx.pyx":508
 
3733
 *         raise TypeError("you must pass a string for dirname not: %s %r"
 
3734
 *                         % (type(dirname), dirname))
 
3735
 *     if hi is None:             # <<<<<<<<<<<<<<
 
3736
 *         _hi = len(dirblocks)
 
3737
 *     else:
 
3738
 */
 
3739
  __pyx_t_1 = (__pyx_v_hi == Py_None);
 
3740
  if (__pyx_t_1) {
 
3741
 
 
3742
    /* "bzrlib/_dirstate_helpers_pyx.pyx":509
 
3743
 *                         % (type(dirname), dirname))
 
3744
 *     if hi is None:
 
3745
 *         _hi = len(dirblocks)             # <<<<<<<<<<<<<<
 
3746
 *     else:
 
3747
 *         _hi = hi
 
3748
 */
 
3749
    __pyx_t_4 = PyObject_Length(__pyx_v_dirblocks); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3750
    __pyx_v__hi = __pyx_t_4;
 
3751
    goto __pyx_L8;
 
3752
  }
 
3753
  /*else*/ {
 
3754
 
 
3755
    /* "bzrlib/_dirstate_helpers_pyx.pyx":511
 
3756
 *         _hi = len(dirblocks)
 
3757
 *     else:
 
3758
 *         _hi = hi             # <<<<<<<<<<<<<<
 
3759
 * 
 
3760
 *     _lo = lo
 
3761
 */
 
3762
    __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_hi); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3763
    __pyx_v__hi = __pyx_t_5;
 
3764
  }
 
3765
  __pyx_L8:;
 
3766
 
 
3767
  /* "bzrlib/_dirstate_helpers_pyx.pyx":513
 
3768
 *         _hi = hi
 
3769
 * 
 
3770
 *     _lo = lo             # <<<<<<<<<<<<<<
 
3771
 *     dirname_cstr = PyString_AsString(dirname)
 
3772
 *     dirname_size = PyString_Size(dirname)
 
3773
 */
 
3774
  __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_v_lo); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3775
  __pyx_v__lo = __pyx_t_5;
 
3776
 
 
3777
  /* "bzrlib/_dirstate_helpers_pyx.pyx":514
 
3778
 * 
 
3779
 *     _lo = lo
 
3780
 *     dirname_cstr = PyString_AsString(dirname)             # <<<<<<<<<<<<<<
 
3781
 *     dirname_size = PyString_Size(dirname)
 
3782
 * 
 
3783
 */
 
3784
  __pyx_v_dirname_cstr = PyString_AsString(__pyx_v_dirname);
 
3785
 
 
3786
  /* "bzrlib/_dirstate_helpers_pyx.pyx":515
 
3787
 *     _lo = lo
 
3788
 *     dirname_cstr = PyString_AsString(dirname)
 
3789
 *     dirname_size = PyString_Size(dirname)             # <<<<<<<<<<<<<<
 
3790
 * 
 
3791
 *     while _lo < _hi:
 
3792
 */
 
3793
  __pyx_v_dirname_size = PyString_Size(__pyx_v_dirname);
 
3794
 
 
3795
  /* "bzrlib/_dirstate_helpers_pyx.pyx":517
 
3796
 *     dirname_size = PyString_Size(dirname)
 
3797
 * 
 
3798
 *     while _lo < _hi:             # <<<<<<<<<<<<<<
 
3799
 *         _mid = (_lo + _hi) / 2
 
3800
 *         # Grab the dirname for the current dirblock
 
3801
 */
 
3802
  while (1) {
 
3803
    __pyx_t_1 = (__pyx_v__lo < __pyx_v__hi);
 
3804
    if (!__pyx_t_1) break;
 
3805
 
 
3806
    /* "bzrlib/_dirstate_helpers_pyx.pyx":518
 
3807
 * 
 
3808
 *     while _lo < _hi:
 
3809
 *         _mid = (_lo + _hi) / 2             # <<<<<<<<<<<<<<
 
3810
 *         # Grab the dirname for the current dirblock
 
3811
 *         # cur = dirblocks[_mid][0]
 
3812
 */
 
3813
    __pyx_v__mid = __Pyx_div_long((__pyx_v__lo + __pyx_v__hi), 2);
 
3814
 
 
3815
    /* "bzrlib/_dirstate_helpers_pyx.pyx":522
 
3816
 *         # cur = dirblocks[_mid][0]
 
3817
 *         cur = PyTuple_GetItem_void_void(
 
3818
 *                 PyList_GetItem_object_void(dirblocks, _mid), 0)             # <<<<<<<<<<<<<<
 
3819
 *         cur_cstr = PyString_AS_STRING_void(cur)
 
3820
 *         cur_size = PyString_GET_SIZE_void(cur)
 
3821
 */
 
3822
    __pyx_v_cur = PyTuple_GET_ITEM(PyList_GET_ITEM(__pyx_v_dirblocks, __pyx_v__mid), 0);
 
3823
 
 
3824
    /* "bzrlib/_dirstate_helpers_pyx.pyx":523
 
3825
 *         cur = PyTuple_GetItem_void_void(
 
3826
 *                 PyList_GetItem_object_void(dirblocks, _mid), 0)
 
3827
 *         cur_cstr = PyString_AS_STRING_void(cur)             # <<<<<<<<<<<<<<
 
3828
 *         cur_size = PyString_GET_SIZE_void(cur)
 
3829
 *         if _cmp_by_dirs(cur_cstr, cur_size, dirname_cstr, dirname_size) < 0:
 
3830
 */
 
3831
    __pyx_v_cur_cstr = PyString_AS_STRING(__pyx_v_cur);
 
3832
 
 
3833
    /* "bzrlib/_dirstate_helpers_pyx.pyx":524
 
3834
 *                 PyList_GetItem_object_void(dirblocks, _mid), 0)
 
3835
 *         cur_cstr = PyString_AS_STRING_void(cur)
 
3836
 *         cur_size = PyString_GET_SIZE_void(cur)             # <<<<<<<<<<<<<<
 
3837
 *         if _cmp_by_dirs(cur_cstr, cur_size, dirname_cstr, dirname_size) < 0:
 
3838
 *             _lo = _mid + 1
 
3839
 */
 
3840
    __pyx_v_cur_size = PyString_GET_SIZE(__pyx_v_cur);
 
3841
 
 
3842
    /* "bzrlib/_dirstate_helpers_pyx.pyx":525
 
3843
 *         cur_cstr = PyString_AS_STRING_void(cur)
 
3844
 *         cur_size = PyString_GET_SIZE_void(cur)
 
3845
 *         if _cmp_by_dirs(cur_cstr, cur_size, dirname_cstr, dirname_size) < 0:             # <<<<<<<<<<<<<<
 
3846
 *             _lo = _mid + 1
 
3847
 *         else:
 
3848
 */
 
3849
    __pyx_t_1 = (__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_by_dirs(__pyx_v_cur_cstr, __pyx_v_cur_size, __pyx_v_dirname_cstr, __pyx_v_dirname_size) < 0);
 
3850
    if (__pyx_t_1) {
 
3851
 
 
3852
      /* "bzrlib/_dirstate_helpers_pyx.pyx":526
 
3853
 *         cur_size = PyString_GET_SIZE_void(cur)
 
3854
 *         if _cmp_by_dirs(cur_cstr, cur_size, dirname_cstr, dirname_size) < 0:
 
3855
 *             _lo = _mid + 1             # <<<<<<<<<<<<<<
 
3856
 *         else:
 
3857
 *             _hi = _mid
 
3858
 */
 
3859
      __pyx_v__lo = (__pyx_v__mid + 1);
 
3860
      goto __pyx_L11;
 
3861
    }
 
3862
    /*else*/ {
 
3863
 
 
3864
      /* "bzrlib/_dirstate_helpers_pyx.pyx":528
 
3865
 *             _lo = _mid + 1
 
3866
 *         else:
 
3867
 *             _hi = _mid             # <<<<<<<<<<<<<<
 
3868
 *     return _lo
 
3869
 * 
 
3870
 */
 
3871
      __pyx_v__hi = __pyx_v__mid;
 
3872
    }
 
3873
    __pyx_L11:;
 
3874
  }
 
3875
 
 
3876
  /* "bzrlib/_dirstate_helpers_pyx.pyx":529
 
3877
 *         else:
 
3878
 *             _hi = _mid
 
3879
 *     return _lo             # <<<<<<<<<<<<<<
 
3880
 * 
 
3881
 * 
 
3882
 */
 
3883
  __Pyx_XDECREF(__pyx_r);
 
3884
  __pyx_t_2 = PyInt_FromLong(__pyx_v__lo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
3885
  __Pyx_GOTREF(__pyx_t_2);
 
3886
  __pyx_r = __pyx_t_2;
 
3887
  __pyx_t_2 = 0;
 
3888
  goto __pyx_L0;
 
3889
 
 
3890
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
3891
  goto __pyx_L0;
 
3892
  __pyx_L1_error:;
 
3893
  __Pyx_XDECREF(__pyx_t_2);
 
3894
  __Pyx_XDECREF(__pyx_t_3);
 
3895
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.bisect_dirblock");
 
3896
  __pyx_r = NULL;
 
3897
  __pyx_L0:;
 
3898
  __Pyx_XGIVEREF(__pyx_r);
 
3899
  __Pyx_RefNannyFinishContext();
 
3900
  return __pyx_r;
 
3901
}
 
3902
 
 
3903
/* "bzrlib/_dirstate_helpers_pyx.pyx":544
 
3904
 *     cdef char *next # Pointer to the end of this record
 
3905
 * 
 
3906
 *     def __init__(self, text, state):             # <<<<<<<<<<<<<<
 
3907
 *         self.state = state
 
3908
 *         self.text = text
 
3909
 */
 
3910
 
 
3911
static int __pyx_pf_6bzrlib_21_dirstate_helpers_pyx_6Reader___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
3912
static int __pyx_pf_6bzrlib_21_dirstate_helpers_pyx_6Reader___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
3913
  PyObject *__pyx_v_text = 0;
 
3914
  PyObject *__pyx_v_state = 0;
 
3915
  int __pyx_r;
 
3916
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__text,&__pyx_n_s__state,0};
 
3917
  __Pyx_RefNannySetupContext("__init__");
 
3918
  if (unlikely(__pyx_kwds)) {
 
3919
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
3920
    PyObject* values[2] = {0,0};
 
3921
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
3922
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
3923
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
3924
      case  0: break;
 
3925
      default: goto __pyx_L5_argtuple_error;
 
3926
    }
 
3927
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
3928
      case  0:
 
3929
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__text);
 
3930
      if (likely(values[0])) kw_args--;
 
3931
      else goto __pyx_L5_argtuple_error;
 
3932
      case  1:
 
3933
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__state);
 
3934
      if (likely(values[1])) kw_args--;
 
3935
      else {
 
3936
        __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
3937
      }
 
3938
    }
 
3939
    if (unlikely(kw_args > 0)) {
 
3940
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
3941
    }
 
3942
    __pyx_v_text = values[0];
 
3943
    __pyx_v_state = values[1];
 
3944
  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
 
3945
    goto __pyx_L5_argtuple_error;
 
3946
  } else {
 
3947
    __pyx_v_text = PyTuple_GET_ITEM(__pyx_args, 0);
 
3948
    __pyx_v_state = PyTuple_GET_ITEM(__pyx_args, 1);
 
3949
  }
 
3950
  goto __pyx_L4_argument_unpacking_done;
 
3951
  __pyx_L5_argtuple_error:;
 
3952
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
3953
  __pyx_L3_error:;
 
3954
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.Reader.__init__");
 
3955
  __Pyx_RefNannyFinishContext();
 
3956
  return -1;
 
3957
  __pyx_L4_argument_unpacking_done:;
 
3958
 
 
3959
  /* "bzrlib/_dirstate_helpers_pyx.pyx":545
 
3960
 * 
 
3961
 *     def __init__(self, text, state):
 
3962
 *         self.state = state             # <<<<<<<<<<<<<<
 
3963
 *         self.text = text
 
3964
 *         self.text_cstr = PyString_AsString(text)
 
3965
 */
 
3966
  __Pyx_INCREF(__pyx_v_state);
 
3967
  __Pyx_GIVEREF(__pyx_v_state);
 
3968
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state);
 
3969
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state);
 
3970
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state = __pyx_v_state;
 
3971
 
 
3972
  /* "bzrlib/_dirstate_helpers_pyx.pyx":546
 
3973
 *     def __init__(self, text, state):
 
3974
 *         self.state = state
 
3975
 *         self.text = text             # <<<<<<<<<<<<<<
 
3976
 *         self.text_cstr = PyString_AsString(text)
 
3977
 *         self.text_size = PyString_Size(text)
 
3978
 */
 
3979
  __Pyx_INCREF(__pyx_v_text);
 
3980
  __Pyx_GIVEREF(__pyx_v_text);
 
3981
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text);
 
3982
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text);
 
3983
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text = __pyx_v_text;
 
3984
 
 
3985
  /* "bzrlib/_dirstate_helpers_pyx.pyx":547
 
3986
 *         self.state = state
 
3987
 *         self.text = text
 
3988
 *         self.text_cstr = PyString_AsString(text)             # <<<<<<<<<<<<<<
 
3989
 *         self.text_size = PyString_Size(text)
 
3990
 *         self.end_cstr = self.text_cstr + self.text_size
 
3991
 */
 
3992
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text_cstr = PyString_AsString(__pyx_v_text);
 
3993
 
 
3994
  /* "bzrlib/_dirstate_helpers_pyx.pyx":548
 
3995
 *         self.text = text
 
3996
 *         self.text_cstr = PyString_AsString(text)
 
3997
 *         self.text_size = PyString_Size(text)             # <<<<<<<<<<<<<<
 
3998
 *         self.end_cstr = self.text_cstr + self.text_size
 
3999
 *         self.cur_cstr = self.text_cstr
 
4000
 */
 
4001
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text_size = PyString_Size(__pyx_v_text);
 
4002
 
 
4003
  /* "bzrlib/_dirstate_helpers_pyx.pyx":549
 
4004
 *         self.text_cstr = PyString_AsString(text)
 
4005
 *         self.text_size = PyString_Size(text)
 
4006
 *         self.end_cstr = self.text_cstr + self.text_size             # <<<<<<<<<<<<<<
 
4007
 *         self.cur_cstr = self.text_cstr
 
4008
 * 
 
4009
 */
 
4010
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->end_cstr = (((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text_cstr + ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text_size);
 
4011
 
 
4012
  /* "bzrlib/_dirstate_helpers_pyx.pyx":550
 
4013
 *         self.text_size = PyString_Size(text)
 
4014
 *         self.end_cstr = self.text_cstr + self.text_size
 
4015
 *         self.cur_cstr = self.text_cstr             # <<<<<<<<<<<<<<
 
4016
 * 
 
4017
 *     cdef char *get_next(self, int *size) except NULL:
 
4018
 */
 
4019
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->cur_cstr = ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->text_cstr;
 
4020
 
 
4021
  __pyx_r = 0;
 
4022
  __Pyx_RefNannyFinishContext();
 
4023
  return __pyx_r;
 
4024
}
 
4025
 
 
4026
/* "bzrlib/_dirstate_helpers_pyx.pyx":552
 
4027
 *         self.cur_cstr = self.text_cstr
 
4028
 * 
 
4029
 *     cdef char *get_next(self, int *size) except NULL:             # <<<<<<<<<<<<<<
 
4030
 *         """Return a pointer to the start of the next field."""
 
4031
 *         cdef char *next
 
4032
 */
 
4033
 
 
4034
static  char *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader_get_next(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *__pyx_v_self, int *__pyx_v_size) {
 
4035
  char *__pyx_v_next;
 
4036
  Py_ssize_t __pyx_v_extra_len;
 
4037
  char *__pyx_r;
 
4038
  int __pyx_t_1;
 
4039
  PyObject *__pyx_t_2 = NULL;
 
4040
  PyObject *__pyx_t_3 = NULL;
 
4041
  PyObject *__pyx_t_4 = NULL;
 
4042
  __Pyx_RefNannySetupContext("get_next");
 
4043
 
 
4044
  /* "bzrlib/_dirstate_helpers_pyx.pyx":557
 
4045
 *         cdef Py_ssize_t extra_len
 
4046
 * 
 
4047
 *         if self.cur_cstr == NULL:             # <<<<<<<<<<<<<<
 
4048
 *             raise AssertionError('get_next() called when cur_str is NULL')
 
4049
 *         elif self.cur_cstr >= self.end_cstr:
 
4050
 */
 
4051
  __pyx_t_1 = (__pyx_v_self->cur_cstr == NULL);
 
4052
  if (__pyx_t_1) {
 
4053
 
 
4054
    /* "bzrlib/_dirstate_helpers_pyx.pyx":558
 
4055
 * 
 
4056
 *         if self.cur_cstr == NULL:
 
4057
 *             raise AssertionError('get_next() called when cur_str is NULL')             # <<<<<<<<<<<<<<
 
4058
 *         elif self.cur_cstr >= self.end_cstr:
 
4059
 *             raise AssertionError('get_next() called when there are no chars'
 
4060
 */
 
4061
    __pyx_t_2 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4062
    __Pyx_GOTREF(__pyx_t_2);
 
4063
    __Pyx_Raise(__pyx_t_2, 0, 0);
 
4064
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4065
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4066
    goto __pyx_L3;
 
4067
  }
 
4068
 
 
4069
  /* "bzrlib/_dirstate_helpers_pyx.pyx":559
 
4070
 *         if self.cur_cstr == NULL:
 
4071
 *             raise AssertionError('get_next() called when cur_str is NULL')
 
4072
 *         elif self.cur_cstr >= self.end_cstr:             # <<<<<<<<<<<<<<
 
4073
 *             raise AssertionError('get_next() called when there are no chars'
 
4074
 *                                  ' left')
 
4075
 */
 
4076
  __pyx_t_1 = (__pyx_v_self->cur_cstr >= __pyx_v_self->end_cstr);
 
4077
  if (__pyx_t_1) {
 
4078
 
 
4079
    /* "bzrlib/_dirstate_helpers_pyx.pyx":560
 
4080
 *             raise AssertionError('get_next() called when cur_str is NULL')
 
4081
 *         elif self.cur_cstr >= self.end_cstr:
 
4082
 *             raise AssertionError('get_next() called when there are no chars'             # <<<<<<<<<<<<<<
 
4083
 *                                  ' left')
 
4084
 *         next = self.cur_cstr
 
4085
 */
 
4086
    __pyx_t_2 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4087
    __Pyx_GOTREF(__pyx_t_2);
 
4088
    __Pyx_Raise(__pyx_t_2, 0, 0);
 
4089
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4090
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4091
    goto __pyx_L3;
 
4092
  }
 
4093
  __pyx_L3:;
 
4094
 
 
4095
  /* "bzrlib/_dirstate_helpers_pyx.pyx":562
 
4096
 *             raise AssertionError('get_next() called when there are no chars'
 
4097
 *                                  ' left')
 
4098
 *         next = self.cur_cstr             # <<<<<<<<<<<<<<
 
4099
 *         self.cur_cstr = <char*>memchr(next, c'\0', self.end_cstr - next)
 
4100
 *         if self.cur_cstr == NULL:
 
4101
 */
 
4102
  __pyx_v_next = __pyx_v_self->cur_cstr;
 
4103
 
 
4104
  /* "bzrlib/_dirstate_helpers_pyx.pyx":563
 
4105
 *                                  ' left')
 
4106
 *         next = self.cur_cstr
 
4107
 *         self.cur_cstr = <char*>memchr(next, c'\0', self.end_cstr - next)             # <<<<<<<<<<<<<<
 
4108
 *         if self.cur_cstr == NULL:
 
4109
 *             extra_len = self.end_cstr - next
 
4110
 */
 
4111
  __pyx_v_self->cur_cstr = ((char *)memchr(__pyx_v_next, '\x00', (__pyx_v_self->end_cstr - __pyx_v_next)));
 
4112
 
 
4113
  /* "bzrlib/_dirstate_helpers_pyx.pyx":564
 
4114
 *         next = self.cur_cstr
 
4115
 *         self.cur_cstr = <char*>memchr(next, c'\0', self.end_cstr - next)
 
4116
 *         if self.cur_cstr == NULL:             # <<<<<<<<<<<<<<
 
4117
 *             extra_len = self.end_cstr - next
 
4118
 *             raise errors.DirstateCorrupt(self.state,
 
4119
 */
 
4120
  __pyx_t_1 = (__pyx_v_self->cur_cstr == NULL);
 
4121
  if (__pyx_t_1) {
 
4122
 
 
4123
    /* "bzrlib/_dirstate_helpers_pyx.pyx":565
 
4124
 *         self.cur_cstr = <char*>memchr(next, c'\0', self.end_cstr - next)
 
4125
 *         if self.cur_cstr == NULL:
 
4126
 *             extra_len = self.end_cstr - next             # <<<<<<<<<<<<<<
 
4127
 *             raise errors.DirstateCorrupt(self.state,
 
4128
 *                 'failed to find trailing NULL (\\0).'
 
4129
 */
 
4130
    __pyx_v_extra_len = (__pyx_v_self->end_cstr - __pyx_v_next);
 
4131
 
 
4132
    /* "bzrlib/_dirstate_helpers_pyx.pyx":566
 
4133
 *         if self.cur_cstr == NULL:
 
4134
 *             extra_len = self.end_cstr - next
 
4135
 *             raise errors.DirstateCorrupt(self.state,             # <<<<<<<<<<<<<<
 
4136
 *                 'failed to find trailing NULL (\\0).'
 
4137
 *                 ' Trailing garbage: %r'
 
4138
 */
 
4139
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__errors); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4140
    __Pyx_GOTREF(__pyx_t_2);
 
4141
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__DirstateCorrupt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4142
    __Pyx_GOTREF(__pyx_t_3);
 
4143
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4144
 
 
4145
    /* "bzrlib/_dirstate_helpers_pyx.pyx":569
 
4146
 *                 'failed to find trailing NULL (\\0).'
 
4147
 *                 ' Trailing garbage: %r'
 
4148
 *                 % safe_string_from_size(next, extra_len))             # <<<<<<<<<<<<<<
 
4149
 *         size[0] = self.cur_cstr - next
 
4150
 *         self.cur_cstr = self.cur_cstr + 1
 
4151
 */
 
4152
    __pyx_t_2 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx_safe_string_from_size(__pyx_v_next, __pyx_v_extra_len); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4153
    __Pyx_GOTREF(__pyx_t_2);
 
4154
    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_14), __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4155
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
 
4156
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4157
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4158
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4159
    __Pyx_INCREF(__pyx_v_self->state);
 
4160
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->state);
 
4161
    __Pyx_GIVEREF(__pyx_v_self->state);
 
4162
    PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_t_4));
 
4163
    __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
 
4164
    __pyx_t_4 = 0;
 
4165
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4166
    __Pyx_GOTREF(__pyx_t_4);
 
4167
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
4168
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
4169
    __Pyx_Raise(__pyx_t_4, 0, 0);
 
4170
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
4171
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4172
    goto __pyx_L4;
 
4173
  }
 
4174
  __pyx_L4:;
 
4175
 
 
4176
  /* "bzrlib/_dirstate_helpers_pyx.pyx":570
 
4177
 *                 ' Trailing garbage: %r'
 
4178
 *                 % safe_string_from_size(next, extra_len))
 
4179
 *         size[0] = self.cur_cstr - next             # <<<<<<<<<<<<<<
 
4180
 *         self.cur_cstr = self.cur_cstr + 1
 
4181
 *         return next
 
4182
 */
 
4183
  (__pyx_v_size[0]) = (__pyx_v_self->cur_cstr - __pyx_v_next);
 
4184
 
 
4185
  /* "bzrlib/_dirstate_helpers_pyx.pyx":571
 
4186
 *                 % safe_string_from_size(next, extra_len))
 
4187
 *         size[0] = self.cur_cstr - next
 
4188
 *         self.cur_cstr = self.cur_cstr + 1             # <<<<<<<<<<<<<<
 
4189
 *         return next
 
4190
 * 
 
4191
 */
 
4192
  __pyx_v_self->cur_cstr = (__pyx_v_self->cur_cstr + 1);
 
4193
 
 
4194
  /* "bzrlib/_dirstate_helpers_pyx.pyx":572
 
4195
 *         size[0] = self.cur_cstr - next
 
4196
 *         self.cur_cstr = self.cur_cstr + 1
 
4197
 *         return next             # <<<<<<<<<<<<<<
 
4198
 * 
 
4199
 *     cdef object get_next_str(self):
 
4200
 */
 
4201
  __pyx_r = __pyx_v_next;
 
4202
  goto __pyx_L0;
 
4203
 
 
4204
  __pyx_r = 0;
 
4205
  goto __pyx_L0;
 
4206
  __pyx_L1_error:;
 
4207
  __Pyx_XDECREF(__pyx_t_2);
 
4208
  __Pyx_XDECREF(__pyx_t_3);
 
4209
  __Pyx_XDECREF(__pyx_t_4);
 
4210
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.Reader.get_next");
 
4211
  __pyx_r = NULL;
 
4212
  __pyx_L0:;
 
4213
  __Pyx_RefNannyFinishContext();
 
4214
  return __pyx_r;
 
4215
}
 
4216
 
 
4217
/* "bzrlib/_dirstate_helpers_pyx.pyx":574
 
4218
 *         return next
 
4219
 * 
 
4220
 *     cdef object get_next_str(self):             # <<<<<<<<<<<<<<
 
4221
 *         """Get the next field as a Python string."""
 
4222
 *         cdef int size
 
4223
 */
 
4224
 
 
4225
static  PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader_get_next_str(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *__pyx_v_self) {
 
4226
  int __pyx_v_size;
 
4227
  char *__pyx_v_next;
 
4228
  PyObject *__pyx_r = NULL;
 
4229
  char *__pyx_t_1;
 
4230
  PyObject *__pyx_t_2 = NULL;
 
4231
  __Pyx_RefNannySetupContext("get_next_str");
 
4232
 
 
4233
  /* "bzrlib/_dirstate_helpers_pyx.pyx":578
 
4234
 *         cdef int size
 
4235
 *         cdef char *next
 
4236
 *         next = self.get_next(&size)             # <<<<<<<<<<<<<<
 
4237
 *         return safe_string_from_size(next, size)
 
4238
 * 
 
4239
 */
 
4240
  __pyx_t_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next(__pyx_v_self, (&__pyx_v_size)); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4241
  __pyx_v_next = __pyx_t_1;
 
4242
 
 
4243
  /* "bzrlib/_dirstate_helpers_pyx.pyx":579
 
4244
 *         cdef char *next
 
4245
 *         next = self.get_next(&size)
 
4246
 *         return safe_string_from_size(next, size)             # <<<<<<<<<<<<<<
 
4247
 * 
 
4248
 *     cdef int _init(self) except -1:
 
4249
 */
 
4250
  __Pyx_XDECREF(__pyx_r);
 
4251
  __pyx_t_2 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx_safe_string_from_size(__pyx_v_next, __pyx_v_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4252
  __Pyx_GOTREF(__pyx_t_2);
 
4253
  __pyx_r = __pyx_t_2;
 
4254
  __pyx_t_2 = 0;
 
4255
  goto __pyx_L0;
 
4256
 
 
4257
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
4258
  goto __pyx_L0;
 
4259
  __pyx_L1_error:;
 
4260
  __Pyx_XDECREF(__pyx_t_2);
 
4261
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.Reader.get_next_str");
 
4262
  __pyx_r = 0;
 
4263
  __pyx_L0:;
 
4264
  __Pyx_XGIVEREF(__pyx_r);
 
4265
  __Pyx_RefNannyFinishContext();
 
4266
  return __pyx_r;
 
4267
}
 
4268
 
 
4269
/* "bzrlib/_dirstate_helpers_pyx.pyx":581
 
4270
 *         return safe_string_from_size(next, size)
 
4271
 * 
 
4272
 *     cdef int _init(self) except -1:             # <<<<<<<<<<<<<<
 
4273
 *         """Get the pointer ready.
 
4274
 * 
 
4275
 */
 
4276
 
 
4277
static  int __pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader__init(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *__pyx_v_self) {
 
4278
  char *__pyx_v_first;
 
4279
  int __pyx_v_size;
 
4280
  int __pyx_r;
 
4281
  char *__pyx_t_1;
 
4282
  int __pyx_t_2;
 
4283
  int __pyx_t_3;
 
4284
  int __pyx_t_4;
 
4285
  PyObject *__pyx_t_5 = NULL;
 
4286
  PyObject *__pyx_t_6 = NULL;
 
4287
  __Pyx_RefNannySetupContext("_init");
 
4288
 
 
4289
  /* "bzrlib/_dirstate_helpers_pyx.pyx":592
 
4290
 *         cdef int size
 
4291
 *         # The first field should be an empty string left over from the Header
 
4292
 *         first = self.get_next(&size)             # <<<<<<<<<<<<<<
 
4293
 *         if first[0] != c'\0' and size == 0:
 
4294
 *             raise AssertionError('First character should be null not: %s'
 
4295
 */
 
4296
  __pyx_t_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next(__pyx_v_self, (&__pyx_v_size)); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4297
  __pyx_v_first = __pyx_t_1;
 
4298
 
 
4299
  /* "bzrlib/_dirstate_helpers_pyx.pyx":593
 
4300
 *         # The first field should be an empty string left over from the Header
 
4301
 *         first = self.get_next(&size)
 
4302
 *         if first[0] != c'\0' and size == 0:             # <<<<<<<<<<<<<<
 
4303
 *             raise AssertionError('First character should be null not: %s'
 
4304
 *                                  % (first,))
 
4305
 */
 
4306
  __pyx_t_2 = ((__pyx_v_first[0]) != '\x00');
 
4307
  if (__pyx_t_2) {
 
4308
    __pyx_t_3 = (__pyx_v_size == 0);
 
4309
    __pyx_t_4 = __pyx_t_3;
 
4310
  } else {
 
4311
    __pyx_t_4 = __pyx_t_2;
 
4312
  }
 
4313
  if (__pyx_t_4) {
 
4314
 
 
4315
    /* "bzrlib/_dirstate_helpers_pyx.pyx":595
 
4316
 *         if first[0] != c'\0' and size == 0:
 
4317
 *             raise AssertionError('First character should be null not: %s'
 
4318
 *                                  % (first,))             # <<<<<<<<<<<<<<
 
4319
 *         return 0
 
4320
 * 
 
4321
 */
 
4322
    __pyx_t_5 = PyBytes_FromString(__pyx_v_first); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4323
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
 
4324
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4325
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
4326
    PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_5));
 
4327
    __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
 
4328
    __pyx_t_5 = 0;
 
4329
    __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4330
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
 
4331
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
4332
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4333
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
4334
    PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_5));
 
4335
    __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
 
4336
    __pyx_t_5 = 0;
 
4337
    __pyx_t_5 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4338
    __Pyx_GOTREF(__pyx_t_5);
 
4339
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
4340
    __Pyx_Raise(__pyx_t_5, 0, 0);
 
4341
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
4342
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4343
    goto __pyx_L3;
 
4344
  }
 
4345
  __pyx_L3:;
 
4346
 
 
4347
  /* "bzrlib/_dirstate_helpers_pyx.pyx":596
 
4348
 *             raise AssertionError('First character should be null not: %s'
 
4349
 *                                  % (first,))
 
4350
 *         return 0             # <<<<<<<<<<<<<<
 
4351
 * 
 
4352
 *     cdef object _get_entry(self, int num_trees, void **p_current_dirname,
 
4353
 */
 
4354
  __pyx_r = 0;
 
4355
  goto __pyx_L0;
 
4356
 
 
4357
  __pyx_r = 0;
 
4358
  goto __pyx_L0;
 
4359
  __pyx_L1_error:;
 
4360
  __Pyx_XDECREF(__pyx_t_5);
 
4361
  __Pyx_XDECREF(__pyx_t_6);
 
4362
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.Reader._init");
 
4363
  __pyx_r = -1;
 
4364
  __pyx_L0:;
 
4365
  __Pyx_RefNannyFinishContext();
 
4366
  return __pyx_r;
 
4367
}
 
4368
 
 
4369
/* "bzrlib/_dirstate_helpers_pyx.pyx":598
 
4370
 *         return 0
 
4371
 * 
 
4372
 *     cdef object _get_entry(self, int num_trees, void **p_current_dirname,             # <<<<<<<<<<<<<<
 
4373
 *                            int *new_block):
 
4374
 *         """Extract the next entry.
 
4375
 */
 
4376
 
 
4377
static  PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader__get_entry(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *__pyx_v_self, int __pyx_v_num_trees, void **__pyx_v_p_current_dirname, int *__pyx_v_new_block) {
 
4378
  StaticTuple *__pyx_v_path_name_file_id_key;
 
4379
  StaticTuple *__pyx_v_tmp;
 
4380
  char *__pyx_v_entry_size_cstr;
 
4381
  unsigned long __pyx_v_entry_size;
 
4382
  char *__pyx_v_executable_cstr;
 
4383
  int __pyx_v_is_executable;
 
4384
  char *__pyx_v_dirname_cstr;
 
4385
  char *__pyx_v_trailing;
 
4386
  int __pyx_v_cur_size;
 
4387
  int __pyx_v_i;
 
4388
  PyObject *__pyx_v_minikind;
 
4389
  PyObject *__pyx_v_fingerprint;
 
4390
  PyObject *__pyx_v_info;
 
4391
  PyObject *__pyx_v_dirname;
 
4392
  PyObject *__pyx_v_cur_dirname;
 
4393
  PyObject *__pyx_v_cur_basename;
 
4394
  PyObject *__pyx_v_cur_file_id;
 
4395
  PyObject *__pyx_v_trees;
 
4396
  PyObject *__pyx_v_ret;
 
4397
  PyObject *__pyx_r = NULL;
 
4398
  char *__pyx_t_1;
 
4399
  int __pyx_t_2;
 
4400
  int __pyx_t_3;
 
4401
  int __pyx_t_4;
 
4402
  PyObject *__pyx_t_5 = NULL;
 
4403
  void *__pyx_t_6;
 
4404
  int __pyx_t_7;
 
4405
  PyObject *__pyx_t_8 = NULL;
 
4406
  PyObject *__pyx_t_9 = NULL;
 
4407
  int __pyx_t_10;
 
4408
  PyObject *__pyx_t_11 = NULL;
 
4409
  __Pyx_RefNannySetupContext("_get_entry");
 
4410
  __pyx_v_path_name_file_id_key = ((StaticTuple *)Py_None); __Pyx_INCREF(Py_None);
 
4411
  __pyx_v_tmp = ((StaticTuple *)Py_None); __Pyx_INCREF(Py_None);
 
4412
  __pyx_v_minikind = Py_None; __Pyx_INCREF(Py_None);
 
4413
  __pyx_v_fingerprint = Py_None; __Pyx_INCREF(Py_None);
 
4414
  __pyx_v_info = Py_None; __Pyx_INCREF(Py_None);
 
4415
  __pyx_v_dirname = Py_None; __Pyx_INCREF(Py_None);
 
4416
  __pyx_v_cur_dirname = Py_None; __Pyx_INCREF(Py_None);
 
4417
  __pyx_v_cur_basename = Py_None; __Pyx_INCREF(Py_None);
 
4418
  __pyx_v_cur_file_id = Py_None; __Pyx_INCREF(Py_None);
 
4419
  __pyx_v_trees = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
 
4420
  __pyx_v_ret = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
 
4421
 
 
4422
  /* "bzrlib/_dirstate_helpers_pyx.pyx":634
 
4423
 * 
 
4424
 *         # Read the 'key' information (dirname, name, file_id)
 
4425
 *         dirname_cstr = self.get_next(&cur_size)             # <<<<<<<<<<<<<<
 
4426
 *         # Check to see if we have started a new directory block.
 
4427
 *         # If so, then we need to create a new dirname PyString, so that it can
 
4428
 */
 
4429
  __pyx_t_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next(__pyx_v_self, (&__pyx_v_cur_size)); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4430
  __pyx_v_dirname_cstr = __pyx_t_1;
 
4431
 
 
4432
  /* "bzrlib/_dirstate_helpers_pyx.pyx":642
 
4433
 *         # Do the cheap 'length of string' check first. If the string is a
 
4434
 *         # different length, then we *have* to be a different directory.
 
4435
 *         if (cur_size != PyString_GET_SIZE_void(p_current_dirname[0])             # <<<<<<<<<<<<<<
 
4436
 *             or strncmp(dirname_cstr,
 
4437
 *                        # Extract the char* from our current dirname string.  We
 
4438
 */
 
4439
  __pyx_t_2 = (__pyx_v_cur_size != PyString_GET_SIZE((__pyx_v_p_current_dirname[0])));
 
4440
  if (!__pyx_t_2) {
 
4441
 
 
4442
    /* "bzrlib/_dirstate_helpers_pyx.pyx":650
 
4443
 *                        # <object>
 
4444
 *                        PyString_AS_STRING_void(p_current_dirname[0]),
 
4445
 *                        cur_size+1) != 0):             # <<<<<<<<<<<<<<
 
4446
 *             dirname = safe_string_from_size(dirname_cstr, cur_size)
 
4447
 *             p_current_dirname[0] = <void*>dirname
 
4448
 */
 
4449
    __pyx_t_3 = (strncmp(__pyx_v_dirname_cstr, PyString_AS_STRING((__pyx_v_p_current_dirname[0])), (__pyx_v_cur_size + 1)) != 0);
 
4450
    __pyx_t_4 = __pyx_t_3;
 
4451
  } else {
 
4452
    __pyx_t_4 = __pyx_t_2;
 
4453
  }
 
4454
  if (__pyx_t_4) {
 
4455
 
 
4456
    /* "bzrlib/_dirstate_helpers_pyx.pyx":651
 
4457
 *                        PyString_AS_STRING_void(p_current_dirname[0]),
 
4458
 *                        cur_size+1) != 0):
 
4459
 *             dirname = safe_string_from_size(dirname_cstr, cur_size)             # <<<<<<<<<<<<<<
 
4460
 *             p_current_dirname[0] = <void*>dirname
 
4461
 *             new_block[0] = 1
 
4462
 */
 
4463
    __pyx_t_5 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx_safe_string_from_size(__pyx_v_dirname_cstr, __pyx_v_cur_size); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4464
    __Pyx_GOTREF(__pyx_t_5);
 
4465
    __Pyx_DECREF(__pyx_v_dirname);
 
4466
    __pyx_v_dirname = __pyx_t_5;
 
4467
    __pyx_t_5 = 0;
 
4468
 
 
4469
    /* "bzrlib/_dirstate_helpers_pyx.pyx":652
 
4470
 *                        cur_size+1) != 0):
 
4471
 *             dirname = safe_string_from_size(dirname_cstr, cur_size)
 
4472
 *             p_current_dirname[0] = <void*>dirname             # <<<<<<<<<<<<<<
 
4473
 *             new_block[0] = 1
 
4474
 *         else:
 
4475
 */
 
4476
    (__pyx_v_p_current_dirname[0]) = ((void *)__pyx_v_dirname);
 
4477
 
 
4478
    /* "bzrlib/_dirstate_helpers_pyx.pyx":653
 
4479
 *             dirname = safe_string_from_size(dirname_cstr, cur_size)
 
4480
 *             p_current_dirname[0] = <void*>dirname
 
4481
 *             new_block[0] = 1             # <<<<<<<<<<<<<<
 
4482
 *         else:
 
4483
 *             new_block[0] = 0
 
4484
 */
 
4485
    (__pyx_v_new_block[0]) = 1;
 
4486
    goto __pyx_L3;
 
4487
  }
 
4488
  /*else*/ {
 
4489
 
 
4490
    /* "bzrlib/_dirstate_helpers_pyx.pyx":655
 
4491
 *             new_block[0] = 1
 
4492
 *         else:
 
4493
 *             new_block[0] = 0             # <<<<<<<<<<<<<<
 
4494
 * 
 
4495
 *         # Build up the key that will be used.
 
4496
 */
 
4497
    (__pyx_v_new_block[0]) = 0;
 
4498
  }
 
4499
  __pyx_L3:;
 
4500
 
 
4501
  /* "bzrlib/_dirstate_helpers_pyx.pyx":660
 
4502
 *         # By using <object>(void *) Pyrex will automatically handle the
 
4503
 *         # Py_INCREF that we need.
 
4504
 *         cur_dirname = <object>p_current_dirname[0]             # <<<<<<<<<<<<<<
 
4505
 *         # Use StaticTuple_New to pre-allocate, rather than creating a regular
 
4506
 *         # tuple and passing it to the StaticTuple constructor.
 
4507
 */
 
4508
  __pyx_t_6 = (__pyx_v_p_current_dirname[0]);
 
4509
  __Pyx_INCREF(((PyObject *)__pyx_t_6));
 
4510
  __Pyx_DECREF(__pyx_v_cur_dirname);
 
4511
  __pyx_v_cur_dirname = ((PyObject *)__pyx_t_6);
 
4512
 
 
4513
  /* "bzrlib/_dirstate_helpers_pyx.pyx":667
 
4514
 *         #                          self.get_next_str(),
 
4515
 *         #                         )
 
4516
 *         tmp = StaticTuple_New(3)             # <<<<<<<<<<<<<<
 
4517
 *         Py_INCREF(cur_dirname); StaticTuple_SET_ITEM(tmp, 0, cur_dirname)
 
4518
 *         cur_basename = self.get_next_str()
 
4519
 */
 
4520
  __pyx_t_5 = ((PyObject *)StaticTuple_New(3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4521
  __Pyx_GOTREF(__pyx_t_5);
 
4522
  __Pyx_DECREF(((PyObject *)__pyx_v_tmp));
 
4523
  __pyx_v_tmp = ((StaticTuple *)__pyx_t_5);
 
4524
  __pyx_t_5 = 0;
 
4525
 
 
4526
  /* "bzrlib/_dirstate_helpers_pyx.pyx":668
 
4527
 *         #                         )
 
4528
 *         tmp = StaticTuple_New(3)
 
4529
 *         Py_INCREF(cur_dirname); StaticTuple_SET_ITEM(tmp, 0, cur_dirname)             # <<<<<<<<<<<<<<
 
4530
 *         cur_basename = self.get_next_str()
 
4531
 *         cur_file_id = self.get_next_str()
 
4532
 */
 
4533
  Py_INCREF(__pyx_v_cur_dirname);
 
4534
  StaticTuple_SET_ITEM(__pyx_v_tmp, 0, __pyx_v_cur_dirname);
 
4535
 
 
4536
  /* "bzrlib/_dirstate_helpers_pyx.pyx":669
 
4537
 *         tmp = StaticTuple_New(3)
 
4538
 *         Py_INCREF(cur_dirname); StaticTuple_SET_ITEM(tmp, 0, cur_dirname)
 
4539
 *         cur_basename = self.get_next_str()             # <<<<<<<<<<<<<<
 
4540
 *         cur_file_id = self.get_next_str()
 
4541
 *         Py_INCREF(cur_basename); StaticTuple_SET_ITEM(tmp, 1, cur_basename)
 
4542
 */
 
4543
  __pyx_t_5 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4544
  __Pyx_GOTREF(__pyx_t_5);
 
4545
  __Pyx_DECREF(__pyx_v_cur_basename);
 
4546
  __pyx_v_cur_basename = __pyx_t_5;
 
4547
  __pyx_t_5 = 0;
 
4548
 
 
4549
  /* "bzrlib/_dirstate_helpers_pyx.pyx":670
 
4550
 *         Py_INCREF(cur_dirname); StaticTuple_SET_ITEM(tmp, 0, cur_dirname)
 
4551
 *         cur_basename = self.get_next_str()
 
4552
 *         cur_file_id = self.get_next_str()             # <<<<<<<<<<<<<<
 
4553
 *         Py_INCREF(cur_basename); StaticTuple_SET_ITEM(tmp, 1, cur_basename)
 
4554
 *         Py_INCREF(cur_file_id); StaticTuple_SET_ITEM(tmp, 2, cur_file_id)
 
4555
 */
 
4556
  __pyx_t_5 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4557
  __Pyx_GOTREF(__pyx_t_5);
 
4558
  __Pyx_DECREF(__pyx_v_cur_file_id);
 
4559
  __pyx_v_cur_file_id = __pyx_t_5;
 
4560
  __pyx_t_5 = 0;
 
4561
 
 
4562
  /* "bzrlib/_dirstate_helpers_pyx.pyx":671
 
4563
 *         cur_basename = self.get_next_str()
 
4564
 *         cur_file_id = self.get_next_str()
 
4565
 *         Py_INCREF(cur_basename); StaticTuple_SET_ITEM(tmp, 1, cur_basename)             # <<<<<<<<<<<<<<
 
4566
 *         Py_INCREF(cur_file_id); StaticTuple_SET_ITEM(tmp, 2, cur_file_id)
 
4567
 *         path_name_file_id_key = tmp
 
4568
 */
 
4569
  Py_INCREF(__pyx_v_cur_basename);
 
4570
  StaticTuple_SET_ITEM(__pyx_v_tmp, 1, __pyx_v_cur_basename);
 
4571
 
 
4572
  /* "bzrlib/_dirstate_helpers_pyx.pyx":672
 
4573
 *         cur_file_id = self.get_next_str()
 
4574
 *         Py_INCREF(cur_basename); StaticTuple_SET_ITEM(tmp, 1, cur_basename)
 
4575
 *         Py_INCREF(cur_file_id); StaticTuple_SET_ITEM(tmp, 2, cur_file_id)             # <<<<<<<<<<<<<<
 
4576
 *         path_name_file_id_key = tmp
 
4577
 * 
 
4578
 */
 
4579
  Py_INCREF(__pyx_v_cur_file_id);
 
4580
  StaticTuple_SET_ITEM(__pyx_v_tmp, 2, __pyx_v_cur_file_id);
 
4581
 
 
4582
  /* "bzrlib/_dirstate_helpers_pyx.pyx":673
 
4583
 *         Py_INCREF(cur_basename); StaticTuple_SET_ITEM(tmp, 1, cur_basename)
 
4584
 *         Py_INCREF(cur_file_id); StaticTuple_SET_ITEM(tmp, 2, cur_file_id)
 
4585
 *         path_name_file_id_key = tmp             # <<<<<<<<<<<<<<
 
4586
 * 
 
4587
 *         # Parse all of the per-tree information. current has the information in
 
4588
 */
 
4589
  __Pyx_INCREF(((PyObject *)__pyx_v_tmp));
 
4590
  __Pyx_DECREF(((PyObject *)__pyx_v_path_name_file_id_key));
 
4591
  __pyx_v_path_name_file_id_key = __pyx_v_tmp;
 
4592
 
 
4593
  /* "bzrlib/_dirstate_helpers_pyx.pyx":688
 
4594
 *         #       Especially since this code is pretty much fixed at a max of
 
4595
 *         #       4GB.
 
4596
 *         trees = []             # <<<<<<<<<<<<<<
 
4597
 *         for i from 0 <= i < num_trees:
 
4598
 *             minikind = self.get_next_str()
 
4599
 */
 
4600
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4601
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
 
4602
  __Pyx_DECREF(((PyObject *)__pyx_v_trees));
 
4603
  __pyx_v_trees = __pyx_t_5;
 
4604
  __pyx_t_5 = 0;
 
4605
 
 
4606
  /* "bzrlib/_dirstate_helpers_pyx.pyx":689
 
4607
 *         #       4GB.
 
4608
 *         trees = []
 
4609
 *         for i from 0 <= i < num_trees:             # <<<<<<<<<<<<<<
 
4610
 *             minikind = self.get_next_str()
 
4611
 *             fingerprint = self.get_next_str()
 
4612
 */
 
4613
  __pyx_t_7 = __pyx_v_num_trees;
 
4614
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {
 
4615
 
 
4616
    /* "bzrlib/_dirstate_helpers_pyx.pyx":690
 
4617
 *         trees = []
 
4618
 *         for i from 0 <= i < num_trees:
 
4619
 *             minikind = self.get_next_str()             # <<<<<<<<<<<<<<
 
4620
 *             fingerprint = self.get_next_str()
 
4621
 *             entry_size_cstr = self.get_next(&cur_size)
 
4622
 */
 
4623
    __pyx_t_5 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4624
    __Pyx_GOTREF(__pyx_t_5);
 
4625
    __Pyx_DECREF(__pyx_v_minikind);
 
4626
    __pyx_v_minikind = __pyx_t_5;
 
4627
    __pyx_t_5 = 0;
 
4628
 
 
4629
    /* "bzrlib/_dirstate_helpers_pyx.pyx":691
 
4630
 *         for i from 0 <= i < num_trees:
 
4631
 *             minikind = self.get_next_str()
 
4632
 *             fingerprint = self.get_next_str()             # <<<<<<<<<<<<<<
 
4633
 *             entry_size_cstr = self.get_next(&cur_size)
 
4634
 *             entry_size = strtoul(entry_size_cstr, NULL, 10)
 
4635
 */
 
4636
    __pyx_t_5 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4637
    __Pyx_GOTREF(__pyx_t_5);
 
4638
    __Pyx_DECREF(__pyx_v_fingerprint);
 
4639
    __pyx_v_fingerprint = __pyx_t_5;
 
4640
    __pyx_t_5 = 0;
 
4641
 
 
4642
    /* "bzrlib/_dirstate_helpers_pyx.pyx":692
 
4643
 *             minikind = self.get_next_str()
 
4644
 *             fingerprint = self.get_next_str()
 
4645
 *             entry_size_cstr = self.get_next(&cur_size)             # <<<<<<<<<<<<<<
 
4646
 *             entry_size = strtoul(entry_size_cstr, NULL, 10)
 
4647
 *             executable_cstr = self.get_next(&cur_size)
 
4648
 */
 
4649
    __pyx_t_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next(__pyx_v_self, (&__pyx_v_cur_size)); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4650
    __pyx_v_entry_size_cstr = __pyx_t_1;
 
4651
 
 
4652
    /* "bzrlib/_dirstate_helpers_pyx.pyx":693
 
4653
 *             fingerprint = self.get_next_str()
 
4654
 *             entry_size_cstr = self.get_next(&cur_size)
 
4655
 *             entry_size = strtoul(entry_size_cstr, NULL, 10)             # <<<<<<<<<<<<<<
 
4656
 *             executable_cstr = self.get_next(&cur_size)
 
4657
 *             is_executable = (executable_cstr[0] == c'y')
 
4658
 */
 
4659
    __pyx_v_entry_size = strtoul(__pyx_v_entry_size_cstr, NULL, 10);
 
4660
 
 
4661
    /* "bzrlib/_dirstate_helpers_pyx.pyx":694
 
4662
 *             entry_size_cstr = self.get_next(&cur_size)
 
4663
 *             entry_size = strtoul(entry_size_cstr, NULL, 10)
 
4664
 *             executable_cstr = self.get_next(&cur_size)             # <<<<<<<<<<<<<<
 
4665
 *             is_executable = (executable_cstr[0] == c'y')
 
4666
 *             info = self.get_next_str()
 
4667
 */
 
4668
    __pyx_t_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next(__pyx_v_self, (&__pyx_v_cur_size)); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4669
    __pyx_v_executable_cstr = __pyx_t_1;
 
4670
 
 
4671
    /* "bzrlib/_dirstate_helpers_pyx.pyx":695
 
4672
 *             entry_size = strtoul(entry_size_cstr, NULL, 10)
 
4673
 *             executable_cstr = self.get_next(&cur_size)
 
4674
 *             is_executable = (executable_cstr[0] == c'y')             # <<<<<<<<<<<<<<
 
4675
 *             info = self.get_next_str()
 
4676
 *             # TODO: If we want to use StaticTuple_New here we need to be pretty
 
4677
 */
 
4678
    __pyx_v_is_executable = ((__pyx_v_executable_cstr[0]) == 'y');
 
4679
 
 
4680
    /* "bzrlib/_dirstate_helpers_pyx.pyx":696
 
4681
 *             executable_cstr = self.get_next(&cur_size)
 
4682
 *             is_executable = (executable_cstr[0] == c'y')
 
4683
 *             info = self.get_next_str()             # <<<<<<<<<<<<<<
 
4684
 *             # TODO: If we want to use StaticTuple_New here we need to be pretty
 
4685
 *             #       careful. We are relying on a bit of Pyrex
 
4686
 */
 
4687
    __pyx_t_5 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next_str(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4688
    __Pyx_GOTREF(__pyx_t_5);
 
4689
    __Pyx_DECREF(__pyx_v_info);
 
4690
    __pyx_v_info = __pyx_t_5;
 
4691
    __pyx_t_5 = 0;
 
4692
 
 
4693
    /* "bzrlib/_dirstate_helpers_pyx.pyx":713
 
4694
 *                 minikind,     # minikind
 
4695
 *                 fingerprint,  # fingerprint
 
4696
 *                 entry_size,   # size             # <<<<<<<<<<<<<<
 
4697
 *                 is_executable,# executable
 
4698
 *                 info,         # packed_stat or revision_id
 
4699
 */
 
4700
    __pyx_t_5 = PyLong_FromUnsignedLong(__pyx_v_entry_size); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4701
    __Pyx_GOTREF(__pyx_t_5);
 
4702
 
 
4703
    /* "bzrlib/_dirstate_helpers_pyx.pyx":714
 
4704
 *                 fingerprint,  # fingerprint
 
4705
 *                 entry_size,   # size
 
4706
 *                 is_executable,# executable             # <<<<<<<<<<<<<<
 
4707
 *                 info,         # packed_stat or revision_id
 
4708
 *             ))
 
4709
 */
 
4710
    __pyx_t_8 = PyInt_FromLong(__pyx_v_is_executable); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4711
    __Pyx_GOTREF(__pyx_t_8);
 
4712
 
 
4713
    /* "bzrlib/_dirstate_helpers_pyx.pyx":715
 
4714
 *                 entry_size,   # size
 
4715
 *                 is_executable,# executable
 
4716
 *                 info,         # packed_stat or revision_id             # <<<<<<<<<<<<<<
 
4717
 *             ))
 
4718
 * 
 
4719
 */
 
4720
    __pyx_t_9 = PyTuple_New(5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4721
    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
4722
    __Pyx_INCREF(__pyx_v_minikind);
 
4723
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_minikind);
 
4724
    __Pyx_GIVEREF(__pyx_v_minikind);
 
4725
    __Pyx_INCREF(__pyx_v_fingerprint);
 
4726
    PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_fingerprint);
 
4727
    __Pyx_GIVEREF(__pyx_v_fingerprint);
 
4728
    PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_5);
 
4729
    __Pyx_GIVEREF(__pyx_t_5);
 
4730
    PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_8);
 
4731
    __Pyx_GIVEREF(__pyx_t_8);
 
4732
    __Pyx_INCREF(__pyx_v_info);
 
4733
    PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_v_info);
 
4734
    __Pyx_GIVEREF(__pyx_v_info);
 
4735
    __pyx_t_5 = 0;
 
4736
    __pyx_t_8 = 0;
 
4737
    __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6bzrlib_15_static_tuple_c_StaticTuple)), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4738
    __Pyx_GOTREF(__pyx_t_8);
 
4739
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
4740
    __pyx_t_10 = PyList_Append(((PyObject *)__pyx_v_trees), __pyx_t_8); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4741
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
4742
  }
 
4743
 
 
4744
  /* "bzrlib/_dirstate_helpers_pyx.pyx":719
 
4745
 * 
 
4746
 *         # The returned tuple is (key, [trees])
 
4747
 *         ret = (path_name_file_id_key, trees)             # <<<<<<<<<<<<<<
 
4748
 *         # Ignore the trailing newline, but assert that it does exist, this
 
4749
 *         # ensures that we always finish parsing a line on an end-of-entry
 
4750
 */
 
4751
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4752
  __Pyx_GOTREF(((PyObject *)__pyx_t_8));
 
4753
  __Pyx_INCREF(((PyObject *)__pyx_v_path_name_file_id_key));
 
4754
  PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_path_name_file_id_key));
 
4755
  __Pyx_GIVEREF(((PyObject *)__pyx_v_path_name_file_id_key));
 
4756
  __Pyx_INCREF(((PyObject *)__pyx_v_trees));
 
4757
  PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_v_trees));
 
4758
  __Pyx_GIVEREF(((PyObject *)__pyx_v_trees));
 
4759
  __Pyx_DECREF(((PyObject *)__pyx_v_ret));
 
4760
  __pyx_v_ret = __pyx_t_8;
 
4761
  __pyx_t_8 = 0;
 
4762
 
 
4763
  /* "bzrlib/_dirstate_helpers_pyx.pyx":723
 
4764
 *         # ensures that we always finish parsing a line on an end-of-entry
 
4765
 *         # marker.
 
4766
 *         trailing = self.get_next(&cur_size)             # <<<<<<<<<<<<<<
 
4767
 *         if cur_size != 1 or trailing[0] != c'\n':
 
4768
 *             raise errors.DirstateCorrupt(self.state,
 
4769
 */
 
4770
  __pyx_t_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self->__pyx_vtab)->get_next(__pyx_v_self, (&__pyx_v_cur_size)); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4771
  __pyx_v_trailing = __pyx_t_1;
 
4772
 
 
4773
  /* "bzrlib/_dirstate_helpers_pyx.pyx":724
 
4774
 *         # marker.
 
4775
 *         trailing = self.get_next(&cur_size)
 
4776
 *         if cur_size != 1 or trailing[0] != c'\n':             # <<<<<<<<<<<<<<
 
4777
 *             raise errors.DirstateCorrupt(self.state,
 
4778
 *                 'Bad parse, we expected to end on \\n, not: %d %s: %s'
 
4779
 */
 
4780
  __pyx_t_4 = (__pyx_v_cur_size != 1);
 
4781
  if (!__pyx_t_4) {
 
4782
    __pyx_t_2 = ((__pyx_v_trailing[0]) != '\n');
 
4783
    __pyx_t_3 = __pyx_t_2;
 
4784
  } else {
 
4785
    __pyx_t_3 = __pyx_t_4;
 
4786
  }
 
4787
  if (__pyx_t_3) {
 
4788
 
 
4789
    /* "bzrlib/_dirstate_helpers_pyx.pyx":725
 
4790
 *         trailing = self.get_next(&cur_size)
 
4791
 *         if cur_size != 1 or trailing[0] != c'\n':
 
4792
 *             raise errors.DirstateCorrupt(self.state,             # <<<<<<<<<<<<<<
 
4793
 *                 'Bad parse, we expected to end on \\n, not: %d %s: %s'
 
4794
 *                 % (cur_size, safe_string_from_size(trailing, cur_size),
 
4795
 */
 
4796
    __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__errors); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4797
    __Pyx_GOTREF(__pyx_t_8);
 
4798
    __pyx_t_9 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__DirstateCorrupt); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4799
    __Pyx_GOTREF(__pyx_t_9);
 
4800
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 
4801
 
 
4802
    /* "bzrlib/_dirstate_helpers_pyx.pyx":727
 
4803
 *             raise errors.DirstateCorrupt(self.state,
 
4804
 *                 'Bad parse, we expected to end on \\n, not: %d %s: %s'
 
4805
 *                 % (cur_size, safe_string_from_size(trailing, cur_size),             # <<<<<<<<<<<<<<
 
4806
 *                    ret))
 
4807
 *         return ret
 
4808
 */
 
4809
    __pyx_t_8 = PyInt_FromLong(__pyx_v_cur_size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4810
    __Pyx_GOTREF(__pyx_t_8);
 
4811
    __pyx_t_5 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx_safe_string_from_size(__pyx_v_trailing, __pyx_v_cur_size); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4812
    __Pyx_GOTREF(__pyx_t_5);
 
4813
 
 
4814
    /* "bzrlib/_dirstate_helpers_pyx.pyx":728
 
4815
 *                 'Bad parse, we expected to end on \\n, not: %d %s: %s'
 
4816
 *                 % (cur_size, safe_string_from_size(trailing, cur_size),
 
4817
 *                    ret))             # <<<<<<<<<<<<<<
 
4818
 *         return ret
 
4819
 * 
 
4820
 */
 
4821
    __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4822
    __Pyx_GOTREF(((PyObject *)__pyx_t_11));
 
4823
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8);
 
4824
    __Pyx_GIVEREF(__pyx_t_8);
 
4825
    PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_5);
 
4826
    __Pyx_GIVEREF(__pyx_t_5);
 
4827
    __Pyx_INCREF(((PyObject *)__pyx_v_ret));
 
4828
    PyTuple_SET_ITEM(__pyx_t_11, 2, ((PyObject *)__pyx_v_ret));
 
4829
    __Pyx_GIVEREF(((PyObject *)__pyx_v_ret));
 
4830
    __pyx_t_8 = 0;
 
4831
    __pyx_t_5 = 0;
 
4832
    __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_16), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4833
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
 
4834
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
 
4835
    __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4836
    __Pyx_GOTREF(((PyObject *)__pyx_t_11));
 
4837
    __Pyx_INCREF(__pyx_v_self->state);
 
4838
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_self->state);
 
4839
    __Pyx_GIVEREF(__pyx_v_self->state);
 
4840
    PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_t_5));
 
4841
    __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
 
4842
    __pyx_t_5 = 0;
 
4843
    __pyx_t_5 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4844
    __Pyx_GOTREF(__pyx_t_5);
 
4845
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
4846
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
 
4847
    __Pyx_Raise(__pyx_t_5, 0, 0);
 
4848
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
4849
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4850
    goto __pyx_L6;
 
4851
  }
 
4852
  __pyx_L6:;
 
4853
 
 
4854
  /* "bzrlib/_dirstate_helpers_pyx.pyx":729
 
4855
 *                 % (cur_size, safe_string_from_size(trailing, cur_size),
 
4856
 *                    ret))
 
4857
 *         return ret             # <<<<<<<<<<<<<<
 
4858
 * 
 
4859
 *     def _parse_dirblocks(self):
 
4860
 */
 
4861
  __Pyx_XDECREF(__pyx_r);
 
4862
  __Pyx_INCREF(((PyObject *)__pyx_v_ret));
 
4863
  __pyx_r = ((PyObject *)__pyx_v_ret);
 
4864
  goto __pyx_L0;
 
4865
 
 
4866
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
4867
  goto __pyx_L0;
 
4868
  __pyx_L1_error:;
 
4869
  __Pyx_XDECREF(__pyx_t_5);
 
4870
  __Pyx_XDECREF(__pyx_t_8);
 
4871
  __Pyx_XDECREF(__pyx_t_9);
 
4872
  __Pyx_XDECREF(__pyx_t_11);
 
4873
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.Reader._get_entry");
 
4874
  __pyx_r = 0;
 
4875
  __pyx_L0:;
 
4876
  __Pyx_DECREF((PyObject *)__pyx_v_path_name_file_id_key);
 
4877
  __Pyx_DECREF((PyObject *)__pyx_v_tmp);
 
4878
  __Pyx_DECREF(__pyx_v_minikind);
 
4879
  __Pyx_DECREF(__pyx_v_fingerprint);
 
4880
  __Pyx_DECREF(__pyx_v_info);
 
4881
  __Pyx_DECREF(__pyx_v_dirname);
 
4882
  __Pyx_DECREF(__pyx_v_cur_dirname);
 
4883
  __Pyx_DECREF(__pyx_v_cur_basename);
 
4884
  __Pyx_DECREF(__pyx_v_cur_file_id);
 
4885
  __Pyx_DECREF(__pyx_v_trees);
 
4886
  __Pyx_DECREF(__pyx_v_ret);
 
4887
  __Pyx_XGIVEREF(__pyx_r);
 
4888
  __Pyx_RefNannyFinishContext();
 
4889
  return __pyx_r;
 
4890
}
 
4891
 
 
4892
/* "bzrlib/_dirstate_helpers_pyx.pyx":731
 
4893
 *         return ret
 
4894
 * 
 
4895
 *     def _parse_dirblocks(self):             # <<<<<<<<<<<<<<
 
4896
 *         """Parse all dirblocks in the state file."""
 
4897
 *         cdef int num_trees
 
4898
 */
 
4899
 
 
4900
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_6Reader_1_parse_dirblocks(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
 
4901
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_6Reader_1_parse_dirblocks[] = "Parse all dirblocks in the state file.";
 
4902
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_6Reader_1_parse_dirblocks(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
 
4903
  int __pyx_v_num_trees;
 
4904
  PyObject *__pyx_v_current_block;
 
4905
  PyObject *__pyx_v_entry;
 
4906
  void *__pyx_v_current_dirname;
 
4907
  int __pyx_v_new_block;
 
4908
  int __pyx_v_expected_entry_count;
 
4909
  int __pyx_v_entry_count;
 
4910
  PyObject *__pyx_v_dirblocks;
 
4911
  PyObject *__pyx_v_obj;
 
4912
  PyObject *__pyx_r = NULL;
 
4913
  PyObject *__pyx_t_1 = NULL;
 
4914
  PyObject *__pyx_t_2 = NULL;
 
4915
  int __pyx_t_3;
 
4916
  PyObject *__pyx_t_4 = NULL;
 
4917
  int __pyx_t_5;
 
4918
  PyObject *__pyx_t_6 = NULL;
 
4919
  __Pyx_RefNannySetupContext("_parse_dirblocks");
 
4920
  __pyx_v_current_block = Py_None; __Pyx_INCREF(Py_None);
 
4921
  __pyx_v_entry = Py_None; __Pyx_INCREF(Py_None);
 
4922
  __pyx_v_dirblocks = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
 
4923
  __pyx_v_obj = Py_None; __Pyx_INCREF(Py_None);
 
4924
 
 
4925
  /* "bzrlib/_dirstate_helpers_pyx.pyx":741
 
4926
 *         cdef int entry_count
 
4927
 * 
 
4928
 *         num_trees = self.state._num_present_parents() + 1             # <<<<<<<<<<<<<<
 
4929
 *         expected_entry_count = self.state._num_entries
 
4930
 * 
 
4931
 */
 
4932
  __pyx_t_1 = PyObject_GetAttr(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state, __pyx_n_s_17); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4933
  __Pyx_GOTREF(__pyx_t_1);
 
4934
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4935
  __Pyx_GOTREF(__pyx_t_2);
 
4936
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
4937
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4938
  __Pyx_GOTREF(__pyx_t_1);
 
4939
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
4940
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4941
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
4942
  __pyx_v_num_trees = __pyx_t_3;
 
4943
 
 
4944
  /* "bzrlib/_dirstate_helpers_pyx.pyx":742
 
4945
 * 
 
4946
 *         num_trees = self.state._num_present_parents() + 1
 
4947
 *         expected_entry_count = self.state._num_entries             # <<<<<<<<<<<<<<
 
4948
 * 
 
4949
 *         # Ignore the first record
 
4950
 */
 
4951
  __pyx_t_1 = PyObject_GetAttr(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state, __pyx_n_s___num_entries); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4952
  __Pyx_GOTREF(__pyx_t_1);
 
4953
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4954
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
4955
  __pyx_v_expected_entry_count = __pyx_t_3;
 
4956
 
 
4957
  /* "bzrlib/_dirstate_helpers_pyx.pyx":745
 
4958
 * 
 
4959
 *         # Ignore the first record
 
4960
 *         self._init()             # <<<<<<<<<<<<<<
 
4961
 * 
 
4962
 *         current_block = []
 
4963
 */
 
4964
  __pyx_t_3 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->__pyx_vtab)->_init(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4965
 
 
4966
  /* "bzrlib/_dirstate_helpers_pyx.pyx":747
 
4967
 *         self._init()
 
4968
 * 
 
4969
 *         current_block = []             # <<<<<<<<<<<<<<
 
4970
 *         dirblocks = [('', current_block), ('', [])]
 
4971
 *         self.state._dirblocks = dirblocks
 
4972
 */
 
4973
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4974
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
4975
  __Pyx_DECREF(__pyx_v_current_block);
 
4976
  __pyx_v_current_block = ((PyObject *)__pyx_t_1);
 
4977
  __pyx_t_1 = 0;
 
4978
 
 
4979
  /* "bzrlib/_dirstate_helpers_pyx.pyx":748
 
4980
 * 
 
4981
 *         current_block = []
 
4982
 *         dirblocks = [('', current_block), ('', [])]             # <<<<<<<<<<<<<<
 
4983
 *         self.state._dirblocks = dirblocks
 
4984
 *         obj = ''
 
4985
 */
 
4986
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4987
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
4988
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
 
4989
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_5));
 
4990
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
 
4991
  __Pyx_INCREF(__pyx_v_current_block);
 
4992
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_current_block);
 
4993
  __Pyx_GIVEREF(__pyx_v_current_block);
 
4994
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4995
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
4996
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
4997
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
 
4998
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
 
4999
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_s_5));
 
5000
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
 
5001
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_2));
 
5002
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
 
5003
  __pyx_t_2 = 0;
 
5004
  __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5005
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
5006
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
 
5007
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
 
5008
  PyList_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_t_4));
 
5009
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
 
5010
  __pyx_t_1 = 0;
 
5011
  __pyx_t_4 = 0;
 
5012
  __Pyx_DECREF(((PyObject *)__pyx_v_dirblocks));
 
5013
  __pyx_v_dirblocks = __pyx_t_2;
 
5014
  __pyx_t_2 = 0;
 
5015
 
 
5016
  /* "bzrlib/_dirstate_helpers_pyx.pyx":749
 
5017
 *         current_block = []
 
5018
 *         dirblocks = [('', current_block), ('', [])]
 
5019
 *         self.state._dirblocks = dirblocks             # <<<<<<<<<<<<<<
 
5020
 *         obj = ''
 
5021
 *         current_dirname = <void*>obj
 
5022
 */
 
5023
  if (PyObject_SetAttr(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state, __pyx_n_s___dirblocks, ((PyObject *)__pyx_v_dirblocks)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5024
 
 
5025
  /* "bzrlib/_dirstate_helpers_pyx.pyx":750
 
5026
 *         dirblocks = [('', current_block), ('', [])]
 
5027
 *         self.state._dirblocks = dirblocks
 
5028
 *         obj = ''             # <<<<<<<<<<<<<<
 
5029
 *         current_dirname = <void*>obj
 
5030
 *         new_block = 0
 
5031
 */
 
5032
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
 
5033
  __Pyx_DECREF(__pyx_v_obj);
 
5034
  __pyx_v_obj = ((PyObject *)__pyx_kp_s_5);
 
5035
 
 
5036
  /* "bzrlib/_dirstate_helpers_pyx.pyx":751
 
5037
 *         self.state._dirblocks = dirblocks
 
5038
 *         obj = ''
 
5039
 *         current_dirname = <void*>obj             # <<<<<<<<<<<<<<
 
5040
 *         new_block = 0
 
5041
 *         entry_count = 0
 
5042
 */
 
5043
  __pyx_v_current_dirname = ((void *)__pyx_v_obj);
 
5044
 
 
5045
  /* "bzrlib/_dirstate_helpers_pyx.pyx":752
 
5046
 *         obj = ''
 
5047
 *         current_dirname = <void*>obj
 
5048
 *         new_block = 0             # <<<<<<<<<<<<<<
 
5049
 *         entry_count = 0
 
5050
 * 
 
5051
 */
 
5052
  __pyx_v_new_block = 0;
 
5053
 
 
5054
  /* "bzrlib/_dirstate_helpers_pyx.pyx":753
 
5055
 *         current_dirname = <void*>obj
 
5056
 *         new_block = 0
 
5057
 *         entry_count = 0             # <<<<<<<<<<<<<<
 
5058
 * 
 
5059
 *         # TODO: jam 2007-05-07 Consider pre-allocating some space for the
 
5060
 */
 
5061
  __pyx_v_entry_count = 0;
 
5062
 
 
5063
  /* "bzrlib/_dirstate_helpers_pyx.pyx":762
 
5064
 *         #       so), and then truncate. That would give us a malloc + realloc,
 
5065
 *         #       rather than lots of reallocs.
 
5066
 *         while self.cur_cstr < self.end_cstr:             # <<<<<<<<<<<<<<
 
5067
 *             entry = self._get_entry(num_trees, &current_dirname, &new_block)
 
5068
 *             if new_block:
 
5069
 */
 
5070
  while (1) {
 
5071
    __pyx_t_5 = (((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->cur_cstr < ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->end_cstr);
 
5072
    if (!__pyx_t_5) break;
 
5073
 
 
5074
    /* "bzrlib/_dirstate_helpers_pyx.pyx":763
 
5075
 *         #       rather than lots of reallocs.
 
5076
 *         while self.cur_cstr < self.end_cstr:
 
5077
 *             entry = self._get_entry(num_trees, &current_dirname, &new_block)             # <<<<<<<<<<<<<<
 
5078
 *             if new_block:
 
5079
 *                 # new block - different dirname
 
5080
 */
 
5081
    __pyx_t_2 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader *)((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->__pyx_vtab)->_get_entry(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self), __pyx_v_num_trees, (&__pyx_v_current_dirname), (&__pyx_v_new_block)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5082
    __Pyx_GOTREF(__pyx_t_2);
 
5083
    __Pyx_DECREF(__pyx_v_entry);
 
5084
    __pyx_v_entry = __pyx_t_2;
 
5085
    __pyx_t_2 = 0;
 
5086
 
 
5087
    /* "bzrlib/_dirstate_helpers_pyx.pyx":764
 
5088
 *         while self.cur_cstr < self.end_cstr:
 
5089
 *             entry = self._get_entry(num_trees, &current_dirname, &new_block)
 
5090
 *             if new_block:             # <<<<<<<<<<<<<<
 
5091
 *                 # new block - different dirname
 
5092
 *                 current_block = []
 
5093
 */
 
5094
    if (__pyx_v_new_block) {
 
5095
 
 
5096
      /* "bzrlib/_dirstate_helpers_pyx.pyx":766
 
5097
 *             if new_block:
 
5098
 *                 # new block - different dirname
 
5099
 *                 current_block = []             # <<<<<<<<<<<<<<
 
5100
 *                 PyList_Append(dirblocks,
 
5101
 *                               (<object>current_dirname, current_block))
 
5102
 */
 
5103
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5104
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
5105
      __Pyx_DECREF(__pyx_v_current_block);
 
5106
      __pyx_v_current_block = ((PyObject *)__pyx_t_2);
 
5107
      __pyx_t_2 = 0;
 
5108
 
 
5109
      /* "bzrlib/_dirstate_helpers_pyx.pyx":768
 
5110
 *                 current_block = []
 
5111
 *                 PyList_Append(dirblocks,
 
5112
 *                               (<object>current_dirname, current_block))             # <<<<<<<<<<<<<<
 
5113
 *             PyList_Append(current_block, entry)
 
5114
 *             entry_count = entry_count + 1
 
5115
 */
 
5116
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5117
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
5118
      __Pyx_INCREF(((PyObject *)__pyx_v_current_dirname));
 
5119
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_current_dirname));
 
5120
      __Pyx_GIVEREF(((PyObject *)__pyx_v_current_dirname));
 
5121
      __Pyx_INCREF(__pyx_v_current_block);
 
5122
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_current_block);
 
5123
      __Pyx_GIVEREF(__pyx_v_current_block);
 
5124
      __pyx_t_3 = PyList_Append(((PyObject *)__pyx_v_dirblocks), ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5125
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
5126
      goto __pyx_L7;
 
5127
    }
 
5128
    __pyx_L7:;
 
5129
 
 
5130
    /* "bzrlib/_dirstate_helpers_pyx.pyx":769
 
5131
 *                 PyList_Append(dirblocks,
 
5132
 *                               (<object>current_dirname, current_block))
 
5133
 *             PyList_Append(current_block, entry)             # <<<<<<<<<<<<<<
 
5134
 *             entry_count = entry_count + 1
 
5135
 *         if entry_count != expected_entry_count:
 
5136
 */
 
5137
    __pyx_t_3 = PyList_Append(__pyx_v_current_block, __pyx_v_entry); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5138
 
 
5139
    /* "bzrlib/_dirstate_helpers_pyx.pyx":770
 
5140
 *                               (<object>current_dirname, current_block))
 
5141
 *             PyList_Append(current_block, entry)
 
5142
 *             entry_count = entry_count + 1             # <<<<<<<<<<<<<<
 
5143
 *         if entry_count != expected_entry_count:
 
5144
 *             raise errors.DirstateCorrupt(self.state,
 
5145
 */
 
5146
    __pyx_v_entry_count = (__pyx_v_entry_count + 1);
 
5147
  }
 
5148
 
 
5149
  /* "bzrlib/_dirstate_helpers_pyx.pyx":771
 
5150
 *             PyList_Append(current_block, entry)
 
5151
 *             entry_count = entry_count + 1
 
5152
 *         if entry_count != expected_entry_count:             # <<<<<<<<<<<<<<
 
5153
 *             raise errors.DirstateCorrupt(self.state,
 
5154
 *                     'We read the wrong number of entries.'
 
5155
 */
 
5156
  __pyx_t_5 = (__pyx_v_entry_count != __pyx_v_expected_entry_count);
 
5157
  if (__pyx_t_5) {
 
5158
 
 
5159
    /* "bzrlib/_dirstate_helpers_pyx.pyx":772
 
5160
 *             entry_count = entry_count + 1
 
5161
 *         if entry_count != expected_entry_count:
 
5162
 *             raise errors.DirstateCorrupt(self.state,             # <<<<<<<<<<<<<<
 
5163
 *                     'We read the wrong number of entries.'
 
5164
 *                     ' We expected to read %s, but read %s'
 
5165
 */
 
5166
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__errors); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5167
    __Pyx_GOTREF(__pyx_t_2);
 
5168
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__DirstateCorrupt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5169
    __Pyx_GOTREF(__pyx_t_4);
 
5170
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
5171
 
 
5172
    /* "bzrlib/_dirstate_helpers_pyx.pyx":775
 
5173
 *                     'We read the wrong number of entries.'
 
5174
 *                     ' We expected to read %s, but read %s'
 
5175
 *                     % (expected_entry_count, entry_count))             # <<<<<<<<<<<<<<
 
5176
 *         self.state._split_root_dirblock_into_contents()
 
5177
 * 
 
5178
 */
 
5179
    __pyx_t_2 = PyInt_FromLong(__pyx_v_expected_entry_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5180
    __Pyx_GOTREF(__pyx_t_2);
 
5181
    __pyx_t_1 = PyInt_FromLong(__pyx_v_entry_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5182
    __Pyx_GOTREF(__pyx_t_1);
 
5183
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5184
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
5185
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
 
5186
    __Pyx_GIVEREF(__pyx_t_2);
 
5187
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
 
5188
    __Pyx_GIVEREF(__pyx_t_1);
 
5189
    __pyx_t_2 = 0;
 
5190
    __pyx_t_1 = 0;
 
5191
    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_18), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5192
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
5193
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
5194
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5195
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
5196
    __Pyx_INCREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state);
 
5197
    PyTuple_SET_ITEM(__pyx_t_6, 0, ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state);
 
5198
    __Pyx_GIVEREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state);
 
5199
    PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_t_1));
 
5200
    __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
 
5201
    __pyx_t_1 = 0;
 
5202
    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5203
    __Pyx_GOTREF(__pyx_t_1);
 
5204
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
5205
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
5206
    __Pyx_Raise(__pyx_t_1, 0, 0);
 
5207
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5208
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5209
    goto __pyx_L8;
 
5210
  }
 
5211
  __pyx_L8:;
 
5212
 
 
5213
  /* "bzrlib/_dirstate_helpers_pyx.pyx":776
 
5214
 *                     ' We expected to read %s, but read %s'
 
5215
 *                     % (expected_entry_count, entry_count))
 
5216
 *         self.state._split_root_dirblock_into_contents()             # <<<<<<<<<<<<<<
 
5217
 * 
 
5218
 * 
 
5219
 */
 
5220
  __pyx_t_1 = PyObject_GetAttr(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_v_self)->state, __pyx_n_s_19); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5221
  __Pyx_GOTREF(__pyx_t_1);
 
5222
  __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5223
  __Pyx_GOTREF(__pyx_t_6);
 
5224
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5225
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
5226
 
 
5227
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
5228
  goto __pyx_L0;
 
5229
  __pyx_L1_error:;
 
5230
  __Pyx_XDECREF(__pyx_t_1);
 
5231
  __Pyx_XDECREF(__pyx_t_2);
 
5232
  __Pyx_XDECREF(__pyx_t_4);
 
5233
  __Pyx_XDECREF(__pyx_t_6);
 
5234
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.Reader._parse_dirblocks");
 
5235
  __pyx_r = NULL;
 
5236
  __pyx_L0:;
 
5237
  __Pyx_DECREF(__pyx_v_current_block);
 
5238
  __Pyx_DECREF(__pyx_v_entry);
 
5239
  __Pyx_DECREF(__pyx_v_dirblocks);
 
5240
  __Pyx_DECREF(__pyx_v_obj);
 
5241
  __Pyx_XGIVEREF(__pyx_r);
 
5242
  __Pyx_RefNannyFinishContext();
 
5243
  return __pyx_r;
 
5244
}
 
5245
 
 
5246
/* "bzrlib/_dirstate_helpers_pyx.pyx":779
 
5247
 * 
 
5248
 * 
 
5249
 * def _read_dirblocks(state):             # <<<<<<<<<<<<<<
 
5250
 *     """Read in the dirblocks for the given DirState object.
 
5251
 * 
 
5252
 */
 
5253
 
 
5254
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_6_read_dirblocks(PyObject *__pyx_self, PyObject *__pyx_v_state); /*proto*/
 
5255
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_6_read_dirblocks[] = "Read in the dirblocks for the given DirState object.\n\n    This is tightly bound to the DirState internal representation. It should be\n    thought of as a member function, which is only separated out so that we can\n    re-write it in pyrex.\n\n    :param state: A DirState object.\n    :return: None\n    :postcondition: The dirblocks will be loaded into the appropriate fields in\n        the DirState object.\n    ";
 
5256
static PyMethodDef __pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_6_read_dirblocks = {__Pyx_NAMESTR("_read_dirblocks"), (PyCFunction)__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_6_read_dirblocks, METH_O, __Pyx_DOCSTR(__pyx_doc_6bzrlib_21_dirstate_helpers_pyx_6_read_dirblocks)};
 
5257
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_6_read_dirblocks(PyObject *__pyx_self, PyObject *__pyx_v_state) {
 
5258
  PyObject *__pyx_v_text;
 
5259
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *__pyx_v_reader;
 
5260
  PyObject *__pyx_r = NULL;
 
5261
  PyObject *__pyx_t_1 = NULL;
 
5262
  PyObject *__pyx_t_2 = NULL;
 
5263
  PyObject *__pyx_t_3 = NULL;
 
5264
  __Pyx_RefNannySetupContext("_read_dirblocks");
 
5265
  __pyx_self = __pyx_self;
 
5266
  __pyx_v_text = Py_None; __Pyx_INCREF(Py_None);
 
5267
  __pyx_v_reader = ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)Py_None); __Pyx_INCREF(Py_None);
 
5268
 
 
5269
  /* "bzrlib/_dirstate_helpers_pyx.pyx":791
 
5270
 *         the DirState object.
 
5271
 *     """
 
5272
 *     state._state_file.seek(state._end_of_header)             # <<<<<<<<<<<<<<
 
5273
 *     text = state._state_file.read()
 
5274
 *     # TODO: check the crc checksums. crc_measured = zlib.crc32(text)
 
5275
 */
 
5276
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_state, __pyx_n_s___state_file); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5277
  __Pyx_GOTREF(__pyx_t_1);
 
5278
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__seek); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5279
  __Pyx_GOTREF(__pyx_t_2);
 
5280
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5281
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_state, __pyx_n_s___end_of_header); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5282
  __Pyx_GOTREF(__pyx_t_1);
 
5283
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5284
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
5285
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
 
5286
  __Pyx_GIVEREF(__pyx_t_1);
 
5287
  __pyx_t_1 = 0;
 
5288
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5289
  __Pyx_GOTREF(__pyx_t_1);
 
5290
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
5291
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
5292
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5293
 
 
5294
  /* "bzrlib/_dirstate_helpers_pyx.pyx":792
 
5295
 *     """
 
5296
 *     state._state_file.seek(state._end_of_header)
 
5297
 *     text = state._state_file.read()             # <<<<<<<<<<<<<<
 
5298
 *     # TODO: check the crc checksums. crc_measured = zlib.crc32(text)
 
5299
 * 
 
5300
 */
 
5301
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_state, __pyx_n_s___state_file); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5302
  __Pyx_GOTREF(__pyx_t_1);
 
5303
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__read); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5304
  __Pyx_GOTREF(__pyx_t_3);
 
5305
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5306
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5307
  __Pyx_GOTREF(__pyx_t_1);
 
5308
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
5309
  __Pyx_DECREF(__pyx_v_text);
 
5310
  __pyx_v_text = __pyx_t_1;
 
5311
  __pyx_t_1 = 0;
 
5312
 
 
5313
  /* "bzrlib/_dirstate_helpers_pyx.pyx":795
 
5314
 *     # TODO: check the crc checksums. crc_measured = zlib.crc32(text)
 
5315
 * 
 
5316
 *     reader = Reader(text, state)             # <<<<<<<<<<<<<<
 
5317
 * 
 
5318
 *     reader._parse_dirblocks()
 
5319
 */
 
5320
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5321
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
5322
  __Pyx_INCREF(__pyx_v_text);
 
5323
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_text);
 
5324
  __Pyx_GIVEREF(__pyx_v_text);
 
5325
  __Pyx_INCREF(__pyx_v_state);
 
5326
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_state);
 
5327
  __Pyx_GIVEREF(__pyx_v_state);
 
5328
  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6bzrlib_21_dirstate_helpers_pyx_Reader)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5329
  __Pyx_GOTREF(__pyx_t_3);
 
5330
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
5331
  __Pyx_DECREF(((PyObject *)__pyx_v_reader));
 
5332
  __pyx_v_reader = ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)__pyx_t_3);
 
5333
  __pyx_t_3 = 0;
 
5334
 
 
5335
  /* "bzrlib/_dirstate_helpers_pyx.pyx":797
 
5336
 *     reader = Reader(text, state)
 
5337
 * 
 
5338
 *     reader._parse_dirblocks()             # <<<<<<<<<<<<<<
 
5339
 *     state._dirblock_state = DirState.IN_MEMORY_UNMODIFIED
 
5340
 * 
 
5341
 */
 
5342
  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_reader), __pyx_n_s___parse_dirblocks); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5343
  __Pyx_GOTREF(__pyx_t_3);
 
5344
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5345
  __Pyx_GOTREF(__pyx_t_1);
 
5346
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
5347
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5348
 
 
5349
  /* "bzrlib/_dirstate_helpers_pyx.pyx":798
 
5350
 * 
 
5351
 *     reader._parse_dirblocks()
 
5352
 *     state._dirblock_state = DirState.IN_MEMORY_UNMODIFIED             # <<<<<<<<<<<<<<
 
5353
 * 
 
5354
 * 
 
5355
 */
 
5356
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DirState); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5357
  __Pyx_GOTREF(__pyx_t_1);
 
5358
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s_20); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5359
  __Pyx_GOTREF(__pyx_t_3);
 
5360
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5361
  if (PyObject_SetAttr(__pyx_v_state, __pyx_n_s___dirblock_state, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5362
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
5363
 
 
5364
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
5365
  goto __pyx_L0;
 
5366
  __pyx_L1_error:;
 
5367
  __Pyx_XDECREF(__pyx_t_1);
 
5368
  __Pyx_XDECREF(__pyx_t_2);
 
5369
  __Pyx_XDECREF(__pyx_t_3);
 
5370
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._read_dirblocks");
 
5371
  __pyx_r = NULL;
 
5372
  __pyx_L0:;
 
5373
  __Pyx_DECREF(__pyx_v_text);
 
5374
  __Pyx_DECREF((PyObject *)__pyx_v_reader);
 
5375
  __Pyx_XGIVEREF(__pyx_r);
 
5376
  __Pyx_RefNannyFinishContext();
 
5377
  return __pyx_r;
 
5378
}
 
5379
 
 
5380
/* "bzrlib/_dirstate_helpers_pyx.pyx":801
 
5381
 * 
 
5382
 * 
 
5383
 * cdef int minikind_from_mode(int mode): # cannot_raise             # <<<<<<<<<<<<<<
 
5384
 *     # in order of frequency:
 
5385
 *     if S_ISREG(mode):
 
5386
 */
 
5387
 
 
5388
static  int __pyx_f_6bzrlib_21_dirstate_helpers_pyx_minikind_from_mode(int __pyx_v_mode) {
 
5389
  int __pyx_r;
 
5390
  int __pyx_t_1;
 
5391
  __Pyx_RefNannySetupContext("minikind_from_mode");
 
5392
 
 
5393
  /* "bzrlib/_dirstate_helpers_pyx.pyx":803
 
5394
 * cdef int minikind_from_mode(int mode): # cannot_raise
 
5395
 *     # in order of frequency:
 
5396
 *     if S_ISREG(mode):             # <<<<<<<<<<<<<<
 
5397
 *         return c"f"
 
5398
 *     if S_ISDIR(mode):
 
5399
 */
 
5400
  __pyx_t_1 = S_ISREG(__pyx_v_mode);
 
5401
  if (__pyx_t_1) {
 
5402
 
 
5403
    /* "bzrlib/_dirstate_helpers_pyx.pyx":804
 
5404
 *     # in order of frequency:
 
5405
 *     if S_ISREG(mode):
 
5406
 *         return c"f"             # <<<<<<<<<<<<<<
 
5407
 *     if S_ISDIR(mode):
 
5408
 *         return c"d"
 
5409
 */
 
5410
    __pyx_r = 'f';
 
5411
    goto __pyx_L0;
 
5412
    goto __pyx_L3;
 
5413
  }
 
5414
  __pyx_L3:;
 
5415
 
 
5416
  /* "bzrlib/_dirstate_helpers_pyx.pyx":805
 
5417
 *     if S_ISREG(mode):
 
5418
 *         return c"f"
 
5419
 *     if S_ISDIR(mode):             # <<<<<<<<<<<<<<
 
5420
 *         return c"d"
 
5421
 *     if S_ISLNK(mode):
 
5422
 */
 
5423
  __pyx_t_1 = S_ISDIR(__pyx_v_mode);
 
5424
  if (__pyx_t_1) {
 
5425
 
 
5426
    /* "bzrlib/_dirstate_helpers_pyx.pyx":806
 
5427
 *         return c"f"
 
5428
 *     if S_ISDIR(mode):
 
5429
 *         return c"d"             # <<<<<<<<<<<<<<
 
5430
 *     if S_ISLNK(mode):
 
5431
 *         return c"l"
 
5432
 */
 
5433
    __pyx_r = 'd';
 
5434
    goto __pyx_L0;
 
5435
    goto __pyx_L4;
 
5436
  }
 
5437
  __pyx_L4:;
 
5438
 
 
5439
  /* "bzrlib/_dirstate_helpers_pyx.pyx":807
 
5440
 *     if S_ISDIR(mode):
 
5441
 *         return c"d"
 
5442
 *     if S_ISLNK(mode):             # <<<<<<<<<<<<<<
 
5443
 *         return c"l"
 
5444
 *     return 0
 
5445
 */
 
5446
  __pyx_t_1 = S_ISLNK(__pyx_v_mode);
 
5447
  if (__pyx_t_1) {
 
5448
 
 
5449
    /* "bzrlib/_dirstate_helpers_pyx.pyx":808
 
5450
 *         return c"d"
 
5451
 *     if S_ISLNK(mode):
 
5452
 *         return c"l"             # <<<<<<<<<<<<<<
 
5453
 *     return 0
 
5454
 * 
 
5455
 */
 
5456
    __pyx_r = 'l';
 
5457
    goto __pyx_L0;
 
5458
    goto __pyx_L5;
 
5459
  }
 
5460
  __pyx_L5:;
 
5461
 
 
5462
  /* "bzrlib/_dirstate_helpers_pyx.pyx":809
 
5463
 *     if S_ISLNK(mode):
 
5464
 *         return c"l"
 
5465
 *     return 0             # <<<<<<<<<<<<<<
 
5466
 * 
 
5467
 * 
 
5468
 */
 
5469
  __pyx_r = 0;
 
5470
  goto __pyx_L0;
 
5471
 
 
5472
  __pyx_r = 0;
 
5473
  __pyx_L0:;
 
5474
  __Pyx_RefNannyFinishContext();
 
5475
  return __pyx_r;
 
5476
}
 
5477
 
 
5478
/* "bzrlib/_dirstate_helpers_pyx.pyx":815
 
5479
 * 
 
5480
 * 
 
5481
 * cdef _pack_stat(stat_value):             # <<<<<<<<<<<<<<
 
5482
 *     """return a string representing the stat value's key fields.
 
5483
 * 
 
5484
 */
 
5485
 
 
5486
static  PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__pack_stat(PyObject *__pyx_v_stat_value) {
 
5487
  char __pyx_v_result[(6 * 4)];
 
5488
  int *__pyx_v_aliased;
 
5489
  PyObject *__pyx_v_packed;
 
5490
  PyObject *__pyx_r = NULL;
 
5491
  PyObject *__pyx_t_1 = NULL;
 
5492
  unsigned long __pyx_t_2;
 
5493
  PyObject *__pyx_t_3 = NULL;
 
5494
  PyObject *__pyx_t_4 = NULL;
 
5495
  __Pyx_RefNannySetupContext("_pack_stat");
 
5496
  __pyx_v_packed = Py_None; __Pyx_INCREF(Py_None);
 
5497
 
 
5498
  /* "bzrlib/_dirstate_helpers_pyx.pyx":823
 
5499
 *     cdef char result[6*4] # 6 long ints
 
5500
 *     cdef int *aliased
 
5501
 *     aliased = <int *>result             # <<<<<<<<<<<<<<
 
5502
 *     aliased[0] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_size))
 
5503
 *     # mtime and ctime will often be floats but get converted to PyInt within
 
5504
 */
 
5505
  __pyx_v_aliased = ((int *)__pyx_v_result);
 
5506
 
 
5507
  /* "bzrlib/_dirstate_helpers_pyx.pyx":824
 
5508
 *     cdef int *aliased
 
5509
 *     aliased = <int *>result
 
5510
 *     aliased[0] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_size))             # <<<<<<<<<<<<<<
 
5511
 *     # mtime and ctime will often be floats but get converted to PyInt within
 
5512
 *     aliased[1] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_mtime))
 
5513
 */
 
5514
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5515
  __Pyx_GOTREF(__pyx_t_1);
 
5516
  __pyx_t_2 = PyInt_AsUnsignedLongMask(__pyx_t_1); if (unlikely(__pyx_t_2 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5517
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5518
  (__pyx_v_aliased[0]) = htonl(__pyx_t_2);
 
5519
 
 
5520
  /* "bzrlib/_dirstate_helpers_pyx.pyx":826
 
5521
 *     aliased[0] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_size))
 
5522
 *     # mtime and ctime will often be floats but get converted to PyInt within
 
5523
 *     aliased[1] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_mtime))             # <<<<<<<<<<<<<<
 
5524
 *     aliased[2] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_ctime))
 
5525
 *     aliased[3] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_dev))
 
5526
 */
 
5527
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_mtime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5528
  __Pyx_GOTREF(__pyx_t_1);
 
5529
  __pyx_t_2 = PyInt_AsUnsignedLongMask(__pyx_t_1); if (unlikely(__pyx_t_2 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5530
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5531
  (__pyx_v_aliased[1]) = htonl(__pyx_t_2);
 
5532
 
 
5533
  /* "bzrlib/_dirstate_helpers_pyx.pyx":827
 
5534
 *     # mtime and ctime will often be floats but get converted to PyInt within
 
5535
 *     aliased[1] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_mtime))
 
5536
 *     aliased[2] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_ctime))             # <<<<<<<<<<<<<<
 
5537
 *     aliased[3] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_dev))
 
5538
 *     aliased[4] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_ino))
 
5539
 */
 
5540
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_ctime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5541
  __Pyx_GOTREF(__pyx_t_1);
 
5542
  __pyx_t_2 = PyInt_AsUnsignedLongMask(__pyx_t_1); if (unlikely(__pyx_t_2 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5543
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5544
  (__pyx_v_aliased[2]) = htonl(__pyx_t_2);
 
5545
 
 
5546
  /* "bzrlib/_dirstate_helpers_pyx.pyx":828
 
5547
 *     aliased[1] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_mtime))
 
5548
 *     aliased[2] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_ctime))
 
5549
 *     aliased[3] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_dev))             # <<<<<<<<<<<<<<
 
5550
 *     aliased[4] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_ino))
 
5551
 *     aliased[5] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_mode))
 
5552
 */
 
5553
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_dev); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5554
  __Pyx_GOTREF(__pyx_t_1);
 
5555
  __pyx_t_2 = PyInt_AsUnsignedLongMask(__pyx_t_1); if (unlikely(__pyx_t_2 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5556
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5557
  (__pyx_v_aliased[3]) = htonl(__pyx_t_2);
 
5558
 
 
5559
  /* "bzrlib/_dirstate_helpers_pyx.pyx":829
 
5560
 *     aliased[2] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_ctime))
 
5561
 *     aliased[3] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_dev))
 
5562
 *     aliased[4] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_ino))             # <<<<<<<<<<<<<<
 
5563
 *     aliased[5] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_mode))
 
5564
 *     packed = PyString_FromStringAndSize(result, 6*4)
 
5565
 */
 
5566
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_ino); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5567
  __Pyx_GOTREF(__pyx_t_1);
 
5568
  __pyx_t_2 = PyInt_AsUnsignedLongMask(__pyx_t_1); if (unlikely(__pyx_t_2 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5569
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5570
  (__pyx_v_aliased[4]) = htonl(__pyx_t_2);
 
5571
 
 
5572
  /* "bzrlib/_dirstate_helpers_pyx.pyx":830
 
5573
 *     aliased[3] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_dev))
 
5574
 *     aliased[4] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_ino))
 
5575
 *     aliased[5] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_mode))             # <<<<<<<<<<<<<<
 
5576
 *     packed = PyString_FromStringAndSize(result, 6*4)
 
5577
 *     return _encode(packed)[:-1]
 
5578
 */
 
5579
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_mode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5580
  __Pyx_GOTREF(__pyx_t_1);
 
5581
  __pyx_t_2 = PyInt_AsUnsignedLongMask(__pyx_t_1); if (unlikely(__pyx_t_2 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5582
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5583
  (__pyx_v_aliased[5]) = htonl(__pyx_t_2);
 
5584
 
 
5585
  /* "bzrlib/_dirstate_helpers_pyx.pyx":831
 
5586
 *     aliased[4] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_ino))
 
5587
 *     aliased[5] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_mode))
 
5588
 *     packed = PyString_FromStringAndSize(result, 6*4)             # <<<<<<<<<<<<<<
 
5589
 *     return _encode(packed)[:-1]
 
5590
 * 
 
5591
 */
 
5592
  __pyx_t_1 = PyString_FromStringAndSize(__pyx_v_result, 24); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5593
  __Pyx_GOTREF(__pyx_t_1);
 
5594
  __Pyx_DECREF(__pyx_v_packed);
 
5595
  __pyx_v_packed = __pyx_t_1;
 
5596
  __pyx_t_1 = 0;
 
5597
 
 
5598
  /* "bzrlib/_dirstate_helpers_pyx.pyx":832
 
5599
 *     aliased[5] = htonl(PyInt_AsUnsignedLongMask(stat_value.st_mode))
 
5600
 *     packed = PyString_FromStringAndSize(result, 6*4)
 
5601
 *     return _encode(packed)[:-1]             # <<<<<<<<<<<<<<
 
5602
 * 
 
5603
 * 
 
5604
 */
 
5605
  __Pyx_XDECREF(__pyx_r);
 
5606
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5607
  __Pyx_GOTREF(__pyx_t_1);
 
5608
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5609
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
5610
  __Pyx_INCREF(__pyx_v_packed);
 
5611
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_packed);
 
5612
  __Pyx_GIVEREF(__pyx_v_packed);
 
5613
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5614
  __Pyx_GOTREF(__pyx_t_4);
 
5615
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5616
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
5617
  __pyx_t_3 = __Pyx_PySequence_GetSlice(__pyx_t_4, 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5618
  __Pyx_GOTREF(__pyx_t_3);
 
5619
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
5620
  __pyx_r = __pyx_t_3;
 
5621
  __pyx_t_3 = 0;
 
5622
  goto __pyx_L0;
 
5623
 
 
5624
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
5625
  goto __pyx_L0;
 
5626
  __pyx_L1_error:;
 
5627
  __Pyx_XDECREF(__pyx_t_1);
 
5628
  __Pyx_XDECREF(__pyx_t_3);
 
5629
  __Pyx_XDECREF(__pyx_t_4);
 
5630
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._pack_stat");
 
5631
  __pyx_r = 0;
 
5632
  __pyx_L0:;
 
5633
  __Pyx_DECREF(__pyx_v_packed);
 
5634
  __Pyx_XGIVEREF(__pyx_r);
 
5635
  __Pyx_RefNannyFinishContext();
 
5636
  return __pyx_r;
 
5637
}
 
5638
 
 
5639
/* "bzrlib/_dirstate_helpers_pyx.pyx":835
 
5640
 * 
 
5641
 * 
 
5642
 * def pack_stat(stat_value):             # <<<<<<<<<<<<<<
 
5643
 *     """Convert stat value into a packed representation quickly with pyrex"""
 
5644
 *     return _pack_stat(stat_value)
 
5645
 */
 
5646
 
 
5647
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_7pack_stat(PyObject *__pyx_self, PyObject *__pyx_v_stat_value); /*proto*/
 
5648
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_7pack_stat[] = "Convert stat value into a packed representation quickly with pyrex";
 
5649
static PyMethodDef __pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_7pack_stat = {__Pyx_NAMESTR("pack_stat"), (PyCFunction)__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_7pack_stat, METH_O, __Pyx_DOCSTR(__pyx_doc_6bzrlib_21_dirstate_helpers_pyx_7pack_stat)};
 
5650
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_7pack_stat(PyObject *__pyx_self, PyObject *__pyx_v_stat_value) {
 
5651
  PyObject *__pyx_r = NULL;
 
5652
  PyObject *__pyx_t_1 = NULL;
 
5653
  __Pyx_RefNannySetupContext("pack_stat");
 
5654
  __pyx_self = __pyx_self;
 
5655
 
 
5656
  /* "bzrlib/_dirstate_helpers_pyx.pyx":837
 
5657
 * def pack_stat(stat_value):
 
5658
 *     """Convert stat value into a packed representation quickly with pyrex"""
 
5659
 *     return _pack_stat(stat_value)             # <<<<<<<<<<<<<<
 
5660
 * 
 
5661
 * 
 
5662
 */
 
5663
  __Pyx_XDECREF(__pyx_r);
 
5664
  __pyx_t_1 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__pack_stat(__pyx_v_stat_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5665
  __Pyx_GOTREF(__pyx_t_1);
 
5666
  __pyx_r = __pyx_t_1;
 
5667
  __pyx_t_1 = 0;
 
5668
  goto __pyx_L0;
 
5669
 
 
5670
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
5671
  goto __pyx_L0;
 
5672
  __pyx_L1_error:;
 
5673
  __Pyx_XDECREF(__pyx_t_1);
 
5674
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.pack_stat");
 
5675
  __pyx_r = NULL;
 
5676
  __pyx_L0:;
 
5677
  __Pyx_XGIVEREF(__pyx_r);
 
5678
  __Pyx_RefNannyFinishContext();
 
5679
  return __pyx_r;
 
5680
}
 
5681
 
 
5682
/* "bzrlib/_dirstate_helpers_pyx.pyx":840
 
5683
 * 
 
5684
 * 
 
5685
 * def update_entry(self, entry, abspath, stat_value):             # <<<<<<<<<<<<<<
 
5686
 *     """Update the entry based on what is actually on disk.
 
5687
 * 
 
5688
 */
 
5689
 
 
5690
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_8update_entry(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
5691
static char __pyx_doc_6bzrlib_21_dirstate_helpers_pyx_8update_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    ";
 
5692
static PyMethodDef __pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_8update_entry = {__Pyx_NAMESTR("update_entry"), (PyCFunction)__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_8update_entry, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6bzrlib_21_dirstate_helpers_pyx_8update_entry)};
 
5693
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_8update_entry(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
5694
  PyObject *__pyx_v_self = 0;
 
5695
  PyObject *__pyx_v_entry = 0;
 
5696
  PyObject *__pyx_v_abspath = 0;
 
5697
  PyObject *__pyx_v_stat_value = 0;
 
5698
  PyObject *__pyx_r = NULL;
 
5699
  PyObject *__pyx_t_1 = NULL;
 
5700
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__entry,&__pyx_n_s__abspath,&__pyx_n_s__stat_value,0};
 
5701
  __Pyx_RefNannySetupContext("update_entry");
 
5702
  __pyx_self = __pyx_self;
 
5703
  if (unlikely(__pyx_kwds)) {
 
5704
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
5705
    PyObject* values[4] = {0,0,0,0};
 
5706
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
5707
      case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
 
5708
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
5709
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
5710
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
5711
      case  0: break;
 
5712
      default: goto __pyx_L5_argtuple_error;
 
5713
    }
 
5714
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
5715
      case  0:
 
5716
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
 
5717
      if (likely(values[0])) kw_args--;
 
5718
      else goto __pyx_L5_argtuple_error;
 
5719
      case  1:
 
5720
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__entry);
 
5721
      if (likely(values[1])) kw_args--;
 
5722
      else {
 
5723
        __Pyx_RaiseArgtupleInvalid("update_entry", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
5724
      }
 
5725
      case  2:
 
5726
      values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__abspath);
 
5727
      if (likely(values[2])) kw_args--;
 
5728
      else {
 
5729
        __Pyx_RaiseArgtupleInvalid("update_entry", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
5730
      }
 
5731
      case  3:
 
5732
      values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stat_value);
 
5733
      if (likely(values[3])) kw_args--;
 
5734
      else {
 
5735
        __Pyx_RaiseArgtupleInvalid("update_entry", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
5736
      }
 
5737
    }
 
5738
    if (unlikely(kw_args > 0)) {
 
5739
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "update_entry") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
5740
    }
 
5741
    __pyx_v_self = values[0];
 
5742
    __pyx_v_entry = values[1];
 
5743
    __pyx_v_abspath = values[2];
 
5744
    __pyx_v_stat_value = values[3];
 
5745
  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
 
5746
    goto __pyx_L5_argtuple_error;
 
5747
  } else {
 
5748
    __pyx_v_self = PyTuple_GET_ITEM(__pyx_args, 0);
 
5749
    __pyx_v_entry = PyTuple_GET_ITEM(__pyx_args, 1);
 
5750
    __pyx_v_abspath = PyTuple_GET_ITEM(__pyx_args, 2);
 
5751
    __pyx_v_stat_value = PyTuple_GET_ITEM(__pyx_args, 3);
 
5752
  }
 
5753
  goto __pyx_L4_argument_unpacking_done;
 
5754
  __pyx_L5_argtuple_error:;
 
5755
  __Pyx_RaiseArgtupleInvalid("update_entry", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
5756
  __pyx_L3_error:;
 
5757
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.update_entry");
 
5758
  __Pyx_RefNannyFinishContext();
 
5759
  return NULL;
 
5760
  __pyx_L4_argument_unpacking_done:;
 
5761
 
 
5762
  /* "bzrlib/_dirstate_helpers_pyx.pyx":854
 
5763
 *         target of a symlink.
 
5764
 *     """
 
5765
 *     return _update_entry(self, entry, abspath, stat_value)             # <<<<<<<<<<<<<<
 
5766
 * 
 
5767
 * 
 
5768
 */
 
5769
  __Pyx_XDECREF(__pyx_r);
 
5770
  __pyx_t_1 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__update_entry(__pyx_v_self, __pyx_v_entry, __pyx_v_abspath, __pyx_v_stat_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5771
  __Pyx_GOTREF(__pyx_t_1);
 
5772
  __pyx_r = __pyx_t_1;
 
5773
  __pyx_t_1 = 0;
 
5774
  goto __pyx_L0;
 
5775
 
 
5776
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
5777
  goto __pyx_L0;
 
5778
  __pyx_L1_error:;
 
5779
  __Pyx_XDECREF(__pyx_t_1);
 
5780
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.update_entry");
 
5781
  __pyx_r = NULL;
 
5782
  __pyx_L0:;
 
5783
  __Pyx_XGIVEREF(__pyx_r);
 
5784
  __Pyx_RefNannyFinishContext();
 
5785
  return __pyx_r;
 
5786
}
 
5787
 
 
5788
/* "bzrlib/_dirstate_helpers_pyx.pyx":857
 
5789
 * 
 
5790
 * 
 
5791
 * cdef _update_entry(self, entry, abspath, stat_value):             # <<<<<<<<<<<<<<
 
5792
 *     """Update the entry based on what is actually on disk.
 
5793
 * 
 
5794
 */
 
5795
 
 
5796
static  PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__update_entry(PyObject *__pyx_v_self, PyObject *__pyx_v_entry, PyObject *__pyx_v_abspath, PyObject *__pyx_v_stat_value) {
 
5797
  int __pyx_v_minikind;
 
5798
  int __pyx_v_saved_minikind;
 
5799
  void *__pyx_v_details;
 
5800
  int __pyx_v_worth_saving;
 
5801
  PyObject *__pyx_v_packed_stat;
 
5802
  PyObject *__pyx_v_saved_link_or_sha1;
 
5803
  PyObject *__pyx_v_saved_file_size;
 
5804
  PyObject *__pyx_v_saved_executable;
 
5805
  PyObject *__pyx_v_saved_packed_stat;
 
5806
  PyObject *__pyx_v_link_or_sha1;
 
5807
  PyObject *__pyx_v_executable;
 
5808
  PyObject *__pyx_v_block_index;
 
5809
  PyObject *__pyx_v_entry_index;
 
5810
  PyObject *__pyx_v_dir_present;
 
5811
  PyObject *__pyx_v_file_present;
 
5812
  PyObject *__pyx_r = NULL;
 
5813
  PyObject *__pyx_t_1 = NULL;
 
5814
  int __pyx_t_2;
 
5815
  int __pyx_t_3;
 
5816
  int __pyx_t_4;
 
5817
  int __pyx_t_5;
 
5818
  PyObject *__pyx_t_6 = NULL;
 
5819
  PyObject *__pyx_t_7 = NULL;
 
5820
  Py_ssize_t __pyx_t_8;
 
5821
  int __pyx_t_9;
 
5822
  int __pyx_t_10;
 
5823
  PyObject *__pyx_t_11 = NULL;
 
5824
  PyObject *__pyx_t_12 = NULL;
 
5825
  PyObject *__pyx_t_13 = NULL;
 
5826
  __Pyx_RefNannySetupContext("_update_entry");
 
5827
  __pyx_v_packed_stat = Py_None; __Pyx_INCREF(Py_None);
 
5828
  __pyx_v_saved_link_or_sha1 = Py_None; __Pyx_INCREF(Py_None);
 
5829
  __pyx_v_saved_file_size = Py_None; __Pyx_INCREF(Py_None);
 
5830
  __pyx_v_saved_executable = Py_None; __Pyx_INCREF(Py_None);
 
5831
  __pyx_v_saved_packed_stat = Py_None; __Pyx_INCREF(Py_None);
 
5832
  __pyx_v_link_or_sha1 = Py_None; __Pyx_INCREF(Py_None);
 
5833
  __pyx_v_executable = Py_None; __Pyx_INCREF(Py_None);
 
5834
  __pyx_v_block_index = Py_None; __Pyx_INCREF(Py_None);
 
5835
  __pyx_v_entry_index = Py_None; __Pyx_INCREF(Py_None);
 
5836
  __pyx_v_dir_present = Py_None; __Pyx_INCREF(Py_None);
 
5837
  __pyx_v_file_present = Py_None; __Pyx_INCREF(Py_None);
 
5838
 
 
5839
  /* "bzrlib/_dirstate_helpers_pyx.pyx":876
 
5840
 *     cdef void * details
 
5841
 *     cdef int worth_saving
 
5842
 *     minikind = minikind_from_mode(stat_value.st_mode)             # <<<<<<<<<<<<<<
 
5843
 *     if 0 == minikind:
 
5844
 *         return None
 
5845
 */
 
5846
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_mode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5847
  __Pyx_GOTREF(__pyx_t_1);
 
5848
  __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5849
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
5850
  __pyx_v_minikind = __pyx_f_6bzrlib_21_dirstate_helpers_pyx_minikind_from_mode(__pyx_t_2);
 
5851
 
 
5852
  /* "bzrlib/_dirstate_helpers_pyx.pyx":877
 
5853
 *     cdef int worth_saving
 
5854
 *     minikind = minikind_from_mode(stat_value.st_mode)
 
5855
 *     if 0 == minikind:             # <<<<<<<<<<<<<<
 
5856
 *         return None
 
5857
 *     packed_stat = _pack_stat(stat_value)
 
5858
 */
 
5859
  __pyx_t_3 = (0 == __pyx_v_minikind);
 
5860
  if (__pyx_t_3) {
 
5861
 
 
5862
    /* "bzrlib/_dirstate_helpers_pyx.pyx":878
 
5863
 *     minikind = minikind_from_mode(stat_value.st_mode)
 
5864
 *     if 0 == minikind:
 
5865
 *         return None             # <<<<<<<<<<<<<<
 
5866
 *     packed_stat = _pack_stat(stat_value)
 
5867
 *     details = PyList_GetItem_void_void(PyTuple_GetItem_void_void(<void *>entry, 1), 0)
 
5868
 */
 
5869
    __Pyx_XDECREF(__pyx_r);
 
5870
    __Pyx_INCREF(Py_None);
 
5871
    __pyx_r = Py_None;
 
5872
    goto __pyx_L0;
 
5873
    goto __pyx_L3;
 
5874
  }
 
5875
  __pyx_L3:;
 
5876
 
 
5877
  /* "bzrlib/_dirstate_helpers_pyx.pyx":879
 
5878
 *     if 0 == minikind:
 
5879
 *         return None
 
5880
 *     packed_stat = _pack_stat(stat_value)             # <<<<<<<<<<<<<<
 
5881
 *     details = PyList_GetItem_void_void(PyTuple_GetItem_void_void(<void *>entry, 1), 0)
 
5882
 *     saved_minikind = PyString_AsString_obj(<PyObject *>PyTuple_GetItem_void_void(details, 0))[0]
 
5883
 */
 
5884
  __pyx_t_1 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__pack_stat(__pyx_v_stat_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5885
  __Pyx_GOTREF(__pyx_t_1);
 
5886
  __Pyx_DECREF(__pyx_v_packed_stat);
 
5887
  __pyx_v_packed_stat = __pyx_t_1;
 
5888
  __pyx_t_1 = 0;
 
5889
 
 
5890
  /* "bzrlib/_dirstate_helpers_pyx.pyx":880
 
5891
 *         return None
 
5892
 *     packed_stat = _pack_stat(stat_value)
 
5893
 *     details = PyList_GetItem_void_void(PyTuple_GetItem_void_void(<void *>entry, 1), 0)             # <<<<<<<<<<<<<<
 
5894
 *     saved_minikind = PyString_AsString_obj(<PyObject *>PyTuple_GetItem_void_void(details, 0))[0]
 
5895
 *     if minikind == c'd' and saved_minikind == c't':
 
5896
 */
 
5897
  __pyx_v_details = PyList_GET_ITEM(PyTuple_GET_ITEM(((void *)__pyx_v_entry), 1), 0);
 
5898
 
 
5899
  /* "bzrlib/_dirstate_helpers_pyx.pyx":881
 
5900
 *     packed_stat = _pack_stat(stat_value)
 
5901
 *     details = PyList_GetItem_void_void(PyTuple_GetItem_void_void(<void *>entry, 1), 0)
 
5902
 *     saved_minikind = PyString_AsString_obj(<PyObject *>PyTuple_GetItem_void_void(details, 0))[0]             # <<<<<<<<<<<<<<
 
5903
 *     if minikind == c'd' and saved_minikind == c't':
 
5904
 *         minikind = c't'
 
5905
 */
 
5906
  __pyx_v_saved_minikind = (PyString_AsString(((PyObject *)PyTuple_GET_ITEM(__pyx_v_details, 0)))[0]);
 
5907
 
 
5908
  /* "bzrlib/_dirstate_helpers_pyx.pyx":882
 
5909
 *     details = PyList_GetItem_void_void(PyTuple_GetItem_void_void(<void *>entry, 1), 0)
 
5910
 *     saved_minikind = PyString_AsString_obj(<PyObject *>PyTuple_GetItem_void_void(details, 0))[0]
 
5911
 *     if minikind == c'd' and saved_minikind == c't':             # <<<<<<<<<<<<<<
 
5912
 *         minikind = c't'
 
5913
 *     saved_link_or_sha1 = PyTuple_GetItem_void_object(details, 1)
 
5914
 */
 
5915
  __pyx_t_3 = (__pyx_v_minikind == 'd');
 
5916
  if (__pyx_t_3) {
 
5917
    __pyx_t_4 = (__pyx_v_saved_minikind == 't');
 
5918
    __pyx_t_5 = __pyx_t_4;
 
5919
  } else {
 
5920
    __pyx_t_5 = __pyx_t_3;
 
5921
  }
 
5922
  if (__pyx_t_5) {
 
5923
 
 
5924
    /* "bzrlib/_dirstate_helpers_pyx.pyx":883
 
5925
 *     saved_minikind = PyString_AsString_obj(<PyObject *>PyTuple_GetItem_void_void(details, 0))[0]
 
5926
 *     if minikind == c'd' and saved_minikind == c't':
 
5927
 *         minikind = c't'             # <<<<<<<<<<<<<<
 
5928
 *     saved_link_or_sha1 = PyTuple_GetItem_void_object(details, 1)
 
5929
 *     saved_file_size = PyTuple_GetItem_void_object(details, 2)
 
5930
 */
 
5931
    __pyx_v_minikind = 't';
 
5932
    goto __pyx_L4;
 
5933
  }
 
5934
  __pyx_L4:;
 
5935
 
 
5936
  /* "bzrlib/_dirstate_helpers_pyx.pyx":884
 
5937
 *     if minikind == c'd' and saved_minikind == c't':
 
5938
 *         minikind = c't'
 
5939
 *     saved_link_or_sha1 = PyTuple_GetItem_void_object(details, 1)             # <<<<<<<<<<<<<<
 
5940
 *     saved_file_size = PyTuple_GetItem_void_object(details, 2)
 
5941
 *     saved_executable = PyTuple_GetItem_void_object(details, 3)
 
5942
 */
 
5943
  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_details, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5944
  __Pyx_GOTREF(__pyx_t_1);
 
5945
  __Pyx_DECREF(__pyx_v_saved_link_or_sha1);
 
5946
  __pyx_v_saved_link_or_sha1 = __pyx_t_1;
 
5947
  __pyx_t_1 = 0;
 
5948
 
 
5949
  /* "bzrlib/_dirstate_helpers_pyx.pyx":885
 
5950
 *         minikind = c't'
 
5951
 *     saved_link_or_sha1 = PyTuple_GetItem_void_object(details, 1)
 
5952
 *     saved_file_size = PyTuple_GetItem_void_object(details, 2)             # <<<<<<<<<<<<<<
 
5953
 *     saved_executable = PyTuple_GetItem_void_object(details, 3)
 
5954
 *     saved_packed_stat = PyTuple_GetItem_void_object(details, 4)
 
5955
 */
 
5956
  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_details, 2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5957
  __Pyx_GOTREF(__pyx_t_1);
 
5958
  __Pyx_DECREF(__pyx_v_saved_file_size);
 
5959
  __pyx_v_saved_file_size = __pyx_t_1;
 
5960
  __pyx_t_1 = 0;
 
5961
 
 
5962
  /* "bzrlib/_dirstate_helpers_pyx.pyx":886
 
5963
 *     saved_link_or_sha1 = PyTuple_GetItem_void_object(details, 1)
 
5964
 *     saved_file_size = PyTuple_GetItem_void_object(details, 2)
 
5965
 *     saved_executable = PyTuple_GetItem_void_object(details, 3)             # <<<<<<<<<<<<<<
 
5966
 *     saved_packed_stat = PyTuple_GetItem_void_object(details, 4)
 
5967
 *     # Deal with pyrex decrefing the objects
 
5968
 */
 
5969
  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_details, 3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5970
  __Pyx_GOTREF(__pyx_t_1);
 
5971
  __Pyx_DECREF(__pyx_v_saved_executable);
 
5972
  __pyx_v_saved_executable = __pyx_t_1;
 
5973
  __pyx_t_1 = 0;
 
5974
 
 
5975
  /* "bzrlib/_dirstate_helpers_pyx.pyx":887
 
5976
 *     saved_file_size = PyTuple_GetItem_void_object(details, 2)
 
5977
 *     saved_executable = PyTuple_GetItem_void_object(details, 3)
 
5978
 *     saved_packed_stat = PyTuple_GetItem_void_object(details, 4)             # <<<<<<<<<<<<<<
 
5979
 *     # Deal with pyrex decrefing the objects
 
5980
 *     Py_INCREF(saved_link_or_sha1)
 
5981
 */
 
5982
  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_v_details, 4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
5983
  __Pyx_GOTREF(__pyx_t_1);
 
5984
  __Pyx_DECREF(__pyx_v_saved_packed_stat);
 
5985
  __pyx_v_saved_packed_stat = __pyx_t_1;
 
5986
  __pyx_t_1 = 0;
 
5987
 
 
5988
  /* "bzrlib/_dirstate_helpers_pyx.pyx":889
 
5989
 *     saved_packed_stat = PyTuple_GetItem_void_object(details, 4)
 
5990
 *     # Deal with pyrex decrefing the objects
 
5991
 *     Py_INCREF(saved_link_or_sha1)             # <<<<<<<<<<<<<<
 
5992
 *     Py_INCREF(saved_file_size)
 
5993
 *     Py_INCREF(saved_executable)
 
5994
 */
 
5995
  Py_INCREF(__pyx_v_saved_link_or_sha1);
 
5996
 
 
5997
  /* "bzrlib/_dirstate_helpers_pyx.pyx":890
 
5998
 *     # Deal with pyrex decrefing the objects
 
5999
 *     Py_INCREF(saved_link_or_sha1)
 
6000
 *     Py_INCREF(saved_file_size)             # <<<<<<<<<<<<<<
 
6001
 *     Py_INCREF(saved_executable)
 
6002
 *     Py_INCREF(saved_packed_stat)
 
6003
 */
 
6004
  Py_INCREF(__pyx_v_saved_file_size);
 
6005
 
 
6006
  /* "bzrlib/_dirstate_helpers_pyx.pyx":891
 
6007
 *     Py_INCREF(saved_link_or_sha1)
 
6008
 *     Py_INCREF(saved_file_size)
 
6009
 *     Py_INCREF(saved_executable)             # <<<<<<<<<<<<<<
 
6010
 *     Py_INCREF(saved_packed_stat)
 
6011
 *     #(saved_minikind, saved_link_or_sha1, saved_file_size,
 
6012
 */
 
6013
  Py_INCREF(__pyx_v_saved_executable);
 
6014
 
 
6015
  /* "bzrlib/_dirstate_helpers_pyx.pyx":892
 
6016
 *     Py_INCREF(saved_file_size)
 
6017
 *     Py_INCREF(saved_executable)
 
6018
 *     Py_INCREF(saved_packed_stat)             # <<<<<<<<<<<<<<
 
6019
 *     #(saved_minikind, saved_link_or_sha1, saved_file_size,
 
6020
 *     # saved_executable, saved_packed_stat) = entry[1][0]
 
6021
 */
 
6022
  Py_INCREF(__pyx_v_saved_packed_stat);
 
6023
 
 
6024
  /* "bzrlib/_dirstate_helpers_pyx.pyx":897
 
6025
 * 
 
6026
 *     if (minikind == saved_minikind
 
6027
 *         and packed_stat == saved_packed_stat):             # <<<<<<<<<<<<<<
 
6028
 *         # The stat hasn't changed since we saved, so we can re-use the
 
6029
 *         # saved sha hash.
 
6030
 */
 
6031
  __pyx_t_5 = (__pyx_v_minikind == __pyx_v_saved_minikind);
 
6032
  if (__pyx_t_5) {
 
6033
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_packed_stat, __pyx_v_saved_packed_stat, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6034
    __Pyx_GOTREF(__pyx_t_1);
 
6035
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6036
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
6037
    __pyx_t_4 = __pyx_t_3;
 
6038
  } else {
 
6039
    __pyx_t_4 = __pyx_t_5;
 
6040
  }
 
6041
  if (__pyx_t_4) {
 
6042
 
 
6043
    /* "bzrlib/_dirstate_helpers_pyx.pyx":900
 
6044
 *         # The stat hasn't changed since we saved, so we can re-use the
 
6045
 *         # saved sha hash.
 
6046
 *         if minikind == c'd':             # <<<<<<<<<<<<<<
 
6047
 *             return None
 
6048
 * 
 
6049
 */
 
6050
    __pyx_t_4 = (__pyx_v_minikind == 'd');
 
6051
    if (__pyx_t_4) {
 
6052
 
 
6053
      /* "bzrlib/_dirstate_helpers_pyx.pyx":901
 
6054
 *         # saved sha hash.
 
6055
 *         if minikind == c'd':
 
6056
 *             return None             # <<<<<<<<<<<<<<
 
6057
 * 
 
6058
 *         # size should also be in packed_stat
 
6059
 */
 
6060
      __Pyx_XDECREF(__pyx_r);
 
6061
      __Pyx_INCREF(Py_None);
 
6062
      __pyx_r = Py_None;
 
6063
      goto __pyx_L0;
 
6064
      goto __pyx_L6;
 
6065
    }
 
6066
    __pyx_L6:;
 
6067
 
 
6068
    /* "bzrlib/_dirstate_helpers_pyx.pyx":904
 
6069
 * 
 
6070
 *         # size should also be in packed_stat
 
6071
 *         if saved_file_size == stat_value.st_size:             # <<<<<<<<<<<<<<
 
6072
 *             return saved_link_or_sha1
 
6073
 * 
 
6074
 */
 
6075
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6076
    __Pyx_GOTREF(__pyx_t_1);
 
6077
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_saved_file_size, __pyx_t_1, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6078
    __Pyx_GOTREF(__pyx_t_6);
 
6079
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
6080
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6081
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
6082
    if (__pyx_t_4) {
 
6083
 
 
6084
      /* "bzrlib/_dirstate_helpers_pyx.pyx":905
 
6085
 *         # size should also be in packed_stat
 
6086
 *         if saved_file_size == stat_value.st_size:
 
6087
 *             return saved_link_or_sha1             # <<<<<<<<<<<<<<
 
6088
 * 
 
6089
 *     # If we have gotten this far, that means that we need to actually
 
6090
 */
 
6091
      __Pyx_XDECREF(__pyx_r);
 
6092
      __Pyx_INCREF(__pyx_v_saved_link_or_sha1);
 
6093
      __pyx_r = __pyx_v_saved_link_or_sha1;
 
6094
      goto __pyx_L0;
 
6095
      goto __pyx_L7;
 
6096
    }
 
6097
    __pyx_L7:;
 
6098
    goto __pyx_L5;
 
6099
  }
 
6100
  __pyx_L5:;
 
6101
 
 
6102
  /* "bzrlib/_dirstate_helpers_pyx.pyx":909
 
6103
 *     # If we have gotten this far, that means that we need to actually
 
6104
 *     # process this entry.
 
6105
 *     link_or_sha1 = None             # <<<<<<<<<<<<<<
 
6106
 *     worth_saving = 1
 
6107
 *     if minikind == c'f':
 
6108
 */
 
6109
  __Pyx_INCREF(Py_None);
 
6110
  __Pyx_DECREF(__pyx_v_link_or_sha1);
 
6111
  __pyx_v_link_or_sha1 = Py_None;
 
6112
 
 
6113
  /* "bzrlib/_dirstate_helpers_pyx.pyx":910
 
6114
 *     # process this entry.
 
6115
 *     link_or_sha1 = None
 
6116
 *     worth_saving = 1             # <<<<<<<<<<<<<<
 
6117
 *     if minikind == c'f':
 
6118
 *         executable = self._is_executable(stat_value.st_mode,
 
6119
 */
 
6120
  __pyx_v_worth_saving = 1;
 
6121
 
 
6122
  /* "bzrlib/_dirstate_helpers_pyx.pyx":949
 
6123
 *             # re-writing a dirstate for just this
 
6124
 *             worth_saving = 0
 
6125
 *     elif minikind == c'l':             # <<<<<<<<<<<<<<
 
6126
 *         if saved_minikind == c'l':
 
6127
 *             # If the object hasn't changed kind, it isn't worth saving the
 
6128
 */
 
6129
  switch (__pyx_v_minikind) {
 
6130
 
 
6131
    /* "bzrlib/_dirstate_helpers_pyx.pyx":911
 
6132
 *     link_or_sha1 = None
 
6133
 *     worth_saving = 1
 
6134
 *     if minikind == c'f':             # <<<<<<<<<<<<<<
 
6135
 *         executable = self._is_executable(stat_value.st_mode,
 
6136
 *                                          saved_executable)
 
6137
 */
 
6138
    case 'f':
 
6139
 
 
6140
    /* "bzrlib/_dirstate_helpers_pyx.pyx":912
 
6141
 *     worth_saving = 1
 
6142
 *     if minikind == c'f':
 
6143
 *         executable = self._is_executable(stat_value.st_mode,             # <<<<<<<<<<<<<<
 
6144
 *                                          saved_executable)
 
6145
 *         if self._cutoff_time is None:
 
6146
 */
 
6147
    __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___is_executable); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6148
    __Pyx_GOTREF(__pyx_t_6);
 
6149
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_mode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6150
    __Pyx_GOTREF(__pyx_t_1);
 
6151
 
 
6152
    /* "bzrlib/_dirstate_helpers_pyx.pyx":913
 
6153
 *     if minikind == c'f':
 
6154
 *         executable = self._is_executable(stat_value.st_mode,
 
6155
 *                                          saved_executable)             # <<<<<<<<<<<<<<
 
6156
 *         if self._cutoff_time is None:
 
6157
 *             self._sha_cutoff_time()
 
6158
 */
 
6159
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6160
    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
6161
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
 
6162
    __Pyx_GIVEREF(__pyx_t_1);
 
6163
    __Pyx_INCREF(__pyx_v_saved_executable);
 
6164
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_saved_executable);
 
6165
    __Pyx_GIVEREF(__pyx_v_saved_executable);
 
6166
    __pyx_t_1 = 0;
 
6167
    __pyx_t_1 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6168
    __Pyx_GOTREF(__pyx_t_1);
 
6169
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
6170
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
6171
    __Pyx_DECREF(__pyx_v_executable);
 
6172
    __pyx_v_executable = __pyx_t_1;
 
6173
    __pyx_t_1 = 0;
 
6174
 
 
6175
    /* "bzrlib/_dirstate_helpers_pyx.pyx":914
 
6176
 *         executable = self._is_executable(stat_value.st_mode,
 
6177
 *                                          saved_executable)
 
6178
 *         if self._cutoff_time is None:             # <<<<<<<<<<<<<<
 
6179
 *             self._sha_cutoff_time()
 
6180
 *         if (stat_value.st_mtime < self._cutoff_time
 
6181
 */
 
6182
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___cutoff_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6183
    __Pyx_GOTREF(__pyx_t_1);
 
6184
    __pyx_t_4 = (__pyx_t_1 == Py_None);
 
6185
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
6186
    if (__pyx_t_4) {
 
6187
 
 
6188
      /* "bzrlib/_dirstate_helpers_pyx.pyx":915
 
6189
 *                                          saved_executable)
 
6190
 *         if self._cutoff_time is None:
 
6191
 *             self._sha_cutoff_time()             # <<<<<<<<<<<<<<
 
6192
 *         if (stat_value.st_mtime < self._cutoff_time
 
6193
 *             and stat_value.st_ctime < self._cutoff_time
 
6194
 */
 
6195
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___sha_cutoff_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6196
      __Pyx_GOTREF(__pyx_t_1);
 
6197
      __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6198
      __Pyx_GOTREF(__pyx_t_7);
 
6199
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
6200
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
6201
      goto __pyx_L8;
 
6202
    }
 
6203
    __pyx_L8:;
 
6204
 
 
6205
    /* "bzrlib/_dirstate_helpers_pyx.pyx":916
 
6206
 *         if self._cutoff_time is None:
 
6207
 *             self._sha_cutoff_time()
 
6208
 *         if (stat_value.st_mtime < self._cutoff_time             # <<<<<<<<<<<<<<
 
6209
 *             and stat_value.st_ctime < self._cutoff_time
 
6210
 *             and len(entry[1]) > 1
 
6211
 */
 
6212
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_mtime); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6213
    __Pyx_GOTREF(__pyx_t_7);
 
6214
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___cutoff_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6215
    __Pyx_GOTREF(__pyx_t_1);
 
6216
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_LT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6217
    __Pyx_GOTREF(__pyx_t_6);
 
6218
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
6219
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
6220
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6221
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
6222
    if (__pyx_t_4) {
 
6223
 
 
6224
      /* "bzrlib/_dirstate_helpers_pyx.pyx":917
 
6225
 *             self._sha_cutoff_time()
 
6226
 *         if (stat_value.st_mtime < self._cutoff_time
 
6227
 *             and stat_value.st_ctime < self._cutoff_time             # <<<<<<<<<<<<<<
 
6228
 *             and len(entry[1]) > 1
 
6229
 *             and entry[1][1][0] != 'a'):
 
6230
 */
 
6231
      __pyx_t_6 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_ctime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6232
      __Pyx_GOTREF(__pyx_t_6);
 
6233
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___cutoff_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6234
      __Pyx_GOTREF(__pyx_t_1);
 
6235
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_LT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6236
      __Pyx_GOTREF(__pyx_t_7);
 
6237
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
6238
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
6239
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6240
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
6241
      if (__pyx_t_5) {
 
6242
 
 
6243
        /* "bzrlib/_dirstate_helpers_pyx.pyx":918
 
6244
 *         if (stat_value.st_mtime < self._cutoff_time
 
6245
 *             and stat_value.st_ctime < self._cutoff_time
 
6246
 *             and len(entry[1]) > 1             # <<<<<<<<<<<<<<
 
6247
 *             and entry[1][1][0] != 'a'):
 
6248
 *                 # Could check for size changes for further optimised
 
6249
 */
 
6250
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6251
        __Pyx_GOTREF(__pyx_t_7);
 
6252
        __pyx_t_8 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6253
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
6254
        __pyx_t_3 = (__pyx_t_8 > 1);
 
6255
        if (__pyx_t_3) {
 
6256
 
 
6257
          /* "bzrlib/_dirstate_helpers_pyx.pyx":919
 
6258
 *             and stat_value.st_ctime < self._cutoff_time
 
6259
 *             and len(entry[1]) > 1
 
6260
 *             and entry[1][1][0] != 'a'):             # <<<<<<<<<<<<<<
 
6261
 *                 # Could check for size changes for further optimised
 
6262
 *                 # avoidance of sha1's. However the most prominent case of
 
6263
 */
 
6264
          __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6265
          __Pyx_GOTREF(__pyx_t_7);
 
6266
          __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_7, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6267
          __Pyx_GOTREF(__pyx_t_1);
 
6268
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
6269
          __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6270
          __Pyx_GOTREF(__pyx_t_7);
 
6271
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
6272
          __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_n_s__a), Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6273
          __Pyx_GOTREF(__pyx_t_1);
 
6274
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
6275
          __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6276
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
6277
          __pyx_t_10 = __pyx_t_9;
 
6278
        } else {
 
6279
          __pyx_t_10 = __pyx_t_3;
 
6280
        }
 
6281
        __pyx_t_3 = __pyx_t_10;
 
6282
      } else {
 
6283
        __pyx_t_3 = __pyx_t_5;
 
6284
      }
 
6285
      __pyx_t_5 = __pyx_t_3;
 
6286
    } else {
 
6287
      __pyx_t_5 = __pyx_t_4;
 
6288
    }
 
6289
    if (__pyx_t_5) {
 
6290
 
 
6291
      /* "bzrlib/_dirstate_helpers_pyx.pyx":923
 
6292
 *                 # avoidance of sha1's. However the most prominent case of
 
6293
 *                 # over-shaing is during initial add, which this catches.
 
6294
 *             link_or_sha1 = self._sha1_file(abspath)             # <<<<<<<<<<<<<<
 
6295
 *             entry[1][0] = ('f', link_or_sha1, stat_value.st_size,
 
6296
 *                            executable, packed_stat)
 
6297
 */
 
6298
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___sha1_file); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6299
      __Pyx_GOTREF(__pyx_t_1);
 
6300
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6301
      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
6302
      __Pyx_INCREF(__pyx_v_abspath);
 
6303
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_abspath);
 
6304
      __Pyx_GIVEREF(__pyx_v_abspath);
 
6305
      __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6306
      __Pyx_GOTREF(__pyx_t_6);
 
6307
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
6308
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
6309
      __Pyx_DECREF(__pyx_v_link_or_sha1);
 
6310
      __pyx_v_link_or_sha1 = __pyx_t_6;
 
6311
      __pyx_t_6 = 0;
 
6312
 
 
6313
      /* "bzrlib/_dirstate_helpers_pyx.pyx":924
 
6314
 *                 # over-shaing is during initial add, which this catches.
 
6315
 *             link_or_sha1 = self._sha1_file(abspath)
 
6316
 *             entry[1][0] = ('f', link_or_sha1, stat_value.st_size,             # <<<<<<<<<<<<<<
 
6317
 *                            executable, packed_stat)
 
6318
 *         else:
 
6319
 */
 
6320
      __pyx_t_6 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6321
      __Pyx_GOTREF(__pyx_t_6);
 
6322
 
 
6323
      /* "bzrlib/_dirstate_helpers_pyx.pyx":925
 
6324
 *             link_or_sha1 = self._sha1_file(abspath)
 
6325
 *             entry[1][0] = ('f', link_or_sha1, stat_value.st_size,
 
6326
 *                            executable, packed_stat)             # <<<<<<<<<<<<<<
 
6327
 *         else:
 
6328
 *             # This file is not worth caching the sha1. Either it is too new, or
 
6329
 */
 
6330
      __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6331
      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
6332
      __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
 
6333
      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_n_s__f));
 
6334
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
 
6335
      __Pyx_INCREF(__pyx_v_link_or_sha1);
 
6336
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_link_or_sha1);
 
6337
      __Pyx_GIVEREF(__pyx_v_link_or_sha1);
 
6338
      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
 
6339
      __Pyx_GIVEREF(__pyx_t_6);
 
6340
      __Pyx_INCREF(__pyx_v_executable);
 
6341
      PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_executable);
 
6342
      __Pyx_GIVEREF(__pyx_v_executable);
 
6343
      __Pyx_INCREF(__pyx_v_packed_stat);
 
6344
      PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_v_packed_stat);
 
6345
      __Pyx_GIVEREF(__pyx_v_packed_stat);
 
6346
      __pyx_t_6 = 0;
 
6347
 
 
6348
      /* "bzrlib/_dirstate_helpers_pyx.pyx":924
 
6349
 *                 # over-shaing is during initial add, which this catches.
 
6350
 *             link_or_sha1 = self._sha1_file(abspath)
 
6351
 *             entry[1][0] = ('f', link_or_sha1, stat_value.st_size,             # <<<<<<<<<<<<<<
 
6352
 *                            executable, packed_stat)
 
6353
 *         else:
 
6354
 */
 
6355
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6356
      __Pyx_GOTREF(__pyx_t_6);
 
6357
      if (__Pyx_SetItemInt(__pyx_t_6, 0, ((PyObject *)__pyx_t_7), sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6358
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
6359
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
6360
      goto __pyx_L9;
 
6361
    }
 
6362
    /*else*/ {
 
6363
 
 
6364
      /* "bzrlib/_dirstate_helpers_pyx.pyx":932
 
6365
 *             # *not* set the IN_MEMORY_MODIFIED flag. (But we'll save the
 
6366
 *             # updated values if there is *other* data worth saving.)
 
6367
 *             entry[1][0] = ('f', '', stat_value.st_size, executable,             # <<<<<<<<<<<<<<
 
6368
 *                            DirState.NULLSTAT)
 
6369
 *             worth_saving = 0
 
6370
 */
 
6371
      __pyx_t_7 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_size); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6372
      __Pyx_GOTREF(__pyx_t_7);
 
6373
 
 
6374
      /* "bzrlib/_dirstate_helpers_pyx.pyx":933
 
6375
 *             # updated values if there is *other* data worth saving.)
 
6376
 *             entry[1][0] = ('f', '', stat_value.st_size, executable,
 
6377
 *                            DirState.NULLSTAT)             # <<<<<<<<<<<<<<
 
6378
 *             worth_saving = 0
 
6379
 *     elif minikind == c'd':
 
6380
 */
 
6381
      __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__DirState); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6382
      __Pyx_GOTREF(__pyx_t_6);
 
6383
      __pyx_t_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__NULLSTAT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6384
      __Pyx_GOTREF(__pyx_t_1);
 
6385
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
6386
      __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6387
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
6388
      __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
 
6389
      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__f));
 
6390
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
 
6391
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
 
6392
      PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_kp_s_5));
 
6393
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
 
6394
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_7);
 
6395
      __Pyx_GIVEREF(__pyx_t_7);
 
6396
      __Pyx_INCREF(__pyx_v_executable);
 
6397
      PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_executable);
 
6398
      __Pyx_GIVEREF(__pyx_v_executable);
 
6399
      PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_1);
 
6400
      __Pyx_GIVEREF(__pyx_t_1);
 
6401
      __pyx_t_7 = 0;
 
6402
      __pyx_t_1 = 0;
 
6403
 
 
6404
      /* "bzrlib/_dirstate_helpers_pyx.pyx":932
 
6405
 *             # *not* set the IN_MEMORY_MODIFIED flag. (But we'll save the
 
6406
 *             # updated values if there is *other* data worth saving.)
 
6407
 *             entry[1][0] = ('f', '', stat_value.st_size, executable,             # <<<<<<<<<<<<<<
 
6408
 *                            DirState.NULLSTAT)
 
6409
 *             worth_saving = 0
 
6410
 */
 
6411
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6412
      __Pyx_GOTREF(__pyx_t_1);
 
6413
      if (__Pyx_SetItemInt(__pyx_t_1, 0, ((PyObject *)__pyx_t_6), sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6414
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
6415
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
6416
 
 
6417
      /* "bzrlib/_dirstate_helpers_pyx.pyx":934
 
6418
 *             entry[1][0] = ('f', '', stat_value.st_size, executable,
 
6419
 *                            DirState.NULLSTAT)
 
6420
 *             worth_saving = 0             # <<<<<<<<<<<<<<
 
6421
 *     elif minikind == c'd':
 
6422
 *         entry[1][0] = ('d', '', 0, False, packed_stat)
 
6423
 */
 
6424
      __pyx_v_worth_saving = 0;
 
6425
    }
 
6426
    __pyx_L9:;
 
6427
    break;
 
6428
 
 
6429
    /* "bzrlib/_dirstate_helpers_pyx.pyx":935
 
6430
 *                            DirState.NULLSTAT)
 
6431
 *             worth_saving = 0
 
6432
 *     elif minikind == c'd':             # <<<<<<<<<<<<<<
 
6433
 *         entry[1][0] = ('d', '', 0, False, packed_stat)
 
6434
 *         if saved_minikind != c'd':
 
6435
 */
 
6436
    case 'd':
 
6437
 
 
6438
    /* "bzrlib/_dirstate_helpers_pyx.pyx":936
 
6439
 *             worth_saving = 0
 
6440
 *     elif minikind == c'd':
 
6441
 *         entry[1][0] = ('d', '', 0, False, packed_stat)             # <<<<<<<<<<<<<<
 
6442
 *         if saved_minikind != c'd':
 
6443
 *             # This changed from something into a directory. Make sure we
 
6444
 */
 
6445
    __pyx_t_6 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6446
    __Pyx_GOTREF(__pyx_t_6);
 
6447
    __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6448
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
6449
    __Pyx_INCREF(((PyObject *)__pyx_n_s__d));
 
6450
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__d));
 
6451
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__d));
 
6452
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
 
6453
    PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_5));
 
6454
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
 
6455
    __Pyx_INCREF(__pyx_int_0);
 
6456
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_int_0);
 
6457
    __Pyx_GIVEREF(__pyx_int_0);
 
6458
    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6);
 
6459
    __Pyx_GIVEREF(__pyx_t_6);
 
6460
    __Pyx_INCREF(__pyx_v_packed_stat);
 
6461
    PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_packed_stat);
 
6462
    __Pyx_GIVEREF(__pyx_v_packed_stat);
 
6463
    __pyx_t_6 = 0;
 
6464
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6465
    __Pyx_GOTREF(__pyx_t_6);
 
6466
    if (__Pyx_SetItemInt(__pyx_t_6, 0, ((PyObject *)__pyx_t_1), sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6467
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
6468
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
6469
 
 
6470
    /* "bzrlib/_dirstate_helpers_pyx.pyx":937
 
6471
 *     elif minikind == c'd':
 
6472
 *         entry[1][0] = ('d', '', 0, False, packed_stat)
 
6473
 *         if saved_minikind != c'd':             # <<<<<<<<<<<<<<
 
6474
 *             # This changed from something into a directory. Make sure we
 
6475
 *             # have a directory block for it. This doesn't happen very
 
6476
 */
 
6477
    __pyx_t_5 = (__pyx_v_saved_minikind != 'd');
 
6478
    if (__pyx_t_5) {
 
6479
 
 
6480
      /* "bzrlib/_dirstate_helpers_pyx.pyx":942
 
6481
 *             # often, so this doesn't have to be super fast.
 
6482
 *             block_index, entry_index, dir_present, file_present = \
 
6483
 *                 self._get_block_entry_index(entry[0][0], entry[0][1], 0)             # <<<<<<<<<<<<<<
 
6484
 *             self._ensure_block(block_index, entry_index,
 
6485
 *                                pathjoin(entry[0][0], entry[0][1]))
 
6486
 */
 
6487
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_21); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6488
      __Pyx_GOTREF(__pyx_t_1);
 
6489
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6490
      __Pyx_GOTREF(__pyx_t_6);
 
6491
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6492
      __Pyx_GOTREF(__pyx_t_7);
 
6493
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
6494
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6495
      __Pyx_GOTREF(__pyx_t_6);
 
6496
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_6, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6497
      __Pyx_GOTREF(__pyx_t_11);
 
6498
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
6499
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6500
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
6501
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
 
6502
      __Pyx_GIVEREF(__pyx_t_7);
 
6503
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11);
 
6504
      __Pyx_GIVEREF(__pyx_t_11);
 
6505
      __Pyx_INCREF(__pyx_int_0);
 
6506
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_int_0);
 
6507
      __Pyx_GIVEREF(__pyx_int_0);
 
6508
      __pyx_t_7 = 0;
 
6509
      __pyx_t_11 = 0;
 
6510
      __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6511
      __Pyx_GOTREF(__pyx_t_11);
 
6512
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
6513
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
6514
      if (PyTuple_CheckExact(__pyx_t_11) && likely(PyTuple_GET_SIZE(__pyx_t_11) == 4)) {
 
6515
        PyObject* tuple = __pyx_t_11;
 
6516
        __pyx_t_6 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_6);
 
6517
        __pyx_t_1 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_1);
 
6518
        __pyx_t_7 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_7);
 
6519
        __pyx_t_12 = PyTuple_GET_ITEM(tuple, 3); __Pyx_INCREF(__pyx_t_12);
 
6520
 
 
6521
        /* "bzrlib/_dirstate_helpers_pyx.pyx":941
 
6522
 *             # have a directory block for it. This doesn't happen very
 
6523
 *             # often, so this doesn't have to be super fast.
 
6524
 *             block_index, entry_index, dir_present, file_present = \             # <<<<<<<<<<<<<<
 
6525
 *                 self._get_block_entry_index(entry[0][0], entry[0][1], 0)
 
6526
 *             self._ensure_block(block_index, entry_index,
 
6527
 */
 
6528
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
6529
        __Pyx_DECREF(__pyx_v_block_index);
 
6530
        __pyx_v_block_index = __pyx_t_6;
 
6531
        __pyx_t_6 = 0;
 
6532
        __Pyx_DECREF(__pyx_v_entry_index);
 
6533
        __pyx_v_entry_index = __pyx_t_1;
 
6534
        __pyx_t_1 = 0;
 
6535
        __Pyx_DECREF(__pyx_v_dir_present);
 
6536
        __pyx_v_dir_present = __pyx_t_7;
 
6537
        __pyx_t_7 = 0;
 
6538
        __Pyx_DECREF(__pyx_v_file_present);
 
6539
        __pyx_v_file_present = __pyx_t_12;
 
6540
        __pyx_t_12 = 0;
 
6541
      } else {
 
6542
        __pyx_t_13 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6543
        __Pyx_GOTREF(__pyx_t_13);
 
6544
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
6545
        __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_13, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6546
        __Pyx_GOTREF(__pyx_t_6);
 
6547
        __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_13, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6548
        __Pyx_GOTREF(__pyx_t_1);
 
6549
        __pyx_t_7 = __Pyx_UnpackItem(__pyx_t_13, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6550
        __Pyx_GOTREF(__pyx_t_7);
 
6551
        __pyx_t_12 = __Pyx_UnpackItem(__pyx_t_13, 3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6552
        __Pyx_GOTREF(__pyx_t_12);
 
6553
        if (__Pyx_EndUnpack(__pyx_t_13, 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6554
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
 
6555
        __Pyx_DECREF(__pyx_v_block_index);
 
6556
        __pyx_v_block_index = __pyx_t_6;
 
6557
        __pyx_t_6 = 0;
 
6558
        __Pyx_DECREF(__pyx_v_entry_index);
 
6559
        __pyx_v_entry_index = __pyx_t_1;
 
6560
        __pyx_t_1 = 0;
 
6561
        __Pyx_DECREF(__pyx_v_dir_present);
 
6562
        __pyx_v_dir_present = __pyx_t_7;
 
6563
        __pyx_t_7 = 0;
 
6564
        __Pyx_DECREF(__pyx_v_file_present);
 
6565
        __pyx_v_file_present = __pyx_t_12;
 
6566
        __pyx_t_12 = 0;
 
6567
      }
 
6568
 
 
6569
      /* "bzrlib/_dirstate_helpers_pyx.pyx":943
 
6570
 *             block_index, entry_index, dir_present, file_present = \
 
6571
 *                 self._get_block_entry_index(entry[0][0], entry[0][1], 0)
 
6572
 *             self._ensure_block(block_index, entry_index,             # <<<<<<<<<<<<<<
 
6573
 *                                pathjoin(entry[0][0], entry[0][1]))
 
6574
 *         else:
 
6575
 */
 
6576
      __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___ensure_block); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6577
      __Pyx_GOTREF(__pyx_t_11);
 
6578
 
 
6579
      /* "bzrlib/_dirstate_helpers_pyx.pyx":944
 
6580
 *                 self._get_block_entry_index(entry[0][0], entry[0][1], 0)
 
6581
 *             self._ensure_block(block_index, entry_index,
 
6582
 *                                pathjoin(entry[0][0], entry[0][1]))             # <<<<<<<<<<<<<<
 
6583
 *         else:
 
6584
 *             # Any changes are derived trivially from the stat object, not worth
 
6585
 */
 
6586
      __pyx_t_12 = __Pyx_GetName(__pyx_m, __pyx_n_s__pathjoin); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6587
      __Pyx_GOTREF(__pyx_t_12);
 
6588
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6589
      __Pyx_GOTREF(__pyx_t_7);
 
6590
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_7, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6591
      __Pyx_GOTREF(__pyx_t_1);
 
6592
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
6593
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6594
      __Pyx_GOTREF(__pyx_t_7);
 
6595
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6596
      __Pyx_GOTREF(__pyx_t_6);
 
6597
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
6598
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6599
      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
6600
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
 
6601
      __Pyx_GIVEREF(__pyx_t_1);
 
6602
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
 
6603
      __Pyx_GIVEREF(__pyx_t_6);
 
6604
      __pyx_t_1 = 0;
 
6605
      __pyx_t_6 = 0;
 
6606
      __pyx_t_6 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6607
      __Pyx_GOTREF(__pyx_t_6);
 
6608
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
6609
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
6610
      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6611
      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
6612
      __Pyx_INCREF(__pyx_v_block_index);
 
6613
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_block_index);
 
6614
      __Pyx_GIVEREF(__pyx_v_block_index);
 
6615
      __Pyx_INCREF(__pyx_v_entry_index);
 
6616
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_entry_index);
 
6617
      __Pyx_GIVEREF(__pyx_v_entry_index);
 
6618
      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
 
6619
      __Pyx_GIVEREF(__pyx_t_6);
 
6620
      __pyx_t_6 = 0;
 
6621
      __pyx_t_6 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6622
      __Pyx_GOTREF(__pyx_t_6);
 
6623
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
6624
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
6625
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
6626
      goto __pyx_L10;
 
6627
    }
 
6628
    /*else*/ {
 
6629
 
 
6630
      /* "bzrlib/_dirstate_helpers_pyx.pyx":948
 
6631
 *             # Any changes are derived trivially from the stat object, not worth
 
6632
 *             # re-writing a dirstate for just this
 
6633
 *             worth_saving = 0             # <<<<<<<<<<<<<<
 
6634
 *     elif minikind == c'l':
 
6635
 *         if saved_minikind == c'l':
 
6636
 */
 
6637
      __pyx_v_worth_saving = 0;
 
6638
    }
 
6639
    __pyx_L10:;
 
6640
    break;
 
6641
 
 
6642
    /* "bzrlib/_dirstate_helpers_pyx.pyx":949
 
6643
 *             # re-writing a dirstate for just this
 
6644
 *             worth_saving = 0
 
6645
 *     elif minikind == c'l':             # <<<<<<<<<<<<<<
 
6646
 *         if saved_minikind == c'l':
 
6647
 *             # If the object hasn't changed kind, it isn't worth saving the
 
6648
 */
 
6649
    case 'l':
 
6650
 
 
6651
    /* "bzrlib/_dirstate_helpers_pyx.pyx":950
 
6652
 *             worth_saving = 0
 
6653
 *     elif minikind == c'l':
 
6654
 *         if saved_minikind == c'l':             # <<<<<<<<<<<<<<
 
6655
 *             # If the object hasn't changed kind, it isn't worth saving the
 
6656
 *             # dirstate just for a symlink. The default is 'fast symlinks' which
 
6657
 */
 
6658
    __pyx_t_5 = (__pyx_v_saved_minikind == 'l');
 
6659
    if (__pyx_t_5) {
 
6660
 
 
6661
      /* "bzrlib/_dirstate_helpers_pyx.pyx":955
 
6662
 *             # save the target in the inode entry, rather than separately. So to
 
6663
 *             # stat, we've already read everything off disk.
 
6664
 *             worth_saving = 0             # <<<<<<<<<<<<<<
 
6665
 *         link_or_sha1 = self._read_link(abspath, saved_link_or_sha1)
 
6666
 *         if self._cutoff_time is None:
 
6667
 */
 
6668
      __pyx_v_worth_saving = 0;
 
6669
      goto __pyx_L11;
 
6670
    }
 
6671
    __pyx_L11:;
 
6672
 
 
6673
    /* "bzrlib/_dirstate_helpers_pyx.pyx":956
 
6674
 *             # stat, we've already read everything off disk.
 
6675
 *             worth_saving = 0
 
6676
 *         link_or_sha1 = self._read_link(abspath, saved_link_or_sha1)             # <<<<<<<<<<<<<<
 
6677
 *         if self._cutoff_time is None:
 
6678
 *             self._sha_cutoff_time()
 
6679
 */
 
6680
    __pyx_t_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___read_link); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6681
    __Pyx_GOTREF(__pyx_t_6);
 
6682
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6683
    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
6684
    __Pyx_INCREF(__pyx_v_abspath);
 
6685
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_abspath);
 
6686
    __Pyx_GIVEREF(__pyx_v_abspath);
 
6687
    __Pyx_INCREF(__pyx_v_saved_link_or_sha1);
 
6688
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_saved_link_or_sha1);
 
6689
    __Pyx_GIVEREF(__pyx_v_saved_link_or_sha1);
 
6690
    __pyx_t_11 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6691
    __Pyx_GOTREF(__pyx_t_11);
 
6692
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
6693
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
6694
    __Pyx_DECREF(__pyx_v_link_or_sha1);
 
6695
    __pyx_v_link_or_sha1 = __pyx_t_11;
 
6696
    __pyx_t_11 = 0;
 
6697
 
 
6698
    /* "bzrlib/_dirstate_helpers_pyx.pyx":957
 
6699
 *             worth_saving = 0
 
6700
 *         link_or_sha1 = self._read_link(abspath, saved_link_or_sha1)
 
6701
 *         if self._cutoff_time is None:             # <<<<<<<<<<<<<<
 
6702
 *             self._sha_cutoff_time()
 
6703
 *         if (stat_value.st_mtime < self._cutoff_time
 
6704
 */
 
6705
    __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___cutoff_time); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6706
    __Pyx_GOTREF(__pyx_t_11);
 
6707
    __pyx_t_5 = (__pyx_t_11 == Py_None);
 
6708
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
6709
    if (__pyx_t_5) {
 
6710
 
 
6711
      /* "bzrlib/_dirstate_helpers_pyx.pyx":958
 
6712
 *         link_or_sha1 = self._read_link(abspath, saved_link_or_sha1)
 
6713
 *         if self._cutoff_time is None:
 
6714
 *             self._sha_cutoff_time()             # <<<<<<<<<<<<<<
 
6715
 *         if (stat_value.st_mtime < self._cutoff_time
 
6716
 *             and stat_value.st_ctime < self._cutoff_time):
 
6717
 */
 
6718
      __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___sha_cutoff_time); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6719
      __Pyx_GOTREF(__pyx_t_11);
 
6720
      __pyx_t_7 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6721
      __Pyx_GOTREF(__pyx_t_7);
 
6722
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
6723
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
6724
      goto __pyx_L12;
 
6725
    }
 
6726
    __pyx_L12:;
 
6727
 
 
6728
    /* "bzrlib/_dirstate_helpers_pyx.pyx":959
 
6729
 *         if self._cutoff_time is None:
 
6730
 *             self._sha_cutoff_time()
 
6731
 *         if (stat_value.st_mtime < self._cutoff_time             # <<<<<<<<<<<<<<
 
6732
 *             and stat_value.st_ctime < self._cutoff_time):
 
6733
 *             entry[1][0] = ('l', link_or_sha1, stat_value.st_size,
 
6734
 */
 
6735
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_mtime); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6736
    __Pyx_GOTREF(__pyx_t_7);
 
6737
    __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___cutoff_time); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6738
    __Pyx_GOTREF(__pyx_t_11);
 
6739
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_11, Py_LT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6740
    __Pyx_GOTREF(__pyx_t_6);
 
6741
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
6742
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
6743
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6744
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
6745
    if (__pyx_t_5) {
 
6746
 
 
6747
      /* "bzrlib/_dirstate_helpers_pyx.pyx":960
 
6748
 *             self._sha_cutoff_time()
 
6749
 *         if (stat_value.st_mtime < self._cutoff_time
 
6750
 *             and stat_value.st_ctime < self._cutoff_time):             # <<<<<<<<<<<<<<
 
6751
 *             entry[1][0] = ('l', link_or_sha1, stat_value.st_size,
 
6752
 *                            False, packed_stat)
 
6753
 */
 
6754
      __pyx_t_6 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_ctime); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6755
      __Pyx_GOTREF(__pyx_t_6);
 
6756
      __pyx_t_11 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___cutoff_time); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6757
      __Pyx_GOTREF(__pyx_t_11);
 
6758
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_11, Py_LT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6759
      __Pyx_GOTREF(__pyx_t_7);
 
6760
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
6761
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
6762
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6763
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
6764
      __pyx_t_3 = __pyx_t_4;
 
6765
    } else {
 
6766
      __pyx_t_3 = __pyx_t_5;
 
6767
    }
 
6768
    if (__pyx_t_3) {
 
6769
 
 
6770
      /* "bzrlib/_dirstate_helpers_pyx.pyx":961
 
6771
 *         if (stat_value.st_mtime < self._cutoff_time
 
6772
 *             and stat_value.st_ctime < self._cutoff_time):
 
6773
 *             entry[1][0] = ('l', link_or_sha1, stat_value.st_size,             # <<<<<<<<<<<<<<
 
6774
 *                            False, packed_stat)
 
6775
 *         else:
 
6776
 */
 
6777
      __pyx_t_7 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_size); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6778
      __Pyx_GOTREF(__pyx_t_7);
 
6779
 
 
6780
      /* "bzrlib/_dirstate_helpers_pyx.pyx":962
 
6781
 *             and stat_value.st_ctime < self._cutoff_time):
 
6782
 *             entry[1][0] = ('l', link_or_sha1, stat_value.st_size,
 
6783
 *                            False, packed_stat)             # <<<<<<<<<<<<<<
 
6784
 *         else:
 
6785
 *             entry[1][0] = ('l', '', stat_value.st_size,
 
6786
 */
 
6787
      __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6788
      __Pyx_GOTREF(__pyx_t_11);
 
6789
      __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6790
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
6791
      __Pyx_INCREF(((PyObject *)__pyx_n_s__l));
 
6792
      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_n_s__l));
 
6793
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l));
 
6794
      __Pyx_INCREF(__pyx_v_link_or_sha1);
 
6795
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_link_or_sha1);
 
6796
      __Pyx_GIVEREF(__pyx_v_link_or_sha1);
 
6797
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_7);
 
6798
      __Pyx_GIVEREF(__pyx_t_7);
 
6799
      PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_11);
 
6800
      __Pyx_GIVEREF(__pyx_t_11);
 
6801
      __Pyx_INCREF(__pyx_v_packed_stat);
 
6802
      PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_v_packed_stat);
 
6803
      __Pyx_GIVEREF(__pyx_v_packed_stat);
 
6804
      __pyx_t_7 = 0;
 
6805
      __pyx_t_11 = 0;
 
6806
 
 
6807
      /* "bzrlib/_dirstate_helpers_pyx.pyx":961
 
6808
 *         if (stat_value.st_mtime < self._cutoff_time
 
6809
 *             and stat_value.st_ctime < self._cutoff_time):
 
6810
 *             entry[1][0] = ('l', link_or_sha1, stat_value.st_size,             # <<<<<<<<<<<<<<
 
6811
 *                            False, packed_stat)
 
6812
 *         else:
 
6813
 */
 
6814
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6815
      __Pyx_GOTREF(__pyx_t_11);
 
6816
      if (__Pyx_SetItemInt(__pyx_t_11, 0, ((PyObject *)__pyx_t_6), sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6817
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
6818
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
6819
      goto __pyx_L13;
 
6820
    }
 
6821
    /*else*/ {
 
6822
 
 
6823
      /* "bzrlib/_dirstate_helpers_pyx.pyx":964
 
6824
 *                            False, packed_stat)
 
6825
 *         else:
 
6826
 *             entry[1][0] = ('l', '', stat_value.st_size,             # <<<<<<<<<<<<<<
 
6827
 *                            False, DirState.NULLSTAT)
 
6828
 *     if worth_saving:
 
6829
 */
 
6830
      __pyx_t_6 = PyObject_GetAttr(__pyx_v_stat_value, __pyx_n_s__st_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6831
      __Pyx_GOTREF(__pyx_t_6);
 
6832
 
 
6833
      /* "bzrlib/_dirstate_helpers_pyx.pyx":965
 
6834
 *         else:
 
6835
 *             entry[1][0] = ('l', '', stat_value.st_size,
 
6836
 *                            False, DirState.NULLSTAT)             # <<<<<<<<<<<<<<
 
6837
 *     if worth_saving:
 
6838
 *         # Note, even though _mark_modified will only set
 
6839
 */
 
6840
      __pyx_t_11 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6841
      __Pyx_GOTREF(__pyx_t_11);
 
6842
      __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__DirState); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6843
      __Pyx_GOTREF(__pyx_t_7);
 
6844
      __pyx_t_12 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__NULLSTAT); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6845
      __Pyx_GOTREF(__pyx_t_12);
 
6846
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
6847
      __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6848
      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
6849
      __Pyx_INCREF(((PyObject *)__pyx_n_s__l));
 
6850
      PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_n_s__l));
 
6851
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l));
 
6852
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
 
6853
      PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_kp_s_5));
 
6854
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
 
6855
      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
 
6856
      __Pyx_GIVEREF(__pyx_t_6);
 
6857
      PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_11);
 
6858
      __Pyx_GIVEREF(__pyx_t_11);
 
6859
      PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_12);
 
6860
      __Pyx_GIVEREF(__pyx_t_12);
 
6861
      __pyx_t_6 = 0;
 
6862
      __pyx_t_11 = 0;
 
6863
      __pyx_t_12 = 0;
 
6864
 
 
6865
      /* "bzrlib/_dirstate_helpers_pyx.pyx":964
 
6866
 *                            False, packed_stat)
 
6867
 *         else:
 
6868
 *             entry[1][0] = ('l', '', stat_value.st_size,             # <<<<<<<<<<<<<<
 
6869
 *                            False, DirState.NULLSTAT)
 
6870
 *     if worth_saving:
 
6871
 */
 
6872
      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6873
      __Pyx_GOTREF(__pyx_t_12);
 
6874
      if (__Pyx_SetItemInt(__pyx_t_12, 0, ((PyObject *)__pyx_t_7), sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6875
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
6876
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
6877
    }
 
6878
    __pyx_L13:;
 
6879
    break;
 
6880
  }
 
6881
 
 
6882
  /* "bzrlib/_dirstate_helpers_pyx.pyx":966
 
6883
 *             entry[1][0] = ('l', '', stat_value.st_size,
 
6884
 *                            False, DirState.NULLSTAT)
 
6885
 *     if worth_saving:             # <<<<<<<<<<<<<<
 
6886
 *         # Note, even though _mark_modified will only set
 
6887
 *         # IN_MEMORY_HASH_MODIFIED, it still isn't worth
 
6888
 */
 
6889
  if (__pyx_v_worth_saving) {
 
6890
 
 
6891
    /* "bzrlib/_dirstate_helpers_pyx.pyx":969
 
6892
 *         # Note, even though _mark_modified will only set
 
6893
 *         # IN_MEMORY_HASH_MODIFIED, it still isn't worth
 
6894
 *         self._mark_modified([entry])             # <<<<<<<<<<<<<<
 
6895
 *     return link_or_sha1
 
6896
 * 
 
6897
 */
 
6898
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___mark_modified); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6899
    __Pyx_GOTREF(__pyx_t_7);
 
6900
    __pyx_t_12 = PyList_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6901
    __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
6902
    __Pyx_INCREF(__pyx_v_entry);
 
6903
    PyList_SET_ITEM(__pyx_t_12, 0, __pyx_v_entry);
 
6904
    __Pyx_GIVEREF(__pyx_v_entry);
 
6905
    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6906
    __Pyx_GOTREF(((PyObject *)__pyx_t_11));
 
6907
    PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_12));
 
6908
    __Pyx_GIVEREF(((PyObject *)__pyx_t_12));
 
6909
    __pyx_t_12 = 0;
 
6910
    __pyx_t_12 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
6911
    __Pyx_GOTREF(__pyx_t_12);
 
6912
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
6913
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
 
6914
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
6915
    goto __pyx_L14;
 
6916
  }
 
6917
  __pyx_L14:;
 
6918
 
 
6919
  /* "bzrlib/_dirstate_helpers_pyx.pyx":970
 
6920
 *         # IN_MEMORY_HASH_MODIFIED, it still isn't worth
 
6921
 *         self._mark_modified([entry])
 
6922
 *     return link_or_sha1             # <<<<<<<<<<<<<<
 
6923
 * 
 
6924
 * 
 
6925
 */
 
6926
  __Pyx_XDECREF(__pyx_r);
 
6927
  __Pyx_INCREF(__pyx_v_link_or_sha1);
 
6928
  __pyx_r = __pyx_v_link_or_sha1;
 
6929
  goto __pyx_L0;
 
6930
 
 
6931
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
6932
  goto __pyx_L0;
 
6933
  __pyx_L1_error:;
 
6934
  __Pyx_XDECREF(__pyx_t_1);
 
6935
  __Pyx_XDECREF(__pyx_t_6);
 
6936
  __Pyx_XDECREF(__pyx_t_7);
 
6937
  __Pyx_XDECREF(__pyx_t_11);
 
6938
  __Pyx_XDECREF(__pyx_t_12);
 
6939
  __Pyx_XDECREF(__pyx_t_13);
 
6940
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._update_entry");
 
6941
  __pyx_r = 0;
 
6942
  __pyx_L0:;
 
6943
  __Pyx_DECREF(__pyx_v_packed_stat);
 
6944
  __Pyx_DECREF(__pyx_v_saved_link_or_sha1);
 
6945
  __Pyx_DECREF(__pyx_v_saved_file_size);
 
6946
  __Pyx_DECREF(__pyx_v_saved_executable);
 
6947
  __Pyx_DECREF(__pyx_v_saved_packed_stat);
 
6948
  __Pyx_DECREF(__pyx_v_link_or_sha1);
 
6949
  __Pyx_DECREF(__pyx_v_executable);
 
6950
  __Pyx_DECREF(__pyx_v_block_index);
 
6951
  __Pyx_DECREF(__pyx_v_entry_index);
 
6952
  __Pyx_DECREF(__pyx_v_dir_present);
 
6953
  __Pyx_DECREF(__pyx_v_file_present);
 
6954
  __Pyx_XGIVEREF(__pyx_r);
 
6955
  __Pyx_RefNannyFinishContext();
 
6956
  return __pyx_r;
 
6957
}
 
6958
 
 
6959
/* "bzrlib/_dirstate_helpers_pyx.pyx":974
 
6960
 * 
 
6961
 * # TODO: Do we want to worry about exceptions here?
 
6962
 * cdef char _minikind_from_string(object string) except? -1:             # <<<<<<<<<<<<<<
 
6963
 *     """Convert a python string to a char."""
 
6964
 *     return PyString_AsString(string)[0]
 
6965
 */
 
6966
 
 
6967
static  char __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_from_string(PyObject *__pyx_v_string) {
 
6968
  char __pyx_r;
 
6969
  __Pyx_RefNannySetupContext("_minikind_from_string");
 
6970
 
 
6971
  /* "bzrlib/_dirstate_helpers_pyx.pyx":976
 
6972
 * cdef char _minikind_from_string(object string) except? -1:
 
6973
 *     """Convert a python string to a char."""
 
6974
 *     return PyString_AsString(string)[0]             # <<<<<<<<<<<<<<
 
6975
 * 
 
6976
 * 
 
6977
 */
 
6978
  __pyx_r = (PyString_AsString(__pyx_v_string)[0]);
 
6979
  goto __pyx_L0;
 
6980
 
 
6981
  __pyx_r = 0;
 
6982
  __pyx_L0:;
 
6983
  __Pyx_RefNannyFinishContext();
 
6984
  return __pyx_r;
 
6985
}
 
6986
 
 
6987
/* "bzrlib/_dirstate_helpers_pyx.pyx":993
 
6988
 * 
 
6989
 * 
 
6990
 * cdef object _minikind_to_kind(char minikind):             # <<<<<<<<<<<<<<
 
6991
 *     """Create a string kind for minikind."""
 
6992
 *     cdef char _minikind[1]
 
6993
 */
 
6994
 
 
6995
static  PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_to_kind(char __pyx_v_minikind) {
 
6996
  char __pyx_v__minikind[1];
 
6997
  PyObject *__pyx_r = NULL;
 
6998
  PyObject *__pyx_t_1 = NULL;
 
6999
  PyObject *__pyx_t_2 = NULL;
 
7000
  __Pyx_RefNannySetupContext("_minikind_to_kind");
 
7001
 
 
7002
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1006
 
7003
 *     elif minikind == c'l':
 
7004
 *         return _kind_symlink
 
7005
 *     elif minikind == c't':             # <<<<<<<<<<<<<<
 
7006
 *         return _kind_tree_reference
 
7007
 *     _minikind[0] = minikind
 
7008
 */
 
7009
  switch (__pyx_v_minikind) {
 
7010
 
 
7011
    /* "bzrlib/_dirstate_helpers_pyx.pyx":996
 
7012
 *     """Create a string kind for minikind."""
 
7013
 *     cdef char _minikind[1]
 
7014
 *     if minikind == c'f':             # <<<<<<<<<<<<<<
 
7015
 *         return _kind_file
 
7016
 *     elif minikind == c'd':
 
7017
 */
 
7018
    case 'f':
 
7019
 
 
7020
    /* "bzrlib/_dirstate_helpers_pyx.pyx":997
 
7021
 *     cdef char _minikind[1]
 
7022
 *     if minikind == c'f':
 
7023
 *         return _kind_file             # <<<<<<<<<<<<<<
 
7024
 *     elif minikind == c'd':
 
7025
 *         return _kind_directory
 
7026
 */
 
7027
    __Pyx_XDECREF(__pyx_r);
 
7028
    __Pyx_INCREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_file);
 
7029
    __pyx_r = __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_file;
 
7030
    goto __pyx_L0;
 
7031
    break;
 
7032
 
 
7033
    /* "bzrlib/_dirstate_helpers_pyx.pyx":998
 
7034
 *     if minikind == c'f':
 
7035
 *         return _kind_file
 
7036
 *     elif minikind == c'd':             # <<<<<<<<<<<<<<
 
7037
 *         return _kind_directory
 
7038
 *     elif minikind == c'a':
 
7039
 */
 
7040
    case 'd':
 
7041
 
 
7042
    /* "bzrlib/_dirstate_helpers_pyx.pyx":999
 
7043
 *         return _kind_file
 
7044
 *     elif minikind == c'd':
 
7045
 *         return _kind_directory             # <<<<<<<<<<<<<<
 
7046
 *     elif minikind == c'a':
 
7047
 *         return _kind_absent
 
7048
 */
 
7049
    __Pyx_XDECREF(__pyx_r);
 
7050
    __Pyx_INCREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_directory);
 
7051
    __pyx_r = __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_directory;
 
7052
    goto __pyx_L0;
 
7053
    break;
 
7054
 
 
7055
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1000
 
7056
 *     elif minikind == c'd':
 
7057
 *         return _kind_directory
 
7058
 *     elif minikind == c'a':             # <<<<<<<<<<<<<<
 
7059
 *         return _kind_absent
 
7060
 *     elif minikind == c'r':
 
7061
 */
 
7062
    case 'a':
 
7063
 
 
7064
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1001
 
7065
 *         return _kind_directory
 
7066
 *     elif minikind == c'a':
 
7067
 *         return _kind_absent             # <<<<<<<<<<<<<<
 
7068
 *     elif minikind == c'r':
 
7069
 *         return _kind_relocated
 
7070
 */
 
7071
    __Pyx_XDECREF(__pyx_r);
 
7072
    __Pyx_INCREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_absent);
 
7073
    __pyx_r = __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_absent;
 
7074
    goto __pyx_L0;
 
7075
    break;
 
7076
 
 
7077
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1002
 
7078
 *     elif minikind == c'a':
 
7079
 *         return _kind_absent
 
7080
 *     elif minikind == c'r':             # <<<<<<<<<<<<<<
 
7081
 *         return _kind_relocated
 
7082
 *     elif minikind == c'l':
 
7083
 */
 
7084
    case 'r':
 
7085
 
 
7086
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1003
 
7087
 *         return _kind_absent
 
7088
 *     elif minikind == c'r':
 
7089
 *         return _kind_relocated             # <<<<<<<<<<<<<<
 
7090
 *     elif minikind == c'l':
 
7091
 *         return _kind_symlink
 
7092
 */
 
7093
    __Pyx_XDECREF(__pyx_r);
 
7094
    __Pyx_INCREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_relocated);
 
7095
    __pyx_r = __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_relocated;
 
7096
    goto __pyx_L0;
 
7097
    break;
 
7098
 
 
7099
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1004
 
7100
 *     elif minikind == c'r':
 
7101
 *         return _kind_relocated
 
7102
 *     elif minikind == c'l':             # <<<<<<<<<<<<<<
 
7103
 *         return _kind_symlink
 
7104
 *     elif minikind == c't':
 
7105
 */
 
7106
    case 'l':
 
7107
 
 
7108
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1005
 
7109
 *         return _kind_relocated
 
7110
 *     elif minikind == c'l':
 
7111
 *         return _kind_symlink             # <<<<<<<<<<<<<<
 
7112
 *     elif minikind == c't':
 
7113
 *         return _kind_tree_reference
 
7114
 */
 
7115
    __Pyx_XDECREF(__pyx_r);
 
7116
    __Pyx_INCREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_symlink);
 
7117
    __pyx_r = __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_symlink;
 
7118
    goto __pyx_L0;
 
7119
    break;
 
7120
 
 
7121
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1006
 
7122
 *     elif minikind == c'l':
 
7123
 *         return _kind_symlink
 
7124
 *     elif minikind == c't':             # <<<<<<<<<<<<<<
 
7125
 *         return _kind_tree_reference
 
7126
 *     _minikind[0] = minikind
 
7127
 */
 
7128
    case 't':
 
7129
 
 
7130
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1007
 
7131
 *         return _kind_symlink
 
7132
 *     elif minikind == c't':
 
7133
 *         return _kind_tree_reference             # <<<<<<<<<<<<<<
 
7134
 *     _minikind[0] = minikind
 
7135
 *     raise KeyError(PyString_FromStringAndSize(_minikind, 1))
 
7136
 */
 
7137
    __Pyx_XDECREF(__pyx_r);
 
7138
    __Pyx_INCREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_tree_reference);
 
7139
    __pyx_r = __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_tree_reference;
 
7140
    goto __pyx_L0;
 
7141
    break;
 
7142
  }
 
7143
 
 
7144
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1008
 
7145
 *     elif minikind == c't':
 
7146
 *         return _kind_tree_reference
 
7147
 *     _minikind[0] = minikind             # <<<<<<<<<<<<<<
 
7148
 *     raise KeyError(PyString_FromStringAndSize(_minikind, 1))
 
7149
 * 
 
7150
 */
 
7151
  (__pyx_v__minikind[0]) = __pyx_v_minikind;
 
7152
 
 
7153
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1009
 
7154
 *         return _kind_tree_reference
 
7155
 *     _minikind[0] = minikind
 
7156
 *     raise KeyError(PyString_FromStringAndSize(_minikind, 1))             # <<<<<<<<<<<<<<
 
7157
 * 
 
7158
 * 
 
7159
 */
 
7160
  __pyx_t_1 = PyString_FromStringAndSize(__pyx_v__minikind, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7161
  __Pyx_GOTREF(__pyx_t_1);
 
7162
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7163
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
7164
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
 
7165
  __Pyx_GIVEREF(__pyx_t_1);
 
7166
  __pyx_t_1 = 0;
 
7167
  __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7168
  __Pyx_GOTREF(__pyx_t_1);
 
7169
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
7170
  __Pyx_Raise(__pyx_t_1, 0, 0);
 
7171
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
7172
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7173
 
 
7174
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
7175
  goto __pyx_L0;
 
7176
  __pyx_L1_error:;
 
7177
  __Pyx_XDECREF(__pyx_t_1);
 
7178
  __Pyx_XDECREF(__pyx_t_2);
 
7179
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx._minikind_to_kind");
 
7180
  __pyx_r = 0;
 
7181
  __pyx_L0:;
 
7182
  __Pyx_XGIVEREF(__pyx_r);
 
7183
  __Pyx_RefNannyFinishContext();
 
7184
  return __pyx_r;
 
7185
}
 
7186
 
 
7187
/* "bzrlib/_dirstate_helpers_pyx.pyx":1012
 
7188
 * 
 
7189
 * 
 
7190
 * cdef int _versioned_minikind(char minikind): # cannot_raise             # <<<<<<<<<<<<<<
 
7191
 *     """Return non-zero if minikind is in fltd"""
 
7192
 *     return (minikind == c'f' or
 
7193
 */
 
7194
 
 
7195
static  int __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(char __pyx_v_minikind) {
 
7196
  int __pyx_r;
 
7197
  int __pyx_t_1;
 
7198
  __Pyx_RefNannySetupContext("_versioned_minikind");
 
7199
 
 
7200
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1014
 
7201
 * cdef int _versioned_minikind(char minikind): # cannot_raise
 
7202
 *     """Return non-zero if minikind is in fltd"""
 
7203
 *     return (minikind == c'f' or             # <<<<<<<<<<<<<<
 
7204
 *             minikind == c'd' or
 
7205
 *             minikind == c'l' or
 
7206
 */
 
7207
  switch (__pyx_v_minikind) {
 
7208
    case 'f':
 
7209
 
 
7210
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1015
 
7211
 *     """Return non-zero if minikind is in fltd"""
 
7212
 *     return (minikind == c'f' or
 
7213
 *             minikind == c'd' or             # <<<<<<<<<<<<<<
 
7214
 *             minikind == c'l' or
 
7215
 *             minikind == c't')
 
7216
 */
 
7217
    case 'd':
 
7218
 
 
7219
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1016
 
7220
 *     return (minikind == c'f' or
 
7221
 *             minikind == c'd' or
 
7222
 *             minikind == c'l' or             # <<<<<<<<<<<<<<
 
7223
 *             minikind == c't')
 
7224
 * 
 
7225
 */
 
7226
    case 'l':
 
7227
 
 
7228
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1017
 
7229
 *             minikind == c'd' or
 
7230
 *             minikind == c'l' or
 
7231
 *             minikind == c't')             # <<<<<<<<<<<<<<
 
7232
 * 
 
7233
 * 
 
7234
 */
 
7235
    case 't':
 
7236
 
 
7237
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1014
 
7238
 * cdef int _versioned_minikind(char minikind): # cannot_raise
 
7239
 *     """Return non-zero if minikind is in fltd"""
 
7240
 *     return (minikind == c'f' or             # <<<<<<<<<<<<<<
 
7241
 *             minikind == c'd' or
 
7242
 *             minikind == c'l' or
 
7243
 */
 
7244
    __pyx_t_1 = 1;
 
7245
    break;
 
7246
    default:
 
7247
    __pyx_t_1 = 0;
 
7248
    break;
 
7249
  }
 
7250
  __pyx_r = __pyx_t_1;
 
7251
  goto __pyx_L0;
 
7252
 
 
7253
  __pyx_r = 0;
 
7254
  __pyx_L0:;
 
7255
  __Pyx_RefNannyFinishContext();
 
7256
  return __pyx_r;
 
7257
}
 
7258
 
 
7259
/* "bzrlib/_dirstate_helpers_pyx.pyx":1064
 
7260
 *     cdef object sha_file
 
7261
 * 
 
7262
 *     def __init__(self, include_unchanged, use_filesystem_for_exec,             # <<<<<<<<<<<<<<
 
7263
 *         search_specific_files, state, source_index, target_index,
 
7264
 *         want_unversioned, tree):
 
7265
 */
 
7266
 
 
7267
static int __pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
 
7268
static int __pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
 
7269
  PyObject *__pyx_v_include_unchanged = 0;
 
7270
  PyObject *__pyx_v_use_filesystem_for_exec = 0;
 
7271
  PyObject *__pyx_v_search_specific_files = 0;
 
7272
  PyObject *__pyx_v_state = 0;
 
7273
  PyObject *__pyx_v_source_index = 0;
 
7274
  PyObject *__pyx_v_target_index = 0;
 
7275
  PyObject *__pyx_v_want_unversioned = 0;
 
7276
  PyObject *__pyx_v_tree = 0;
 
7277
  int __pyx_r;
 
7278
  PyObject *__pyx_t_1 = NULL;
 
7279
  PyObject *__pyx_t_2 = NULL;
 
7280
  PyObject *__pyx_t_3 = NULL;
 
7281
  int __pyx_t_4;
 
7282
  int __pyx_t_5;
 
7283
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__include_unchanged,&__pyx_n_s_22,&__pyx_n_s_23,&__pyx_n_s__state,&__pyx_n_s__source_index,&__pyx_n_s__target_index,&__pyx_n_s__want_unversioned,&__pyx_n_s__tree,0};
 
7284
  __Pyx_RefNannySetupContext("__init__");
 
7285
  if (unlikely(__pyx_kwds)) {
 
7286
    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
 
7287
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
 
7288
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
7289
      case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
 
7290
      case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
 
7291
      case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
 
7292
      case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
 
7293
      case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
 
7294
      case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
 
7295
      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
 
7296
      case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
 
7297
      case  0: break;
 
7298
      default: goto __pyx_L5_argtuple_error;
 
7299
    }
 
7300
    switch (PyTuple_GET_SIZE(__pyx_args)) {
 
7301
      case  0:
 
7302
      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__include_unchanged);
 
7303
      if (likely(values[0])) kw_args--;
 
7304
      else goto __pyx_L5_argtuple_error;
 
7305
      case  1:
 
7306
      values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_22);
 
7307
      if (likely(values[1])) kw_args--;
 
7308
      else {
 
7309
        __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
7310
      }
 
7311
      case  2:
 
7312
      values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_23);
 
7313
      if (likely(values[2])) kw_args--;
 
7314
      else {
 
7315
        __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
7316
      }
 
7317
      case  3:
 
7318
      values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__state);
 
7319
      if (likely(values[3])) kw_args--;
 
7320
      else {
 
7321
        __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
7322
      }
 
7323
      case  4:
 
7324
      values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__source_index);
 
7325
      if (likely(values[4])) kw_args--;
 
7326
      else {
 
7327
        __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
7328
      }
 
7329
      case  5:
 
7330
      values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__target_index);
 
7331
      if (likely(values[5])) kw_args--;
 
7332
      else {
 
7333
        __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
7334
      }
 
7335
      case  6:
 
7336
      values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__want_unversioned);
 
7337
      if (likely(values[6])) kw_args--;
 
7338
      else {
 
7339
        __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
7340
      }
 
7341
      case  7:
 
7342
      values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tree);
 
7343
      if (likely(values[7])) kw_args--;
 
7344
      else {
 
7345
        __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
7346
      }
 
7347
    }
 
7348
    if (unlikely(kw_args > 0)) {
 
7349
      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
7350
    }
 
7351
    __pyx_v_include_unchanged = values[0];
 
7352
    __pyx_v_use_filesystem_for_exec = values[1];
 
7353
    __pyx_v_search_specific_files = values[2];
 
7354
    __pyx_v_state = values[3];
 
7355
    __pyx_v_source_index = values[4];
 
7356
    __pyx_v_target_index = values[5];
 
7357
    __pyx_v_want_unversioned = values[6];
 
7358
    __pyx_v_tree = values[7];
 
7359
  } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
 
7360
    goto __pyx_L5_argtuple_error;
 
7361
  } else {
 
7362
    __pyx_v_include_unchanged = PyTuple_GET_ITEM(__pyx_args, 0);
 
7363
    __pyx_v_use_filesystem_for_exec = PyTuple_GET_ITEM(__pyx_args, 1);
 
7364
    __pyx_v_search_specific_files = PyTuple_GET_ITEM(__pyx_args, 2);
 
7365
    __pyx_v_state = PyTuple_GET_ITEM(__pyx_args, 3);
 
7366
    __pyx_v_source_index = PyTuple_GET_ITEM(__pyx_args, 4);
 
7367
    __pyx_v_target_index = PyTuple_GET_ITEM(__pyx_args, 5);
 
7368
    __pyx_v_want_unversioned = PyTuple_GET_ITEM(__pyx_args, 6);
 
7369
    __pyx_v_tree = PyTuple_GET_ITEM(__pyx_args, 7);
 
7370
  }
 
7371
  goto __pyx_L4_argument_unpacking_done;
 
7372
  __pyx_L5_argtuple_error:;
 
7373
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
7374
  __pyx_L3_error:;
 
7375
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC.__init__");
 
7376
  __Pyx_RefNannyFinishContext();
 
7377
  return -1;
 
7378
  __pyx_L4_argument_unpacking_done:;
 
7379
 
 
7380
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1067
 
7381
 *         search_specific_files, state, source_index, target_index,
 
7382
 *         want_unversioned, tree):
 
7383
 *         self.doing_consistency_expansion = 0             # <<<<<<<<<<<<<<
 
7384
 *         self.old_dirname_to_file_id = {}
 
7385
 *         self.new_dirname_to_file_id = {}
 
7386
 */
 
7387
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->doing_consistency_expansion = 0;
 
7388
 
 
7389
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1068
 
7390
 *         want_unversioned, tree):
 
7391
 *         self.doing_consistency_expansion = 0
 
7392
 *         self.old_dirname_to_file_id = {}             # <<<<<<<<<<<<<<
 
7393
 *         self.new_dirname_to_file_id = {}
 
7394
 *         # Are we doing a partial iter_changes?
 
7395
 */
 
7396
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7397
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
7398
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
 
7399
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->old_dirname_to_file_id);
 
7400
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->old_dirname_to_file_id);
 
7401
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->old_dirname_to_file_id = ((PyObject *)__pyx_t_1);
 
7402
  __pyx_t_1 = 0;
 
7403
 
 
7404
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1069
 
7405
 *         self.doing_consistency_expansion = 0
 
7406
 *         self.old_dirname_to_file_id = {}
 
7407
 *         self.new_dirname_to_file_id = {}             # <<<<<<<<<<<<<<
 
7408
 *         # Are we doing a partial iter_changes?
 
7409
 *         self.partial = set(['']).__ne__(search_specific_files)
 
7410
 */
 
7411
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7412
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
7413
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
 
7414
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->new_dirname_to_file_id);
 
7415
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->new_dirname_to_file_id);
 
7416
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->new_dirname_to_file_id = ((PyObject *)__pyx_t_1);
 
7417
  __pyx_t_1 = 0;
 
7418
 
 
7419
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1071
 
7420
 *         self.new_dirname_to_file_id = {}
 
7421
 *         # Are we doing a partial iter_changes?
 
7422
 *         self.partial = set(['']).__ne__(search_specific_files)             # <<<<<<<<<<<<<<
 
7423
 *         # Using a list so that we can access the values and change them in
 
7424
 *         # nested scope. Each one is [path, file_id, entry]
 
7425
 */
 
7426
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7427
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
7428
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
 
7429
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_5));
 
7430
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
 
7431
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7432
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
7433
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
 
7434
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
 
7435
  __pyx_t_1 = 0;
 
7436
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7437
  __Pyx_GOTREF(__pyx_t_1);
 
7438
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
7439
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____ne__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7440
  __Pyx_GOTREF(__pyx_t_2);
 
7441
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
7442
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7443
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
7444
  __Pyx_INCREF(__pyx_v_search_specific_files);
 
7445
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_search_specific_files);
 
7446
  __Pyx_GIVEREF(__pyx_v_search_specific_files);
 
7447
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7448
  __Pyx_GOTREF(__pyx_t_3);
 
7449
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
7450
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
7451
  __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7452
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
7453
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->partial = __pyx_t_4;
 
7454
 
 
7455
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1074
 
7456
 *         # Using a list so that we can access the values and change them in
 
7457
 *         # nested scope. Each one is [path, file_id, entry]
 
7458
 *         self.last_source_parent = [None, None]             # <<<<<<<<<<<<<<
 
7459
 *         self.last_target_parent = [None, None]
 
7460
 *         if include_unchanged is None:
 
7461
 */
 
7462
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7463
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
7464
  __Pyx_INCREF(Py_None);
 
7465
  PyList_SET_ITEM(__pyx_t_3, 0, Py_None);
 
7466
  __Pyx_GIVEREF(Py_None);
 
7467
  __Pyx_INCREF(Py_None);
 
7468
  PyList_SET_ITEM(__pyx_t_3, 1, Py_None);
 
7469
  __Pyx_GIVEREF(Py_None);
 
7470
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
7471
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->last_source_parent);
 
7472
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->last_source_parent);
 
7473
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->last_source_parent = ((PyObject *)__pyx_t_3);
 
7474
  __pyx_t_3 = 0;
 
7475
 
 
7476
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1075
 
7477
 *         # nested scope. Each one is [path, file_id, entry]
 
7478
 *         self.last_source_parent = [None, None]
 
7479
 *         self.last_target_parent = [None, None]             # <<<<<<<<<<<<<<
 
7480
 *         if include_unchanged is None:
 
7481
 *             self.include_unchanged = False
 
7482
 */
 
7483
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7484
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
7485
  __Pyx_INCREF(Py_None);
 
7486
  PyList_SET_ITEM(__pyx_t_3, 0, Py_None);
 
7487
  __Pyx_GIVEREF(Py_None);
 
7488
  __Pyx_INCREF(Py_None);
 
7489
  PyList_SET_ITEM(__pyx_t_3, 1, Py_None);
 
7490
  __Pyx_GIVEREF(Py_None);
 
7491
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
7492
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->last_target_parent);
 
7493
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->last_target_parent);
 
7494
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->last_target_parent = ((PyObject *)__pyx_t_3);
 
7495
  __pyx_t_3 = 0;
 
7496
 
 
7497
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1076
 
7498
 *         self.last_source_parent = [None, None]
 
7499
 *         self.last_target_parent = [None, None]
 
7500
 *         if include_unchanged is None:             # <<<<<<<<<<<<<<
 
7501
 *             self.include_unchanged = False
 
7502
 *         else:
 
7503
 */
 
7504
  __pyx_t_5 = (__pyx_v_include_unchanged == Py_None);
 
7505
  if (__pyx_t_5) {
 
7506
 
 
7507
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1077
 
7508
 *         self.last_target_parent = [None, None]
 
7509
 *         if include_unchanged is None:
 
7510
 *             self.include_unchanged = False             # <<<<<<<<<<<<<<
 
7511
 *         else:
 
7512
 *             self.include_unchanged = int(include_unchanged)
 
7513
 */
 
7514
    ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->include_unchanged = 0;
 
7515
    goto __pyx_L6;
 
7516
  }
 
7517
  /*else*/ {
 
7518
 
 
7519
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1079
 
7520
 *             self.include_unchanged = False
 
7521
 *         else:
 
7522
 *             self.include_unchanged = int(include_unchanged)             # <<<<<<<<<<<<<<
 
7523
 *         self.use_filesystem_for_exec = use_filesystem_for_exec
 
7524
 *         self.utf8_decode = cache_utf8._utf8_decode
 
7525
 */
 
7526
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7527
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
7528
    __Pyx_INCREF(__pyx_v_include_unchanged);
 
7529
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_include_unchanged);
 
7530
    __Pyx_GIVEREF(__pyx_v_include_unchanged);
 
7531
    __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7532
    __Pyx_GOTREF(__pyx_t_1);
 
7533
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
7534
    __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7535
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
7536
    ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->include_unchanged = __pyx_t_4;
 
7537
  }
 
7538
  __pyx_L6:;
 
7539
 
 
7540
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1080
 
7541
 *         else:
 
7542
 *             self.include_unchanged = int(include_unchanged)
 
7543
 *         self.use_filesystem_for_exec = use_filesystem_for_exec             # <<<<<<<<<<<<<<
 
7544
 *         self.utf8_decode = cache_utf8._utf8_decode
 
7545
 *         # for all search_indexs in each path at or under each element of
 
7546
 */
 
7547
  __Pyx_INCREF(__pyx_v_use_filesystem_for_exec);
 
7548
  __Pyx_GIVEREF(__pyx_v_use_filesystem_for_exec);
 
7549
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->use_filesystem_for_exec);
 
7550
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->use_filesystem_for_exec);
 
7551
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->use_filesystem_for_exec = __pyx_v_use_filesystem_for_exec;
 
7552
 
 
7553
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1081
 
7554
 *             self.include_unchanged = int(include_unchanged)
 
7555
 *         self.use_filesystem_for_exec = use_filesystem_for_exec
 
7556
 *         self.utf8_decode = cache_utf8._utf8_decode             # <<<<<<<<<<<<<<
 
7557
 *         # for all search_indexs in each path at or under each element of
 
7558
 *         # search_specific_files, if the detail is relocated: add the id, and
 
7559
 */
 
7560
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__cache_utf8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7561
  __Pyx_GOTREF(__pyx_t_1);
 
7562
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s___utf8_decode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7563
  __Pyx_GOTREF(__pyx_t_3);
 
7564
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
7565
  __Pyx_GIVEREF(__pyx_t_3);
 
7566
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->utf8_decode);
 
7567
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->utf8_decode);
 
7568
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->utf8_decode = __pyx_t_3;
 
7569
  __pyx_t_3 = 0;
 
7570
 
 
7571
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1086
 
7572
 *         # add the relocated path as one to search if its not searched already.
 
7573
 *         # If the detail is not relocated, add the id.
 
7574
 *         self.searched_specific_files = set()             # <<<<<<<<<<<<<<
 
7575
 *         # When we search exact paths without expanding downwards, we record
 
7576
 *         # that here.
 
7577
 */
 
7578
  __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7579
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
7580
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
7581
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->searched_specific_files);
 
7582
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->searched_specific_files);
 
7583
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->searched_specific_files = ((PyObject *)__pyx_t_3);
 
7584
  __pyx_t_3 = 0;
 
7585
 
 
7586
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1089
 
7587
 *         # When we search exact paths without expanding downwards, we record
 
7588
 *         # that here.
 
7589
 *         self.searched_exact_paths = set()             # <<<<<<<<<<<<<<
 
7590
 *         self.search_specific_files = search_specific_files
 
7591
 *         # The parents up to the root of the paths we are searching.
 
7592
 */
 
7593
  __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7594
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
7595
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
7596
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->searched_exact_paths);
 
7597
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->searched_exact_paths);
 
7598
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->searched_exact_paths = ((PyObject *)__pyx_t_3);
 
7599
  __pyx_t_3 = 0;
 
7600
 
 
7601
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1090
 
7602
 *         # that here.
 
7603
 *         self.searched_exact_paths = set()
 
7604
 *         self.search_specific_files = search_specific_files             # <<<<<<<<<<<<<<
 
7605
 *         # The parents up to the root of the paths we are searching.
 
7606
 *         # After all normal paths are returned, these specific items are returned.
 
7607
 */
 
7608
  __Pyx_INCREF(__pyx_v_search_specific_files);
 
7609
  __Pyx_GIVEREF(__pyx_v_search_specific_files);
 
7610
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->search_specific_files);
 
7611
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->search_specific_files);
 
7612
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->search_specific_files = __pyx_v_search_specific_files;
 
7613
 
 
7614
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1093
 
7615
 *         # The parents up to the root of the paths we are searching.
 
7616
 *         # After all normal paths are returned, these specific items are returned.
 
7617
 *         self.search_specific_file_parents = set()             # <<<<<<<<<<<<<<
 
7618
 *         # The ids we've sent out in the delta.
 
7619
 *         self.seen_ids = set()
 
7620
 */
 
7621
  __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7622
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
7623
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
7624
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->search_specific_file_parents);
 
7625
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->search_specific_file_parents);
 
7626
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->search_specific_file_parents = ((PyObject *)__pyx_t_3);
 
7627
  __pyx_t_3 = 0;
 
7628
 
 
7629
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1095
 
7630
 *         self.search_specific_file_parents = set()
 
7631
 *         # The ids we've sent out in the delta.
 
7632
 *         self.seen_ids = set()             # <<<<<<<<<<<<<<
 
7633
 *         self.state = state
 
7634
 *         self.current_root = None
 
7635
 */
 
7636
  __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7637
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
7638
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
7639
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->seen_ids);
 
7640
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->seen_ids);
 
7641
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->seen_ids = ((PyObject *)__pyx_t_3);
 
7642
  __pyx_t_3 = 0;
 
7643
 
 
7644
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1096
 
7645
 *         # The ids we've sent out in the delta.
 
7646
 *         self.seen_ids = set()
 
7647
 *         self.state = state             # <<<<<<<<<<<<<<
 
7648
 *         self.current_root = None
 
7649
 *         self.current_root_unicode = None
 
7650
 */
 
7651
  __Pyx_INCREF(__pyx_v_state);
 
7652
  __Pyx_GIVEREF(__pyx_v_state);
 
7653
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->state);
 
7654
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->state);
 
7655
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->state = __pyx_v_state;
 
7656
 
 
7657
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1097
 
7658
 *         self.seen_ids = set()
 
7659
 *         self.state = state
 
7660
 *         self.current_root = None             # <<<<<<<<<<<<<<
 
7661
 *         self.current_root_unicode = None
 
7662
 *         self.root_entries = None
 
7663
 */
 
7664
  __Pyx_INCREF(Py_None);
 
7665
  __Pyx_GIVEREF(Py_None);
 
7666
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_root);
 
7667
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_root);
 
7668
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_root = Py_None;
 
7669
 
 
7670
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1098
 
7671
 *         self.state = state
 
7672
 *         self.current_root = None
 
7673
 *         self.current_root_unicode = None             # <<<<<<<<<<<<<<
 
7674
 *         self.root_entries = None
 
7675
 *         self.root_entries_pos = 0
 
7676
 */
 
7677
  __Pyx_INCREF(Py_None);
 
7678
  __Pyx_GIVEREF(Py_None);
 
7679
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_root_unicode);
 
7680
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_root_unicode);
 
7681
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_root_unicode = Py_None;
 
7682
 
 
7683
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1099
 
7684
 *         self.current_root = None
 
7685
 *         self.current_root_unicode = None
 
7686
 *         self.root_entries = None             # <<<<<<<<<<<<<<
 
7687
 *         self.root_entries_pos = 0
 
7688
 *         self.root_entries_len = 0
 
7689
 */
 
7690
  __Pyx_INCREF(Py_None);
 
7691
  __Pyx_GIVEREF(Py_None);
 
7692
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_entries);
 
7693
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_entries);
 
7694
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_entries = Py_None;
 
7695
 
 
7696
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1100
 
7697
 *         self.current_root_unicode = None
 
7698
 *         self.root_entries = None
 
7699
 *         self.root_entries_pos = 0             # <<<<<<<<<<<<<<
 
7700
 *         self.root_entries_len = 0
 
7701
 *         self.root_abspath = None
 
7702
 */
 
7703
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_entries_pos = 0;
 
7704
 
 
7705
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1101
 
7706
 *         self.root_entries = None
 
7707
 *         self.root_entries_pos = 0
 
7708
 *         self.root_entries_len = 0             # <<<<<<<<<<<<<<
 
7709
 *         self.root_abspath = None
 
7710
 *         if source_index is None:
 
7711
 */
 
7712
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_entries_len = 0;
 
7713
 
 
7714
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1102
 
7715
 *         self.root_entries_pos = 0
 
7716
 *         self.root_entries_len = 0
 
7717
 *         self.root_abspath = None             # <<<<<<<<<<<<<<
 
7718
 *         if source_index is None:
 
7719
 *             self.source_index = -1
 
7720
 */
 
7721
  __Pyx_INCREF(Py_None);
 
7722
  __Pyx_GIVEREF(Py_None);
 
7723
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_abspath);
 
7724
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_abspath);
 
7725
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_abspath = Py_None;
 
7726
 
 
7727
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1103
 
7728
 *         self.root_entries_len = 0
 
7729
 *         self.root_abspath = None
 
7730
 *         if source_index is None:             # <<<<<<<<<<<<<<
 
7731
 *             self.source_index = -1
 
7732
 *         else:
 
7733
 */
 
7734
  __pyx_t_5 = (__pyx_v_source_index == Py_None);
 
7735
  if (__pyx_t_5) {
 
7736
 
 
7737
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1104
 
7738
 *         self.root_abspath = None
 
7739
 *         if source_index is None:
 
7740
 *             self.source_index = -1             # <<<<<<<<<<<<<<
 
7741
 *         else:
 
7742
 *             self.source_index = source_index
 
7743
 */
 
7744
    ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->source_index = -1;
 
7745
    goto __pyx_L7;
 
7746
  }
 
7747
  /*else*/ {
 
7748
 
 
7749
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1106
 
7750
 *             self.source_index = -1
 
7751
 *         else:
 
7752
 *             self.source_index = source_index             # <<<<<<<<<<<<<<
 
7753
 *         self.target_index = target_index
 
7754
 *         self.want_unversioned = want_unversioned
 
7755
 */
 
7756
    __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_v_source_index); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7757
    ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->source_index = __pyx_t_4;
 
7758
  }
 
7759
  __pyx_L7:;
 
7760
 
 
7761
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1107
 
7762
 *         else:
 
7763
 *             self.source_index = source_index
 
7764
 *         self.target_index = target_index             # <<<<<<<<<<<<<<
 
7765
 *         self.want_unversioned = want_unversioned
 
7766
 *         self.tree = tree
 
7767
 */
 
7768
  __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_v_target_index); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7769
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->target_index = __pyx_t_4;
 
7770
 
 
7771
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1108
 
7772
 *             self.source_index = source_index
 
7773
 *         self.target_index = target_index
 
7774
 *         self.want_unversioned = want_unversioned             # <<<<<<<<<<<<<<
 
7775
 *         self.tree = tree
 
7776
 *         self.dir_iterator = None
 
7777
 */
 
7778
  __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_v_want_unversioned); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7779
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->want_unversioned = __pyx_t_4;
 
7780
 
 
7781
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1109
 
7782
 *         self.target_index = target_index
 
7783
 *         self.want_unversioned = want_unversioned
 
7784
 *         self.tree = tree             # <<<<<<<<<<<<<<
 
7785
 *         self.dir_iterator = None
 
7786
 *         self.block_index = -1
 
7787
 */
 
7788
  __Pyx_INCREF(__pyx_v_tree);
 
7789
  __Pyx_GIVEREF(__pyx_v_tree);
 
7790
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->tree);
 
7791
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->tree);
 
7792
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->tree = __pyx_v_tree;
 
7793
 
 
7794
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1110
 
7795
 *         self.want_unversioned = want_unversioned
 
7796
 *         self.tree = tree
 
7797
 *         self.dir_iterator = None             # <<<<<<<<<<<<<<
 
7798
 *         self.block_index = -1
 
7799
 *         self.current_block = None
 
7800
 */
 
7801
  __Pyx_INCREF(Py_None);
 
7802
  __Pyx_GIVEREF(Py_None);
 
7803
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->dir_iterator);
 
7804
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->dir_iterator);
 
7805
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->dir_iterator = Py_None;
 
7806
 
 
7807
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1111
 
7808
 *         self.tree = tree
 
7809
 *         self.dir_iterator = None
 
7810
 *         self.block_index = -1             # <<<<<<<<<<<<<<
 
7811
 *         self.current_block = None
 
7812
 *         self.current_block_list = None
 
7813
 */
 
7814
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->block_index = -1;
 
7815
 
 
7816
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1112
 
7817
 *         self.dir_iterator = None
 
7818
 *         self.block_index = -1
 
7819
 *         self.current_block = None             # <<<<<<<<<<<<<<
 
7820
 *         self.current_block_list = None
 
7821
 *         self.current_block_pos = -1
 
7822
 */
 
7823
  __Pyx_INCREF(Py_None);
 
7824
  __Pyx_GIVEREF(Py_None);
 
7825
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_block);
 
7826
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_block);
 
7827
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_block = Py_None;
 
7828
 
 
7829
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1113
 
7830
 *         self.block_index = -1
 
7831
 *         self.current_block = None
 
7832
 *         self.current_block_list = None             # <<<<<<<<<<<<<<
 
7833
 *         self.current_block_pos = -1
 
7834
 *         self.current_dir_info = None
 
7835
 */
 
7836
  __Pyx_INCREF(Py_None);
 
7837
  __Pyx_GIVEREF(Py_None);
 
7838
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_block_list);
 
7839
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_block_list);
 
7840
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_block_list = Py_None;
 
7841
 
 
7842
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1114
 
7843
 *         self.current_block = None
 
7844
 *         self.current_block_list = None
 
7845
 *         self.current_block_pos = -1             # <<<<<<<<<<<<<<
 
7846
 *         self.current_dir_info = None
 
7847
 *         self.current_dir_list = None
 
7848
 */
 
7849
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_block_pos = -1;
 
7850
 
 
7851
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1115
 
7852
 *         self.current_block_list = None
 
7853
 *         self.current_block_pos = -1
 
7854
 *         self.current_dir_info = None             # <<<<<<<<<<<<<<
 
7855
 *         self.current_dir_list = None
 
7856
 *         self._pending_consistent_entries = []
 
7857
 */
 
7858
  __Pyx_INCREF(Py_None);
 
7859
  __Pyx_GIVEREF(Py_None);
 
7860
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_dir_info);
 
7861
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_dir_info);
 
7862
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_dir_info = Py_None;
 
7863
 
 
7864
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1116
 
7865
 *         self.current_block_pos = -1
 
7866
 *         self.current_dir_info = None
 
7867
 *         self.current_dir_list = None             # <<<<<<<<<<<<<<
 
7868
 *         self._pending_consistent_entries = []
 
7869
 *         self.path_index = 0
 
7870
 */
 
7871
  __Pyx_INCREF(Py_None);
 
7872
  __Pyx_GIVEREF(Py_None);
 
7873
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_dir_list);
 
7874
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_dir_list);
 
7875
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->current_dir_list = Py_None;
 
7876
 
 
7877
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1117
 
7878
 *         self.current_dir_info = None
 
7879
 *         self.current_dir_list = None
 
7880
 *         self._pending_consistent_entries = []             # <<<<<<<<<<<<<<
 
7881
 *         self.path_index = 0
 
7882
 *         self.root_dir_info = None
 
7883
 */
 
7884
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7885
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
7886
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
7887
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->_pending_consistent_entries);
 
7888
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->_pending_consistent_entries);
 
7889
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->_pending_consistent_entries = ((PyObject *)__pyx_t_3);
 
7890
  __pyx_t_3 = 0;
 
7891
 
 
7892
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1118
 
7893
 *         self.current_dir_list = None
 
7894
 *         self._pending_consistent_entries = []
 
7895
 *         self.path_index = 0             # <<<<<<<<<<<<<<
 
7896
 *         self.root_dir_info = None
 
7897
 *         self.bisect_left = bisect.bisect_left
 
7898
 */
 
7899
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->path_index = 0;
 
7900
 
 
7901
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1119
 
7902
 *         self._pending_consistent_entries = []
 
7903
 *         self.path_index = 0
 
7904
 *         self.root_dir_info = None             # <<<<<<<<<<<<<<
 
7905
 *         self.bisect_left = bisect.bisect_left
 
7906
 *         self.pathjoin = osutils.pathjoin
 
7907
 */
 
7908
  __Pyx_INCREF(Py_None);
 
7909
  __Pyx_GIVEREF(Py_None);
 
7910
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_dir_info);
 
7911
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_dir_info);
 
7912
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->root_dir_info = Py_None;
 
7913
 
 
7914
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1120
 
7915
 *         self.path_index = 0
 
7916
 *         self.root_dir_info = None
 
7917
 *         self.bisect_left = bisect.bisect_left             # <<<<<<<<<<<<<<
 
7918
 *         self.pathjoin = osutils.pathjoin
 
7919
 *         self.fstat = os.fstat
 
7920
 */
 
7921
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__bisect); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7922
  __Pyx_GOTREF(__pyx_t_3);
 
7923
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__bisect_left); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7924
  __Pyx_GOTREF(__pyx_t_1);
 
7925
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
7926
  __Pyx_GIVEREF(__pyx_t_1);
 
7927
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->bisect_left);
 
7928
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->bisect_left);
 
7929
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->bisect_left = __pyx_t_1;
 
7930
  __pyx_t_1 = 0;
 
7931
 
 
7932
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1121
 
7933
 *         self.root_dir_info = None
 
7934
 *         self.bisect_left = bisect.bisect_left
 
7935
 *         self.pathjoin = osutils.pathjoin             # <<<<<<<<<<<<<<
 
7936
 *         self.fstat = os.fstat
 
7937
 *         self.sha_file = osutils.sha_file
 
7938
 */
 
7939
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__osutils); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7940
  __Pyx_GOTREF(__pyx_t_1);
 
7941
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__pathjoin); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7942
  __Pyx_GOTREF(__pyx_t_3);
 
7943
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
7944
  __Pyx_GIVEREF(__pyx_t_3);
 
7945
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->pathjoin);
 
7946
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->pathjoin);
 
7947
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->pathjoin = __pyx_t_3;
 
7948
  __pyx_t_3 = 0;
 
7949
 
 
7950
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1122
 
7951
 *         self.bisect_left = bisect.bisect_left
 
7952
 *         self.pathjoin = osutils.pathjoin
 
7953
 *         self.fstat = os.fstat             # <<<<<<<<<<<<<<
 
7954
 *         self.sha_file = osutils.sha_file
 
7955
 *         if target_index != 0:
 
7956
 */
 
7957
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7958
  __Pyx_GOTREF(__pyx_t_3);
 
7959
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__fstat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7960
  __Pyx_GOTREF(__pyx_t_1);
 
7961
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
7962
  __Pyx_GIVEREF(__pyx_t_1);
 
7963
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->fstat);
 
7964
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->fstat);
 
7965
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->fstat = __pyx_t_1;
 
7966
  __pyx_t_1 = 0;
 
7967
 
 
7968
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1123
 
7969
 *         self.pathjoin = osutils.pathjoin
 
7970
 *         self.fstat = os.fstat
 
7971
 *         self.sha_file = osutils.sha_file             # <<<<<<<<<<<<<<
 
7972
 *         if target_index != 0:
 
7973
 *             # A lot of code in here depends on target_index == 0
 
7974
 */
 
7975
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__osutils); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7976
  __Pyx_GOTREF(__pyx_t_1);
 
7977
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__sha_file); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7978
  __Pyx_GOTREF(__pyx_t_3);
 
7979
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
7980
  __Pyx_GIVEREF(__pyx_t_3);
 
7981
  __Pyx_GOTREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->sha_file);
 
7982
  __Pyx_DECREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->sha_file);
 
7983
  ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->sha_file = __pyx_t_3;
 
7984
  __pyx_t_3 = 0;
 
7985
 
 
7986
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1124
 
7987
 *         self.fstat = os.fstat
 
7988
 *         self.sha_file = osutils.sha_file
 
7989
 *         if target_index != 0:             # <<<<<<<<<<<<<<
 
7990
 *             # A lot of code in here depends on target_index == 0
 
7991
 *             raise errors.BzrError('unsupported target index')
 
7992
 */
 
7993
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_target_index, __pyx_int_0, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7994
  __Pyx_GOTREF(__pyx_t_3);
 
7995
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
7996
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
7997
  if (__pyx_t_5) {
 
7998
 
 
7999
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1126
 
8000
 *         if target_index != 0:
 
8001
 *             # A lot of code in here depends on target_index == 0
 
8002
 *             raise errors.BzrError('unsupported target index')             # <<<<<<<<<<<<<<
 
8003
 * 
 
8004
 *     cdef _process_entry(self, entry, path_info):
 
8005
 */
 
8006
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__errors); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8007
    __Pyx_GOTREF(__pyx_t_3);
 
8008
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__BzrError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8009
    __Pyx_GOTREF(__pyx_t_1);
 
8010
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
8011
    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8012
    __Pyx_GOTREF(__pyx_t_3);
 
8013
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
8014
    __Pyx_Raise(__pyx_t_3, 0, 0);
 
8015
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
8016
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8017
    goto __pyx_L8;
 
8018
  }
 
8019
  __pyx_L8:;
 
8020
 
 
8021
  __pyx_r = 0;
 
8022
  goto __pyx_L0;
 
8023
  __pyx_L1_error:;
 
8024
  __Pyx_XDECREF(__pyx_t_1);
 
8025
  __Pyx_XDECREF(__pyx_t_2);
 
8026
  __Pyx_XDECREF(__pyx_t_3);
 
8027
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC.__init__");
 
8028
  __pyx_r = -1;
 
8029
  __pyx_L0:;
 
8030
  __Pyx_RefNannyFinishContext();
 
8031
  return __pyx_r;
 
8032
}
 
8033
 
 
8034
/* "bzrlib/_dirstate_helpers_pyx.pyx":1128
 
8035
 *             raise errors.BzrError('unsupported target index')
 
8036
 * 
 
8037
 *     cdef _process_entry(self, entry, path_info):             # <<<<<<<<<<<<<<
 
8038
 *         """Compare an entry and real disk to generate delta information.
 
8039
 * 
 
8040
 */
 
8041
 
 
8042
static  PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__process_entry(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self, PyObject *__pyx_v_entry, PyObject *__pyx_v_path_info) {
 
8043
  char __pyx_v_target_minikind;
 
8044
  char __pyx_v_source_minikind;
 
8045
  PyObject *__pyx_v_file_id;
 
8046
  int __pyx_v_content_change;
 
8047
  PyObject *__pyx_v_details_list;
 
8048
  PyObject *__pyx_v_source_details;
 
8049
  PyObject *__pyx_v_target_details;
 
8050
  PyObject *__pyx_v_link_or_sha1;
 
8051
  PyObject *__pyx_v_old_dirname;
 
8052
  PyObject *__pyx_v_old_basename;
 
8053
  PyObject *__pyx_v_old_path;
 
8054
  PyObject *__pyx_v_path;
 
8055
  PyObject *__pyx_v_old_entry;
 
8056
  PyObject *__pyx_v_target_kind;
 
8057
  PyObject *__pyx_v_target_exec;
 
8058
  PyObject *__pyx_v_statvalue;
 
8059
  PyObject *__pyx_v_source_parent_id;
 
8060
  PyObject *__pyx_v__;
 
8061
  PyObject *__pyx_v_source_parent_entry;
 
8062
  PyObject *__pyx_v_new_dirname;
 
8063
  PyObject *__pyx_v_target_parent_id;
 
8064
  PyObject *__pyx_v_target_parent_entry;
 
8065
  PyObject *__pyx_v_source_exec;
 
8066
  PyObject *__pyx_v_changed;
 
8067
  PyObject *__pyx_v_old_path_u;
 
8068
  PyObject *__pyx_v_path_u;
 
8069
  PyObject *__pyx_v_source_kind;
 
8070
  PyObject *__pyx_v_parent_entry;
 
8071
  PyObject *__pyx_v_parent_id;
 
8072
  PyObject *__pyx_r = NULL;
 
8073
  PyObject *__pyx_t_1 = NULL;
 
8074
  int __pyx_t_2;
 
8075
  PyObject *__pyx_t_3 = NULL;
 
8076
  char __pyx_t_4;
 
8077
  int __pyx_t_5;
 
8078
  PyObject *__pyx_t_6 = NULL;
 
8079
  PyObject *__pyx_t_7 = NULL;
 
8080
  int __pyx_t_8;
 
8081
  PyObject *__pyx_t_9 = NULL;
 
8082
  int __pyx_t_10;
 
8083
  PyObject *__pyx_t_11 = NULL;
 
8084
  PyObject *__pyx_t_12 = NULL;
 
8085
  PyObject *__pyx_t_13 = NULL;
 
8086
  PyObject *__pyx_t_14 = NULL;
 
8087
  __Pyx_RefNannySetupContext("_process_entry");
 
8088
  __pyx_v_file_id = Py_None; __Pyx_INCREF(Py_None);
 
8089
  __pyx_v_details_list = Py_None; __Pyx_INCREF(Py_None);
 
8090
  __pyx_v_source_details = Py_None; __Pyx_INCREF(Py_None);
 
8091
  __pyx_v_target_details = Py_None; __Pyx_INCREF(Py_None);
 
8092
  __pyx_v_link_or_sha1 = Py_None; __Pyx_INCREF(Py_None);
 
8093
  __pyx_v_old_dirname = Py_None; __Pyx_INCREF(Py_None);
 
8094
  __pyx_v_old_basename = Py_None; __Pyx_INCREF(Py_None);
 
8095
  __pyx_v_old_path = Py_None; __Pyx_INCREF(Py_None);
 
8096
  __pyx_v_path = Py_None; __Pyx_INCREF(Py_None);
 
8097
  __pyx_v_old_entry = Py_None; __Pyx_INCREF(Py_None);
 
8098
  __pyx_v_target_kind = Py_None; __Pyx_INCREF(Py_None);
 
8099
  __pyx_v_target_exec = Py_None; __Pyx_INCREF(Py_None);
 
8100
  __pyx_v_statvalue = Py_None; __Pyx_INCREF(Py_None);
 
8101
  __pyx_v_source_parent_id = Py_None; __Pyx_INCREF(Py_None);
 
8102
  __pyx_v__ = Py_None; __Pyx_INCREF(Py_None);
 
8103
  __pyx_v_source_parent_entry = Py_None; __Pyx_INCREF(Py_None);
 
8104
  __pyx_v_new_dirname = Py_None; __Pyx_INCREF(Py_None);
 
8105
  __pyx_v_target_parent_id = Py_None; __Pyx_INCREF(Py_None);
 
8106
  __pyx_v_target_parent_entry = Py_None; __Pyx_INCREF(Py_None);
 
8107
  __pyx_v_source_exec = Py_None; __Pyx_INCREF(Py_None);
 
8108
  __pyx_v_changed = Py_None; __Pyx_INCREF(Py_None);
 
8109
  __pyx_v_old_path_u = Py_None; __Pyx_INCREF(Py_None);
 
8110
  __pyx_v_path_u = Py_None; __Pyx_INCREF(Py_None);
 
8111
  __pyx_v_source_kind = Py_None; __Pyx_INCREF(Py_None);
 
8112
  __pyx_v_parent_entry = Py_None; __Pyx_INCREF(Py_None);
 
8113
  __pyx_v_parent_id = Py_None; __Pyx_INCREF(Py_None);
 
8114
 
 
8115
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1150
 
8116
 *         cdef int content_change
 
8117
 *         cdef object details_list
 
8118
 *         file_id = None             # <<<<<<<<<<<<<<
 
8119
 *         details_list = entry[1]
 
8120
 *         if -1 == self.source_index:
 
8121
 */
 
8122
  __Pyx_INCREF(Py_None);
 
8123
  __Pyx_DECREF(__pyx_v_file_id);
 
8124
  __pyx_v_file_id = Py_None;
 
8125
 
 
8126
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1151
 
8127
 *         cdef object details_list
 
8128
 *         file_id = None
 
8129
 *         details_list = entry[1]             # <<<<<<<<<<<<<<
 
8130
 *         if -1 == self.source_index:
 
8131
 *             source_details = DirState.NULL_PARENT_DETAILS
 
8132
 */
 
8133
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8134
  __Pyx_GOTREF(__pyx_t_1);
 
8135
  __Pyx_DECREF(__pyx_v_details_list);
 
8136
  __pyx_v_details_list = __pyx_t_1;
 
8137
  __pyx_t_1 = 0;
 
8138
 
 
8139
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1152
 
8140
 *         file_id = None
 
8141
 *         details_list = entry[1]
 
8142
 *         if -1 == self.source_index:             # <<<<<<<<<<<<<<
 
8143
 *             source_details = DirState.NULL_PARENT_DETAILS
 
8144
 *         else:
 
8145
 */
 
8146
  __pyx_t_2 = (-1 == __pyx_v_self->source_index);
 
8147
  if (__pyx_t_2) {
 
8148
 
 
8149
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1153
 
8150
 *         details_list = entry[1]
 
8151
 *         if -1 == self.source_index:
 
8152
 *             source_details = DirState.NULL_PARENT_DETAILS             # <<<<<<<<<<<<<<
 
8153
 *         else:
 
8154
 *             source_details = details_list[self.source_index]
 
8155
 */
 
8156
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__DirState); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8157
    __Pyx_GOTREF(__pyx_t_1);
 
8158
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__NULL_PARENT_DETAILS); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8159
    __Pyx_GOTREF(__pyx_t_3);
 
8160
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
8161
    __Pyx_DECREF(__pyx_v_source_details);
 
8162
    __pyx_v_source_details = __pyx_t_3;
 
8163
    __pyx_t_3 = 0;
 
8164
    goto __pyx_L3;
 
8165
  }
 
8166
  /*else*/ {
 
8167
 
 
8168
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1155
 
8169
 *             source_details = DirState.NULL_PARENT_DETAILS
 
8170
 *         else:
 
8171
 *             source_details = details_list[self.source_index]             # <<<<<<<<<<<<<<
 
8172
 *         target_details = details_list[self.target_index]
 
8173
 *         target_minikind = _minikind_from_string(target_details[0])
 
8174
 */
 
8175
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_details_list, __pyx_v_self->source_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8176
    __Pyx_GOTREF(__pyx_t_3);
 
8177
    __Pyx_DECREF(__pyx_v_source_details);
 
8178
    __pyx_v_source_details = __pyx_t_3;
 
8179
    __pyx_t_3 = 0;
 
8180
  }
 
8181
  __pyx_L3:;
 
8182
 
 
8183
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1156
 
8184
 *         else:
 
8185
 *             source_details = details_list[self.source_index]
 
8186
 *         target_details = details_list[self.target_index]             # <<<<<<<<<<<<<<
 
8187
 *         target_minikind = _minikind_from_string(target_details[0])
 
8188
 *         if path_info is not None and _versioned_minikind(target_minikind):
 
8189
 */
 
8190
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_details_list, __pyx_v_self->target_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8191
  __Pyx_GOTREF(__pyx_t_3);
 
8192
  __Pyx_DECREF(__pyx_v_target_details);
 
8193
  __pyx_v_target_details = __pyx_t_3;
 
8194
  __pyx_t_3 = 0;
 
8195
 
 
8196
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1157
 
8197
 *             source_details = details_list[self.source_index]
 
8198
 *         target_details = details_list[self.target_index]
 
8199
 *         target_minikind = _minikind_from_string(target_details[0])             # <<<<<<<<<<<<<<
 
8200
 *         if path_info is not None and _versioned_minikind(target_minikind):
 
8201
 *             if self.target_index != 0:
 
8202
 */
 
8203
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_target_details, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8204
  __Pyx_GOTREF(__pyx_t_3);
 
8205
  __pyx_t_4 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_from_string(__pyx_t_3); if (unlikely(__pyx_t_4 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8206
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
8207
  __pyx_v_target_minikind = __pyx_t_4;
 
8208
 
 
8209
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1158
 
8210
 *         target_details = details_list[self.target_index]
 
8211
 *         target_minikind = _minikind_from_string(target_details[0])
 
8212
 *         if path_info is not None and _versioned_minikind(target_minikind):             # <<<<<<<<<<<<<<
 
8213
 *             if self.target_index != 0:
 
8214
 *                 raise AssertionError("Unsupported target index %d" %
 
8215
 */
 
8216
  __pyx_t_2 = (__pyx_v_path_info != Py_None);
 
8217
  if (__pyx_t_2) {
 
8218
    __pyx_t_5 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_target_minikind);
 
8219
  } else {
 
8220
    __pyx_t_5 = __pyx_t_2;
 
8221
  }
 
8222
  if (__pyx_t_5) {
 
8223
 
 
8224
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1159
 
8225
 *         target_minikind = _minikind_from_string(target_details[0])
 
8226
 *         if path_info is not None and _versioned_minikind(target_minikind):
 
8227
 *             if self.target_index != 0:             # <<<<<<<<<<<<<<
 
8228
 *                 raise AssertionError("Unsupported target index %d" %
 
8229
 *                                      self.target_index)
 
8230
 */
 
8231
    __pyx_t_5 = (__pyx_v_self->target_index != 0);
 
8232
    if (__pyx_t_5) {
 
8233
 
 
8234
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1161
 
8235
 *             if self.target_index != 0:
 
8236
 *                 raise AssertionError("Unsupported target index %d" %
 
8237
 *                                      self.target_index)             # <<<<<<<<<<<<<<
 
8238
 *             link_or_sha1 = _update_entry(self.state, entry, path_info[4], path_info[3])
 
8239
 *             # The entry may have been modified by update_entry
 
8240
 */
 
8241
      __pyx_t_3 = PyInt_FromLong(__pyx_v_self->target_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8242
      __Pyx_GOTREF(__pyx_t_3);
 
8243
      __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_34), __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8244
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
8245
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
8246
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8247
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
8248
      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1));
 
8249
      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
 
8250
      __pyx_t_1 = 0;
 
8251
      __pyx_t_1 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8252
      __Pyx_GOTREF(__pyx_t_1);
 
8253
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
8254
      __Pyx_Raise(__pyx_t_1, 0, 0);
 
8255
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
8256
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8257
      goto __pyx_L5;
 
8258
    }
 
8259
    __pyx_L5:;
 
8260
 
 
8261
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1162
 
8262
 *                 raise AssertionError("Unsupported target index %d" %
 
8263
 *                                      self.target_index)
 
8264
 *             link_or_sha1 = _update_entry(self.state, entry, path_info[4], path_info[3])             # <<<<<<<<<<<<<<
 
8265
 *             # The entry may have been modified by update_entry
 
8266
 *             target_details = details_list[self.target_index]
 
8267
 */
 
8268
    __pyx_t_1 = __pyx_v_self->state;
 
8269
    __Pyx_INCREF(__pyx_t_1);
 
8270
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_path_info, 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8271
    __Pyx_GOTREF(__pyx_t_3);
 
8272
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_path_info, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8273
    __Pyx_GOTREF(__pyx_t_6);
 
8274
    __pyx_t_7 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__update_entry(__pyx_t_1, __pyx_v_entry, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8275
    __Pyx_GOTREF(__pyx_t_7);
 
8276
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
8277
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
8278
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
8279
    __Pyx_DECREF(__pyx_v_link_or_sha1);
 
8280
    __pyx_v_link_or_sha1 = __pyx_t_7;
 
8281
    __pyx_t_7 = 0;
 
8282
 
 
8283
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1164
 
8284
 *             link_or_sha1 = _update_entry(self.state, entry, path_info[4], path_info[3])
 
8285
 *             # The entry may have been modified by update_entry
 
8286
 *             target_details = details_list[self.target_index]             # <<<<<<<<<<<<<<
 
8287
 *             target_minikind = _minikind_from_string(target_details[0])
 
8288
 *         else:
 
8289
 */
 
8290
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_details_list, __pyx_v_self->target_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8291
    __Pyx_GOTREF(__pyx_t_7);
 
8292
    __Pyx_DECREF(__pyx_v_target_details);
 
8293
    __pyx_v_target_details = __pyx_t_7;
 
8294
    __pyx_t_7 = 0;
 
8295
 
 
8296
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1165
 
8297
 *             # The entry may have been modified by update_entry
 
8298
 *             target_details = details_list[self.target_index]
 
8299
 *             target_minikind = _minikind_from_string(target_details[0])             # <<<<<<<<<<<<<<
 
8300
 *         else:
 
8301
 *             link_or_sha1 = None
 
8302
 */
 
8303
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_target_details, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8304
    __Pyx_GOTREF(__pyx_t_7);
 
8305
    __pyx_t_4 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_from_string(__pyx_t_7); if (unlikely(__pyx_t_4 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8306
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
8307
    __pyx_v_target_minikind = __pyx_t_4;
 
8308
    goto __pyx_L4;
 
8309
  }
 
8310
  /*else*/ {
 
8311
 
 
8312
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1167
 
8313
 *             target_minikind = _minikind_from_string(target_details[0])
 
8314
 *         else:
 
8315
 *             link_or_sha1 = None             # <<<<<<<<<<<<<<
 
8316
 *         # the rest of this function is 0.3 seconds on 50K paths, or
 
8317
 *         # 0.000006 seconds per call.
 
8318
 */
 
8319
    __Pyx_INCREF(Py_None);
 
8320
    __Pyx_DECREF(__pyx_v_link_or_sha1);
 
8321
    __pyx_v_link_or_sha1 = Py_None;
 
8322
  }
 
8323
  __pyx_L4:;
 
8324
 
 
8325
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1170
 
8326
 *         # the rest of this function is 0.3 seconds on 50K paths, or
 
8327
 *         # 0.000006 seconds per call.
 
8328
 *         source_minikind = _minikind_from_string(source_details[0])             # <<<<<<<<<<<<<<
 
8329
 *         if ((_versioned_minikind(source_minikind) or source_minikind == c'r')
 
8330
 *             and _versioned_minikind(target_minikind)):
 
8331
 */
 
8332
  __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_source_details, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8333
  __Pyx_GOTREF(__pyx_t_7);
 
8334
  __pyx_t_4 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_from_string(__pyx_t_7); if (unlikely(__pyx_t_4 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8335
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
8336
  __pyx_v_source_minikind = __pyx_t_4;
 
8337
 
 
8338
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1171
 
8339
 *         # 0.000006 seconds per call.
 
8340
 *         source_minikind = _minikind_from_string(source_details[0])
 
8341
 *         if ((_versioned_minikind(source_minikind) or source_minikind == c'r')             # <<<<<<<<<<<<<<
 
8342
 *             and _versioned_minikind(target_minikind)):
 
8343
 *             # claimed content in both: diff
 
8344
 */
 
8345
  if (!__pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_source_minikind)) {
 
8346
    __pyx_t_5 = (__pyx_v_source_minikind == 'r');
 
8347
    __pyx_t_2 = __pyx_t_5;
 
8348
  } else {
 
8349
    __pyx_t_2 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_source_minikind);
 
8350
  }
 
8351
  if (__pyx_t_2) {
 
8352
 
 
8353
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1172
 
8354
 *         source_minikind = _minikind_from_string(source_details[0])
 
8355
 *         if ((_versioned_minikind(source_minikind) or source_minikind == c'r')
 
8356
 *             and _versioned_minikind(target_minikind)):             # <<<<<<<<<<<<<<
 
8357
 *             # claimed content in both: diff
 
8358
 *             #   r    | fdlt   |      | add source to search, add id path move and perform
 
8359
 */
 
8360
    __pyx_t_5 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_target_minikind);
 
8361
  } else {
 
8362
    __pyx_t_5 = __pyx_t_2;
 
8363
  }
 
8364
  if (__pyx_t_5) {
 
8365
 
 
8366
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1178
 
8367
 *             #   r    | fdlt   |  a   | dangling file that was present in the basis.
 
8368
 *             #        |        |      | ???
 
8369
 *             if source_minikind != c'r':             # <<<<<<<<<<<<<<
 
8370
 *                 old_dirname = entry[0][0]
 
8371
 *                 old_basename = entry[0][1]
 
8372
 */
 
8373
    __pyx_t_5 = (__pyx_v_source_minikind != 'r');
 
8374
    if (__pyx_t_5) {
 
8375
 
 
8376
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1179
 
8377
 *             #        |        |      | ???
 
8378
 *             if source_minikind != c'r':
 
8379
 *                 old_dirname = entry[0][0]             # <<<<<<<<<<<<<<
 
8380
 *                 old_basename = entry[0][1]
 
8381
 *                 old_path = path = None
 
8382
 */
 
8383
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8384
      __Pyx_GOTREF(__pyx_t_7);
 
8385
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8386
      __Pyx_GOTREF(__pyx_t_6);
 
8387
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
8388
      __Pyx_DECREF(__pyx_v_old_dirname);
 
8389
      __pyx_v_old_dirname = __pyx_t_6;
 
8390
      __pyx_t_6 = 0;
 
8391
 
 
8392
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1180
 
8393
 *             if source_minikind != c'r':
 
8394
 *                 old_dirname = entry[0][0]
 
8395
 *                 old_basename = entry[0][1]             # <<<<<<<<<<<<<<
 
8396
 *                 old_path = path = None
 
8397
 *             else:
 
8398
 */
 
8399
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8400
      __Pyx_GOTREF(__pyx_t_6);
 
8401
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8402
      __Pyx_GOTREF(__pyx_t_7);
 
8403
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
8404
      __Pyx_DECREF(__pyx_v_old_basename);
 
8405
      __pyx_v_old_basename = __pyx_t_7;
 
8406
      __pyx_t_7 = 0;
 
8407
 
 
8408
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1181
 
8409
 *                 old_dirname = entry[0][0]
 
8410
 *                 old_basename = entry[0][1]
 
8411
 *                 old_path = path = None             # <<<<<<<<<<<<<<
 
8412
 *             else:
 
8413
 *                 # add the source to the search path to find any children it
 
8414
 */
 
8415
      __Pyx_INCREF(Py_None);
 
8416
      __Pyx_DECREF(__pyx_v_old_path);
 
8417
      __pyx_v_old_path = Py_None;
 
8418
      __Pyx_INCREF(Py_None);
 
8419
      __Pyx_DECREF(__pyx_v_path);
 
8420
      __pyx_v_path = Py_None;
 
8421
      goto __pyx_L7;
 
8422
    }
 
8423
    /*else*/ {
 
8424
 
 
8425
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1185
 
8426
 *                 # add the source to the search path to find any children it
 
8427
 *                 # has.  TODO ? : only add if it is a container ?
 
8428
 *                 if (not self.doing_consistency_expansion and             # <<<<<<<<<<<<<<
 
8429
 *                     not osutils.is_inside_any(self.searched_specific_files,
 
8430
 *                                              source_details[1])):
 
8431
 */
 
8432
      __pyx_t_5 = (!__pyx_v_self->doing_consistency_expansion);
 
8433
      if (__pyx_t_5) {
 
8434
 
 
8435
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1186
 
8436
 *                 # has.  TODO ? : only add if it is a container ?
 
8437
 *                 if (not self.doing_consistency_expansion and
 
8438
 *                     not osutils.is_inside_any(self.searched_specific_files,             # <<<<<<<<<<<<<<
 
8439
 *                                              source_details[1])):
 
8440
 *                     self.search_specific_files.add(source_details[1])
 
8441
 */
 
8442
        __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__osutils); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8443
        __Pyx_GOTREF(__pyx_t_7);
 
8444
        __pyx_t_6 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__is_inside_any); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8445
        __Pyx_GOTREF(__pyx_t_6);
 
8446
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
8447
 
 
8448
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1187
 
8449
 *                 if (not self.doing_consistency_expansion and
 
8450
 *                     not osutils.is_inside_any(self.searched_specific_files,
 
8451
 *                                              source_details[1])):             # <<<<<<<<<<<<<<
 
8452
 *                     self.search_specific_files.add(source_details[1])
 
8453
 *                     # expanding from a user requested path, parent expansion
 
8454
 */
 
8455
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_source_details, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8456
        __Pyx_GOTREF(__pyx_t_7);
 
8457
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8458
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
8459
        __Pyx_INCREF(__pyx_v_self->searched_specific_files);
 
8460
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->searched_specific_files);
 
8461
        __Pyx_GIVEREF(__pyx_v_self->searched_specific_files);
 
8462
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
 
8463
        __Pyx_GIVEREF(__pyx_t_7);
 
8464
        __pyx_t_7 = 0;
 
8465
        __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8466
        __Pyx_GOTREF(__pyx_t_7);
 
8467
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
8468
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
8469
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8470
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
8471
        __pyx_t_8 = (!__pyx_t_2);
 
8472
        __pyx_t_2 = __pyx_t_8;
 
8473
      } else {
 
8474
        __pyx_t_2 = __pyx_t_5;
 
8475
      }
 
8476
      if (__pyx_t_2) {
 
8477
 
 
8478
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1188
 
8479
 *                     not osutils.is_inside_any(self.searched_specific_files,
 
8480
 *                                              source_details[1])):
 
8481
 *                     self.search_specific_files.add(source_details[1])             # <<<<<<<<<<<<<<
 
8482
 *                     # expanding from a user requested path, parent expansion
 
8483
 *                     # for delta consistency happens later.
 
8484
 */
 
8485
        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self->search_specific_files, __pyx_n_s__add); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8486
        __Pyx_GOTREF(__pyx_t_7);
 
8487
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_source_details, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8488
        __Pyx_GOTREF(__pyx_t_3);
 
8489
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8490
        __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
8491
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
 
8492
        __Pyx_GIVEREF(__pyx_t_3);
 
8493
        __pyx_t_3 = 0;
 
8494
        __pyx_t_3 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8495
        __Pyx_GOTREF(__pyx_t_3);
 
8496
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
8497
        __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
8498
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
8499
        goto __pyx_L8;
 
8500
      }
 
8501
      __pyx_L8:;
 
8502
 
 
8503
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1193
 
8504
 *                 # generate the old path; this is needed for stating later
 
8505
 *                 # as well.
 
8506
 *                 old_path = source_details[1]             # <<<<<<<<<<<<<<
 
8507
 *                 old_dirname, old_basename = os.path.split(old_path)
 
8508
 *                 path = self.pathjoin(entry[0][0], entry[0][1])
 
8509
 */
 
8510
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_source_details, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8511
      __Pyx_GOTREF(__pyx_t_3);
 
8512
      __Pyx_DECREF(__pyx_v_old_path);
 
8513
      __pyx_v_old_path = __pyx_t_3;
 
8514
      __pyx_t_3 = 0;
 
8515
 
 
8516
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1194
 
8517
 *                 # as well.
 
8518
 *                 old_path = source_details[1]
 
8519
 *                 old_dirname, old_basename = os.path.split(old_path)             # <<<<<<<<<<<<<<
 
8520
 *                 path = self.pathjoin(entry[0][0], entry[0][1])
 
8521
 *                 old_entry = self.state._get_entry(self.source_index,
 
8522
 */
 
8523
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8524
      __Pyx_GOTREF(__pyx_t_3);
 
8525
      __pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8526
      __Pyx_GOTREF(__pyx_t_6);
 
8527
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
8528
      __pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8529
      __Pyx_GOTREF(__pyx_t_3);
 
8530
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
8531
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8532
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
8533
      __Pyx_INCREF(__pyx_v_old_path);
 
8534
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_old_path);
 
8535
      __Pyx_GIVEREF(__pyx_v_old_path);
 
8536
      __pyx_t_7 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8537
      __Pyx_GOTREF(__pyx_t_7);
 
8538
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
8539
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
8540
      if (PyTuple_CheckExact(__pyx_t_7) && likely(PyTuple_GET_SIZE(__pyx_t_7) == 2)) {
 
8541
        PyObject* tuple = __pyx_t_7;
 
8542
        __pyx_t_6 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_6);
 
8543
        __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
 
8544
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
8545
        __Pyx_DECREF(__pyx_v_old_dirname);
 
8546
        __pyx_v_old_dirname = __pyx_t_6;
 
8547
        __pyx_t_6 = 0;
 
8548
        __Pyx_DECREF(__pyx_v_old_basename);
 
8549
        __pyx_v_old_basename = __pyx_t_3;
 
8550
        __pyx_t_3 = 0;
 
8551
      } else {
 
8552
        __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8553
        __Pyx_GOTREF(__pyx_t_1);
 
8554
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
8555
        __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_1, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8556
        __Pyx_GOTREF(__pyx_t_6);
 
8557
        __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_1, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8558
        __Pyx_GOTREF(__pyx_t_3);
 
8559
        if (__Pyx_EndUnpack(__pyx_t_1, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8560
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
8561
        __Pyx_DECREF(__pyx_v_old_dirname);
 
8562
        __pyx_v_old_dirname = __pyx_t_6;
 
8563
        __pyx_t_6 = 0;
 
8564
        __Pyx_DECREF(__pyx_v_old_basename);
 
8565
        __pyx_v_old_basename = __pyx_t_3;
 
8566
        __pyx_t_3 = 0;
 
8567
      }
 
8568
 
 
8569
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1195
 
8570
 *                 old_path = source_details[1]
 
8571
 *                 old_dirname, old_basename = os.path.split(old_path)
 
8572
 *                 path = self.pathjoin(entry[0][0], entry[0][1])             # <<<<<<<<<<<<<<
 
8573
 *                 old_entry = self.state._get_entry(self.source_index,
 
8574
 *                                              path_utf8=old_path)
 
8575
 */
 
8576
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8577
      __Pyx_GOTREF(__pyx_t_7);
 
8578
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_7, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8579
      __Pyx_GOTREF(__pyx_t_3);
 
8580
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
8581
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8582
      __Pyx_GOTREF(__pyx_t_7);
 
8583
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8584
      __Pyx_GOTREF(__pyx_t_6);
 
8585
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
8586
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8587
      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
8588
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
 
8589
      __Pyx_GIVEREF(__pyx_t_3);
 
8590
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
 
8591
      __Pyx_GIVEREF(__pyx_t_6);
 
8592
      __pyx_t_3 = 0;
 
8593
      __pyx_t_6 = 0;
 
8594
      __pyx_t_6 = PyObject_Call(__pyx_v_self->pathjoin, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8595
      __Pyx_GOTREF(__pyx_t_6);
 
8596
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
8597
      __Pyx_DECREF(__pyx_v_path);
 
8598
      __pyx_v_path = __pyx_t_6;
 
8599
      __pyx_t_6 = 0;
 
8600
 
 
8601
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1196
 
8602
 *                 old_dirname, old_basename = os.path.split(old_path)
 
8603
 *                 path = self.pathjoin(entry[0][0], entry[0][1])
 
8604
 *                 old_entry = self.state._get_entry(self.source_index,             # <<<<<<<<<<<<<<
 
8605
 *                                              path_utf8=old_path)
 
8606
 *                 # update the source details variable to be the real
 
8607
 */
 
8608
      __pyx_t_6 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___get_entry); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8609
      __Pyx_GOTREF(__pyx_t_6);
 
8610
      __pyx_t_7 = PyInt_FromLong(__pyx_v_self->source_index); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8611
      __Pyx_GOTREF(__pyx_t_7);
 
8612
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8613
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
8614
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7);
 
8615
      __Pyx_GIVEREF(__pyx_t_7);
 
8616
      __pyx_t_7 = 0;
 
8617
      __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8618
      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
8619
 
 
8620
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1197
 
8621
 *                 path = self.pathjoin(entry[0][0], entry[0][1])
 
8622
 *                 old_entry = self.state._get_entry(self.source_index,
 
8623
 *                                              path_utf8=old_path)             # <<<<<<<<<<<<<<
 
8624
 *                 # update the source details variable to be the real
 
8625
 *                 # location.
 
8626
 */
 
8627
      if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__path_utf8), __pyx_v_old_path) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8628
      __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_6, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8629
      __Pyx_GOTREF(__pyx_t_1);
 
8630
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
8631
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
8632
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
8633
      __Pyx_DECREF(__pyx_v_old_entry);
 
8634
      __pyx_v_old_entry = __pyx_t_1;
 
8635
      __pyx_t_1 = 0;
 
8636
 
 
8637
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1200
 
8638
 *                 # update the source details variable to be the real
 
8639
 *                 # location.
 
8640
 *                 if old_entry == (None, None):             # <<<<<<<<<<<<<<
 
8641
 *                     raise errors.CorruptDirstate(self.state._filename,
 
8642
 *                         "entry '%s/%s' is considered renamed from %r"
 
8643
 */
 
8644
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_old_entry, ((PyObject *)__pyx_k_tuple_35), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8645
      __Pyx_GOTREF(__pyx_t_1);
 
8646
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8647
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
8648
      if (__pyx_t_2) {
 
8649
 
 
8650
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1201
 
8651
 *                 # location.
 
8652
 *                 if old_entry == (None, None):
 
8653
 *                     raise errors.CorruptDirstate(self.state._filename,             # <<<<<<<<<<<<<<
 
8654
 *                         "entry '%s/%s' is considered renamed from %r"
 
8655
 *                         " but source does not exist\n"
 
8656
 */
 
8657
        __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8658
        __Pyx_GOTREF(__pyx_t_1);
 
8659
        __pyx_t_7 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__CorruptDirstate); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8660
        __Pyx_GOTREF(__pyx_t_7);
 
8661
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
8662
        __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8663
        __Pyx_GOTREF(__pyx_t_1);
 
8664
 
 
8665
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1204
 
8666
 *                         "entry '%s/%s' is considered renamed from %r"
 
8667
 *                         " but source does not exist\n"
 
8668
 *                         "entry: %s" % (entry[0][0], entry[0][1], old_path, entry))             # <<<<<<<<<<<<<<
 
8669
 *                 source_details = old_entry[1][self.source_index]
 
8670
 *                 source_minikind = _minikind_from_string(source_details[0])
 
8671
 */
 
8672
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8673
        __Pyx_GOTREF(__pyx_t_3);
 
8674
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_3, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8675
        __Pyx_GOTREF(__pyx_t_6);
 
8676
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
8677
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8678
        __Pyx_GOTREF(__pyx_t_3);
 
8679
        __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_3, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8680
        __Pyx_GOTREF(__pyx_t_9);
 
8681
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
8682
        __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8683
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
8684
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
 
8685
        __Pyx_GIVEREF(__pyx_t_6);
 
8686
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_9);
 
8687
        __Pyx_GIVEREF(__pyx_t_9);
 
8688
        __Pyx_INCREF(__pyx_v_old_path);
 
8689
        PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_old_path);
 
8690
        __Pyx_GIVEREF(__pyx_v_old_path);
 
8691
        __Pyx_INCREF(__pyx_v_entry);
 
8692
        PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_entry);
 
8693
        __Pyx_GIVEREF(__pyx_v_entry);
 
8694
        __pyx_t_6 = 0;
 
8695
        __pyx_t_9 = 0;
 
8696
        __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_36), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8697
        __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
8698
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
8699
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8700
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
8701
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
 
8702
        __Pyx_GIVEREF(__pyx_t_1);
 
8703
        PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_t_9));
 
8704
        __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
 
8705
        __pyx_t_1 = 0;
 
8706
        __pyx_t_9 = 0;
 
8707
        __pyx_t_9 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8708
        __Pyx_GOTREF(__pyx_t_9);
 
8709
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
8710
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
8711
        __Pyx_Raise(__pyx_t_9, 0, 0);
 
8712
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
8713
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8714
        goto __pyx_L9;
 
8715
      }
 
8716
      __pyx_L9:;
 
8717
 
 
8718
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1205
 
8719
 *                         " but source does not exist\n"
 
8720
 *                         "entry: %s" % (entry[0][0], entry[0][1], old_path, entry))
 
8721
 *                 source_details = old_entry[1][self.source_index]             # <<<<<<<<<<<<<<
 
8722
 *                 source_minikind = _minikind_from_string(source_details[0])
 
8723
 *             if path_info is None:
 
8724
 */
 
8725
      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_old_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8726
      __Pyx_GOTREF(__pyx_t_9);
 
8727
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_9, __pyx_v_self->source_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8728
      __Pyx_GOTREF(__pyx_t_3);
 
8729
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
8730
      __Pyx_DECREF(__pyx_v_source_details);
 
8731
      __pyx_v_source_details = __pyx_t_3;
 
8732
      __pyx_t_3 = 0;
 
8733
 
 
8734
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1206
 
8735
 *                         "entry: %s" % (entry[0][0], entry[0][1], old_path, entry))
 
8736
 *                 source_details = old_entry[1][self.source_index]
 
8737
 *                 source_minikind = _minikind_from_string(source_details[0])             # <<<<<<<<<<<<<<
 
8738
 *             if path_info is None:
 
8739
 *                 # the file is missing on disk, show as removed.
 
8740
 */
 
8741
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_source_details, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8742
      __Pyx_GOTREF(__pyx_t_3);
 
8743
      __pyx_t_4 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_from_string(__pyx_t_3); if (unlikely(__pyx_t_4 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8744
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
8745
      __pyx_v_source_minikind = __pyx_t_4;
 
8746
    }
 
8747
    __pyx_L7:;
 
8748
 
 
8749
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1207
 
8750
 *                 source_details = old_entry[1][self.source_index]
 
8751
 *                 source_minikind = _minikind_from_string(source_details[0])
 
8752
 *             if path_info is None:             # <<<<<<<<<<<<<<
 
8753
 *                 # the file is missing on disk, show as removed.
 
8754
 *                 content_change = 1
 
8755
 */
 
8756
    __pyx_t_2 = (__pyx_v_path_info == Py_None);
 
8757
    if (__pyx_t_2) {
 
8758
 
 
8759
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1209
 
8760
 *             if path_info is None:
 
8761
 *                 # the file is missing on disk, show as removed.
 
8762
 *                 content_change = 1             # <<<<<<<<<<<<<<
 
8763
 *                 target_kind = None
 
8764
 *                 target_exec = False
 
8765
 */
 
8766
      __pyx_v_content_change = 1;
 
8767
 
 
8768
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1210
 
8769
 *                 # the file is missing on disk, show as removed.
 
8770
 *                 content_change = 1
 
8771
 *                 target_kind = None             # <<<<<<<<<<<<<<
 
8772
 *                 target_exec = False
 
8773
 *             else:
 
8774
 */
 
8775
      __Pyx_INCREF(Py_None);
 
8776
      __Pyx_DECREF(__pyx_v_target_kind);
 
8777
      __pyx_v_target_kind = Py_None;
 
8778
 
 
8779
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1211
 
8780
 *                 content_change = 1
 
8781
 *                 target_kind = None
 
8782
 *                 target_exec = False             # <<<<<<<<<<<<<<
 
8783
 *             else:
 
8784
 *                 # source and target are both versioned and disk file is present.
 
8785
 */
 
8786
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8787
      __Pyx_GOTREF(__pyx_t_3);
 
8788
      __Pyx_DECREF(__pyx_v_target_exec);
 
8789
      __pyx_v_target_exec = __pyx_t_3;
 
8790
      __pyx_t_3 = 0;
 
8791
      goto __pyx_L10;
 
8792
    }
 
8793
    /*else*/ {
 
8794
 
 
8795
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1214
 
8796
 *             else:
 
8797
 *                 # source and target are both versioned and disk file is present.
 
8798
 *                 target_kind = path_info[2]             # <<<<<<<<<<<<<<
 
8799
 *                 if target_kind == 'directory':
 
8800
 *                     if path is None:
 
8801
 */
 
8802
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_path_info, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8803
      __Pyx_GOTREF(__pyx_t_3);
 
8804
      __Pyx_DECREF(__pyx_v_target_kind);
 
8805
      __pyx_v_target_kind = __pyx_t_3;
 
8806
      __pyx_t_3 = 0;
 
8807
 
 
8808
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1215
 
8809
 *                 # source and target are both versioned and disk file is present.
 
8810
 *                 target_kind = path_info[2]
 
8811
 *                 if target_kind == 'directory':             # <<<<<<<<<<<<<<
 
8812
 *                     if path is None:
 
8813
 *                         old_path = path = self.pathjoin(old_dirname, old_basename)
 
8814
 */
 
8815
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_target_kind, ((PyObject *)__pyx_n_s__directory), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8816
      __Pyx_GOTREF(__pyx_t_3);
 
8817
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8818
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
8819
      if (__pyx_t_2) {
 
8820
 
 
8821
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1216
 
8822
 *                 target_kind = path_info[2]
 
8823
 *                 if target_kind == 'directory':
 
8824
 *                     if path is None:             # <<<<<<<<<<<<<<
 
8825
 *                         old_path = path = self.pathjoin(old_dirname, old_basename)
 
8826
 *                     file_id = entry[0][2]
 
8827
 */
 
8828
        __pyx_t_2 = (__pyx_v_path == Py_None);
 
8829
        if (__pyx_t_2) {
 
8830
 
 
8831
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1217
 
8832
 *                 if target_kind == 'directory':
 
8833
 *                     if path is None:
 
8834
 *                         old_path = path = self.pathjoin(old_dirname, old_basename)             # <<<<<<<<<<<<<<
 
8835
 *                     file_id = entry[0][2]
 
8836
 *                     self.new_dirname_to_file_id[path] = file_id
 
8837
 */
 
8838
          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8839
          __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
8840
          __Pyx_INCREF(__pyx_v_old_dirname);
 
8841
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_old_dirname);
 
8842
          __Pyx_GIVEREF(__pyx_v_old_dirname);
 
8843
          __Pyx_INCREF(__pyx_v_old_basename);
 
8844
          PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_old_basename);
 
8845
          __Pyx_GIVEREF(__pyx_v_old_basename);
 
8846
          __pyx_t_9 = PyObject_Call(__pyx_v_self->pathjoin, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8847
          __Pyx_GOTREF(__pyx_t_9);
 
8848
          __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
8849
          __Pyx_INCREF(__pyx_t_9);
 
8850
          __Pyx_DECREF(__pyx_v_old_path);
 
8851
          __pyx_v_old_path = __pyx_t_9;
 
8852
          __Pyx_INCREF(__pyx_t_9);
 
8853
          __Pyx_DECREF(__pyx_v_path);
 
8854
          __pyx_v_path = __pyx_t_9;
 
8855
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
8856
          goto __pyx_L12;
 
8857
        }
 
8858
        __pyx_L12:;
 
8859
 
 
8860
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1218
 
8861
 *                     if path is None:
 
8862
 *                         old_path = path = self.pathjoin(old_dirname, old_basename)
 
8863
 *                     file_id = entry[0][2]             # <<<<<<<<<<<<<<
 
8864
 *                     self.new_dirname_to_file_id[path] = file_id
 
8865
 *                     if source_minikind != c'd':
 
8866
 */
 
8867
        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8868
        __Pyx_GOTREF(__pyx_t_9);
 
8869
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_9, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8870
        __Pyx_GOTREF(__pyx_t_3);
 
8871
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
8872
        __Pyx_DECREF(__pyx_v_file_id);
 
8873
        __pyx_v_file_id = __pyx_t_3;
 
8874
        __pyx_t_3 = 0;
 
8875
 
 
8876
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1219
 
8877
 *                         old_path = path = self.pathjoin(old_dirname, old_basename)
 
8878
 *                     file_id = entry[0][2]
 
8879
 *                     self.new_dirname_to_file_id[path] = file_id             # <<<<<<<<<<<<<<
 
8880
 *                     if source_minikind != c'd':
 
8881
 *                         content_change = 1
 
8882
 */
 
8883
        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 = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8884
 
 
8885
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1220
 
8886
 *                     file_id = entry[0][2]
 
8887
 *                     self.new_dirname_to_file_id[path] = file_id
 
8888
 *                     if source_minikind != c'd':             # <<<<<<<<<<<<<<
 
8889
 *                         content_change = 1
 
8890
 *                     else:
 
8891
 */
 
8892
        __pyx_t_2 = (__pyx_v_source_minikind != 'd');
 
8893
        if (__pyx_t_2) {
 
8894
 
 
8895
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1221
 
8896
 *                     self.new_dirname_to_file_id[path] = file_id
 
8897
 *                     if source_minikind != c'd':
 
8898
 *                         content_change = 1             # <<<<<<<<<<<<<<
 
8899
 *                     else:
 
8900
 *                         # directories have no fingerprint
 
8901
 */
 
8902
          __pyx_v_content_change = 1;
 
8903
          goto __pyx_L13;
 
8904
        }
 
8905
        /*else*/ {
 
8906
 
 
8907
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1224
 
8908
 *                     else:
 
8909
 *                         # directories have no fingerprint
 
8910
 *                         content_change = 0             # <<<<<<<<<<<<<<
 
8911
 *                     target_exec = False
 
8912
 *                 elif target_kind == 'file':
 
8913
 */
 
8914
          __pyx_v_content_change = 0;
 
8915
        }
 
8916
        __pyx_L13:;
 
8917
 
 
8918
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1225
 
8919
 *                         # directories have no fingerprint
 
8920
 *                         content_change = 0
 
8921
 *                     target_exec = False             # <<<<<<<<<<<<<<
 
8922
 *                 elif target_kind == 'file':
 
8923
 *                     if source_minikind != c'f':
 
8924
 */
 
8925
        __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8926
        __Pyx_GOTREF(__pyx_t_3);
 
8927
        __Pyx_DECREF(__pyx_v_target_exec);
 
8928
        __pyx_v_target_exec = __pyx_t_3;
 
8929
        __pyx_t_3 = 0;
 
8930
        goto __pyx_L11;
 
8931
      }
 
8932
 
 
8933
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1226
 
8934
 *                         content_change = 0
 
8935
 *                     target_exec = False
 
8936
 *                 elif target_kind == 'file':             # <<<<<<<<<<<<<<
 
8937
 *                     if source_minikind != c'f':
 
8938
 *                         content_change = 1
 
8939
 */
 
8940
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_target_kind, ((PyObject *)__pyx_n_s__file), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8941
      __Pyx_GOTREF(__pyx_t_3);
 
8942
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8943
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
8944
      if (__pyx_t_2) {
 
8945
 
 
8946
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1227
 
8947
 *                     target_exec = False
 
8948
 *                 elif target_kind == 'file':
 
8949
 *                     if source_minikind != c'f':             # <<<<<<<<<<<<<<
 
8950
 *                         content_change = 1
 
8951
 *                     else:
 
8952
 */
 
8953
        __pyx_t_2 = (__pyx_v_source_minikind != 'f');
 
8954
        if (__pyx_t_2) {
 
8955
 
 
8956
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1228
 
8957
 *                 elif target_kind == 'file':
 
8958
 *                     if source_minikind != c'f':
 
8959
 *                         content_change = 1             # <<<<<<<<<<<<<<
 
8960
 *                     else:
 
8961
 *                         # Check the sha. We can't just rely on the size as
 
8962
 */
 
8963
          __pyx_v_content_change = 1;
 
8964
          goto __pyx_L14;
 
8965
        }
 
8966
        /*else*/ {
 
8967
 
 
8968
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1233
 
8969
 *                         # content filtering may mean differ sizes actually
 
8970
 *                         # map to the same content
 
8971
 *                         if link_or_sha1 is None:             # <<<<<<<<<<<<<<
 
8972
 *                             # Stat cache miss:
 
8973
 *                             statvalue, link_or_sha1 = \
 
8974
 */
 
8975
          __pyx_t_2 = (__pyx_v_link_or_sha1 == Py_None);
 
8976
          if (__pyx_t_2) {
 
8977
 
 
8978
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1236
 
8979
 *                             # Stat cache miss:
 
8980
 *                             statvalue, link_or_sha1 = \
 
8981
 *                                 self.state._sha1_provider.stat_and_sha1(             # <<<<<<<<<<<<<<
 
8982
 *                                 path_info[4])
 
8983
 *                             self.state._observed_sha1(entry, link_or_sha1,
 
8984
 */
 
8985
            __pyx_t_3 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___sha1_provider); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8986
            __Pyx_GOTREF(__pyx_t_3);
 
8987
            __pyx_t_9 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__stat_and_sha1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8988
            __Pyx_GOTREF(__pyx_t_9);
 
8989
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
8990
 
 
8991
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1237
 
8992
 *                             statvalue, link_or_sha1 = \
 
8993
 *                                 self.state._sha1_provider.stat_and_sha1(
 
8994
 *                                 path_info[4])             # <<<<<<<<<<<<<<
 
8995
 *                             self.state._observed_sha1(entry, link_or_sha1,
 
8996
 *                                 statvalue)
 
8997
 */
 
8998
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_path_info, 4, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
8999
            __Pyx_GOTREF(__pyx_t_3);
 
9000
            __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9001
            __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
9002
            PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
 
9003
            __Pyx_GIVEREF(__pyx_t_3);
 
9004
            __pyx_t_3 = 0;
 
9005
            __pyx_t_3 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9006
            __Pyx_GOTREF(__pyx_t_3);
 
9007
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
9008
            __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
9009
            if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
 
9010
              PyObject* tuple = __pyx_t_3;
 
9011
              __pyx_t_7 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_7);
 
9012
              __pyx_t_9 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_9);
 
9013
 
 
9014
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1235
 
9015
 *                         if link_or_sha1 is None:
 
9016
 *                             # Stat cache miss:
 
9017
 *                             statvalue, link_or_sha1 = \             # <<<<<<<<<<<<<<
 
9018
 *                                 self.state._sha1_provider.stat_and_sha1(
 
9019
 *                                 path_info[4])
 
9020
 */
 
9021
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9022
              __Pyx_DECREF(__pyx_v_statvalue);
 
9023
              __pyx_v_statvalue = __pyx_t_7;
 
9024
              __pyx_t_7 = 0;
 
9025
              __Pyx_DECREF(__pyx_v_link_or_sha1);
 
9026
              __pyx_v_link_or_sha1 = __pyx_t_9;
 
9027
              __pyx_t_9 = 0;
 
9028
            } else {
 
9029
              __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9030
              __Pyx_GOTREF(__pyx_t_1);
 
9031
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9032
              __pyx_t_7 = __Pyx_UnpackItem(__pyx_t_1, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9033
              __Pyx_GOTREF(__pyx_t_7);
 
9034
              __pyx_t_9 = __Pyx_UnpackItem(__pyx_t_1, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9035
              __Pyx_GOTREF(__pyx_t_9);
 
9036
              if (__Pyx_EndUnpack(__pyx_t_1, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9037
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
9038
              __Pyx_DECREF(__pyx_v_statvalue);
 
9039
              __pyx_v_statvalue = __pyx_t_7;
 
9040
              __pyx_t_7 = 0;
 
9041
              __Pyx_DECREF(__pyx_v_link_or_sha1);
 
9042
              __pyx_v_link_or_sha1 = __pyx_t_9;
 
9043
              __pyx_t_9 = 0;
 
9044
            }
 
9045
 
 
9046
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1238
 
9047
 *                                 self.state._sha1_provider.stat_and_sha1(
 
9048
 *                                 path_info[4])
 
9049
 *                             self.state._observed_sha1(entry, link_or_sha1,             # <<<<<<<<<<<<<<
 
9050
 *                                 statvalue)
 
9051
 *                         content_change = (link_or_sha1 != source_details[1])
 
9052
 */
 
9053
            __pyx_t_3 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___observed_sha1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9054
            __Pyx_GOTREF(__pyx_t_3);
 
9055
 
 
9056
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1239
 
9057
 *                                 path_info[4])
 
9058
 *                             self.state._observed_sha1(entry, link_or_sha1,
 
9059
 *                                 statvalue)             # <<<<<<<<<<<<<<
 
9060
 *                         content_change = (link_or_sha1 != source_details[1])
 
9061
 *                     # Target details is updated at update_entry time
 
9062
 */
 
9063
            __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9064
            __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
9065
            __Pyx_INCREF(__pyx_v_entry);
 
9066
            PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_entry);
 
9067
            __Pyx_GIVEREF(__pyx_v_entry);
 
9068
            __Pyx_INCREF(__pyx_v_link_or_sha1);
 
9069
            PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_link_or_sha1);
 
9070
            __Pyx_GIVEREF(__pyx_v_link_or_sha1);
 
9071
            __Pyx_INCREF(__pyx_v_statvalue);
 
9072
            PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_statvalue);
 
9073
            __Pyx_GIVEREF(__pyx_v_statvalue);
 
9074
            __pyx_t_7 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9075
            __Pyx_GOTREF(__pyx_t_7);
 
9076
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9077
            __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
9078
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9079
            goto __pyx_L15;
 
9080
          }
 
9081
          __pyx_L15:;
 
9082
 
 
9083
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1240
 
9084
 *                             self.state._observed_sha1(entry, link_or_sha1,
 
9085
 *                                 statvalue)
 
9086
 *                         content_change = (link_or_sha1 != source_details[1])             # <<<<<<<<<<<<<<
 
9087
 *                     # Target details is updated at update_entry time
 
9088
 *                     if self.use_filesystem_for_exec:
 
9089
 */
 
9090
          __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_source_details, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9091
          __Pyx_GOTREF(__pyx_t_7);
 
9092
          __pyx_t_9 = PyObject_RichCompare(__pyx_v_link_or_sha1, __pyx_t_7, Py_NE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9093
          __Pyx_GOTREF(__pyx_t_9);
 
9094
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9095
          __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9096
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
9097
          __pyx_v_content_change = __pyx_t_10;
 
9098
        }
 
9099
        __pyx_L14:;
 
9100
 
 
9101
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1242
 
9102
 *                         content_change = (link_or_sha1 != source_details[1])
 
9103
 *                     # Target details is updated at update_entry time
 
9104
 *                     if self.use_filesystem_for_exec:             # <<<<<<<<<<<<<<
 
9105
 *                         # We don't need S_ISREG here, because we are sure
 
9106
 *                         # we are dealing with a file.
 
9107
 */
 
9108
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->use_filesystem_for_exec); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9109
        if (__pyx_t_2) {
 
9110
 
 
9111
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1245
 
9112
 *                         # We don't need S_ISREG here, because we are sure
 
9113
 *                         # we are dealing with a file.
 
9114
 *                         target_exec = bool(S_IXUSR & path_info[3].st_mode)             # <<<<<<<<<<<<<<
 
9115
 *                     else:
 
9116
 *                         target_exec = target_details[3]
 
9117
 */
 
9118
          __pyx_t_9 = PyInt_FromLong(S_IXUSR); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9119
          __Pyx_GOTREF(__pyx_t_9);
 
9120
          __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_path_info, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9121
          __Pyx_GOTREF(__pyx_t_7);
 
9122
          __pyx_t_3 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__st_mode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9123
          __Pyx_GOTREF(__pyx_t_3);
 
9124
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9125
          __pyx_t_7 = PyNumber_And(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9126
          __Pyx_GOTREF(__pyx_t_7);
 
9127
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
9128
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9129
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9130
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9131
          __pyx_t_7 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9132
          __Pyx_GOTREF(__pyx_t_7);
 
9133
          __Pyx_DECREF(__pyx_v_target_exec);
 
9134
          __pyx_v_target_exec = __pyx_t_7;
 
9135
          __pyx_t_7 = 0;
 
9136
          goto __pyx_L16;
 
9137
        }
 
9138
        /*else*/ {
 
9139
 
 
9140
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1247
 
9141
 *                         target_exec = bool(S_IXUSR & path_info[3].st_mode)
 
9142
 *                     else:
 
9143
 *                         target_exec = target_details[3]             # <<<<<<<<<<<<<<
 
9144
 *                 elif target_kind == 'symlink':
 
9145
 *                     if source_minikind != c'l':
 
9146
 */
 
9147
          __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_target_details, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9148
          __Pyx_GOTREF(__pyx_t_7);
 
9149
          __Pyx_DECREF(__pyx_v_target_exec);
 
9150
          __pyx_v_target_exec = __pyx_t_7;
 
9151
          __pyx_t_7 = 0;
 
9152
        }
 
9153
        __pyx_L16:;
 
9154
        goto __pyx_L11;
 
9155
      }
 
9156
 
 
9157
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1248
 
9158
 *                     else:
 
9159
 *                         target_exec = target_details[3]
 
9160
 *                 elif target_kind == 'symlink':             # <<<<<<<<<<<<<<
 
9161
 *                     if source_minikind != c'l':
 
9162
 *                         content_change = 1
 
9163
 */
 
9164
      __pyx_t_7 = PyObject_RichCompare(__pyx_v_target_kind, ((PyObject *)__pyx_n_s__symlink), Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9165
      __Pyx_GOTREF(__pyx_t_7);
 
9166
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9167
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9168
      if (__pyx_t_2) {
 
9169
 
 
9170
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1249
 
9171
 *                         target_exec = target_details[3]
 
9172
 *                 elif target_kind == 'symlink':
 
9173
 *                     if source_minikind != c'l':             # <<<<<<<<<<<<<<
 
9174
 *                         content_change = 1
 
9175
 *                     else:
 
9176
 */
 
9177
        __pyx_t_2 = (__pyx_v_source_minikind != 'l');
 
9178
        if (__pyx_t_2) {
 
9179
 
 
9180
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1250
 
9181
 *                 elif target_kind == 'symlink':
 
9182
 *                     if source_minikind != c'l':
 
9183
 *                         content_change = 1             # <<<<<<<<<<<<<<
 
9184
 *                     else:
 
9185
 *                         content_change = (link_or_sha1 != source_details[1])
 
9186
 */
 
9187
          __pyx_v_content_change = 1;
 
9188
          goto __pyx_L17;
 
9189
        }
 
9190
        /*else*/ {
 
9191
 
 
9192
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1252
 
9193
 *                         content_change = 1
 
9194
 *                     else:
 
9195
 *                         content_change = (link_or_sha1 != source_details[1])             # <<<<<<<<<<<<<<
 
9196
 *                     target_exec = False
 
9197
 *                 elif target_kind == 'tree-reference':
 
9198
 */
 
9199
          __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_source_details, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9200
          __Pyx_GOTREF(__pyx_t_7);
 
9201
          __pyx_t_3 = PyObject_RichCompare(__pyx_v_link_or_sha1, __pyx_t_7, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9202
          __Pyx_GOTREF(__pyx_t_3);
 
9203
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9204
          __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9205
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9206
          __pyx_v_content_change = __pyx_t_10;
 
9207
        }
 
9208
        __pyx_L17:;
 
9209
 
 
9210
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1253
 
9211
 *                     else:
 
9212
 *                         content_change = (link_or_sha1 != source_details[1])
 
9213
 *                     target_exec = False             # <<<<<<<<<<<<<<
 
9214
 *                 elif target_kind == 'tree-reference':
 
9215
 *                     if source_minikind != c't':
 
9216
 */
 
9217
        __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9218
        __Pyx_GOTREF(__pyx_t_3);
 
9219
        __Pyx_DECREF(__pyx_v_target_exec);
 
9220
        __pyx_v_target_exec = __pyx_t_3;
 
9221
        __pyx_t_3 = 0;
 
9222
        goto __pyx_L11;
 
9223
      }
 
9224
 
 
9225
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1254
 
9226
 *                         content_change = (link_or_sha1 != source_details[1])
 
9227
 *                     target_exec = False
 
9228
 *                 elif target_kind == 'tree-reference':             # <<<<<<<<<<<<<<
 
9229
 *                     if source_minikind != c't':
 
9230
 *                         content_change = 1
 
9231
 */
 
9232
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_target_kind, ((PyObject *)__pyx_kp_s_37), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9233
      __Pyx_GOTREF(__pyx_t_3);
 
9234
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9235
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9236
      if (__pyx_t_2) {
 
9237
 
 
9238
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1255
 
9239
 *                     target_exec = False
 
9240
 *                 elif target_kind == 'tree-reference':
 
9241
 *                     if source_minikind != c't':             # <<<<<<<<<<<<<<
 
9242
 *                         content_change = 1
 
9243
 *                     else:
 
9244
 */
 
9245
        __pyx_t_2 = (__pyx_v_source_minikind != 't');
 
9246
        if (__pyx_t_2) {
 
9247
 
 
9248
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1256
 
9249
 *                 elif target_kind == 'tree-reference':
 
9250
 *                     if source_minikind != c't':
 
9251
 *                         content_change = 1             # <<<<<<<<<<<<<<
 
9252
 *                     else:
 
9253
 *                         content_change = 0
 
9254
 */
 
9255
          __pyx_v_content_change = 1;
 
9256
          goto __pyx_L18;
 
9257
        }
 
9258
        /*else*/ {
 
9259
 
 
9260
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1258
 
9261
 *                         content_change = 1
 
9262
 *                     else:
 
9263
 *                         content_change = 0             # <<<<<<<<<<<<<<
 
9264
 *                     target_exec = False
 
9265
 *                 else:
 
9266
 */
 
9267
          __pyx_v_content_change = 0;
 
9268
        }
 
9269
        __pyx_L18:;
 
9270
 
 
9271
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1259
 
9272
 *                     else:
 
9273
 *                         content_change = 0
 
9274
 *                     target_exec = False             # <<<<<<<<<<<<<<
 
9275
 *                 else:
 
9276
 *                     if path is None:
 
9277
 */
 
9278
        __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9279
        __Pyx_GOTREF(__pyx_t_3);
 
9280
        __Pyx_DECREF(__pyx_v_target_exec);
 
9281
        __pyx_v_target_exec = __pyx_t_3;
 
9282
        __pyx_t_3 = 0;
 
9283
        goto __pyx_L11;
 
9284
      }
 
9285
      /*else*/ {
 
9286
 
 
9287
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1261
 
9288
 *                     target_exec = False
 
9289
 *                 else:
 
9290
 *                     if path is None:             # <<<<<<<<<<<<<<
 
9291
 *                         path = self.pathjoin(old_dirname, old_basename)
 
9292
 *                     raise errors.BadFileKindError(path, path_info[2])
 
9293
 */
 
9294
        __pyx_t_2 = (__pyx_v_path == Py_None);
 
9295
        if (__pyx_t_2) {
 
9296
 
 
9297
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1262
 
9298
 *                 else:
 
9299
 *                     if path is None:
 
9300
 *                         path = self.pathjoin(old_dirname, old_basename)             # <<<<<<<<<<<<<<
 
9301
 *                     raise errors.BadFileKindError(path, path_info[2])
 
9302
 *             if source_minikind == c'd':
 
9303
 */
 
9304
          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9305
          __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
9306
          __Pyx_INCREF(__pyx_v_old_dirname);
 
9307
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_old_dirname);
 
9308
          __Pyx_GIVEREF(__pyx_v_old_dirname);
 
9309
          __Pyx_INCREF(__pyx_v_old_basename);
 
9310
          PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_old_basename);
 
9311
          __Pyx_GIVEREF(__pyx_v_old_basename);
 
9312
          __pyx_t_7 = PyObject_Call(__pyx_v_self->pathjoin, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9313
          __Pyx_GOTREF(__pyx_t_7);
 
9314
          __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
9315
          __Pyx_DECREF(__pyx_v_path);
 
9316
          __pyx_v_path = __pyx_t_7;
 
9317
          __pyx_t_7 = 0;
 
9318
          goto __pyx_L19;
 
9319
        }
 
9320
        __pyx_L19:;
 
9321
 
 
9322
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1263
 
9323
 *                     if path is None:
 
9324
 *                         path = self.pathjoin(old_dirname, old_basename)
 
9325
 *                     raise errors.BadFileKindError(path, path_info[2])             # <<<<<<<<<<<<<<
 
9326
 *             if source_minikind == c'd':
 
9327
 *                 if path is None:
 
9328
 */
 
9329
        __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__errors); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9330
        __Pyx_GOTREF(__pyx_t_7);
 
9331
        __pyx_t_3 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__BadFileKindError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9332
        __Pyx_GOTREF(__pyx_t_3);
 
9333
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9334
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_path_info, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9335
        __Pyx_GOTREF(__pyx_t_7);
 
9336
        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9337
        __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
9338
        __Pyx_INCREF(__pyx_v_path);
 
9339
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_path);
 
9340
        __Pyx_GIVEREF(__pyx_v_path);
 
9341
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7);
 
9342
        __Pyx_GIVEREF(__pyx_t_7);
 
9343
        __pyx_t_7 = 0;
 
9344
        __pyx_t_7 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9345
        __Pyx_GOTREF(__pyx_t_7);
 
9346
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9347
        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
9348
        __Pyx_Raise(__pyx_t_7, 0, 0);
 
9349
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9350
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9351
      }
 
9352
      __pyx_L11:;
 
9353
    }
 
9354
    __pyx_L10:;
 
9355
 
 
9356
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1264
 
9357
 *                         path = self.pathjoin(old_dirname, old_basename)
 
9358
 *                     raise errors.BadFileKindError(path, path_info[2])
 
9359
 *             if source_minikind == c'd':             # <<<<<<<<<<<<<<
 
9360
 *                 if path is None:
 
9361
 *                     old_path = path = self.pathjoin(old_dirname, old_basename)
 
9362
 */
 
9363
    __pyx_t_2 = (__pyx_v_source_minikind == 'd');
 
9364
    if (__pyx_t_2) {
 
9365
 
 
9366
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1265
 
9367
 *                     raise errors.BadFileKindError(path, path_info[2])
 
9368
 *             if source_minikind == c'd':
 
9369
 *                 if path is None:             # <<<<<<<<<<<<<<
 
9370
 *                     old_path = path = self.pathjoin(old_dirname, old_basename)
 
9371
 *                 if file_id is None:
 
9372
 */
 
9373
      __pyx_t_2 = (__pyx_v_path == Py_None);
 
9374
      if (__pyx_t_2) {
 
9375
 
 
9376
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1266
 
9377
 *             if source_minikind == c'd':
 
9378
 *                 if path is None:
 
9379
 *                     old_path = path = self.pathjoin(old_dirname, old_basename)             # <<<<<<<<<<<<<<
 
9380
 *                 if file_id is None:
 
9381
 *                     file_id = entry[0][2]
 
9382
 */
 
9383
        __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9384
        __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
9385
        __Pyx_INCREF(__pyx_v_old_dirname);
 
9386
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_old_dirname);
 
9387
        __Pyx_GIVEREF(__pyx_v_old_dirname);
 
9388
        __Pyx_INCREF(__pyx_v_old_basename);
 
9389
        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_old_basename);
 
9390
        __Pyx_GIVEREF(__pyx_v_old_basename);
 
9391
        __pyx_t_9 = PyObject_Call(__pyx_v_self->pathjoin, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9392
        __Pyx_GOTREF(__pyx_t_9);
 
9393
        __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
9394
        __Pyx_INCREF(__pyx_t_9);
 
9395
        __Pyx_DECREF(__pyx_v_old_path);
 
9396
        __pyx_v_old_path = __pyx_t_9;
 
9397
        __Pyx_INCREF(__pyx_t_9);
 
9398
        __Pyx_DECREF(__pyx_v_path);
 
9399
        __pyx_v_path = __pyx_t_9;
 
9400
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
9401
        goto __pyx_L21;
 
9402
      }
 
9403
      __pyx_L21:;
 
9404
 
 
9405
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1267
 
9406
 *                 if path is None:
 
9407
 *                     old_path = path = self.pathjoin(old_dirname, old_basename)
 
9408
 *                 if file_id is None:             # <<<<<<<<<<<<<<
 
9409
 *                     file_id = entry[0][2]
 
9410
 *                 self.old_dirname_to_file_id[old_path] = file_id
 
9411
 */
 
9412
      __pyx_t_2 = (__pyx_v_file_id == Py_None);
 
9413
      if (__pyx_t_2) {
 
9414
 
 
9415
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1268
 
9416
 *                     old_path = path = self.pathjoin(old_dirname, old_basename)
 
9417
 *                 if file_id is None:
 
9418
 *                     file_id = entry[0][2]             # <<<<<<<<<<<<<<
 
9419
 *                 self.old_dirname_to_file_id[old_path] = file_id
 
9420
 *             # parent id is the entry for the path in the target tree
 
9421
 */
 
9422
        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9423
        __Pyx_GOTREF(__pyx_t_9);
 
9424
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_9, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9425
        __Pyx_GOTREF(__pyx_t_7);
 
9426
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
9427
        __Pyx_DECREF(__pyx_v_file_id);
 
9428
        __pyx_v_file_id = __pyx_t_7;
 
9429
        __pyx_t_7 = 0;
 
9430
        goto __pyx_L22;
 
9431
      }
 
9432
      __pyx_L22:;
 
9433
 
 
9434
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1269
 
9435
 *                 if file_id is None:
 
9436
 *                     file_id = entry[0][2]
 
9437
 *                 self.old_dirname_to_file_id[old_path] = file_id             # <<<<<<<<<<<<<<
 
9438
 *             # parent id is the entry for the path in the target tree
 
9439
 *             if old_basename and old_dirname == self.last_source_parent[0]:
 
9440
 */
 
9441
      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 = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9442
      goto __pyx_L20;
 
9443
    }
 
9444
    __pyx_L20:;
 
9445
 
 
9446
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1271
 
9447
 *                 self.old_dirname_to_file_id[old_path] = file_id
 
9448
 *             # parent id is the entry for the path in the target tree
 
9449
 *             if old_basename and old_dirname == self.last_source_parent[0]:             # <<<<<<<<<<<<<<
 
9450
 *                 # use a cached hit for non-root source entries.
 
9451
 *                 source_parent_id = self.last_source_parent[1]
 
9452
 */
 
9453
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_old_basename); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9454
    if (__pyx_t_2) {
 
9455
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_self->last_source_parent, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9456
      __Pyx_GOTREF(__pyx_t_7);
 
9457
      __pyx_t_9 = PyObject_RichCompare(__pyx_v_old_dirname, __pyx_t_7, Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9458
      __Pyx_GOTREF(__pyx_t_9);
 
9459
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9460
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9461
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
9462
      __pyx_t_8 = __pyx_t_5;
 
9463
    } else {
 
9464
      __pyx_t_8 = __pyx_t_2;
 
9465
    }
 
9466
    if (__pyx_t_8) {
 
9467
 
 
9468
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1273
 
9469
 *             if old_basename and old_dirname == self.last_source_parent[0]:
 
9470
 *                 # use a cached hit for non-root source entries.
 
9471
 *                 source_parent_id = self.last_source_parent[1]             # <<<<<<<<<<<<<<
 
9472
 *             else:
 
9473
 *                 try:
 
9474
 */
 
9475
      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_self->last_source_parent, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9476
      __Pyx_GOTREF(__pyx_t_9);
 
9477
      __Pyx_DECREF(__pyx_v_source_parent_id);
 
9478
      __pyx_v_source_parent_id = __pyx_t_9;
 
9479
      __pyx_t_9 = 0;
 
9480
      goto __pyx_L23;
 
9481
    }
 
9482
    /*else*/ {
 
9483
 
 
9484
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1275
 
9485
 *                 source_parent_id = self.last_source_parent[1]
 
9486
 *             else:
 
9487
 *                 try:             # <<<<<<<<<<<<<<
 
9488
 *                     source_parent_id = self.old_dirname_to_file_id[old_dirname]
 
9489
 *                 except KeyError, _:
 
9490
 */
 
9491
      {
 
9492
        PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
 
9493
        __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
 
9494
        __Pyx_XGOTREF(__pyx_save_exc_type);
 
9495
        __Pyx_XGOTREF(__pyx_save_exc_value);
 
9496
        __Pyx_XGOTREF(__pyx_save_exc_tb);
 
9497
        /*try:*/ {
 
9498
 
 
9499
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1276
 
9500
 *             else:
 
9501
 *                 try:
 
9502
 *                     source_parent_id = self.old_dirname_to_file_id[old_dirname]             # <<<<<<<<<<<<<<
 
9503
 *                 except KeyError, _:
 
9504
 *                     source_parent_entry = self.state._get_entry(self.source_index,
 
9505
 */
 
9506
          __pyx_t_9 = PyObject_GetItem(__pyx_v_self->old_dirname_to_file_id, __pyx_v_old_dirname); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
 
9507
          __Pyx_GOTREF(__pyx_t_9);
 
9508
          __Pyx_DECREF(__pyx_v_source_parent_id);
 
9509
          __pyx_v_source_parent_id = __pyx_t_9;
 
9510
          __pyx_t_9 = 0;
 
9511
        }
 
9512
        __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
 
9513
        __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
 
9514
        __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
 
9515
        goto __pyx_L31_try_end;
 
9516
        __pyx_L24_error:;
 
9517
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 
9518
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
 
9519
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9520
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9521
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
 
9522
 
 
9523
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1277
 
9524
 *                 try:
 
9525
 *                     source_parent_id = self.old_dirname_to_file_id[old_dirname]
 
9526
 *                 except KeyError, _:             # <<<<<<<<<<<<<<
 
9527
 *                     source_parent_entry = self.state._get_entry(self.source_index,
 
9528
 *                                                            path_utf8=old_dirname)
 
9529
 */
 
9530
        __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
 
9531
        if (__pyx_t_10) {
 
9532
          __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._process_entry");
 
9533
          if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_7, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1277; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
 
9534
          __Pyx_GOTREF(__pyx_t_9);
 
9535
          __Pyx_GOTREF(__pyx_t_7);
 
9536
          __Pyx_GOTREF(__pyx_t_3);
 
9537
          __Pyx_INCREF(__pyx_t_7);
 
9538
          __Pyx_DECREF(__pyx_v__);
 
9539
          __pyx_v__ = __pyx_t_7;
 
9540
 
 
9541
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1278
 
9542
 *                     source_parent_id = self.old_dirname_to_file_id[old_dirname]
 
9543
 *                 except KeyError, _:
 
9544
 *                     source_parent_entry = self.state._get_entry(self.source_index,             # <<<<<<<<<<<<<<
 
9545
 *                                                            path_utf8=old_dirname)
 
9546
 *                     source_parent_id = source_parent_entry[0][2]
 
9547
 */
 
9548
          __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___get_entry); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
 
9549
          __Pyx_GOTREF(__pyx_t_1);
 
9550
          __pyx_t_6 = PyInt_FromLong(__pyx_v_self->source_index); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
 
9551
          __Pyx_GOTREF(__pyx_t_6);
 
9552
          __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
 
9553
          __Pyx_GOTREF(((PyObject *)__pyx_t_11));
 
9554
          PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6);
 
9555
          __Pyx_GIVEREF(__pyx_t_6);
 
9556
          __pyx_t_6 = 0;
 
9557
          __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
 
9558
          __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
9559
 
 
9560
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1279
 
9561
 *                 except KeyError, _:
 
9562
 *                     source_parent_entry = self.state._get_entry(self.source_index,
 
9563
 *                                                            path_utf8=old_dirname)             # <<<<<<<<<<<<<<
 
9564
 *                     source_parent_id = source_parent_entry[0][2]
 
9565
 *                 if source_parent_id == entry[0][2]:
 
9566
 */
 
9567
          if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__path_utf8), __pyx_v_old_dirname) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
 
9568
          __pyx_t_12 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1278; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
 
9569
          __Pyx_GOTREF(__pyx_t_12);
 
9570
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
9571
          __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
 
9572
          __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
9573
          __Pyx_DECREF(__pyx_v_source_parent_entry);
 
9574
          __pyx_v_source_parent_entry = __pyx_t_12;
 
9575
          __pyx_t_12 = 0;
 
9576
 
 
9577
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1280
 
9578
 *                     source_parent_entry = self.state._get_entry(self.source_index,
 
9579
 *                                                            path_utf8=old_dirname)
 
9580
 *                     source_parent_id = source_parent_entry[0][2]             # <<<<<<<<<<<<<<
 
9581
 *                 if source_parent_id == entry[0][2]:
 
9582
 *                     # This is the root, so the parent is None
 
9583
 */
 
9584
          __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_source_parent_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
 
9585
          __Pyx_GOTREF(__pyx_t_12);
 
9586
          __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_12, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
 
9587
          __Pyx_GOTREF(__pyx_t_6);
 
9588
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
9589
          __Pyx_DECREF(__pyx_v_source_parent_id);
 
9590
          __pyx_v_source_parent_id = __pyx_t_6;
 
9591
          __pyx_t_6 = 0;
 
9592
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
9593
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9594
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9595
          goto __pyx_L25_exception_handled;
 
9596
        }
 
9597
        __pyx_L26_except_error:;
 
9598
        __Pyx_XGIVEREF(__pyx_save_exc_type);
 
9599
        __Pyx_XGIVEREF(__pyx_save_exc_value);
 
9600
        __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
9601
        __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
9602
        goto __pyx_L1_error;
 
9603
        __pyx_L25_exception_handled:;
 
9604
        __Pyx_XGIVEREF(__pyx_save_exc_type);
 
9605
        __Pyx_XGIVEREF(__pyx_save_exc_value);
 
9606
        __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
9607
        __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
9608
        __pyx_L31_try_end:;
 
9609
      }
 
9610
 
 
9611
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1281
 
9612
 *                                                            path_utf8=old_dirname)
 
9613
 *                     source_parent_id = source_parent_entry[0][2]
 
9614
 *                 if source_parent_id == entry[0][2]:             # <<<<<<<<<<<<<<
 
9615
 *                     # This is the root, so the parent is None
 
9616
 *                     source_parent_id = None
 
9617
 */
 
9618
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9619
      __Pyx_GOTREF(__pyx_t_3);
 
9620
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_3, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9621
      __Pyx_GOTREF(__pyx_t_7);
 
9622
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9623
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_source_parent_id, __pyx_t_7, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9624
      __Pyx_GOTREF(__pyx_t_3);
 
9625
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9626
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9627
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9628
      if (__pyx_t_8) {
 
9629
 
 
9630
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1283
 
9631
 *                 if source_parent_id == entry[0][2]:
 
9632
 *                     # This is the root, so the parent is None
 
9633
 *                     source_parent_id = None             # <<<<<<<<<<<<<<
 
9634
 *                 else:
 
9635
 *                     self.last_source_parent[0] = old_dirname
 
9636
 */
 
9637
        __Pyx_INCREF(Py_None);
 
9638
        __Pyx_DECREF(__pyx_v_source_parent_id);
 
9639
        __pyx_v_source_parent_id = Py_None;
 
9640
        goto __pyx_L34;
 
9641
      }
 
9642
      /*else*/ {
 
9643
 
 
9644
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1285
 
9645
 *                     source_parent_id = None
 
9646
 *                 else:
 
9647
 *                     self.last_source_parent[0] = old_dirname             # <<<<<<<<<<<<<<
 
9648
 *                     self.last_source_parent[1] = source_parent_id
 
9649
 *             new_dirname = entry[0][0]
 
9650
 */
 
9651
        if (__Pyx_SetItemInt(__pyx_v_self->last_source_parent, 0, __pyx_v_old_dirname, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9652
 
 
9653
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1286
 
9654
 *                 else:
 
9655
 *                     self.last_source_parent[0] = old_dirname
 
9656
 *                     self.last_source_parent[1] = source_parent_id             # <<<<<<<<<<<<<<
 
9657
 *             new_dirname = entry[0][0]
 
9658
 *             if entry[0][1] and new_dirname == self.last_target_parent[0]:
 
9659
 */
 
9660
        if (__Pyx_SetItemInt(__pyx_v_self->last_source_parent, 1, __pyx_v_source_parent_id, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9661
      }
 
9662
      __pyx_L34:;
 
9663
    }
 
9664
    __pyx_L23:;
 
9665
 
 
9666
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1287
 
9667
 *                     self.last_source_parent[0] = old_dirname
 
9668
 *                     self.last_source_parent[1] = source_parent_id
 
9669
 *             new_dirname = entry[0][0]             # <<<<<<<<<<<<<<
 
9670
 *             if entry[0][1] and new_dirname == self.last_target_parent[0]:
 
9671
 *                 # use a cached hit for non-root target entries.
 
9672
 */
 
9673
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9674
    __Pyx_GOTREF(__pyx_t_3);
 
9675
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_3, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9676
    __Pyx_GOTREF(__pyx_t_7);
 
9677
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9678
    __Pyx_DECREF(__pyx_v_new_dirname);
 
9679
    __pyx_v_new_dirname = __pyx_t_7;
 
9680
    __pyx_t_7 = 0;
 
9681
 
 
9682
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1288
 
9683
 *                     self.last_source_parent[1] = source_parent_id
 
9684
 *             new_dirname = entry[0][0]
 
9685
 *             if entry[0][1] and new_dirname == self.last_target_parent[0]:             # <<<<<<<<<<<<<<
 
9686
 *                 # use a cached hit for non-root target entries.
 
9687
 *                 target_parent_id = self.last_target_parent[1]
 
9688
 */
 
9689
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9690
    __Pyx_GOTREF(__pyx_t_7);
 
9691
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_7, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9692
    __Pyx_GOTREF(__pyx_t_3);
 
9693
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9694
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9695
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9696
    if (__pyx_t_8) {
 
9697
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->last_target_parent, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9698
      __Pyx_GOTREF(__pyx_t_3);
 
9699
      __pyx_t_7 = PyObject_RichCompare(__pyx_v_new_dirname, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9700
      __Pyx_GOTREF(__pyx_t_7);
 
9701
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9702
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9703
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9704
      __pyx_t_5 = __pyx_t_2;
 
9705
    } else {
 
9706
      __pyx_t_5 = __pyx_t_8;
 
9707
    }
 
9708
    if (__pyx_t_5) {
 
9709
 
 
9710
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1290
 
9711
 *             if entry[0][1] and new_dirname == self.last_target_parent[0]:
 
9712
 *                 # use a cached hit for non-root target entries.
 
9713
 *                 target_parent_id = self.last_target_parent[1]             # <<<<<<<<<<<<<<
 
9714
 *             else:
 
9715
 *                 try:
 
9716
 */
 
9717
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_self->last_target_parent, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9718
      __Pyx_GOTREF(__pyx_t_7);
 
9719
      __Pyx_DECREF(__pyx_v_target_parent_id);
 
9720
      __pyx_v_target_parent_id = __pyx_t_7;
 
9721
      __pyx_t_7 = 0;
 
9722
      goto __pyx_L35;
 
9723
    }
 
9724
    /*else*/ {
 
9725
 
 
9726
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1292
 
9727
 *                 target_parent_id = self.last_target_parent[1]
 
9728
 *             else:
 
9729
 *                 try:             # <<<<<<<<<<<<<<
 
9730
 *                     target_parent_id = self.new_dirname_to_file_id[new_dirname]
 
9731
 *                 except KeyError, _:
 
9732
 */
 
9733
      {
 
9734
        PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
 
9735
        __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
 
9736
        __Pyx_XGOTREF(__pyx_save_exc_type);
 
9737
        __Pyx_XGOTREF(__pyx_save_exc_value);
 
9738
        __Pyx_XGOTREF(__pyx_save_exc_tb);
 
9739
        /*try:*/ {
 
9740
 
 
9741
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1293
 
9742
 *             else:
 
9743
 *                 try:
 
9744
 *                     target_parent_id = self.new_dirname_to_file_id[new_dirname]             # <<<<<<<<<<<<<<
 
9745
 *                 except KeyError, _:
 
9746
 *                     # TODO: We don't always need to do the lookup, because the
 
9747
 */
 
9748
          __pyx_t_7 = PyObject_GetItem(__pyx_v_self->new_dirname_to_file_id, __pyx_v_new_dirname); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L36_error;}
 
9749
          __Pyx_GOTREF(__pyx_t_7);
 
9750
          __Pyx_DECREF(__pyx_v_target_parent_id);
 
9751
          __pyx_v_target_parent_id = __pyx_t_7;
 
9752
          __pyx_t_7 = 0;
 
9753
        }
 
9754
        __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
 
9755
        __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
 
9756
        __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
 
9757
        goto __pyx_L43_try_end;
 
9758
        __pyx_L36_error:;
 
9759
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
 
9760
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
 
9761
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
 
9762
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 
9763
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
 
9764
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9765
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9766
 
 
9767
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1294
 
9768
 *                 try:
 
9769
 *                     target_parent_id = self.new_dirname_to_file_id[new_dirname]
 
9770
 *                 except KeyError, _:             # <<<<<<<<<<<<<<
 
9771
 *                     # TODO: We don't always need to do the lookup, because the
 
9772
 *                     #       parent entry will be the same as the source entry.
 
9773
 */
 
9774
        __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
 
9775
        if (__pyx_t_10) {
 
9776
          __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._process_entry");
 
9777
          if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_3, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9778
          __Pyx_GOTREF(__pyx_t_7);
 
9779
          __Pyx_GOTREF(__pyx_t_3);
 
9780
          __Pyx_GOTREF(__pyx_t_9);
 
9781
          __Pyx_INCREF(__pyx_t_3);
 
9782
          __Pyx_DECREF(__pyx_v__);
 
9783
          __pyx_v__ = __pyx_t_3;
 
9784
 
 
9785
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1297
 
9786
 *                     # TODO: We don't always need to do the lookup, because the
 
9787
 *                     #       parent entry will be the same as the source entry.
 
9788
 *                     target_parent_entry = self.state._get_entry(self.target_index,             # <<<<<<<<<<<<<<
 
9789
 *                                                            path_utf8=new_dirname)
 
9790
 *                     if target_parent_entry == (None, None):
 
9791
 */
 
9792
          __pyx_t_6 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___get_entry); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9793
          __Pyx_GOTREF(__pyx_t_6);
 
9794
          __pyx_t_12 = PyInt_FromLong(__pyx_v_self->target_index); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9795
          __Pyx_GOTREF(__pyx_t_12);
 
9796
          __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9797
          __Pyx_GOTREF(((PyObject *)__pyx_t_11));
 
9798
          PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12);
 
9799
          __Pyx_GIVEREF(__pyx_t_12);
 
9800
          __pyx_t_12 = 0;
 
9801
          __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9802
          __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
9803
 
 
9804
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1298
 
9805
 *                     #       parent entry will be the same as the source entry.
 
9806
 *                     target_parent_entry = self.state._get_entry(self.target_index,
 
9807
 *                                                            path_utf8=new_dirname)             # <<<<<<<<<<<<<<
 
9808
 *                     if target_parent_entry == (None, None):
 
9809
 *                         raise AssertionError(
 
9810
 */
 
9811
          if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__path_utf8), __pyx_v_new_dirname) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9812
          __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_6, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9813
          __Pyx_GOTREF(__pyx_t_1);
 
9814
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
9815
          __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
 
9816
          __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
 
9817
          __Pyx_DECREF(__pyx_v_target_parent_entry);
 
9818
          __pyx_v_target_parent_entry = __pyx_t_1;
 
9819
          __pyx_t_1 = 0;
 
9820
 
 
9821
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1299
 
9822
 *                     target_parent_entry = self.state._get_entry(self.target_index,
 
9823
 *                                                            path_utf8=new_dirname)
 
9824
 *                     if target_parent_entry == (None, None):             # <<<<<<<<<<<<<<
 
9825
 *                         raise AssertionError(
 
9826
 *                             "Could not find target parent in wt: %s\nparent of: %s"
 
9827
 */
 
9828
          __pyx_t_1 = PyObject_RichCompare(__pyx_v_target_parent_entry, ((PyObject *)__pyx_k_tuple_38), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9829
          __Pyx_GOTREF(__pyx_t_1);
 
9830
          __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9831
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
9832
          if (__pyx_t_5) {
 
9833
 
 
9834
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1302
 
9835
 *                         raise AssertionError(
 
9836
 *                             "Could not find target parent in wt: %s\nparent of: %s"
 
9837
 *                             % (new_dirname, entry))             # <<<<<<<<<<<<<<
 
9838
 *                     target_parent_id = target_parent_entry[0][2]
 
9839
 *                 if target_parent_id == entry[0][2]:
 
9840
 */
 
9841
            __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9842
            __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
9843
            __Pyx_INCREF(__pyx_v_new_dirname);
 
9844
            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_new_dirname);
 
9845
            __Pyx_GIVEREF(__pyx_v_new_dirname);
 
9846
            __Pyx_INCREF(__pyx_v_entry);
 
9847
            PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_entry);
 
9848
            __Pyx_GIVEREF(__pyx_v_entry);
 
9849
            __pyx_t_12 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_39), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1302; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9850
            __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
9851
            __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
9852
            __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9853
            __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
9854
            PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_12));
 
9855
            __Pyx_GIVEREF(((PyObject *)__pyx_t_12));
 
9856
            __pyx_t_12 = 0;
 
9857
            __pyx_t_12 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9858
            __Pyx_GOTREF(__pyx_t_12);
 
9859
            __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
9860
            __Pyx_Raise(__pyx_t_12, 0, 0);
 
9861
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
9862
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9863
            goto __pyx_L46;
 
9864
          }
 
9865
          __pyx_L46:;
 
9866
 
 
9867
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1303
 
9868
 *                             "Could not find target parent in wt: %s\nparent of: %s"
 
9869
 *                             % (new_dirname, entry))
 
9870
 *                     target_parent_id = target_parent_entry[0][2]             # <<<<<<<<<<<<<<
 
9871
 *                 if target_parent_id == entry[0][2]:
 
9872
 *                     # This is the root, so the parent is None
 
9873
 */
 
9874
          __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_target_parent_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9875
          __Pyx_GOTREF(__pyx_t_12);
 
9876
          __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_12, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L38_except_error;}
 
9877
          __Pyx_GOTREF(__pyx_t_1);
 
9878
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
9879
          __Pyx_DECREF(__pyx_v_target_parent_id);
 
9880
          __pyx_v_target_parent_id = __pyx_t_1;
 
9881
          __pyx_t_1 = 0;
 
9882
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
9883
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9884
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
9885
          goto __pyx_L37_exception_handled;
 
9886
        }
 
9887
        __pyx_L38_except_error:;
 
9888
        __Pyx_XGIVEREF(__pyx_save_exc_type);
 
9889
        __Pyx_XGIVEREF(__pyx_save_exc_value);
 
9890
        __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
9891
        __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
9892
        goto __pyx_L1_error;
 
9893
        __pyx_L37_exception_handled:;
 
9894
        __Pyx_XGIVEREF(__pyx_save_exc_type);
 
9895
        __Pyx_XGIVEREF(__pyx_save_exc_value);
 
9896
        __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
9897
        __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
9898
        __pyx_L43_try_end:;
 
9899
      }
 
9900
 
 
9901
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1304
 
9902
 *                             % (new_dirname, entry))
 
9903
 *                     target_parent_id = target_parent_entry[0][2]
 
9904
 *                 if target_parent_id == entry[0][2]:             # <<<<<<<<<<<<<<
 
9905
 *                     # This is the root, so the parent is None
 
9906
 *                     target_parent_id = None
 
9907
 */
 
9908
      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9909
      __Pyx_GOTREF(__pyx_t_9);
 
9910
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_9, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9911
      __Pyx_GOTREF(__pyx_t_3);
 
9912
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
9913
      __pyx_t_9 = PyObject_RichCompare(__pyx_v_target_parent_id, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9914
      __Pyx_GOTREF(__pyx_t_9);
 
9915
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9916
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9917
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
9918
      if (__pyx_t_5) {
 
9919
 
 
9920
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1306
 
9921
 *                 if target_parent_id == entry[0][2]:
 
9922
 *                     # This is the root, so the parent is None
 
9923
 *                     target_parent_id = None             # <<<<<<<<<<<<<<
 
9924
 *                 else:
 
9925
 *                     self.last_target_parent[0] = new_dirname
 
9926
 */
 
9927
        __Pyx_INCREF(Py_None);
 
9928
        __Pyx_DECREF(__pyx_v_target_parent_id);
 
9929
        __pyx_v_target_parent_id = Py_None;
 
9930
        goto __pyx_L47;
 
9931
      }
 
9932
      /*else*/ {
 
9933
 
 
9934
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1308
 
9935
 *                     target_parent_id = None
 
9936
 *                 else:
 
9937
 *                     self.last_target_parent[0] = new_dirname             # <<<<<<<<<<<<<<
 
9938
 *                     self.last_target_parent[1] = target_parent_id
 
9939
 * 
 
9940
 */
 
9941
        if (__Pyx_SetItemInt(__pyx_v_self->last_target_parent, 0, __pyx_v_new_dirname, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9942
 
 
9943
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1309
 
9944
 *                 else:
 
9945
 *                     self.last_target_parent[0] = new_dirname
 
9946
 *                     self.last_target_parent[1] = target_parent_id             # <<<<<<<<<<<<<<
 
9947
 * 
 
9948
 *             source_exec = source_details[3]
 
9949
 */
 
9950
        if (__Pyx_SetItemInt(__pyx_v_self->last_target_parent, 1, __pyx_v_target_parent_id, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9951
      }
 
9952
      __pyx_L47:;
 
9953
    }
 
9954
    __pyx_L35:;
 
9955
 
 
9956
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1311
 
9957
 *                     self.last_target_parent[1] = target_parent_id
 
9958
 * 
 
9959
 *             source_exec = source_details[3]             # <<<<<<<<<<<<<<
 
9960
 *             changed = (content_change
 
9961
 *                 or source_parent_id != target_parent_id
 
9962
 */
 
9963
    __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_source_details, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9964
    __Pyx_GOTREF(__pyx_t_9);
 
9965
    __Pyx_DECREF(__pyx_v_source_exec);
 
9966
    __pyx_v_source_exec = __pyx_t_9;
 
9967
    __pyx_t_9 = 0;
 
9968
 
 
9969
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1313
 
9970
 *             source_exec = source_details[3]
 
9971
 *             changed = (content_change
 
9972
 *                 or source_parent_id != target_parent_id             # <<<<<<<<<<<<<<
 
9973
 *                 or old_basename != entry[0][1]
 
9974
 *                 or source_exec != target_exec
 
9975
 */
 
9976
    __pyx_t_9 = PyInt_FromLong(__pyx_v_content_change); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9977
    __Pyx_GOTREF(__pyx_t_9);
 
9978
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9979
    if (!__pyx_t_5) {
 
9980
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
9981
 
 
9982
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1314
 
9983
 *             changed = (content_change
 
9984
 *                 or source_parent_id != target_parent_id
 
9985
 *                 or old_basename != entry[0][1]             # <<<<<<<<<<<<<<
 
9986
 *                 or source_exec != target_exec
 
9987
 *                 )
 
9988
 */
 
9989
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_source_parent_id, __pyx_v_target_parent_id, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9990
      __Pyx_GOTREF(__pyx_t_3);
 
9991
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
9992
      if (!__pyx_t_5) {
 
9993
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
9994
 
 
9995
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1315
 
9996
 *                 or source_parent_id != target_parent_id
 
9997
 *                 or old_basename != entry[0][1]
 
9998
 *                 or source_exec != target_exec             # <<<<<<<<<<<<<<
 
9999
 *                 )
 
10000
 *             if not changed and not self.include_unchanged:
 
10001
 */
 
10002
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10003
        __Pyx_GOTREF(__pyx_t_7);
 
10004
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_7, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10005
        __Pyx_GOTREF(__pyx_t_1);
 
10006
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
10007
        __pyx_t_7 = PyObject_RichCompare(__pyx_v_old_basename, __pyx_t_1, Py_NE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10008
        __Pyx_GOTREF(__pyx_t_7);
 
10009
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
10010
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10011
        if (!__pyx_t_5) {
 
10012
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
10013
 
 
10014
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1316
 
10015
 *                 or old_basename != entry[0][1]
 
10016
 *                 or source_exec != target_exec
 
10017
 *                 )             # <<<<<<<<<<<<<<
 
10018
 *             if not changed and not self.include_unchanged:
 
10019
 *                 return None, False
 
10020
 */
 
10021
          __pyx_t_1 = PyObject_RichCompare(__pyx_v_source_exec, __pyx_v_target_exec, Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10022
          __Pyx_GOTREF(__pyx_t_1);
 
10023
          __pyx_t_12 = __pyx_t_1;
 
10024
          __pyx_t_1 = 0;
 
10025
        } else {
 
10026
          __pyx_t_12 = __pyx_t_7;
 
10027
          __pyx_t_7 = 0;
 
10028
        }
 
10029
        __pyx_t_7 = __pyx_t_12;
 
10030
        __pyx_t_12 = 0;
 
10031
      } else {
 
10032
        __pyx_t_7 = __pyx_t_3;
 
10033
        __pyx_t_3 = 0;
 
10034
      }
 
10035
      __pyx_t_3 = __pyx_t_7;
 
10036
      __pyx_t_7 = 0;
 
10037
    } else {
 
10038
      __pyx_t_3 = __pyx_t_9;
 
10039
      __pyx_t_9 = 0;
 
10040
    }
 
10041
    __Pyx_DECREF(__pyx_v_changed);
 
10042
    __pyx_v_changed = __pyx_t_3;
 
10043
    __pyx_t_3 = 0;
 
10044
 
 
10045
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1317
 
10046
 *                 or source_exec != target_exec
 
10047
 *                 )
 
10048
 *             if not changed and not self.include_unchanged:             # <<<<<<<<<<<<<<
 
10049
 *                 return None, False
 
10050
 *             else:
 
10051
 */
 
10052
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_changed); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10053
    __pyx_t_8 = (!__pyx_t_5);
 
10054
    if (__pyx_t_8) {
 
10055
      __pyx_t_5 = (!__pyx_v_self->include_unchanged);
 
10056
      __pyx_t_2 = __pyx_t_5;
 
10057
    } else {
 
10058
      __pyx_t_2 = __pyx_t_8;
 
10059
    }
 
10060
    if (__pyx_t_2) {
 
10061
 
 
10062
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1318
 
10063
 *                 )
 
10064
 *             if not changed and not self.include_unchanged:
 
10065
 *                 return None, False             # <<<<<<<<<<<<<<
 
10066
 *             else:
 
10067
 *                 if old_path is None:
 
10068
 */
 
10069
      __Pyx_XDECREF(__pyx_r);
 
10070
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10071
      __Pyx_GOTREF(__pyx_t_3);
 
10072
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10073
      __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
10074
      __Pyx_INCREF(Py_None);
 
10075
      PyTuple_SET_ITEM(__pyx_t_9, 0, Py_None);
 
10076
      __Pyx_GIVEREF(Py_None);
 
10077
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3);
 
10078
      __Pyx_GIVEREF(__pyx_t_3);
 
10079
      __pyx_t_3 = 0;
 
10080
      __pyx_r = ((PyObject *)__pyx_t_9);
 
10081
      __pyx_t_9 = 0;
 
10082
      goto __pyx_L0;
 
10083
      goto __pyx_L48;
 
10084
    }
 
10085
    /*else*/ {
 
10086
 
 
10087
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1320
 
10088
 *                 return None, False
 
10089
 *             else:
 
10090
 *                 if old_path is None:             # <<<<<<<<<<<<<<
 
10091
 *                     path = self.pathjoin(old_dirname, old_basename)
 
10092
 *                     old_path = path
 
10093
 */
 
10094
      __pyx_t_2 = (__pyx_v_old_path == Py_None);
 
10095
      if (__pyx_t_2) {
 
10096
 
 
10097
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1321
 
10098
 *             else:
 
10099
 *                 if old_path is None:
 
10100
 *                     path = self.pathjoin(old_dirname, old_basename)             # <<<<<<<<<<<<<<
 
10101
 *                     old_path = path
 
10102
 *                     old_path_u = self.utf8_decode(old_path)[0]
 
10103
 */
 
10104
        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10105
        __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
10106
        __Pyx_INCREF(__pyx_v_old_dirname);
 
10107
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_old_dirname);
 
10108
        __Pyx_GIVEREF(__pyx_v_old_dirname);
 
10109
        __Pyx_INCREF(__pyx_v_old_basename);
 
10110
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_old_basename);
 
10111
        __Pyx_GIVEREF(__pyx_v_old_basename);
 
10112
        __pyx_t_3 = PyObject_Call(__pyx_v_self->pathjoin, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10113
        __Pyx_GOTREF(__pyx_t_3);
 
10114
        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
10115
        __Pyx_DECREF(__pyx_v_path);
 
10116
        __pyx_v_path = __pyx_t_3;
 
10117
        __pyx_t_3 = 0;
 
10118
 
 
10119
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1322
 
10120
 *                 if old_path is None:
 
10121
 *                     path = self.pathjoin(old_dirname, old_basename)
 
10122
 *                     old_path = path             # <<<<<<<<<<<<<<
 
10123
 *                     old_path_u = self.utf8_decode(old_path)[0]
 
10124
 *                     path_u = old_path_u
 
10125
 */
 
10126
        __Pyx_INCREF(__pyx_v_path);
 
10127
        __Pyx_DECREF(__pyx_v_old_path);
 
10128
        __pyx_v_old_path = __pyx_v_path;
 
10129
 
 
10130
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1323
 
10131
 *                     path = self.pathjoin(old_dirname, old_basename)
 
10132
 *                     old_path = path
 
10133
 *                     old_path_u = self.utf8_decode(old_path)[0]             # <<<<<<<<<<<<<<
 
10134
 *                     path_u = old_path_u
 
10135
 *                 else:
 
10136
 */
 
10137
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10138
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
10139
        __Pyx_INCREF(__pyx_v_old_path);
 
10140
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_old_path);
 
10141
        __Pyx_GIVEREF(__pyx_v_old_path);
 
10142
        __pyx_t_9 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10143
        __Pyx_GOTREF(__pyx_t_9);
 
10144
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
10145
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_9, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10146
        __Pyx_GOTREF(__pyx_t_3);
 
10147
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
10148
        __Pyx_DECREF(__pyx_v_old_path_u);
 
10149
        __pyx_v_old_path_u = __pyx_t_3;
 
10150
        __pyx_t_3 = 0;
 
10151
 
 
10152
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1324
 
10153
 *                     old_path = path
 
10154
 *                     old_path_u = self.utf8_decode(old_path)[0]
 
10155
 *                     path_u = old_path_u             # <<<<<<<<<<<<<<
 
10156
 *                 else:
 
10157
 *                     old_path_u = self.utf8_decode(old_path)[0]
 
10158
 */
 
10159
        __Pyx_INCREF(__pyx_v_old_path_u);
 
10160
        __Pyx_DECREF(__pyx_v_path_u);
 
10161
        __pyx_v_path_u = __pyx_v_old_path_u;
 
10162
        goto __pyx_L49;
 
10163
      }
 
10164
      /*else*/ {
 
10165
 
 
10166
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1326
 
10167
 *                     path_u = old_path_u
 
10168
 *                 else:
 
10169
 *                     old_path_u = self.utf8_decode(old_path)[0]             # <<<<<<<<<<<<<<
 
10170
 *                     if old_path == path:
 
10171
 *                         path_u = old_path_u
 
10172
 */
 
10173
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10174
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
10175
        __Pyx_INCREF(__pyx_v_old_path);
 
10176
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_old_path);
 
10177
        __Pyx_GIVEREF(__pyx_v_old_path);
 
10178
        __pyx_t_9 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10179
        __Pyx_GOTREF(__pyx_t_9);
 
10180
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
10181
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_9, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10182
        __Pyx_GOTREF(__pyx_t_3);
 
10183
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
10184
        __Pyx_DECREF(__pyx_v_old_path_u);
 
10185
        __pyx_v_old_path_u = __pyx_t_3;
 
10186
        __pyx_t_3 = 0;
 
10187
 
 
10188
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1327
 
10189
 *                 else:
 
10190
 *                     old_path_u = self.utf8_decode(old_path)[0]
 
10191
 *                     if old_path == path:             # <<<<<<<<<<<<<<
 
10192
 *                         path_u = old_path_u
 
10193
 *                     else:
 
10194
 */
 
10195
        __pyx_t_3 = PyObject_RichCompare(__pyx_v_old_path, __pyx_v_path, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10196
        __Pyx_GOTREF(__pyx_t_3);
 
10197
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10198
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
10199
        if (__pyx_t_2) {
 
10200
 
 
10201
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1328
 
10202
 *                     old_path_u = self.utf8_decode(old_path)[0]
 
10203
 *                     if old_path == path:
 
10204
 *                         path_u = old_path_u             # <<<<<<<<<<<<<<
 
10205
 *                     else:
 
10206
 *                         path_u = self.utf8_decode(path)[0]
 
10207
 */
 
10208
          __Pyx_INCREF(__pyx_v_old_path_u);
 
10209
          __Pyx_DECREF(__pyx_v_path_u);
 
10210
          __pyx_v_path_u = __pyx_v_old_path_u;
 
10211
          goto __pyx_L50;
 
10212
        }
 
10213
        /*else*/ {
 
10214
 
 
10215
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1330
 
10216
 *                         path_u = old_path_u
 
10217
 *                     else:
 
10218
 *                         path_u = self.utf8_decode(path)[0]             # <<<<<<<<<<<<<<
 
10219
 *                 source_kind = _minikind_to_kind(source_minikind)
 
10220
 *                 return (entry[0][2],
 
10221
 */
 
10222
          __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10223
          __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
10224
          __Pyx_INCREF(__pyx_v_path);
 
10225
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_path);
 
10226
          __Pyx_GIVEREF(__pyx_v_path);
 
10227
          __pyx_t_9 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10228
          __Pyx_GOTREF(__pyx_t_9);
 
10229
          __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
10230
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_9, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10231
          __Pyx_GOTREF(__pyx_t_3);
 
10232
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
10233
          __Pyx_DECREF(__pyx_v_path_u);
 
10234
          __pyx_v_path_u = __pyx_t_3;
 
10235
          __pyx_t_3 = 0;
 
10236
        }
 
10237
        __pyx_L50:;
 
10238
      }
 
10239
      __pyx_L49:;
 
10240
 
 
10241
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1331
 
10242
 *                     else:
 
10243
 *                         path_u = self.utf8_decode(path)[0]
 
10244
 *                 source_kind = _minikind_to_kind(source_minikind)             # <<<<<<<<<<<<<<
 
10245
 *                 return (entry[0][2],
 
10246
 *                        (old_path_u, path_u),
 
10247
 */
 
10248
      __pyx_t_3 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_to_kind(__pyx_v_source_minikind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10249
      __Pyx_GOTREF(__pyx_t_3);
 
10250
      __Pyx_DECREF(__pyx_v_source_kind);
 
10251
      __pyx_v_source_kind = __pyx_t_3;
 
10252
      __pyx_t_3 = 0;
 
10253
 
 
10254
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1332
 
10255
 *                         path_u = self.utf8_decode(path)[0]
 
10256
 *                 source_kind = _minikind_to_kind(source_minikind)
 
10257
 *                 return (entry[0][2],             # <<<<<<<<<<<<<<
 
10258
 *                        (old_path_u, path_u),
 
10259
 *                        content_change,
 
10260
 */
 
10261
      __Pyx_XDECREF(__pyx_r);
 
10262
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10263
      __Pyx_GOTREF(__pyx_t_3);
 
10264
      __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_3, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10265
      __Pyx_GOTREF(__pyx_t_9);
 
10266
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
10267
 
 
10268
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1333
 
10269
 *                 source_kind = _minikind_to_kind(source_minikind)
 
10270
 *                 return (entry[0][2],
 
10271
 *                        (old_path_u, path_u),             # <<<<<<<<<<<<<<
 
10272
 *                        content_change,
 
10273
 *                        (True, True),
 
10274
 */
 
10275
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10276
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
10277
      __Pyx_INCREF(__pyx_v_old_path_u);
 
10278
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_old_path_u);
 
10279
      __Pyx_GIVEREF(__pyx_v_old_path_u);
 
10280
      __Pyx_INCREF(__pyx_v_path_u);
 
10281
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_path_u);
 
10282
      __Pyx_GIVEREF(__pyx_v_path_u);
 
10283
 
 
10284
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1334
 
10285
 *                 return (entry[0][2],
 
10286
 *                        (old_path_u, path_u),
 
10287
 *                        content_change,             # <<<<<<<<<<<<<<
 
10288
 *                        (True, True),
 
10289
 *                        (source_parent_id, target_parent_id),
 
10290
 */
 
10291
      __pyx_t_7 = PyInt_FromLong(__pyx_v_content_change); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10292
      __Pyx_GOTREF(__pyx_t_7);
 
10293
 
 
10294
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1335
 
10295
 *                        (old_path_u, path_u),
 
10296
 *                        content_change,
 
10297
 *                        (True, True),             # <<<<<<<<<<<<<<
 
10298
 *                        (source_parent_id, target_parent_id),
 
10299
 *                        (self.utf8_decode(old_basename)[0], self.utf8_decode(entry[0][1])[0]),
 
10300
 */
 
10301
      __pyx_t_12 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10302
      __Pyx_GOTREF(__pyx_t_12);
 
10303
      __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10304
      __Pyx_GOTREF(__pyx_t_1);
 
10305
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10306
      __Pyx_GOTREF(((PyObject *)__pyx_t_11));
 
10307
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12);
 
10308
      __Pyx_GIVEREF(__pyx_t_12);
 
10309
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_1);
 
10310
      __Pyx_GIVEREF(__pyx_t_1);
 
10311
      __pyx_t_12 = 0;
 
10312
      __pyx_t_1 = 0;
 
10313
 
 
10314
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1336
 
10315
 *                        content_change,
 
10316
 *                        (True, True),
 
10317
 *                        (source_parent_id, target_parent_id),             # <<<<<<<<<<<<<<
 
10318
 *                        (self.utf8_decode(old_basename)[0], self.utf8_decode(entry[0][1])[0]),
 
10319
 *                        (source_kind, target_kind),
 
10320
 */
 
10321
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10322
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
10323
      __Pyx_INCREF(__pyx_v_source_parent_id);
 
10324
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_source_parent_id);
 
10325
      __Pyx_GIVEREF(__pyx_v_source_parent_id);
 
10326
      __Pyx_INCREF(__pyx_v_target_parent_id);
 
10327
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_target_parent_id);
 
10328
      __Pyx_GIVEREF(__pyx_v_target_parent_id);
 
10329
 
 
10330
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1337
 
10331
 *                        (True, True),
 
10332
 *                        (source_parent_id, target_parent_id),
 
10333
 *                        (self.utf8_decode(old_basename)[0], self.utf8_decode(entry[0][1])[0]),             # <<<<<<<<<<<<<<
 
10334
 *                        (source_kind, target_kind),
 
10335
 *                        (source_exec, target_exec)), changed
 
10336
 */
 
10337
      __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10338
      __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
10339
      __Pyx_INCREF(__pyx_v_old_basename);
 
10340
      PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_old_basename);
 
10341
      __Pyx_GIVEREF(__pyx_v_old_basename);
 
10342
      __pyx_t_6 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10343
      __Pyx_GOTREF(__pyx_t_6);
 
10344
      __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
 
10345
      __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_6, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10346
      __Pyx_GOTREF(__pyx_t_12);
 
10347
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
10348
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10349
      __Pyx_GOTREF(__pyx_t_6);
 
10350
      __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_6, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10351
      __Pyx_GOTREF(__pyx_t_13);
 
10352
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
10353
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10354
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
10355
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_13);
 
10356
      __Pyx_GIVEREF(__pyx_t_13);
 
10357
      __pyx_t_13 = 0;
 
10358
      __pyx_t_13 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10359
      __Pyx_GOTREF(__pyx_t_13);
 
10360
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
10361
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_13, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10362
      __Pyx_GOTREF(__pyx_t_6);
 
10363
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
 
10364
      __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10365
      __Pyx_GOTREF(((PyObject *)__pyx_t_13));
 
10366
      PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12);
 
10367
      __Pyx_GIVEREF(__pyx_t_12);
 
10368
      PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_6);
 
10369
      __Pyx_GIVEREF(__pyx_t_6);
 
10370
      __pyx_t_12 = 0;
 
10371
      __pyx_t_6 = 0;
 
10372
 
 
10373
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1338
 
10374
 *                        (source_parent_id, target_parent_id),
 
10375
 *                        (self.utf8_decode(old_basename)[0], self.utf8_decode(entry[0][1])[0]),
 
10376
 *                        (source_kind, target_kind),             # <<<<<<<<<<<<<<
 
10377
 *                        (source_exec, target_exec)), changed
 
10378
 *         elif source_minikind == c'a' and _versioned_minikind(target_minikind):
 
10379
 */
 
10380
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10381
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
10382
      __Pyx_INCREF(__pyx_v_source_kind);
 
10383
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_source_kind);
 
10384
      __Pyx_GIVEREF(__pyx_v_source_kind);
 
10385
      __Pyx_INCREF(__pyx_v_target_kind);
 
10386
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_target_kind);
 
10387
      __Pyx_GIVEREF(__pyx_v_target_kind);
 
10388
 
 
10389
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1339
 
10390
 *                        (self.utf8_decode(old_basename)[0], self.utf8_decode(entry[0][1])[0]),
 
10391
 *                        (source_kind, target_kind),
 
10392
 *                        (source_exec, target_exec)), changed             # <<<<<<<<<<<<<<
 
10393
 *         elif source_minikind == c'a' and _versioned_minikind(target_minikind):
 
10394
 *             # looks like a new file
 
10395
 */
 
10396
      __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10397
      __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
10398
      __Pyx_INCREF(__pyx_v_source_exec);
 
10399
      PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_source_exec);
 
10400
      __Pyx_GIVEREF(__pyx_v_source_exec);
 
10401
      __Pyx_INCREF(__pyx_v_target_exec);
 
10402
      PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v_target_exec);
 
10403
      __Pyx_GIVEREF(__pyx_v_target_exec);
 
10404
      __pyx_t_14 = PyTuple_New(8); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10405
      __Pyx_GOTREF(((PyObject *)__pyx_t_14));
 
10406
      PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_9);
 
10407
      __Pyx_GIVEREF(__pyx_t_9);
 
10408
      PyTuple_SET_ITEM(__pyx_t_14, 1, ((PyObject *)__pyx_t_3));
 
10409
      __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
10410
      PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_7);
 
10411
      __Pyx_GIVEREF(__pyx_t_7);
 
10412
      PyTuple_SET_ITEM(__pyx_t_14, 3, ((PyObject *)__pyx_t_11));
 
10413
      __Pyx_GIVEREF(((PyObject *)__pyx_t_11));
 
10414
      PyTuple_SET_ITEM(__pyx_t_14, 4, ((PyObject *)__pyx_t_1));
 
10415
      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
 
10416
      PyTuple_SET_ITEM(__pyx_t_14, 5, ((PyObject *)__pyx_t_13));
 
10417
      __Pyx_GIVEREF(((PyObject *)__pyx_t_13));
 
10418
      PyTuple_SET_ITEM(__pyx_t_14, 6, ((PyObject *)__pyx_t_6));
 
10419
      __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
 
10420
      PyTuple_SET_ITEM(__pyx_t_14, 7, ((PyObject *)__pyx_t_12));
 
10421
      __Pyx_GIVEREF(((PyObject *)__pyx_t_12));
 
10422
      __pyx_t_9 = 0;
 
10423
      __pyx_t_3 = 0;
 
10424
      __pyx_t_7 = 0;
 
10425
      __pyx_t_11 = 0;
 
10426
      __pyx_t_1 = 0;
 
10427
      __pyx_t_13 = 0;
 
10428
      __pyx_t_6 = 0;
 
10429
      __pyx_t_12 = 0;
 
10430
      __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10431
      __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
10432
      PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_t_14));
 
10433
      __Pyx_GIVEREF(((PyObject *)__pyx_t_14));
 
10434
      __Pyx_INCREF(__pyx_v_changed);
 
10435
      PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v_changed);
 
10436
      __Pyx_GIVEREF(__pyx_v_changed);
 
10437
      __pyx_t_14 = 0;
 
10438
      __pyx_r = ((PyObject *)__pyx_t_12);
 
10439
      __pyx_t_12 = 0;
 
10440
      goto __pyx_L0;
 
10441
    }
 
10442
    __pyx_L48:;
 
10443
    goto __pyx_L6;
 
10444
  }
 
10445
 
 
10446
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1340
 
10447
 *                        (source_kind, target_kind),
 
10448
 *                        (source_exec, target_exec)), changed
 
10449
 *         elif source_minikind == c'a' and _versioned_minikind(target_minikind):             # <<<<<<<<<<<<<<
 
10450
 *             # looks like a new file
 
10451
 *             path = self.pathjoin(entry[0][0], entry[0][1])
 
10452
 */
 
10453
  __pyx_t_2 = (__pyx_v_source_minikind == 'a');
 
10454
  if (__pyx_t_2) {
 
10455
    __pyx_t_8 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_target_minikind);
 
10456
  } else {
 
10457
    __pyx_t_8 = __pyx_t_2;
 
10458
  }
 
10459
  if (__pyx_t_8) {
 
10460
 
 
10461
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1342
 
10462
 *         elif source_minikind == c'a' and _versioned_minikind(target_minikind):
 
10463
 *             # looks like a new file
 
10464
 *             path = self.pathjoin(entry[0][0], entry[0][1])             # <<<<<<<<<<<<<<
 
10465
 *             # parent id is the entry for the path in the target tree
 
10466
 *             # TODO: these are the same for an entire directory: cache em.
 
10467
 */
 
10468
    __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10469
    __Pyx_GOTREF(__pyx_t_12);
 
10470
    __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_12, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10471
    __Pyx_GOTREF(__pyx_t_14);
 
10472
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
10473
    __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10474
    __Pyx_GOTREF(__pyx_t_12);
 
10475
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_12, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10476
    __Pyx_GOTREF(__pyx_t_6);
 
10477
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
10478
    __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10479
    __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
10480
    PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_14);
 
10481
    __Pyx_GIVEREF(__pyx_t_14);
 
10482
    PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_6);
 
10483
    __Pyx_GIVEREF(__pyx_t_6);
 
10484
    __pyx_t_14 = 0;
 
10485
    __pyx_t_6 = 0;
 
10486
    __pyx_t_6 = PyObject_Call(__pyx_v_self->pathjoin, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10487
    __Pyx_GOTREF(__pyx_t_6);
 
10488
    __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
 
10489
    __Pyx_DECREF(__pyx_v_path);
 
10490
    __pyx_v_path = __pyx_t_6;
 
10491
    __pyx_t_6 = 0;
 
10492
 
 
10493
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1345
 
10494
 *             # parent id is the entry for the path in the target tree
 
10495
 *             # TODO: these are the same for an entire directory: cache em.
 
10496
 *             parent_entry = self.state._get_entry(self.target_index,             # <<<<<<<<<<<<<<
 
10497
 *                                                  path_utf8=entry[0][0])
 
10498
 *             if parent_entry is None:
 
10499
 */
 
10500
    __pyx_t_6 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___get_entry); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10501
    __Pyx_GOTREF(__pyx_t_6);
 
10502
    __pyx_t_12 = PyInt_FromLong(__pyx_v_self->target_index); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10503
    __Pyx_GOTREF(__pyx_t_12);
 
10504
    __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10505
    __Pyx_GOTREF(((PyObject *)__pyx_t_14));
 
10506
    PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12);
 
10507
    __Pyx_GIVEREF(__pyx_t_12);
 
10508
    __pyx_t_12 = 0;
 
10509
    __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10510
    __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
10511
 
 
10512
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1346
 
10513
 *             # TODO: these are the same for an entire directory: cache em.
 
10514
 *             parent_entry = self.state._get_entry(self.target_index,
 
10515
 *                                                  path_utf8=entry[0][0])             # <<<<<<<<<<<<<<
 
10516
 *             if parent_entry is None:
 
10517
 *                 raise errors.DirstateCorrupt(self.state,
 
10518
 */
 
10519
    __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10520
    __Pyx_GOTREF(__pyx_t_13);
 
10521
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_13, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10522
    __Pyx_GOTREF(__pyx_t_1);
 
10523
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
 
10524
    if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__path_utf8), __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10525
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
10526
    __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_6, ((PyObject *)__pyx_t_14), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10527
    __Pyx_GOTREF(__pyx_t_1);
 
10528
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
10529
    __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
 
10530
    __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
 
10531
    __Pyx_DECREF(__pyx_v_parent_entry);
 
10532
    __pyx_v_parent_entry = __pyx_t_1;
 
10533
    __pyx_t_1 = 0;
 
10534
 
 
10535
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1347
 
10536
 *             parent_entry = self.state._get_entry(self.target_index,
 
10537
 *                                                  path_utf8=entry[0][0])
 
10538
 *             if parent_entry is None:             # <<<<<<<<<<<<<<
 
10539
 *                 raise errors.DirstateCorrupt(self.state,
 
10540
 *                     "We could not find the parent entry in index %d"
 
10541
 */
 
10542
    __pyx_t_8 = (__pyx_v_parent_entry == Py_None);
 
10543
    if (__pyx_t_8) {
 
10544
 
 
10545
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1348
 
10546
 *                                                  path_utf8=entry[0][0])
 
10547
 *             if parent_entry is None:
 
10548
 *                 raise errors.DirstateCorrupt(self.state,             # <<<<<<<<<<<<<<
 
10549
 *                     "We could not find the parent entry in index %d"
 
10550
 *                     " for the entry: %s"
 
10551
 */
 
10552
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10553
      __Pyx_GOTREF(__pyx_t_1);
 
10554
      __pyx_t_12 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__DirstateCorrupt); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10555
      __Pyx_GOTREF(__pyx_t_12);
 
10556
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
10557
 
 
10558
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1351
 
10559
 *                     "We could not find the parent entry in index %d"
 
10560
 *                     " for the entry: %s"
 
10561
 *                     % (self.target_index, entry[0]))             # <<<<<<<<<<<<<<
 
10562
 *             parent_id = parent_entry[0][2]
 
10563
 *             if parent_id == entry[0][2]:
 
10564
 */
 
10565
      __pyx_t_1 = PyInt_FromLong(__pyx_v_self->target_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10566
      __Pyx_GOTREF(__pyx_t_1);
 
10567
      __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10568
      __Pyx_GOTREF(__pyx_t_14);
 
10569
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10570
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
10571
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
 
10572
      __Pyx_GIVEREF(__pyx_t_1);
 
10573
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_14);
 
10574
      __Pyx_GIVEREF(__pyx_t_14);
 
10575
      __pyx_t_1 = 0;
 
10576
      __pyx_t_14 = 0;
 
10577
      __pyx_t_14 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_40), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10578
      __Pyx_GOTREF(((PyObject *)__pyx_t_14));
 
10579
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
10580
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10581
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
10582
      __Pyx_INCREF(__pyx_v_self->state);
 
10583
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self->state);
 
10584
      __Pyx_GIVEREF(__pyx_v_self->state);
 
10585
      PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_t_14));
 
10586
      __Pyx_GIVEREF(((PyObject *)__pyx_t_14));
 
10587
      __pyx_t_14 = 0;
 
10588
      __pyx_t_14 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10589
      __Pyx_GOTREF(__pyx_t_14);
 
10590
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
10591
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
10592
      __Pyx_Raise(__pyx_t_14, 0, 0);
 
10593
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
 
10594
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10595
      goto __pyx_L51;
 
10596
    }
 
10597
    __pyx_L51:;
 
10598
 
 
10599
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1352
 
10600
 *                     " for the entry: %s"
 
10601
 *                     % (self.target_index, entry[0]))
 
10602
 *             parent_id = parent_entry[0][2]             # <<<<<<<<<<<<<<
 
10603
 *             if parent_id == entry[0][2]:
 
10604
 *                 parent_id = None
 
10605
 */
 
10606
    __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_parent_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10607
    __Pyx_GOTREF(__pyx_t_14);
 
10608
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_14, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10609
    __Pyx_GOTREF(__pyx_t_6);
 
10610
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
 
10611
    __Pyx_DECREF(__pyx_v_parent_id);
 
10612
    __pyx_v_parent_id = __pyx_t_6;
 
10613
    __pyx_t_6 = 0;
 
10614
 
 
10615
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1353
 
10616
 *                     % (self.target_index, entry[0]))
 
10617
 *             parent_id = parent_entry[0][2]
 
10618
 *             if parent_id == entry[0][2]:             # <<<<<<<<<<<<<<
 
10619
 *                 parent_id = None
 
10620
 *             if path_info is not None:
 
10621
 */
 
10622
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10623
    __Pyx_GOTREF(__pyx_t_6);
 
10624
    __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_6, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10625
    __Pyx_GOTREF(__pyx_t_14);
 
10626
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
10627
    __pyx_t_6 = PyObject_RichCompare(__pyx_v_parent_id, __pyx_t_14, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10628
    __Pyx_GOTREF(__pyx_t_6);
 
10629
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
 
10630
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10631
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
10632
    if (__pyx_t_8) {
 
10633
 
 
10634
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1354
 
10635
 *             parent_id = parent_entry[0][2]
 
10636
 *             if parent_id == entry[0][2]:
 
10637
 *                 parent_id = None             # <<<<<<<<<<<<<<
 
10638
 *             if path_info is not None:
 
10639
 *                 # Present on disk:
 
10640
 */
 
10641
      __Pyx_INCREF(Py_None);
 
10642
      __Pyx_DECREF(__pyx_v_parent_id);
 
10643
      __pyx_v_parent_id = Py_None;
 
10644
      goto __pyx_L52;
 
10645
    }
 
10646
    __pyx_L52:;
 
10647
 
 
10648
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1355
 
10649
 *             if parent_id == entry[0][2]:
 
10650
 *                 parent_id = None
 
10651
 *             if path_info is not None:             # <<<<<<<<<<<<<<
 
10652
 *                 # Present on disk:
 
10653
 *                 if self.use_filesystem_for_exec:
 
10654
 */
 
10655
    __pyx_t_8 = (__pyx_v_path_info != Py_None);
 
10656
    if (__pyx_t_8) {
 
10657
 
 
10658
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1357
 
10659
 *             if path_info is not None:
 
10660
 *                 # Present on disk:
 
10661
 *                 if self.use_filesystem_for_exec:             # <<<<<<<<<<<<<<
 
10662
 *                     # We need S_ISREG here, because we aren't sure if this
 
10663
 *                     # is a file or not.
 
10664
 */
 
10665
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->use_filesystem_for_exec); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10666
      if (__pyx_t_8) {
 
10667
 
 
10668
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1361
 
10669
 *                     # is a file or not.
 
10670
 *                     target_exec = bool(
 
10671
 *                         S_ISREG(path_info[3].st_mode)             # <<<<<<<<<<<<<<
 
10672
 *                         and S_IXUSR & path_info[3].st_mode)
 
10673
 *                 else:
 
10674
 */
 
10675
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_path_info, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10676
        __Pyx_GOTREF(__pyx_t_6);
 
10677
        __pyx_t_14 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__st_mode); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10678
        __Pyx_GOTREF(__pyx_t_14);
 
10679
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
10680
        __pyx_t_10 = __Pyx_PyInt_AsInt(__pyx_t_14); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10681
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
 
10682
        __pyx_t_14 = PyInt_FromLong(S_ISREG(__pyx_t_10)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10683
        __Pyx_GOTREF(__pyx_t_14);
 
10684
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10685
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
 
10686
        if (__pyx_t_8) {
 
10687
 
 
10688
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1362
 
10689
 *                     target_exec = bool(
 
10690
 *                         S_ISREG(path_info[3].st_mode)
 
10691
 *                         and S_IXUSR & path_info[3].st_mode)             # <<<<<<<<<<<<<<
 
10692
 *                 else:
 
10693
 *                     target_exec = target_details[3]
 
10694
 */
 
10695
          __pyx_t_14 = PyInt_FromLong(S_IXUSR); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10696
          __Pyx_GOTREF(__pyx_t_14);
 
10697
          __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_path_info, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10698
          __Pyx_GOTREF(__pyx_t_6);
 
10699
          __pyx_t_12 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__st_mode); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10700
          __Pyx_GOTREF(__pyx_t_12);
 
10701
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
10702
          __pyx_t_6 = PyNumber_And(__pyx_t_14, __pyx_t_12); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10703
          __Pyx_GOTREF(__pyx_t_6);
 
10704
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
 
10705
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
10706
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10707
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
10708
          __pyx_t_5 = __pyx_t_2;
 
10709
        } else {
 
10710
          __pyx_t_5 = __pyx_t_8;
 
10711
        }
 
10712
        __pyx_t_6 = __Pyx_PyBool_FromLong((!(!__pyx_t_5))); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10713
        __Pyx_GOTREF(__pyx_t_6);
 
10714
        __Pyx_DECREF(__pyx_v_target_exec);
 
10715
        __pyx_v_target_exec = __pyx_t_6;
 
10716
        __pyx_t_6 = 0;
 
10717
        goto __pyx_L54;
 
10718
      }
 
10719
      /*else*/ {
 
10720
 
 
10721
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1364
 
10722
 *                         and S_IXUSR & path_info[3].st_mode)
 
10723
 *                 else:
 
10724
 *                     target_exec = target_details[3]             # <<<<<<<<<<<<<<
 
10725
 *                 return (entry[0][2],
 
10726
 *                        (None, self.utf8_decode(path)[0]),
 
10727
 */
 
10728
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_target_details, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10729
        __Pyx_GOTREF(__pyx_t_6);
 
10730
        __Pyx_DECREF(__pyx_v_target_exec);
 
10731
        __pyx_v_target_exec = __pyx_t_6;
 
10732
        __pyx_t_6 = 0;
 
10733
      }
 
10734
      __pyx_L54:;
 
10735
 
 
10736
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1365
 
10737
 *                 else:
 
10738
 *                     target_exec = target_details[3]
 
10739
 *                 return (entry[0][2],             # <<<<<<<<<<<<<<
 
10740
 *                        (None, self.utf8_decode(path)[0]),
 
10741
 *                        True,
 
10742
 */
 
10743
      __Pyx_XDECREF(__pyx_r);
 
10744
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10745
      __Pyx_GOTREF(__pyx_t_6);
 
10746
      __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_6, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10747
      __Pyx_GOTREF(__pyx_t_12);
 
10748
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
10749
 
 
10750
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1366
 
10751
 *                     target_exec = target_details[3]
 
10752
 *                 return (entry[0][2],
 
10753
 *                        (None, self.utf8_decode(path)[0]),             # <<<<<<<<<<<<<<
 
10754
 *                        True,
 
10755
 *                        (False, True),
 
10756
 */
 
10757
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10758
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
10759
      __Pyx_INCREF(__pyx_v_path);
 
10760
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_path);
 
10761
      __Pyx_GIVEREF(__pyx_v_path);
 
10762
      __pyx_t_14 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10763
      __Pyx_GOTREF(__pyx_t_14);
 
10764
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
10765
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_14, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10766
      __Pyx_GOTREF(__pyx_t_6);
 
10767
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
 
10768
      __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10769
      __Pyx_GOTREF(((PyObject *)__pyx_t_14));
 
10770
      __Pyx_INCREF(Py_None);
 
10771
      PyTuple_SET_ITEM(__pyx_t_14, 0, Py_None);
 
10772
      __Pyx_GIVEREF(Py_None);
 
10773
      PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_6);
 
10774
      __Pyx_GIVEREF(__pyx_t_6);
 
10775
      __pyx_t_6 = 0;
 
10776
 
 
10777
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1367
 
10778
 *                 return (entry[0][2],
 
10779
 *                        (None, self.utf8_decode(path)[0]),
 
10780
 *                        True,             # <<<<<<<<<<<<<<
 
10781
 *                        (False, True),
 
10782
 *                        (None, parent_id),
 
10783
 */
 
10784
      __pyx_t_6 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10785
      __Pyx_GOTREF(__pyx_t_6);
 
10786
 
 
10787
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1368
 
10788
 *                        (None, self.utf8_decode(path)[0]),
 
10789
 *                        True,
 
10790
 *                        (False, True),             # <<<<<<<<<<<<<<
 
10791
 *                        (None, parent_id),
 
10792
 *                        (None, self.utf8_decode(entry[0][1])[0]),
 
10793
 */
 
10794
      __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10795
      __Pyx_GOTREF(__pyx_t_1);
 
10796
      __pyx_t_13 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10797
      __Pyx_GOTREF(__pyx_t_13);
 
10798
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10799
      __Pyx_GOTREF(((PyObject *)__pyx_t_11));
 
10800
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
 
10801
      __Pyx_GIVEREF(__pyx_t_1);
 
10802
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_13);
 
10803
      __Pyx_GIVEREF(__pyx_t_13);
 
10804
      __pyx_t_1 = 0;
 
10805
      __pyx_t_13 = 0;
 
10806
 
 
10807
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1369
 
10808
 *                        True,
 
10809
 *                        (False, True),
 
10810
 *                        (None, parent_id),             # <<<<<<<<<<<<<<
 
10811
 *                        (None, self.utf8_decode(entry[0][1])[0]),
 
10812
 *                        (None, path_info[2]),
 
10813
 */
 
10814
      __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10815
      __Pyx_GOTREF(((PyObject *)__pyx_t_13));
 
10816
      __Pyx_INCREF(Py_None);
 
10817
      PyTuple_SET_ITEM(__pyx_t_13, 0, Py_None);
 
10818
      __Pyx_GIVEREF(Py_None);
 
10819
      __Pyx_INCREF(__pyx_v_parent_id);
 
10820
      PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_v_parent_id);
 
10821
      __Pyx_GIVEREF(__pyx_v_parent_id);
 
10822
 
 
10823
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1370
 
10824
 *                        (False, True),
 
10825
 *                        (None, parent_id),
 
10826
 *                        (None, self.utf8_decode(entry[0][1])[0]),             # <<<<<<<<<<<<<<
 
10827
 *                        (None, path_info[2]),
 
10828
 *                        (None, target_exec)), True
 
10829
 */
 
10830
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10831
      __Pyx_GOTREF(__pyx_t_1);
 
10832
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_1, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10833
      __Pyx_GOTREF(__pyx_t_7);
 
10834
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
10835
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10836
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
10837
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
 
10838
      __Pyx_GIVEREF(__pyx_t_7);
 
10839
      __pyx_t_7 = 0;
 
10840
      __pyx_t_7 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10841
      __Pyx_GOTREF(__pyx_t_7);
 
10842
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
10843
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_7, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10844
      __Pyx_GOTREF(__pyx_t_1);
 
10845
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
10846
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10847
      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
10848
      __Pyx_INCREF(Py_None);
 
10849
      PyTuple_SET_ITEM(__pyx_t_7, 0, Py_None);
 
10850
      __Pyx_GIVEREF(Py_None);
 
10851
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
 
10852
      __Pyx_GIVEREF(__pyx_t_1);
 
10853
      __pyx_t_1 = 0;
 
10854
 
 
10855
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1371
 
10856
 *                        (None, parent_id),
 
10857
 *                        (None, self.utf8_decode(entry[0][1])[0]),
 
10858
 *                        (None, path_info[2]),             # <<<<<<<<<<<<<<
 
10859
 *                        (None, target_exec)), True
 
10860
 *             else:
 
10861
 */
 
10862
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_path_info, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10863
      __Pyx_GOTREF(__pyx_t_1);
 
10864
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10865
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
10866
      __Pyx_INCREF(Py_None);
 
10867
      PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
 
10868
      __Pyx_GIVEREF(Py_None);
 
10869
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
 
10870
      __Pyx_GIVEREF(__pyx_t_1);
 
10871
      __pyx_t_1 = 0;
 
10872
 
 
10873
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1372
 
10874
 *                        (None, self.utf8_decode(entry[0][1])[0]),
 
10875
 *                        (None, path_info[2]),
 
10876
 *                        (None, target_exec)), True             # <<<<<<<<<<<<<<
 
10877
 *             else:
 
10878
 *                 # Its a missing file, report it as such.
 
10879
 */
 
10880
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10881
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
10882
      __Pyx_INCREF(Py_None);
 
10883
      PyTuple_SET_ITEM(__pyx_t_1, 0, Py_None);
 
10884
      __Pyx_GIVEREF(Py_None);
 
10885
      __Pyx_INCREF(__pyx_v_target_exec);
 
10886
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_target_exec);
 
10887
      __Pyx_GIVEREF(__pyx_v_target_exec);
 
10888
      __pyx_t_9 = PyTuple_New(8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10889
      __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
10890
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_12);
 
10891
      __Pyx_GIVEREF(__pyx_t_12);
 
10892
      PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_t_14));
 
10893
      __Pyx_GIVEREF(((PyObject *)__pyx_t_14));
 
10894
      PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_6);
 
10895
      __Pyx_GIVEREF(__pyx_t_6);
 
10896
      PyTuple_SET_ITEM(__pyx_t_9, 3, ((PyObject *)__pyx_t_11));
 
10897
      __Pyx_GIVEREF(((PyObject *)__pyx_t_11));
 
10898
      PyTuple_SET_ITEM(__pyx_t_9, 4, ((PyObject *)__pyx_t_13));
 
10899
      __Pyx_GIVEREF(((PyObject *)__pyx_t_13));
 
10900
      PyTuple_SET_ITEM(__pyx_t_9, 5, ((PyObject *)__pyx_t_7));
 
10901
      __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
 
10902
      PyTuple_SET_ITEM(__pyx_t_9, 6, ((PyObject *)__pyx_t_3));
 
10903
      __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
10904
      PyTuple_SET_ITEM(__pyx_t_9, 7, ((PyObject *)__pyx_t_1));
 
10905
      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
 
10906
      __pyx_t_12 = 0;
 
10907
      __pyx_t_14 = 0;
 
10908
      __pyx_t_6 = 0;
 
10909
      __pyx_t_11 = 0;
 
10910
      __pyx_t_13 = 0;
 
10911
      __pyx_t_7 = 0;
 
10912
      __pyx_t_3 = 0;
 
10913
      __pyx_t_1 = 0;
 
10914
      __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10915
      __Pyx_GOTREF(__pyx_t_1);
 
10916
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10917
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
10918
      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_9));
 
10919
      __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
 
10920
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
 
10921
      __Pyx_GIVEREF(__pyx_t_1);
 
10922
      __pyx_t_9 = 0;
 
10923
      __pyx_t_1 = 0;
 
10924
      __pyx_r = ((PyObject *)__pyx_t_3);
 
10925
      __pyx_t_3 = 0;
 
10926
      goto __pyx_L0;
 
10927
      goto __pyx_L53;
 
10928
    }
 
10929
    /*else*/ {
 
10930
 
 
10931
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1375
 
10932
 *             else:
 
10933
 *                 # Its a missing file, report it as such.
 
10934
 *                 return (entry[0][2],             # <<<<<<<<<<<<<<
 
10935
 *                        (None, self.utf8_decode(path)[0]),
 
10936
 *                        False,
 
10937
 */
 
10938
      __Pyx_XDECREF(__pyx_r);
 
10939
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10940
      __Pyx_GOTREF(__pyx_t_3);
 
10941
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10942
      __Pyx_GOTREF(__pyx_t_1);
 
10943
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
10944
 
 
10945
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1376
 
10946
 *                 # Its a missing file, report it as such.
 
10947
 *                 return (entry[0][2],
 
10948
 *                        (None, self.utf8_decode(path)[0]),             # <<<<<<<<<<<<<<
 
10949
 *                        False,
 
10950
 *                        (False, True),
 
10951
 */
 
10952
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10953
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
10954
      __Pyx_INCREF(__pyx_v_path);
 
10955
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_path);
 
10956
      __Pyx_GIVEREF(__pyx_v_path);
 
10957
      __pyx_t_9 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10958
      __Pyx_GOTREF(__pyx_t_9);
 
10959
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
10960
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_9, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10961
      __Pyx_GOTREF(__pyx_t_3);
 
10962
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
10963
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10964
      __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
10965
      __Pyx_INCREF(Py_None);
 
10966
      PyTuple_SET_ITEM(__pyx_t_9, 0, Py_None);
 
10967
      __Pyx_GIVEREF(Py_None);
 
10968
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3);
 
10969
      __Pyx_GIVEREF(__pyx_t_3);
 
10970
      __pyx_t_3 = 0;
 
10971
 
 
10972
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1377
 
10973
 *                 return (entry[0][2],
 
10974
 *                        (None, self.utf8_decode(path)[0]),
 
10975
 *                        False,             # <<<<<<<<<<<<<<
 
10976
 *                        (False, True),
 
10977
 *                        (None, parent_id),
 
10978
 */
 
10979
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10980
      __Pyx_GOTREF(__pyx_t_3);
 
10981
 
 
10982
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1378
 
10983
 *                        (None, self.utf8_decode(path)[0]),
 
10984
 *                        False,
 
10985
 *                        (False, True),             # <<<<<<<<<<<<<<
 
10986
 *                        (None, parent_id),
 
10987
 *                        (None, self.utf8_decode(entry[0][1])[0]),
 
10988
 */
 
10989
      __pyx_t_7 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10990
      __Pyx_GOTREF(__pyx_t_7);
 
10991
      __pyx_t_13 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10992
      __Pyx_GOTREF(__pyx_t_13);
 
10993
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
10994
      __Pyx_GOTREF(((PyObject *)__pyx_t_11));
 
10995
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
 
10996
      __Pyx_GIVEREF(__pyx_t_7);
 
10997
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_13);
 
10998
      __Pyx_GIVEREF(__pyx_t_13);
 
10999
      __pyx_t_7 = 0;
 
11000
      __pyx_t_13 = 0;
 
11001
 
 
11002
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1379
 
11003
 *                        False,
 
11004
 *                        (False, True),
 
11005
 *                        (None, parent_id),             # <<<<<<<<<<<<<<
 
11006
 *                        (None, self.utf8_decode(entry[0][1])[0]),
 
11007
 *                        (None, None),
 
11008
 */
 
11009
      __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11010
      __Pyx_GOTREF(((PyObject *)__pyx_t_13));
 
11011
      __Pyx_INCREF(Py_None);
 
11012
      PyTuple_SET_ITEM(__pyx_t_13, 0, Py_None);
 
11013
      __Pyx_GIVEREF(Py_None);
 
11014
      __Pyx_INCREF(__pyx_v_parent_id);
 
11015
      PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_v_parent_id);
 
11016
      __Pyx_GIVEREF(__pyx_v_parent_id);
 
11017
 
 
11018
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1380
 
11019
 *                        (False, True),
 
11020
 *                        (None, parent_id),
 
11021
 *                        (None, self.utf8_decode(entry[0][1])[0]),             # <<<<<<<<<<<<<<
 
11022
 *                        (None, None),
 
11023
 *                        (None, False)), True
 
11024
 */
 
11025
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11026
      __Pyx_GOTREF(__pyx_t_7);
 
11027
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11028
      __Pyx_GOTREF(__pyx_t_6);
 
11029
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
11030
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11031
      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
11032
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
 
11033
      __Pyx_GIVEREF(__pyx_t_6);
 
11034
      __pyx_t_6 = 0;
 
11035
      __pyx_t_6 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11036
      __Pyx_GOTREF(__pyx_t_6);
 
11037
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
11038
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11039
      __Pyx_GOTREF(__pyx_t_7);
 
11040
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
11041
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11042
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
11043
      __Pyx_INCREF(Py_None);
 
11044
      PyTuple_SET_ITEM(__pyx_t_6, 0, Py_None);
 
11045
      __Pyx_GIVEREF(Py_None);
 
11046
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
 
11047
      __Pyx_GIVEREF(__pyx_t_7);
 
11048
      __pyx_t_7 = 0;
 
11049
 
 
11050
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1382
 
11051
 *                        (None, self.utf8_decode(entry[0][1])[0]),
 
11052
 *                        (None, None),
 
11053
 *                        (None, False)), True             # <<<<<<<<<<<<<<
 
11054
 *         elif _versioned_minikind(source_minikind) and target_minikind == c'a':
 
11055
 *             # unversioned, possibly, or possibly not deleted: we dont care.
 
11056
 */
 
11057
      __pyx_t_7 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11058
      __Pyx_GOTREF(__pyx_t_7);
 
11059
      __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11060
      __Pyx_GOTREF(((PyObject *)__pyx_t_14));
 
11061
      __Pyx_INCREF(Py_None);
 
11062
      PyTuple_SET_ITEM(__pyx_t_14, 0, Py_None);
 
11063
      __Pyx_GIVEREF(Py_None);
 
11064
      PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_7);
 
11065
      __Pyx_GIVEREF(__pyx_t_7);
 
11066
      __pyx_t_7 = 0;
 
11067
      __pyx_t_7 = PyTuple_New(8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11068
      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
11069
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
 
11070
      __Pyx_GIVEREF(__pyx_t_1);
 
11071
      PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_t_9));
 
11072
      __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
 
11073
      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3);
 
11074
      __Pyx_GIVEREF(__pyx_t_3);
 
11075
      PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_t_11));
 
11076
      __Pyx_GIVEREF(((PyObject *)__pyx_t_11));
 
11077
      PyTuple_SET_ITEM(__pyx_t_7, 4, ((PyObject *)__pyx_t_13));
 
11078
      __Pyx_GIVEREF(((PyObject *)__pyx_t_13));
 
11079
      PyTuple_SET_ITEM(__pyx_t_7, 5, ((PyObject *)__pyx_t_6));
 
11080
      __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
 
11081
      __Pyx_INCREF(((PyObject *)__pyx_k_tuple_41));
 
11082
      PyTuple_SET_ITEM(__pyx_t_7, 6, ((PyObject *)__pyx_k_tuple_41));
 
11083
      __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41));
 
11084
      PyTuple_SET_ITEM(__pyx_t_7, 7, ((PyObject *)__pyx_t_14));
 
11085
      __Pyx_GIVEREF(((PyObject *)__pyx_t_14));
 
11086
      __pyx_t_1 = 0;
 
11087
      __pyx_t_9 = 0;
 
11088
      __pyx_t_3 = 0;
 
11089
      __pyx_t_11 = 0;
 
11090
      __pyx_t_13 = 0;
 
11091
      __pyx_t_6 = 0;
 
11092
      __pyx_t_14 = 0;
 
11093
      __pyx_t_14 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11094
      __Pyx_GOTREF(__pyx_t_14);
 
11095
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11096
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
11097
      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_7));
 
11098
      __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
 
11099
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_14);
 
11100
      __Pyx_GIVEREF(__pyx_t_14);
 
11101
      __pyx_t_7 = 0;
 
11102
      __pyx_t_14 = 0;
 
11103
      __pyx_r = ((PyObject *)__pyx_t_6);
 
11104
      __pyx_t_6 = 0;
 
11105
      goto __pyx_L0;
 
11106
    }
 
11107
    __pyx_L53:;
 
11108
    goto __pyx_L6;
 
11109
  }
 
11110
 
 
11111
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1383
 
11112
 *                        (None, None),
 
11113
 *                        (None, False)), True
 
11114
 *         elif _versioned_minikind(source_minikind) and target_minikind == c'a':             # <<<<<<<<<<<<<<
 
11115
 *             # unversioned, possibly, or possibly not deleted: we dont care.
 
11116
 *             # if its still on disk, *and* theres no other entry at this
 
11117
 */
 
11118
  if (__pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_source_minikind)) {
 
11119
    __pyx_t_5 = (__pyx_v_target_minikind == 'a');
 
11120
    __pyx_t_8 = __pyx_t_5;
 
11121
  } else {
 
11122
    __pyx_t_8 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_source_minikind);
 
11123
  }
 
11124
  if (__pyx_t_8) {
 
11125
 
 
11126
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1388
 
11127
 *             # path [we dont know this in this routine at the moment -
 
11128
 *             # perhaps we should change this - then it would be an unknown.
 
11129
 *             old_path = self.pathjoin(entry[0][0], entry[0][1])             # <<<<<<<<<<<<<<
 
11130
 *             # parent id is the entry for the path in the target tree
 
11131
 *             parent_id = self.state._get_entry(self.source_index, path_utf8=entry[0][0])[0][2]
 
11132
 */
 
11133
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11134
    __Pyx_GOTREF(__pyx_t_6);
 
11135
    __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_6, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11136
    __Pyx_GOTREF(__pyx_t_14);
 
11137
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
11138
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11139
    __Pyx_GOTREF(__pyx_t_6);
 
11140
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11141
    __Pyx_GOTREF(__pyx_t_7);
 
11142
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
11143
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11144
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
11145
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_14);
 
11146
    __Pyx_GIVEREF(__pyx_t_14);
 
11147
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
 
11148
    __Pyx_GIVEREF(__pyx_t_7);
 
11149
    __pyx_t_14 = 0;
 
11150
    __pyx_t_7 = 0;
 
11151
    __pyx_t_7 = PyObject_Call(__pyx_v_self->pathjoin, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11152
    __Pyx_GOTREF(__pyx_t_7);
 
11153
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
11154
    __Pyx_DECREF(__pyx_v_old_path);
 
11155
    __pyx_v_old_path = __pyx_t_7;
 
11156
    __pyx_t_7 = 0;
 
11157
 
 
11158
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1390
 
11159
 *             old_path = self.pathjoin(entry[0][0], entry[0][1])
 
11160
 *             # parent id is the entry for the path in the target tree
 
11161
 *             parent_id = self.state._get_entry(self.source_index, path_utf8=entry[0][0])[0][2]             # <<<<<<<<<<<<<<
 
11162
 *             if parent_id == entry[0][2]:
 
11163
 *                 parent_id = None
 
11164
 */
 
11165
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___get_entry); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11166
    __Pyx_GOTREF(__pyx_t_7);
 
11167
    __pyx_t_6 = PyInt_FromLong(__pyx_v_self->source_index); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11168
    __Pyx_GOTREF(__pyx_t_6);
 
11169
    __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11170
    __Pyx_GOTREF(((PyObject *)__pyx_t_14));
 
11171
    PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_6);
 
11172
    __Pyx_GIVEREF(__pyx_t_6);
 
11173
    __pyx_t_6 = 0;
 
11174
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11175
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
11176
    __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11177
    __Pyx_GOTREF(__pyx_t_13);
 
11178
    __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_13, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11179
    __Pyx_GOTREF(__pyx_t_11);
 
11180
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
 
11181
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__path_utf8), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11182
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
11183
    __pyx_t_11 = PyEval_CallObjectWithKeywords(__pyx_t_7, ((PyObject *)__pyx_t_14), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11184
    __Pyx_GOTREF(__pyx_t_11);
 
11185
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
11186
    __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
 
11187
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
11188
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_11, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11189
    __Pyx_GOTREF(__pyx_t_6);
 
11190
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
11191
    __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_6, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11192
    __Pyx_GOTREF(__pyx_t_11);
 
11193
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
11194
    __Pyx_DECREF(__pyx_v_parent_id);
 
11195
    __pyx_v_parent_id = __pyx_t_11;
 
11196
    __pyx_t_11 = 0;
 
11197
 
 
11198
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1391
 
11199
 *             # parent id is the entry for the path in the target tree
 
11200
 *             parent_id = self.state._get_entry(self.source_index, path_utf8=entry[0][0])[0][2]
 
11201
 *             if parent_id == entry[0][2]:             # <<<<<<<<<<<<<<
 
11202
 *                 parent_id = None
 
11203
 *             return (entry[0][2],
 
11204
 */
 
11205
    __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11206
    __Pyx_GOTREF(__pyx_t_11);
 
11207
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_11, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11208
    __Pyx_GOTREF(__pyx_t_6);
 
11209
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
11210
    __pyx_t_11 = PyObject_RichCompare(__pyx_v_parent_id, __pyx_t_6, Py_EQ); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11211
    __Pyx_GOTREF(__pyx_t_11);
 
11212
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
11213
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11214
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
11215
    if (__pyx_t_8) {
 
11216
 
 
11217
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1392
 
11218
 *             parent_id = self.state._get_entry(self.source_index, path_utf8=entry[0][0])[0][2]
 
11219
 *             if parent_id == entry[0][2]:
 
11220
 *                 parent_id = None             # <<<<<<<<<<<<<<
 
11221
 *             return (entry[0][2],
 
11222
 *                    (self.utf8_decode(old_path)[0], None),
 
11223
 */
 
11224
      __Pyx_INCREF(Py_None);
 
11225
      __Pyx_DECREF(__pyx_v_parent_id);
 
11226
      __pyx_v_parent_id = Py_None;
 
11227
      goto __pyx_L55;
 
11228
    }
 
11229
    __pyx_L55:;
 
11230
 
 
11231
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1393
 
11232
 *             if parent_id == entry[0][2]:
 
11233
 *                 parent_id = None
 
11234
 *             return (entry[0][2],             # <<<<<<<<<<<<<<
 
11235
 *                    (self.utf8_decode(old_path)[0], None),
 
11236
 *                    True,
 
11237
 */
 
11238
    __Pyx_XDECREF(__pyx_r);
 
11239
    __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11240
    __Pyx_GOTREF(__pyx_t_11);
 
11241
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_11, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11242
    __Pyx_GOTREF(__pyx_t_6);
 
11243
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
11244
 
 
11245
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1394
 
11246
 *                 parent_id = None
 
11247
 *             return (entry[0][2],
 
11248
 *                    (self.utf8_decode(old_path)[0], None),             # <<<<<<<<<<<<<<
 
11249
 *                    True,
 
11250
 *                    (True, False),
 
11251
 */
 
11252
    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11253
    __Pyx_GOTREF(((PyObject *)__pyx_t_11));
 
11254
    __Pyx_INCREF(__pyx_v_old_path);
 
11255
    PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_old_path);
 
11256
    __Pyx_GIVEREF(__pyx_v_old_path);
 
11257
    __pyx_t_14 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11258
    __Pyx_GOTREF(__pyx_t_14);
 
11259
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
 
11260
    __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_14, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11261
    __Pyx_GOTREF(__pyx_t_11);
 
11262
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
 
11263
    __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11264
    __Pyx_GOTREF(((PyObject *)__pyx_t_14));
 
11265
    PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_11);
 
11266
    __Pyx_GIVEREF(__pyx_t_11);
 
11267
    __Pyx_INCREF(Py_None);
 
11268
    PyTuple_SET_ITEM(__pyx_t_14, 1, Py_None);
 
11269
    __Pyx_GIVEREF(Py_None);
 
11270
    __pyx_t_11 = 0;
 
11271
 
 
11272
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1395
 
11273
 *             return (entry[0][2],
 
11274
 *                    (self.utf8_decode(old_path)[0], None),
 
11275
 *                    True,             # <<<<<<<<<<<<<<
 
11276
 *                    (True, False),
 
11277
 *                    (parent_id, None),
 
11278
 */
 
11279
    __pyx_t_11 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11280
    __Pyx_GOTREF(__pyx_t_11);
 
11281
 
 
11282
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1396
 
11283
 *                    (self.utf8_decode(old_path)[0], None),
 
11284
 *                    True,
 
11285
 *                    (True, False),             # <<<<<<<<<<<<<<
 
11286
 *                    (parent_id, None),
 
11287
 *                    (self.utf8_decode(entry[0][1])[0], None),
 
11288
 */
 
11289
    __pyx_t_7 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11290
    __Pyx_GOTREF(__pyx_t_7);
 
11291
    __pyx_t_13 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11292
    __Pyx_GOTREF(__pyx_t_13);
 
11293
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11294
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
11295
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7);
 
11296
    __Pyx_GIVEREF(__pyx_t_7);
 
11297
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_13);
 
11298
    __Pyx_GIVEREF(__pyx_t_13);
 
11299
    __pyx_t_7 = 0;
 
11300
    __pyx_t_13 = 0;
 
11301
 
 
11302
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1397
 
11303
 *                    True,
 
11304
 *                    (True, False),
 
11305
 *                    (parent_id, None),             # <<<<<<<<<<<<<<
 
11306
 *                    (self.utf8_decode(entry[0][1])[0], None),
 
11307
 *                    (_minikind_to_kind(source_minikind), None),
 
11308
 */
 
11309
    __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11310
    __Pyx_GOTREF(((PyObject *)__pyx_t_13));
 
11311
    __Pyx_INCREF(__pyx_v_parent_id);
 
11312
    PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_parent_id);
 
11313
    __Pyx_GIVEREF(__pyx_v_parent_id);
 
11314
    __Pyx_INCREF(Py_None);
 
11315
    PyTuple_SET_ITEM(__pyx_t_13, 1, Py_None);
 
11316
    __Pyx_GIVEREF(Py_None);
 
11317
 
 
11318
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1398
 
11319
 *                    (True, False),
 
11320
 *                    (parent_id, None),
 
11321
 *                    (self.utf8_decode(entry[0][1])[0], None),             # <<<<<<<<<<<<<<
 
11322
 *                    (_minikind_to_kind(source_minikind), None),
 
11323
 *                    (source_details[3], None)), True
 
11324
 */
 
11325
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11326
    __Pyx_GOTREF(__pyx_t_7);
 
11327
    __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_7, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11328
    __Pyx_GOTREF(__pyx_t_9);
 
11329
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
11330
    __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11331
    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
11332
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9);
 
11333
    __Pyx_GIVEREF(__pyx_t_9);
 
11334
    __pyx_t_9 = 0;
 
11335
    __pyx_t_9 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11336
    __Pyx_GOTREF(__pyx_t_9);
 
11337
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
11338
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_9, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11339
    __Pyx_GOTREF(__pyx_t_7);
 
11340
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
11341
    __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11342
    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
11343
    PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7);
 
11344
    __Pyx_GIVEREF(__pyx_t_7);
 
11345
    __Pyx_INCREF(Py_None);
 
11346
    PyTuple_SET_ITEM(__pyx_t_9, 1, Py_None);
 
11347
    __Pyx_GIVEREF(Py_None);
 
11348
    __pyx_t_7 = 0;
 
11349
 
 
11350
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1399
 
11351
 *                    (parent_id, None),
 
11352
 *                    (self.utf8_decode(entry[0][1])[0], None),
 
11353
 *                    (_minikind_to_kind(source_minikind), None),             # <<<<<<<<<<<<<<
 
11354
 *                    (source_details[3], None)), True
 
11355
 *         elif _versioned_minikind(source_minikind) and target_minikind == c'r':
 
11356
 */
 
11357
    __pyx_t_7 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_to_kind(__pyx_v_source_minikind); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11358
    __Pyx_GOTREF(__pyx_t_7);
 
11359
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11360
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
11361
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
 
11362
    __Pyx_GIVEREF(__pyx_t_7);
 
11363
    __Pyx_INCREF(Py_None);
 
11364
    PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
 
11365
    __Pyx_GIVEREF(Py_None);
 
11366
    __pyx_t_7 = 0;
 
11367
 
 
11368
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1400
 
11369
 *                    (self.utf8_decode(entry[0][1])[0], None),
 
11370
 *                    (_minikind_to_kind(source_minikind), None),
 
11371
 *                    (source_details[3], None)), True             # <<<<<<<<<<<<<<
 
11372
 *         elif _versioned_minikind(source_minikind) and target_minikind == c'r':
 
11373
 *             # a rename; could be a true rename, or a rename inherited from
 
11374
 */
 
11375
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_source_details, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11376
    __Pyx_GOTREF(__pyx_t_7);
 
11377
    __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11378
    __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
11379
    PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7);
 
11380
    __Pyx_GIVEREF(__pyx_t_7);
 
11381
    __Pyx_INCREF(Py_None);
 
11382
    PyTuple_SET_ITEM(__pyx_t_12, 1, Py_None);
 
11383
    __Pyx_GIVEREF(Py_None);
 
11384
    __pyx_t_7 = 0;
 
11385
    __pyx_t_7 = PyTuple_New(8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11386
    __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
11387
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
 
11388
    __Pyx_GIVEREF(__pyx_t_6);
 
11389
    PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_t_14));
 
11390
    __Pyx_GIVEREF(((PyObject *)__pyx_t_14));
 
11391
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_11);
 
11392
    __Pyx_GIVEREF(__pyx_t_11);
 
11393
    PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_t_3));
 
11394
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
11395
    PyTuple_SET_ITEM(__pyx_t_7, 4, ((PyObject *)__pyx_t_13));
 
11396
    __Pyx_GIVEREF(((PyObject *)__pyx_t_13));
 
11397
    PyTuple_SET_ITEM(__pyx_t_7, 5, ((PyObject *)__pyx_t_9));
 
11398
    __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
 
11399
    PyTuple_SET_ITEM(__pyx_t_7, 6, ((PyObject *)__pyx_t_1));
 
11400
    __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
 
11401
    PyTuple_SET_ITEM(__pyx_t_7, 7, ((PyObject *)__pyx_t_12));
 
11402
    __Pyx_GIVEREF(((PyObject *)__pyx_t_12));
 
11403
    __pyx_t_6 = 0;
 
11404
    __pyx_t_14 = 0;
 
11405
    __pyx_t_11 = 0;
 
11406
    __pyx_t_3 = 0;
 
11407
    __pyx_t_13 = 0;
 
11408
    __pyx_t_9 = 0;
 
11409
    __pyx_t_1 = 0;
 
11410
    __pyx_t_12 = 0;
 
11411
    __pyx_t_12 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11412
    __Pyx_GOTREF(__pyx_t_12);
 
11413
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11414
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
11415
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_7));
 
11416
    __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
 
11417
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_12);
 
11418
    __Pyx_GIVEREF(__pyx_t_12);
 
11419
    __pyx_t_7 = 0;
 
11420
    __pyx_t_12 = 0;
 
11421
    __pyx_r = ((PyObject *)__pyx_t_1);
 
11422
    __pyx_t_1 = 0;
 
11423
    goto __pyx_L0;
 
11424
    goto __pyx_L6;
 
11425
  }
 
11426
 
 
11427
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1401
 
11428
 *                    (_minikind_to_kind(source_minikind), None),
 
11429
 *                    (source_details[3], None)), True
 
11430
 *         elif _versioned_minikind(source_minikind) and target_minikind == c'r':             # <<<<<<<<<<<<<<
 
11431
 *             # a rename; could be a true rename, or a rename inherited from
 
11432
 *             # a renamed parent. TODO: handle this efficiently. Its not
 
11433
 */
 
11434
  if (__pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_source_minikind)) {
 
11435
    __pyx_t_8 = (__pyx_v_target_minikind == 'r');
 
11436
    __pyx_t_5 = __pyx_t_8;
 
11437
  } else {
 
11438
    __pyx_t_5 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__versioned_minikind(__pyx_v_source_minikind);
 
11439
  }
 
11440
  if (__pyx_t_5) {
 
11441
 
 
11442
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1406
 
11443
 *             # common case to rename dirs though, so a correct but slow
 
11444
 *             # implementation will do.
 
11445
 *             if (not self.doing_consistency_expansion and             # <<<<<<<<<<<<<<
 
11446
 *                 not osutils.is_inside_any(self.searched_specific_files,
 
11447
 *                     target_details[1])):
 
11448
 */
 
11449
    __pyx_t_5 = (!__pyx_v_self->doing_consistency_expansion);
 
11450
    if (__pyx_t_5) {
 
11451
 
 
11452
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1407
 
11453
 *             # implementation will do.
 
11454
 *             if (not self.doing_consistency_expansion and
 
11455
 *                 not osutils.is_inside_any(self.searched_specific_files,             # <<<<<<<<<<<<<<
 
11456
 *                     target_details[1])):
 
11457
 *                 self.search_specific_files.add(target_details[1])
 
11458
 */
 
11459
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__osutils); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11460
      __Pyx_GOTREF(__pyx_t_1);
 
11461
      __pyx_t_12 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__is_inside_any); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11462
      __Pyx_GOTREF(__pyx_t_12);
 
11463
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
11464
 
 
11465
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1408
 
11466
 *             if (not self.doing_consistency_expansion and
 
11467
 *                 not osutils.is_inside_any(self.searched_specific_files,
 
11468
 *                     target_details[1])):             # <<<<<<<<<<<<<<
 
11469
 *                 self.search_specific_files.add(target_details[1])
 
11470
 *                 # We don't expand the specific files parents list here as
 
11471
 */
 
11472
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_target_details, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11473
      __Pyx_GOTREF(__pyx_t_1);
 
11474
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11475
      __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
11476
      __Pyx_INCREF(__pyx_v_self->searched_specific_files);
 
11477
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self->searched_specific_files);
 
11478
      __Pyx_GIVEREF(__pyx_v_self->searched_specific_files);
 
11479
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
 
11480
      __Pyx_GIVEREF(__pyx_t_1);
 
11481
      __pyx_t_1 = 0;
 
11482
      __pyx_t_1 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11483
      __Pyx_GOTREF(__pyx_t_1);
 
11484
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
11485
      __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
 
11486
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11487
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
11488
      __pyx_t_2 = (!__pyx_t_8);
 
11489
      __pyx_t_8 = __pyx_t_2;
 
11490
    } else {
 
11491
      __pyx_t_8 = __pyx_t_5;
 
11492
    }
 
11493
    if (__pyx_t_8) {
 
11494
 
 
11495
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1409
 
11496
 *                 not osutils.is_inside_any(self.searched_specific_files,
 
11497
 *                     target_details[1])):
 
11498
 *                 self.search_specific_files.add(target_details[1])             # <<<<<<<<<<<<<<
 
11499
 *                 # We don't expand the specific files parents list here as
 
11500
 *                 # the path is absent in target and won't create a delta with
 
11501
 */
 
11502
      __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->search_specific_files, __pyx_n_s__add); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11503
      __Pyx_GOTREF(__pyx_t_1);
 
11504
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_target_details, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11505
      __Pyx_GOTREF(__pyx_t_7);
 
11506
      __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11507
      __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
11508
      PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7);
 
11509
      __Pyx_GIVEREF(__pyx_t_7);
 
11510
      __pyx_t_7 = 0;
 
11511
      __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11512
      __Pyx_GOTREF(__pyx_t_7);
 
11513
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
11514
      __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
 
11515
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
11516
      goto __pyx_L56;
 
11517
    }
 
11518
    __pyx_L56:;
 
11519
    goto __pyx_L6;
 
11520
  }
 
11521
 
 
11522
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1413
 
11523
 *                 # the path is absent in target and won't create a delta with
 
11524
 *                 # missing parent.
 
11525
 *         elif ((source_minikind == c'r' or source_minikind == c'a') and             # <<<<<<<<<<<<<<
 
11526
 *               (target_minikind == c'r' or target_minikind == c'a')):
 
11527
 *             # neither of the selected trees contain this path,
 
11528
 */
 
11529
  switch (__pyx_v_source_minikind) {
 
11530
    case 'r':
 
11531
    case 'a':
 
11532
    __pyx_t_8 = 1;
 
11533
    break;
 
11534
    default:
 
11535
    __pyx_t_8 = 0;
 
11536
    break;
 
11537
  }
 
11538
  if (__pyx_t_8) {
 
11539
 
 
11540
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1414
 
11541
 *                 # missing parent.
 
11542
 *         elif ((source_minikind == c'r' or source_minikind == c'a') and
 
11543
 *               (target_minikind == c'r' or target_minikind == c'a')):             # <<<<<<<<<<<<<<
 
11544
 *             # neither of the selected trees contain this path,
 
11545
 *             # so skip over it. This is not currently directly tested, but
 
11546
 */
 
11547
    switch (__pyx_v_target_minikind) {
 
11548
      case 'r':
 
11549
      case 'a':
 
11550
      __pyx_t_5 = 1;
 
11551
      break;
 
11552
      default:
 
11553
      __pyx_t_5 = 0;
 
11554
      break;
 
11555
    }
 
11556
    __pyx_t_2 = __pyx_t_5;
 
11557
  } else {
 
11558
    __pyx_t_2 = __pyx_t_8;
 
11559
  }
 
11560
  if (__pyx_t_2) {
 
11561
    goto __pyx_L6;
 
11562
  }
 
11563
  /*else*/ {
 
11564
 
 
11565
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1422
 
11566
 *             raise AssertionError("don't know how to compare "
 
11567
 *                 "source_minikind=%r, target_minikind=%r"
 
11568
 *                 % (source_minikind, target_minikind))             # <<<<<<<<<<<<<<
 
11569
 *             ## import pdb;pdb.set_trace()
 
11570
 *         return None, None
 
11571
 */
 
11572
    __pyx_t_7 = PyInt_FromLong(__pyx_v_source_minikind); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11573
    __Pyx_GOTREF(__pyx_t_7);
 
11574
    __pyx_t_12 = PyInt_FromLong(__pyx_v_target_minikind); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11575
    __Pyx_GOTREF(__pyx_t_12);
 
11576
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11577
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
11578
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
 
11579
    __Pyx_GIVEREF(__pyx_t_7);
 
11580
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_12);
 
11581
    __Pyx_GIVEREF(__pyx_t_12);
 
11582
    __pyx_t_7 = 0;
 
11583
    __pyx_t_12 = 0;
 
11584
    __pyx_t_12 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_42), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11585
    __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
11586
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
11587
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11588
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
11589
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_12));
 
11590
    __Pyx_GIVEREF(((PyObject *)__pyx_t_12));
 
11591
    __pyx_t_12 = 0;
 
11592
    __pyx_t_12 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11593
    __Pyx_GOTREF(__pyx_t_12);
 
11594
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
11595
    __Pyx_Raise(__pyx_t_12, 0, 0);
 
11596
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
11597
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11598
  }
 
11599
  __pyx_L6:;
 
11600
 
 
11601
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1424
 
11602
 *                 % (source_minikind, target_minikind))
 
11603
 *             ## import pdb;pdb.set_trace()
 
11604
 *         return None, None             # <<<<<<<<<<<<<<
 
11605
 * 
 
11606
 *     def __iter__(self):
 
11607
 */
 
11608
  __Pyx_XDECREF(__pyx_r);
 
11609
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_43));
 
11610
  __pyx_r = ((PyObject *)__pyx_k_tuple_43);
 
11611
  goto __pyx_L0;
 
11612
 
 
11613
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
11614
  goto __pyx_L0;
 
11615
  __pyx_L1_error:;
 
11616
  __Pyx_XDECREF(__pyx_t_1);
 
11617
  __Pyx_XDECREF(__pyx_t_3);
 
11618
  __Pyx_XDECREF(__pyx_t_6);
 
11619
  __Pyx_XDECREF(__pyx_t_7);
 
11620
  __Pyx_XDECREF(__pyx_t_9);
 
11621
  __Pyx_XDECREF(__pyx_t_11);
 
11622
  __Pyx_XDECREF(__pyx_t_12);
 
11623
  __Pyx_XDECREF(__pyx_t_13);
 
11624
  __Pyx_XDECREF(__pyx_t_14);
 
11625
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._process_entry");
 
11626
  __pyx_r = 0;
 
11627
  __pyx_L0:;
 
11628
  __Pyx_DECREF(__pyx_v_file_id);
 
11629
  __Pyx_DECREF(__pyx_v_details_list);
 
11630
  __Pyx_DECREF(__pyx_v_source_details);
 
11631
  __Pyx_DECREF(__pyx_v_target_details);
 
11632
  __Pyx_DECREF(__pyx_v_link_or_sha1);
 
11633
  __Pyx_DECREF(__pyx_v_old_dirname);
 
11634
  __Pyx_DECREF(__pyx_v_old_basename);
 
11635
  __Pyx_DECREF(__pyx_v_old_path);
 
11636
  __Pyx_DECREF(__pyx_v_path);
 
11637
  __Pyx_DECREF(__pyx_v_old_entry);
 
11638
  __Pyx_DECREF(__pyx_v_target_kind);
 
11639
  __Pyx_DECREF(__pyx_v_target_exec);
 
11640
  __Pyx_DECREF(__pyx_v_statvalue);
 
11641
  __Pyx_DECREF(__pyx_v_source_parent_id);
 
11642
  __Pyx_DECREF(__pyx_v__);
 
11643
  __Pyx_DECREF(__pyx_v_source_parent_entry);
 
11644
  __Pyx_DECREF(__pyx_v_new_dirname);
 
11645
  __Pyx_DECREF(__pyx_v_target_parent_id);
 
11646
  __Pyx_DECREF(__pyx_v_target_parent_entry);
 
11647
  __Pyx_DECREF(__pyx_v_source_exec);
 
11648
  __Pyx_DECREF(__pyx_v_changed);
 
11649
  __Pyx_DECREF(__pyx_v_old_path_u);
 
11650
  __Pyx_DECREF(__pyx_v_path_u);
 
11651
  __Pyx_DECREF(__pyx_v_source_kind);
 
11652
  __Pyx_DECREF(__pyx_v_parent_entry);
 
11653
  __Pyx_DECREF(__pyx_v_parent_id);
 
11654
  __Pyx_XGIVEREF(__pyx_r);
 
11655
  __Pyx_RefNannyFinishContext();
 
11656
  return __pyx_r;
 
11657
}
 
11658
 
 
11659
/* "bzrlib/_dirstate_helpers_pyx.pyx":1426
 
11660
 *         return None, None
 
11661
 * 
 
11662
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 
11663
 *         return self
 
11664
 * 
 
11665
 */
 
11666
 
 
11667
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_1__iter__(PyObject *__pyx_v_self); /*proto*/
 
11668
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_1__iter__(PyObject *__pyx_v_self) {
 
11669
  PyObject *__pyx_r = NULL;
 
11670
  __Pyx_RefNannySetupContext("__iter__");
 
11671
 
 
11672
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1427
 
11673
 * 
 
11674
 *     def __iter__(self):
 
11675
 *         return self             # <<<<<<<<<<<<<<
 
11676
 * 
 
11677
 *     def iter_changes(self):
 
11678
 */
 
11679
  __Pyx_XDECREF(__pyx_r);
 
11680
  __Pyx_INCREF(__pyx_v_self);
 
11681
  __pyx_r = __pyx_v_self;
 
11682
  goto __pyx_L0;
 
11683
 
 
11684
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
11685
  __pyx_L0:;
 
11686
  __Pyx_XGIVEREF(__pyx_r);
 
11687
  __Pyx_RefNannyFinishContext();
 
11688
  return __pyx_r;
 
11689
}
 
11690
 
 
11691
/* "bzrlib/_dirstate_helpers_pyx.pyx":1429
 
11692
 *         return self
 
11693
 * 
 
11694
 *     def iter_changes(self):             # <<<<<<<<<<<<<<
 
11695
 *         return self
 
11696
 * 
 
11697
 */
 
11698
 
 
11699
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_2iter_changes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
 
11700
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_2iter_changes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
 
11701
  PyObject *__pyx_r = NULL;
 
11702
  __Pyx_RefNannySetupContext("iter_changes");
 
11703
 
 
11704
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1430
 
11705
 * 
 
11706
 *     def iter_changes(self):
 
11707
 *         return self             # <<<<<<<<<<<<<<
 
11708
 * 
 
11709
 *     cdef int _gather_result_for_consistency(self, result) except -1:
 
11710
 */
 
11711
  __Pyx_XDECREF(__pyx_r);
 
11712
  __Pyx_INCREF(__pyx_v_self);
 
11713
  __pyx_r = __pyx_v_self;
 
11714
  goto __pyx_L0;
 
11715
 
 
11716
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
11717
  __pyx_L0:;
 
11718
  __Pyx_XGIVEREF(__pyx_r);
 
11719
  __Pyx_RefNannyFinishContext();
 
11720
  return __pyx_r;
 
11721
}
 
11722
 
 
11723
/* "bzrlib/_dirstate_helpers_pyx.pyx":1432
 
11724
 *         return self
 
11725
 * 
 
11726
 *     cdef int _gather_result_for_consistency(self, result) except -1:             # <<<<<<<<<<<<<<
 
11727
 *         """Check a result we will yield to make sure we are consistent later.
 
11728
 * 
 
11729
 */
 
11730
 
 
11731
static  int __pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__gather_result_for_consistency(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self, PyObject *__pyx_v_result) {
 
11732
  PyObject *__pyx_v_new_path;
 
11733
  int __pyx_r;
 
11734
  int __pyx_t_1;
 
11735
  PyObject *__pyx_t_2 = NULL;
 
11736
  int __pyx_t_3;
 
11737
  int __pyx_t_4;
 
11738
  PyObject *__pyx_t_5 = NULL;
 
11739
  PyObject *__pyx_t_6 = NULL;
 
11740
  PyObject *__pyx_t_7 = NULL;
 
11741
  __Pyx_RefNannySetupContext("_gather_result_for_consistency");
 
11742
  __pyx_v_new_path = Py_None; __Pyx_INCREF(Py_None);
 
11743
 
 
11744
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1439
 
11745
 *         :param result: A result tuple.
 
11746
 *         """
 
11747
 *         if not self.partial or not result[0]:             # <<<<<<<<<<<<<<
 
11748
 *             return 0
 
11749
 *         self.seen_ids.add(result[0])
 
11750
 */
 
11751
  __pyx_t_1 = (!__pyx_v_self->partial);
 
11752
  if (!__pyx_t_1) {
 
11753
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_result, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11754
    __Pyx_GOTREF(__pyx_t_2);
 
11755
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11756
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
11757
    __pyx_t_4 = (!__pyx_t_3);
 
11758
    __pyx_t_3 = __pyx_t_4;
 
11759
  } else {
 
11760
    __pyx_t_3 = __pyx_t_1;
 
11761
  }
 
11762
  if (__pyx_t_3) {
 
11763
 
 
11764
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1440
 
11765
 *         """
 
11766
 *         if not self.partial or not result[0]:
 
11767
 *             return 0             # <<<<<<<<<<<<<<
 
11768
 *         self.seen_ids.add(result[0])
 
11769
 *         new_path = result[1][1]
 
11770
 */
 
11771
    __pyx_r = 0;
 
11772
    goto __pyx_L0;
 
11773
    goto __pyx_L3;
 
11774
  }
 
11775
  __pyx_L3:;
 
11776
 
 
11777
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1441
 
11778
 *         if not self.partial or not result[0]:
 
11779
 *             return 0
 
11780
 *         self.seen_ids.add(result[0])             # <<<<<<<<<<<<<<
 
11781
 *         new_path = result[1][1]
 
11782
 *         if new_path:
 
11783
 */
 
11784
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->seen_ids, __pyx_n_s__add); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11785
  __Pyx_GOTREF(__pyx_t_2);
 
11786
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_result, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11787
  __Pyx_GOTREF(__pyx_t_5);
 
11788
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11789
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
11790
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
 
11791
  __Pyx_GIVEREF(__pyx_t_5);
 
11792
  __pyx_t_5 = 0;
 
11793
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11794
  __Pyx_GOTREF(__pyx_t_5);
 
11795
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
11796
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
11797
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
11798
 
 
11799
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1442
 
11800
 *             return 0
 
11801
 *         self.seen_ids.add(result[0])
 
11802
 *         new_path = result[1][1]             # <<<<<<<<<<<<<<
 
11803
 *         if new_path:
 
11804
 *             # Not the root and not a delete: queue up the parents of the path.
 
11805
 */
 
11806
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_result, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11807
  __Pyx_GOTREF(__pyx_t_5);
 
11808
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11809
  __Pyx_GOTREF(__pyx_t_6);
 
11810
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
11811
  __Pyx_DECREF(__pyx_v_new_path);
 
11812
  __pyx_v_new_path = __pyx_t_6;
 
11813
  __pyx_t_6 = 0;
 
11814
 
 
11815
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1443
 
11816
 *         self.seen_ids.add(result[0])
 
11817
 *         new_path = result[1][1]
 
11818
 *         if new_path:             # <<<<<<<<<<<<<<
 
11819
 *             # Not the root and not a delete: queue up the parents of the path.
 
11820
 *             self.search_specific_file_parents.update(
 
11821
 */
 
11822
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_new_path); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11823
  if (__pyx_t_3) {
 
11824
 
 
11825
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1445
 
11826
 *         if new_path:
 
11827
 *             # Not the root and not a delete: queue up the parents of the path.
 
11828
 *             self.search_specific_file_parents.update(             # <<<<<<<<<<<<<<
 
11829
 *                 osutils.parent_directories(new_path.encode('utf8')))
 
11830
 *             # Add the root directory which parent_directories does not
 
11831
 */
 
11832
    __pyx_t_6 = PyObject_GetAttr(__pyx_v_self->search_specific_file_parents, __pyx_n_s__update); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11833
    __Pyx_GOTREF(__pyx_t_6);
 
11834
 
 
11835
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1446
 
11836
 *             # Not the root and not a delete: queue up the parents of the path.
 
11837
 *             self.search_specific_file_parents.update(
 
11838
 *                 osutils.parent_directories(new_path.encode('utf8')))             # <<<<<<<<<<<<<<
 
11839
 *             # Add the root directory which parent_directories does not
 
11840
 *             # provide.
 
11841
 */
 
11842
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__osutils); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11843
    __Pyx_GOTREF(__pyx_t_5);
 
11844
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__parent_directories); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11845
    __Pyx_GOTREF(__pyx_t_2);
 
11846
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
11847
    __pyx_t_5 = PyObject_GetAttr(__pyx_v_new_path, __pyx_n_s__encode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11848
    __Pyx_GOTREF(__pyx_t_5);
 
11849
    __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_44), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11850
    __Pyx_GOTREF(__pyx_t_7);
 
11851
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
11852
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11853
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
 
11854
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
 
11855
    __Pyx_GIVEREF(__pyx_t_7);
 
11856
    __pyx_t_7 = 0;
 
11857
    __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11858
    __Pyx_GOTREF(__pyx_t_7);
 
11859
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
11860
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
 
11861
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11862
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
 
11863
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
 
11864
    __Pyx_GIVEREF(__pyx_t_7);
 
11865
    __pyx_t_7 = 0;
 
11866
    __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11867
    __Pyx_GOTREF(__pyx_t_7);
 
11868
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
11869
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
 
11870
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
11871
 
 
11872
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1449
 
11873
 *             # Add the root directory which parent_directories does not
 
11874
 *             # provide.
 
11875
 *             self.search_specific_file_parents.add('')             # <<<<<<<<<<<<<<
 
11876
 *         return 0
 
11877
 * 
 
11878
 */
 
11879
    __pyx_t_7 = PyObject_GetAttr(__pyx_v_self->search_specific_file_parents, __pyx_n_s__add); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11880
    __Pyx_GOTREF(__pyx_t_7);
 
11881
    __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11882
    __Pyx_GOTREF(__pyx_t_5);
 
11883
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
11884
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
11885
    goto __pyx_L4;
 
11886
  }
 
11887
  __pyx_L4:;
 
11888
 
 
11889
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1450
 
11890
 *             # provide.
 
11891
 *             self.search_specific_file_parents.add('')
 
11892
 *         return 0             # <<<<<<<<<<<<<<
 
11893
 * 
 
11894
 *     cdef int _update_current_block(self) except -1:
 
11895
 */
 
11896
  __pyx_r = 0;
 
11897
  goto __pyx_L0;
 
11898
 
 
11899
  __pyx_r = 0;
 
11900
  goto __pyx_L0;
 
11901
  __pyx_L1_error:;
 
11902
  __Pyx_XDECREF(__pyx_t_2);
 
11903
  __Pyx_XDECREF(__pyx_t_5);
 
11904
  __Pyx_XDECREF(__pyx_t_6);
 
11905
  __Pyx_XDECREF(__pyx_t_7);
 
11906
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._gather_result_for_consistency");
 
11907
  __pyx_r = -1;
 
11908
  __pyx_L0:;
 
11909
  __Pyx_DECREF(__pyx_v_new_path);
 
11910
  __Pyx_RefNannyFinishContext();
 
11911
  return __pyx_r;
 
11912
}
 
11913
 
 
11914
/* "bzrlib/_dirstate_helpers_pyx.pyx":1452
 
11915
 *         return 0
 
11916
 * 
 
11917
 *     cdef int _update_current_block(self) except -1:             # <<<<<<<<<<<<<<
 
11918
 *         if (self.block_index < len(self.state._dirblocks) and
 
11919
 *             osutils.is_inside(self.current_root, self.state._dirblocks[self.block_index][0])):
 
11920
 */
 
11921
 
 
11922
static  int __pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__update_current_block(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self) {
 
11923
  int __pyx_r;
 
11924
  PyObject *__pyx_t_1 = NULL;
 
11925
  Py_ssize_t __pyx_t_2;
 
11926
  int __pyx_t_3;
 
11927
  PyObject *__pyx_t_4 = NULL;
 
11928
  PyObject *__pyx_t_5 = NULL;
 
11929
  int __pyx_t_6;
 
11930
  int __pyx_t_7;
 
11931
  __Pyx_RefNannySetupContext("_update_current_block");
 
11932
 
 
11933
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1453
 
11934
 * 
 
11935
 *     cdef int _update_current_block(self) except -1:
 
11936
 *         if (self.block_index < len(self.state._dirblocks) and             # <<<<<<<<<<<<<<
 
11937
 *             osutils.is_inside(self.current_root, self.state._dirblocks[self.block_index][0])):
 
11938
 *             self.current_block = self.state._dirblocks[self.block_index]
 
11939
 */
 
11940
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___dirblocks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11941
  __Pyx_GOTREF(__pyx_t_1);
 
11942
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11943
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
11944
  __pyx_t_3 = (__pyx_v_self->block_index < __pyx_t_2);
 
11945
  if (__pyx_t_3) {
 
11946
 
 
11947
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1454
 
11948
 *     cdef int _update_current_block(self) except -1:
 
11949
 *         if (self.block_index < len(self.state._dirblocks) and
 
11950
 *             osutils.is_inside(self.current_root, self.state._dirblocks[self.block_index][0])):             # <<<<<<<<<<<<<<
 
11951
 *             self.current_block = self.state._dirblocks[self.block_index]
 
11952
 *             self.current_block_list = self.current_block[1]
 
11953
 */
 
11954
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__osutils); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11955
    __Pyx_GOTREF(__pyx_t_1);
 
11956
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__is_inside); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11957
    __Pyx_GOTREF(__pyx_t_4);
 
11958
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
11959
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___dirblocks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11960
    __Pyx_GOTREF(__pyx_t_1);
 
11961
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_self->block_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11962
    __Pyx_GOTREF(__pyx_t_5);
 
11963
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
11964
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11965
    __Pyx_GOTREF(__pyx_t_1);
 
11966
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
11967
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11968
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
 
11969
    __Pyx_INCREF(__pyx_v_self->current_root);
 
11970
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->current_root);
 
11971
    __Pyx_GIVEREF(__pyx_v_self->current_root);
 
11972
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
 
11973
    __Pyx_GIVEREF(__pyx_t_1);
 
11974
    __pyx_t_1 = 0;
 
11975
    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11976
    __Pyx_GOTREF(__pyx_t_1);
 
11977
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
11978
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
 
11979
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11980
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
11981
    __pyx_t_7 = __pyx_t_6;
 
11982
  } else {
 
11983
    __pyx_t_7 = __pyx_t_3;
 
11984
  }
 
11985
  if (__pyx_t_7) {
 
11986
 
 
11987
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1455
 
11988
 *         if (self.block_index < len(self.state._dirblocks) and
 
11989
 *             osutils.is_inside(self.current_root, self.state._dirblocks[self.block_index][0])):
 
11990
 *             self.current_block = self.state._dirblocks[self.block_index]             # <<<<<<<<<<<<<<
 
11991
 *             self.current_block_list = self.current_block[1]
 
11992
 *             self.current_block_pos = 0
 
11993
 */
 
11994
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___dirblocks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11995
    __Pyx_GOTREF(__pyx_t_1);
 
11996
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_self->block_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
11997
    __Pyx_GOTREF(__pyx_t_5);
 
11998
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
11999
    __Pyx_GIVEREF(__pyx_t_5);
 
12000
    __Pyx_GOTREF(__pyx_v_self->current_block);
 
12001
    __Pyx_DECREF(__pyx_v_self->current_block);
 
12002
    __pyx_v_self->current_block = __pyx_t_5;
 
12003
    __pyx_t_5 = 0;
 
12004
 
 
12005
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1456
 
12006
 *             osutils.is_inside(self.current_root, self.state._dirblocks[self.block_index][0])):
 
12007
 *             self.current_block = self.state._dirblocks[self.block_index]
 
12008
 *             self.current_block_list = self.current_block[1]             # <<<<<<<<<<<<<<
 
12009
 *             self.current_block_pos = 0
 
12010
 *         else:
 
12011
 */
 
12012
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_self->current_block, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12013
    __Pyx_GOTREF(__pyx_t_5);
 
12014
    __Pyx_GIVEREF(__pyx_t_5);
 
12015
    __Pyx_GOTREF(__pyx_v_self->current_block_list);
 
12016
    __Pyx_DECREF(__pyx_v_self->current_block_list);
 
12017
    __pyx_v_self->current_block_list = __pyx_t_5;
 
12018
    __pyx_t_5 = 0;
 
12019
 
 
12020
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1457
 
12021
 *             self.current_block = self.state._dirblocks[self.block_index]
 
12022
 *             self.current_block_list = self.current_block[1]
 
12023
 *             self.current_block_pos = 0             # <<<<<<<<<<<<<<
 
12024
 *         else:
 
12025
 *             self.current_block = None
 
12026
 */
 
12027
    __pyx_v_self->current_block_pos = 0;
 
12028
    goto __pyx_L3;
 
12029
  }
 
12030
  /*else*/ {
 
12031
 
 
12032
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1459
 
12033
 *             self.current_block_pos = 0
 
12034
 *         else:
 
12035
 *             self.current_block = None             # <<<<<<<<<<<<<<
 
12036
 *             self.current_block_list = None
 
12037
 *         return 0
 
12038
 */
 
12039
    __Pyx_INCREF(Py_None);
 
12040
    __Pyx_GIVEREF(Py_None);
 
12041
    __Pyx_GOTREF(__pyx_v_self->current_block);
 
12042
    __Pyx_DECREF(__pyx_v_self->current_block);
 
12043
    __pyx_v_self->current_block = Py_None;
 
12044
 
 
12045
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1460
 
12046
 *         else:
 
12047
 *             self.current_block = None
 
12048
 *             self.current_block_list = None             # <<<<<<<<<<<<<<
 
12049
 *         return 0
 
12050
 * 
 
12051
 */
 
12052
    __Pyx_INCREF(Py_None);
 
12053
    __Pyx_GIVEREF(Py_None);
 
12054
    __Pyx_GOTREF(__pyx_v_self->current_block_list);
 
12055
    __Pyx_DECREF(__pyx_v_self->current_block_list);
 
12056
    __pyx_v_self->current_block_list = Py_None;
 
12057
  }
 
12058
  __pyx_L3:;
 
12059
 
 
12060
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1461
 
12061
 *             self.current_block = None
 
12062
 *             self.current_block_list = None
 
12063
 *         return 0             # <<<<<<<<<<<<<<
 
12064
 * 
 
12065
 *     def __next__(self):
 
12066
 */
 
12067
  __pyx_r = 0;
 
12068
  goto __pyx_L0;
 
12069
 
 
12070
  __pyx_r = 0;
 
12071
  goto __pyx_L0;
 
12072
  __pyx_L1_error:;
 
12073
  __Pyx_XDECREF(__pyx_t_1);
 
12074
  __Pyx_XDECREF(__pyx_t_4);
 
12075
  __Pyx_XDECREF(__pyx_t_5);
 
12076
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._update_current_block");
 
12077
  __pyx_r = -1;
 
12078
  __pyx_L0:;
 
12079
  __Pyx_RefNannyFinishContext();
 
12080
  return __pyx_r;
 
12081
}
 
12082
 
 
12083
/* "bzrlib/_dirstate_helpers_pyx.pyx":1463
 
12084
 *         return 0
 
12085
 * 
 
12086
 *     def __next__(self):             # <<<<<<<<<<<<<<
 
12087
 *         # Simple thunk to allow tail recursion without pyrex confusion
 
12088
 *         return self._iter_next()
 
12089
 */
 
12090
 
 
12091
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_3__next__(PyObject *__pyx_v_self); /*proto*/
 
12092
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_3__next__(PyObject *__pyx_v_self) {
 
12093
  PyObject *__pyx_r = NULL;
 
12094
  PyObject *__pyx_t_1 = NULL;
 
12095
  __Pyx_RefNannySetupContext("__next__");
 
12096
 
 
12097
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1465
 
12098
 *     def __next__(self):
 
12099
 *         # Simple thunk to allow tail recursion without pyrex confusion
 
12100
 *         return self._iter_next()             # <<<<<<<<<<<<<<
 
12101
 * 
 
12102
 *     cdef _iter_next(self):
 
12103
 */
 
12104
  __Pyx_XDECREF(__pyx_r);
 
12105
  __pyx_t_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->__pyx_vtab)->_iter_next(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12106
  __Pyx_GOTREF(__pyx_t_1);
 
12107
  __pyx_r = __pyx_t_1;
 
12108
  __pyx_t_1 = 0;
 
12109
  goto __pyx_L0;
 
12110
 
 
12111
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
12112
  goto __pyx_L0;
 
12113
  __pyx_L1_error:;
 
12114
  __Pyx_XDECREF(__pyx_t_1);
 
12115
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC.__next__");
 
12116
  __pyx_r = NULL;
 
12117
  __pyx_L0:;
 
12118
  __Pyx_XGIVEREF(__pyx_r);
 
12119
  __Pyx_RefNannyFinishContext();
 
12120
  return __pyx_r;
 
12121
}
 
12122
 
 
12123
/* "bzrlib/_dirstate_helpers_pyx.pyx":1467
 
12124
 *         return self._iter_next()
 
12125
 * 
 
12126
 *     cdef _iter_next(self):             # <<<<<<<<<<<<<<
 
12127
 *         """Iterate over the changes."""
 
12128
 *         # This function single steps through an iterator. As such while loops
 
12129
 */
 
12130
 
 
12131
static  PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__iter_next(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self) {
 
12132
  PyObject *__pyx_v_current_dirname;
 
12133
  PyObject *__pyx_v_current_blockname;
 
12134
  char *__pyx_v_current_dirname_c;
 
12135
  char *__pyx_v_current_blockname_c;
 
12136
  int __pyx_v_path_handled;
 
12137
  PyObject *__pyx_v_searched_specific_files;
 
12138
  PyObject *__pyx_v_entry;
 
12139
  PyObject *__pyx_v_result;
 
12140
  PyObject *__pyx_v_changed;
 
12141
  PyObject *__pyx_v__;
 
12142
  PyObject *__pyx_v_root_stat;
 
12143
  PyObject *__pyx_v_e;
 
12144
  PyObject *__pyx_v_new_executable;
 
12145
  PyObject *__pyx_v_e_winerror;
 
12146
  PyObject *__pyx_v_win_errors;
 
12147
  PyObject *__pyx_v_bzr_index;
 
12148
  PyObject *__pyx_v_initial_key;
 
12149
  PyObject *__pyx_v_current_path_info;
 
12150
  PyObject *__pyx_v_current_entry;
 
12151
  PyObject *__pyx_r = NULL;
 
12152
  int __pyx_t_1;
 
12153
  PyObject *__pyx_t_2 = NULL;
 
12154
  PyObject *__pyx_t_3 = NULL;
 
12155
  PyObject *__pyx_t_4 = NULL;
 
12156
  PyObject *__pyx_t_5 = NULL;
 
12157
  int __pyx_t_6;
 
12158
  int __pyx_t_7;
 
12159
  Py_ssize_t __pyx_t_8;
 
12160
  PyObject *__pyx_t_9 = NULL;
 
12161
  PyObject *__pyx_t_10 = NULL;
 
12162
  int __pyx_t_11;
 
12163
  PyObject *__pyx_t_12 = NULL;
 
12164
  int __pyx_t_13;
 
12165
  __Pyx_RefNannySetupContext("_iter_next");
 
12166
  __pyx_v_current_dirname = Py_None; __Pyx_INCREF(Py_None);
 
12167
  __pyx_v_current_blockname = Py_None; __Pyx_INCREF(Py_None);
 
12168
  __pyx_v_searched_specific_files = Py_None; __Pyx_INCREF(Py_None);
 
12169
  __pyx_v_entry = Py_None; __Pyx_INCREF(Py_None);
 
12170
  __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
 
12171
  __pyx_v_changed = Py_None; __Pyx_INCREF(Py_None);
 
12172
  __pyx_v__ = Py_None; __Pyx_INCREF(Py_None);
 
12173
  __pyx_v_root_stat = Py_None; __Pyx_INCREF(Py_None);
 
12174
  __pyx_v_e = Py_None; __Pyx_INCREF(Py_None);
 
12175
  __pyx_v_new_executable = Py_None; __Pyx_INCREF(Py_None);
 
12176
  __pyx_v_e_winerror = Py_None; __Pyx_INCREF(Py_None);
 
12177
  __pyx_v_win_errors = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
 
12178
  __pyx_v_bzr_index = Py_None; __Pyx_INCREF(Py_None);
 
12179
  __pyx_v_initial_key = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
 
12180
  __pyx_v_current_path_info = Py_None; __Pyx_INCREF(Py_None);
 
12181
  __pyx_v_current_entry = Py_None; __Pyx_INCREF(Py_None);
 
12182
 
 
12183
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1519
 
12184
 *         cdef int advance_entry, advance_path
 
12185
 *         cdef int path_handled
 
12186
 *         searched_specific_files = self.searched_specific_files             # <<<<<<<<<<<<<<
 
12187
 *         # Are we walking a root?
 
12188
 *         while self.root_entries_pos < self.root_entries_len:
 
12189
 */
 
12190
  __Pyx_INCREF(__pyx_v_self->searched_specific_files);
 
12191
  __Pyx_DECREF(__pyx_v_searched_specific_files);
 
12192
  __pyx_v_searched_specific_files = __pyx_v_self->searched_specific_files;
 
12193
 
 
12194
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1521
 
12195
 *         searched_specific_files = self.searched_specific_files
 
12196
 *         # Are we walking a root?
 
12197
 *         while self.root_entries_pos < self.root_entries_len:             # <<<<<<<<<<<<<<
 
12198
 *             entry = self.root_entries[self.root_entries_pos]
 
12199
 *             self.root_entries_pos = self.root_entries_pos + 1
 
12200
 */
 
12201
  while (1) {
 
12202
    __pyx_t_1 = (__pyx_v_self->root_entries_pos < __pyx_v_self->root_entries_len);
 
12203
    if (!__pyx_t_1) break;
 
12204
 
 
12205
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1522
 
12206
 *         # Are we walking a root?
 
12207
 *         while self.root_entries_pos < self.root_entries_len:
 
12208
 *             entry = self.root_entries[self.root_entries_pos]             # <<<<<<<<<<<<<<
 
12209
 *             self.root_entries_pos = self.root_entries_pos + 1
 
12210
 *             result, changed = self._process_entry(entry, self.root_dir_info)
 
12211
 */
 
12212
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_self->root_entries, __pyx_v_self->root_entries_pos, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12213
    __Pyx_GOTREF(__pyx_t_2);
 
12214
    __Pyx_DECREF(__pyx_v_entry);
 
12215
    __pyx_v_entry = __pyx_t_2;
 
12216
    __pyx_t_2 = 0;
 
12217
 
 
12218
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1523
 
12219
 *         while self.root_entries_pos < self.root_entries_len:
 
12220
 *             entry = self.root_entries[self.root_entries_pos]
 
12221
 *             self.root_entries_pos = self.root_entries_pos + 1             # <<<<<<<<<<<<<<
 
12222
 *             result, changed = self._process_entry(entry, self.root_dir_info)
 
12223
 *             if changed is not None:
 
12224
 */
 
12225
    __pyx_v_self->root_entries_pos = (__pyx_v_self->root_entries_pos + 1);
 
12226
 
 
12227
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1524
 
12228
 *             entry = self.root_entries[self.root_entries_pos]
 
12229
 *             self.root_entries_pos = self.root_entries_pos + 1
 
12230
 *             result, changed = self._process_entry(entry, self.root_dir_info)             # <<<<<<<<<<<<<<
 
12231
 *             if changed is not None:
 
12232
 *                 if changed:
 
12233
 */
 
12234
    __pyx_t_2 = __pyx_v_self->root_dir_info;
 
12235
    __Pyx_INCREF(__pyx_t_2);
 
12236
    __pyx_t_3 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self, __pyx_v_entry, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12237
    __Pyx_GOTREF(__pyx_t_3);
 
12238
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
12239
    if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
 
12240
      PyObject* tuple = __pyx_t_3;
 
12241
      __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
 
12242
      __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
 
12243
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12244
      __Pyx_DECREF(__pyx_v_result);
 
12245
      __pyx_v_result = __pyx_t_2;
 
12246
      __pyx_t_2 = 0;
 
12247
      __Pyx_DECREF(__pyx_v_changed);
 
12248
      __pyx_v_changed = __pyx_t_4;
 
12249
      __pyx_t_4 = 0;
 
12250
    } else {
 
12251
      __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12252
      __Pyx_GOTREF(__pyx_t_5);
 
12253
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12254
      __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12255
      __Pyx_GOTREF(__pyx_t_2);
 
12256
      __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12257
      __Pyx_GOTREF(__pyx_t_4);
 
12258
      if (__Pyx_EndUnpack(__pyx_t_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12259
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
12260
      __Pyx_DECREF(__pyx_v_result);
 
12261
      __pyx_v_result = __pyx_t_2;
 
12262
      __pyx_t_2 = 0;
 
12263
      __Pyx_DECREF(__pyx_v_changed);
 
12264
      __pyx_v_changed = __pyx_t_4;
 
12265
      __pyx_t_4 = 0;
 
12266
    }
 
12267
 
 
12268
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1525
 
12269
 *             self.root_entries_pos = self.root_entries_pos + 1
 
12270
 *             result, changed = self._process_entry(entry, self.root_dir_info)
 
12271
 *             if changed is not None:             # <<<<<<<<<<<<<<
 
12272
 *                 if changed:
 
12273
 *                     self._gather_result_for_consistency(result)
 
12274
 */
 
12275
    __pyx_t_1 = (__pyx_v_changed != Py_None);
 
12276
    if (__pyx_t_1) {
 
12277
 
 
12278
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1526
 
12279
 *             result, changed = self._process_entry(entry, self.root_dir_info)
 
12280
 *             if changed is not None:
 
12281
 *                 if changed:             # <<<<<<<<<<<<<<
 
12282
 *                     self._gather_result_for_consistency(result)
 
12283
 *                 if changed or self.include_unchanged:
 
12284
 */
 
12285
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_changed); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12286
      if (__pyx_t_1) {
 
12287
 
 
12288
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1527
 
12289
 *             if changed is not None:
 
12290
 *                 if changed:
 
12291
 *                     self._gather_result_for_consistency(result)             # <<<<<<<<<<<<<<
 
12292
 *                 if changed or self.include_unchanged:
 
12293
 *                     return result
 
12294
 */
 
12295
        __pyx_t_6 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_gather_result_for_consistency(__pyx_v_self, __pyx_v_result); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12296
        goto __pyx_L6;
 
12297
      }
 
12298
      __pyx_L6:;
 
12299
 
 
12300
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1528
 
12301
 *                 if changed:
 
12302
 *                     self._gather_result_for_consistency(result)
 
12303
 *                 if changed or self.include_unchanged:             # <<<<<<<<<<<<<<
 
12304
 *                     return result
 
12305
 *         # Have we finished the prior root, or never started one ?
 
12306
 */
 
12307
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_changed); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12308
      if (!__pyx_t_1) {
 
12309
        __pyx_t_7 = __pyx_v_self->include_unchanged;
 
12310
      } else {
 
12311
        __pyx_t_7 = __pyx_t_1;
 
12312
      }
 
12313
      if (__pyx_t_7) {
 
12314
 
 
12315
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1529
 
12316
 *                     self._gather_result_for_consistency(result)
 
12317
 *                 if changed or self.include_unchanged:
 
12318
 *                     return result             # <<<<<<<<<<<<<<
 
12319
 *         # Have we finished the prior root, or never started one ?
 
12320
 *         if self.current_root is None:
 
12321
 */
 
12322
        __Pyx_XDECREF(__pyx_r);
 
12323
        __Pyx_INCREF(__pyx_v_result);
 
12324
        __pyx_r = __pyx_v_result;
 
12325
        goto __pyx_L0;
 
12326
        goto __pyx_L7;
 
12327
      }
 
12328
      __pyx_L7:;
 
12329
      goto __pyx_L5;
 
12330
    }
 
12331
    __pyx_L5:;
 
12332
  }
 
12333
 
 
12334
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1531
 
12335
 *                     return result
 
12336
 *         # Have we finished the prior root, or never started one ?
 
12337
 *         if self.current_root is None:             # <<<<<<<<<<<<<<
 
12338
 *             # TODO: the pending list should be lexically sorted?  the
 
12339
 *             # interface doesn't require it.
 
12340
 */
 
12341
  __pyx_t_7 = (__pyx_v_self->current_root == Py_None);
 
12342
  if (__pyx_t_7) {
 
12343
 
 
12344
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1534
 
12345
 *             # TODO: the pending list should be lexically sorted?  the
 
12346
 *             # interface doesn't require it.
 
12347
 *             try:             # <<<<<<<<<<<<<<
 
12348
 *                 self.current_root = self.search_specific_files.pop()
 
12349
 *             except KeyError, _:
 
12350
 */
 
12351
    {
 
12352
      PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
 
12353
      __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
 
12354
      __Pyx_XGOTREF(__pyx_save_exc_type);
 
12355
      __Pyx_XGOTREF(__pyx_save_exc_value);
 
12356
      __Pyx_XGOTREF(__pyx_save_exc_tb);
 
12357
      /*try:*/ {
 
12358
 
 
12359
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1535
 
12360
 *             # interface doesn't require it.
 
12361
 *             try:
 
12362
 *                 self.current_root = self.search_specific_files.pop()             # <<<<<<<<<<<<<<
 
12363
 *             except KeyError, _:
 
12364
 *                 raise StopIteration()
 
12365
 */
 
12366
        __pyx_t_3 = __Pyx_PyObject_Pop(__pyx_v_self->search_specific_files); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
 
12367
        __Pyx_GOTREF(__pyx_t_3);
 
12368
        __Pyx_GIVEREF(__pyx_t_3);
 
12369
        __Pyx_GOTREF(__pyx_v_self->current_root);
 
12370
        __Pyx_DECREF(__pyx_v_self->current_root);
 
12371
        __pyx_v_self->current_root = __pyx_t_3;
 
12372
        __pyx_t_3 = 0;
 
12373
      }
 
12374
      __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
 
12375
      __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
 
12376
      __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
 
12377
      goto __pyx_L16_try_end;
 
12378
      __pyx_L9_error:;
 
12379
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
 
12380
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
 
12381
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
 
12382
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12383
 
 
12384
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1536
 
12385
 *             try:
 
12386
 *                 self.current_root = self.search_specific_files.pop()
 
12387
 *             except KeyError, _:             # <<<<<<<<<<<<<<
 
12388
 *                 raise StopIteration()
 
12389
 *             self.searched_specific_files.add(self.current_root)
 
12390
 */
 
12391
      __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
 
12392
      if (__pyx_t_6) {
 
12393
        __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._iter_next");
 
12394
        if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
 
12395
        __Pyx_GOTREF(__pyx_t_3);
 
12396
        __Pyx_GOTREF(__pyx_t_4);
 
12397
        __Pyx_GOTREF(__pyx_t_2);
 
12398
        __Pyx_INCREF(__pyx_t_4);
 
12399
        __Pyx_DECREF(__pyx_v__);
 
12400
        __pyx_v__ = __pyx_t_4;
 
12401
 
 
12402
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1537
 
12403
 *                 self.current_root = self.search_specific_files.pop()
 
12404
 *             except KeyError, _:
 
12405
 *                 raise StopIteration()             # <<<<<<<<<<<<<<
 
12406
 *             self.searched_specific_files.add(self.current_root)
 
12407
 *             # process the entries for this containing directory: the rest will be
 
12408
 */
 
12409
        __pyx_t_5 = PyObject_Call(__pyx_builtin_StopIteration, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
 
12410
        __Pyx_GOTREF(__pyx_t_5);
 
12411
        __Pyx_Raise(__pyx_t_5, 0, 0);
 
12412
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
12413
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
 
12414
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12415
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
12416
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
12417
        goto __pyx_L10_exception_handled;
 
12418
      }
 
12419
      __pyx_L11_except_error:;
 
12420
      __Pyx_XGIVEREF(__pyx_save_exc_type);
 
12421
      __Pyx_XGIVEREF(__pyx_save_exc_value);
 
12422
      __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
12423
      __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
12424
      goto __pyx_L1_error;
 
12425
      __pyx_L10_exception_handled:;
 
12426
      __Pyx_XGIVEREF(__pyx_save_exc_type);
 
12427
      __Pyx_XGIVEREF(__pyx_save_exc_value);
 
12428
      __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
12429
      __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
12430
      __pyx_L16_try_end:;
 
12431
    }
 
12432
 
 
12433
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1538
 
12434
 *             except KeyError, _:
 
12435
 *                 raise StopIteration()
 
12436
 *             self.searched_specific_files.add(self.current_root)             # <<<<<<<<<<<<<<
 
12437
 *             # process the entries for this containing directory: the rest will be
 
12438
 *             # found by their parents recursively.
 
12439
 */
 
12440
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->searched_specific_files, __pyx_n_s__add); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12441
    __Pyx_GOTREF(__pyx_t_2);
 
12442
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12443
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
 
12444
    __Pyx_INCREF(__pyx_v_self->current_root);
 
12445
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->current_root);
 
12446
    __Pyx_GIVEREF(__pyx_v_self->current_root);
 
12447
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12448
    __Pyx_GOTREF(__pyx_t_3);
 
12449
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
12450
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
 
12451
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12452
 
 
12453
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1541
 
12454
 *             # process the entries for this containing directory: the rest will be
 
12455
 *             # found by their parents recursively.
 
12456
 *             self.root_entries = self.state._entries_for_path(self.current_root)             # <<<<<<<<<<<<<<
 
12457
 *             self.root_entries_len = len(self.root_entries)
 
12458
 *             self.current_root_unicode = self.current_root.decode('utf8')
 
12459
 */
 
12460
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___entries_for_path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12461
    __Pyx_GOTREF(__pyx_t_3);
 
12462
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12463
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
 
12464
    __Pyx_INCREF(__pyx_v_self->current_root);
 
12465
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->current_root);
 
12466
    __Pyx_GIVEREF(__pyx_v_self->current_root);
 
12467
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12468
    __Pyx_GOTREF(__pyx_t_2);
 
12469
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12470
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
 
12471
    __Pyx_GIVEREF(__pyx_t_2);
 
12472
    __Pyx_GOTREF(__pyx_v_self->root_entries);
 
12473
    __Pyx_DECREF(__pyx_v_self->root_entries);
 
12474
    __pyx_v_self->root_entries = __pyx_t_2;
 
12475
    __pyx_t_2 = 0;
 
12476
 
 
12477
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1542
 
12478
 *             # found by their parents recursively.
 
12479
 *             self.root_entries = self.state._entries_for_path(self.current_root)
 
12480
 *             self.root_entries_len = len(self.root_entries)             # <<<<<<<<<<<<<<
 
12481
 *             self.current_root_unicode = self.current_root.decode('utf8')
 
12482
 *             self.root_abspath = self.tree.abspath(self.current_root_unicode)
 
12483
 */
 
12484
    __pyx_t_2 = __pyx_v_self->root_entries;
 
12485
    __Pyx_INCREF(__pyx_t_2);
 
12486
    __pyx_t_8 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12487
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
12488
    __pyx_v_self->root_entries_len = __pyx_t_8;
 
12489
 
 
12490
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1543
 
12491
 *             self.root_entries = self.state._entries_for_path(self.current_root)
 
12492
 *             self.root_entries_len = len(self.root_entries)
 
12493
 *             self.current_root_unicode = self.current_root.decode('utf8')             # <<<<<<<<<<<<<<
 
12494
 *             self.root_abspath = self.tree.abspath(self.current_root_unicode)
 
12495
 *             try:
 
12496
 */
 
12497
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->current_root, __pyx_n_s__decode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12498
    __Pyx_GOTREF(__pyx_t_2);
 
12499
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12500
    __Pyx_GOTREF(__pyx_t_4);
 
12501
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
12502
    __Pyx_GIVEREF(__pyx_t_4);
 
12503
    __Pyx_GOTREF(__pyx_v_self->current_root_unicode);
 
12504
    __Pyx_DECREF(__pyx_v_self->current_root_unicode);
 
12505
    __pyx_v_self->current_root_unicode = __pyx_t_4;
 
12506
    __pyx_t_4 = 0;
 
12507
 
 
12508
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1544
 
12509
 *             self.root_entries_len = len(self.root_entries)
 
12510
 *             self.current_root_unicode = self.current_root.decode('utf8')
 
12511
 *             self.root_abspath = self.tree.abspath(self.current_root_unicode)             # <<<<<<<<<<<<<<
 
12512
 *             try:
 
12513
 *                 root_stat = os.lstat(self.root_abspath)
 
12514
 */
 
12515
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n_s__abspath); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12516
    __Pyx_GOTREF(__pyx_t_4);
 
12517
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12518
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
12519
    __Pyx_INCREF(__pyx_v_self->current_root_unicode);
 
12520
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->current_root_unicode);
 
12521
    __Pyx_GIVEREF(__pyx_v_self->current_root_unicode);
 
12522
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12523
    __Pyx_GOTREF(__pyx_t_3);
 
12524
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
12525
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
12526
    __Pyx_GIVEREF(__pyx_t_3);
 
12527
    __Pyx_GOTREF(__pyx_v_self->root_abspath);
 
12528
    __Pyx_DECREF(__pyx_v_self->root_abspath);
 
12529
    __pyx_v_self->root_abspath = __pyx_t_3;
 
12530
    __pyx_t_3 = 0;
 
12531
 
 
12532
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1545
 
12533
 *             self.current_root_unicode = self.current_root.decode('utf8')
 
12534
 *             self.root_abspath = self.tree.abspath(self.current_root_unicode)
 
12535
 *             try:             # <<<<<<<<<<<<<<
 
12536
 *                 root_stat = os.lstat(self.root_abspath)
 
12537
 *             except OSError, e:
 
12538
 */
 
12539
    {
 
12540
      PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
 
12541
      __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
 
12542
      __Pyx_XGOTREF(__pyx_save_exc_type);
 
12543
      __Pyx_XGOTREF(__pyx_save_exc_value);
 
12544
      __Pyx_XGOTREF(__pyx_save_exc_tb);
 
12545
      /*try:*/ {
 
12546
 
 
12547
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1546
 
12548
 *             self.root_abspath = self.tree.abspath(self.current_root_unicode)
 
12549
 *             try:
 
12550
 *                 root_stat = os.lstat(self.root_abspath)             # <<<<<<<<<<<<<<
 
12551
 *             except OSError, e:
 
12552
 *                 if e.errno == errno.ENOENT:
 
12553
 */
 
12554
        __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L19_error;}
 
12555
        __Pyx_GOTREF(__pyx_t_3);
 
12556
        __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__lstat); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L19_error;}
 
12557
        __Pyx_GOTREF(__pyx_t_2);
 
12558
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12559
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L19_error;}
 
12560
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
12561
        __Pyx_INCREF(__pyx_v_self->root_abspath);
 
12562
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->root_abspath);
 
12563
        __Pyx_GIVEREF(__pyx_v_self->root_abspath);
 
12564
        __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L19_error;}
 
12565
        __Pyx_GOTREF(__pyx_t_4);
 
12566
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
12567
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
12568
        __Pyx_DECREF(__pyx_v_root_stat);
 
12569
        __pyx_v_root_stat = __pyx_t_4;
 
12570
        __pyx_t_4 = 0;
 
12571
      }
 
12572
      /*else:*/ {
 
12573
 
 
12574
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1556
 
12575
 *             else:
 
12576
 *                 self.root_dir_info = ('', self.current_root,
 
12577
 *                     osutils.file_kind_from_stat_mode(root_stat.st_mode), root_stat,             # <<<<<<<<<<<<<<
 
12578
 *                     self.root_abspath)
 
12579
 *                 if self.root_dir_info[2] == 'directory':
 
12580
 */
 
12581
        __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__osutils); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12582
        __Pyx_GOTREF(__pyx_t_4);
 
12583
        __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s_48); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12584
        __Pyx_GOTREF(__pyx_t_3);
 
12585
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
12586
        __pyx_t_4 = PyObject_GetAttr(__pyx_v_root_stat, __pyx_n_s__st_mode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12587
        __Pyx_GOTREF(__pyx_t_4);
 
12588
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12589
        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
12590
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
 
12591
        __Pyx_GIVEREF(__pyx_t_4);
 
12592
        __pyx_t_4 = 0;
 
12593
        __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12594
        __Pyx_GOTREF(__pyx_t_4);
 
12595
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12596
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
12597
 
 
12598
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1557
 
12599
 *                 self.root_dir_info = ('', self.current_root,
 
12600
 *                     osutils.file_kind_from_stat_mode(root_stat.st_mode), root_stat,
 
12601
 *                     self.root_abspath)             # <<<<<<<<<<<<<<
 
12602
 *                 if self.root_dir_info[2] == 'directory':
 
12603
 *                     if self.tree._directory_is_tree_reference(
 
12604
 */
 
12605
        __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12606
        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
12607
        __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
 
12608
        PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_s_5));
 
12609
        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
 
12610
        __Pyx_INCREF(__pyx_v_self->current_root);
 
12611
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->current_root);
 
12612
        __Pyx_GIVEREF(__pyx_v_self->current_root);
 
12613
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_4);
 
12614
        __Pyx_GIVEREF(__pyx_t_4);
 
12615
        __Pyx_INCREF(__pyx_v_root_stat);
 
12616
        PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_root_stat);
 
12617
        __Pyx_GIVEREF(__pyx_v_root_stat);
 
12618
        __Pyx_INCREF(__pyx_v_self->root_abspath);
 
12619
        PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_self->root_abspath);
 
12620
        __Pyx_GIVEREF(__pyx_v_self->root_abspath);
 
12621
        __pyx_t_4 = 0;
 
12622
 
 
12623
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1555
 
12624
 *                     raise
 
12625
 *             else:
 
12626
 *                 self.root_dir_info = ('', self.current_root,             # <<<<<<<<<<<<<<
 
12627
 *                     osutils.file_kind_from_stat_mode(root_stat.st_mode), root_stat,
 
12628
 *                     self.root_abspath)
 
12629
 */
 
12630
        __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
 
12631
        __Pyx_GOTREF(__pyx_v_self->root_dir_info);
 
12632
        __Pyx_DECREF(__pyx_v_self->root_dir_info);
 
12633
        __pyx_v_self->root_dir_info = ((PyObject *)__pyx_t_2);
 
12634
        __pyx_t_2 = 0;
 
12635
 
 
12636
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1558
 
12637
 *                     osutils.file_kind_from_stat_mode(root_stat.st_mode), root_stat,
 
12638
 *                     self.root_abspath)
 
12639
 *                 if self.root_dir_info[2] == 'directory':             # <<<<<<<<<<<<<<
 
12640
 *                     if self.tree._directory_is_tree_reference(
 
12641
 *                         self.current_root_unicode):
 
12642
 */
 
12643
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12644
        __Pyx_GOTREF(__pyx_t_2);
 
12645
        __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_s__directory), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12646
        __Pyx_GOTREF(__pyx_t_4);
 
12647
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
12648
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12649
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
12650
        if (__pyx_t_7) {
 
12651
 
 
12652
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1559
 
12653
 *                     self.root_abspath)
 
12654
 *                 if self.root_dir_info[2] == 'directory':
 
12655
 *                     if self.tree._directory_is_tree_reference(             # <<<<<<<<<<<<<<
 
12656
 *                         self.current_root_unicode):
 
12657
 *                         self.root_dir_info = self.root_dir_info[:2] + \
 
12658
 */
 
12659
          __pyx_t_4 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n_s_49); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12660
          __Pyx_GOTREF(__pyx_t_4);
 
12661
 
 
12662
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1560
 
12663
 *                 if self.root_dir_info[2] == 'directory':
 
12664
 *                     if self.tree._directory_is_tree_reference(
 
12665
 *                         self.current_root_unicode):             # <<<<<<<<<<<<<<
 
12666
 *                         self.root_dir_info = self.root_dir_info[:2] + \
 
12667
 *                             ('tree-reference',) + self.root_dir_info[3:]
 
12668
 */
 
12669
          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12670
          __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
12671
          __Pyx_INCREF(__pyx_v_self->current_root_unicode);
 
12672
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->current_root_unicode);
 
12673
          __Pyx_GIVEREF(__pyx_v_self->current_root_unicode);
 
12674
          __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12675
          __Pyx_GOTREF(__pyx_t_3);
 
12676
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
12677
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
12678
          __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12679
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12680
          if (__pyx_t_7) {
 
12681
 
 
12682
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1561
 
12683
 *                     if self.tree._directory_is_tree_reference(
 
12684
 *                         self.current_root_unicode):
 
12685
 *                         self.root_dir_info = self.root_dir_info[:2] + \             # <<<<<<<<<<<<<<
 
12686
 *                             ('tree-reference',) + self.root_dir_info[3:]
 
12687
 *             if not self.root_entries and not self.root_dir_info:
 
12688
 */
 
12689
            __pyx_t_3 = __Pyx_PySequence_GetSlice(__pyx_v_self->root_dir_info, 0, 2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12690
            __Pyx_GOTREF(__pyx_t_3);
 
12691
 
 
12692
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1562
 
12693
 *                         self.current_root_unicode):
 
12694
 *                         self.root_dir_info = self.root_dir_info[:2] + \
 
12695
 *                             ('tree-reference',) + self.root_dir_info[3:]             # <<<<<<<<<<<<<<
 
12696
 *             if not self.root_entries and not self.root_dir_info:
 
12697
 *                 # this specified path is not present at all, skip it.
 
12698
 */
 
12699
            __pyx_t_2 = PyNumber_Add(__pyx_t_3, ((PyObject *)__pyx_k_tuple_50)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12700
            __Pyx_GOTREF(__pyx_t_2);
 
12701
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12702
            __pyx_t_3 = __Pyx_PySequence_GetSlice(__pyx_v_self->root_dir_info, 3, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12703
            __Pyx_GOTREF(__pyx_t_3);
 
12704
            __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12705
            __Pyx_GOTREF(__pyx_t_4);
 
12706
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
12707
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12708
 
 
12709
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1561
 
12710
 *                     if self.tree._directory_is_tree_reference(
 
12711
 *                         self.current_root_unicode):
 
12712
 *                         self.root_dir_info = self.root_dir_info[:2] + \             # <<<<<<<<<<<<<<
 
12713
 *                             ('tree-reference',) + self.root_dir_info[3:]
 
12714
 *             if not self.root_entries and not self.root_dir_info:
 
12715
 */
 
12716
            __Pyx_GIVEREF(__pyx_t_4);
 
12717
            __Pyx_GOTREF(__pyx_v_self->root_dir_info);
 
12718
            __Pyx_DECREF(__pyx_v_self->root_dir_info);
 
12719
            __pyx_v_self->root_dir_info = __pyx_t_4;
 
12720
            __pyx_t_4 = 0;
 
12721
            goto __pyx_L28;
 
12722
          }
 
12723
          __pyx_L28:;
 
12724
          goto __pyx_L27;
 
12725
        }
 
12726
        __pyx_L27:;
 
12727
      }
 
12728
      __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
 
12729
      __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
 
12730
      __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
 
12731
      goto __pyx_L26_try_end;
 
12732
      __pyx_L19_error:;
 
12733
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
 
12734
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
 
12735
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12736
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
 
12737
 
 
12738
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1547
 
12739
 *             try:
 
12740
 *                 root_stat = os.lstat(self.root_abspath)
 
12741
 *             except OSError, e:             # <<<<<<<<<<<<<<
 
12742
 *                 if e.errno == errno.ENOENT:
 
12743
 *                     # the path does not exist: let _process_entry know that.
 
12744
 */
 
12745
      __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_OSError);
 
12746
      if (__pyx_t_6) {
 
12747
        __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._iter_next");
 
12748
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12749
        __Pyx_GOTREF(__pyx_t_4);
 
12750
        __Pyx_GOTREF(__pyx_t_3);
 
12751
        __Pyx_GOTREF(__pyx_t_2);
 
12752
        __Pyx_INCREF(__pyx_t_3);
 
12753
        __Pyx_DECREF(__pyx_v_e);
 
12754
        __pyx_v_e = __pyx_t_3;
 
12755
 
 
12756
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1548
 
12757
 *                 root_stat = os.lstat(self.root_abspath)
 
12758
 *             except OSError, e:
 
12759
 *                 if e.errno == errno.ENOENT:             # <<<<<<<<<<<<<<
 
12760
 *                     # the path does not exist: let _process_entry know that.
 
12761
 *                     self.root_dir_info = None
 
12762
 */
 
12763
        __pyx_t_5 = PyObject_GetAttr(__pyx_v_e, __pyx_n_s__errno); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12764
        __Pyx_GOTREF(__pyx_t_5);
 
12765
        __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__errno); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12766
        __Pyx_GOTREF(__pyx_t_9);
 
12767
        __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__ENOENT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12768
        __Pyx_GOTREF(__pyx_t_10);
 
12769
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
12770
        __pyx_t_9 = PyObject_RichCompare(__pyx_t_5, __pyx_t_10, Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12771
        __Pyx_GOTREF(__pyx_t_9);
 
12772
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
12773
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
12774
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1548; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12775
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
12776
        if (__pyx_t_7) {
 
12777
 
 
12778
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1550
 
12779
 *                 if e.errno == errno.ENOENT:
 
12780
 *                     # the path does not exist: let _process_entry know that.
 
12781
 *                     self.root_dir_info = None             # <<<<<<<<<<<<<<
 
12782
 *                 else:
 
12783
 *                     # some other random error: hand it up.
 
12784
 */
 
12785
          __Pyx_INCREF(Py_None);
 
12786
          __Pyx_GIVEREF(Py_None);
 
12787
          __Pyx_GOTREF(__pyx_v_self->root_dir_info);
 
12788
          __Pyx_DECREF(__pyx_v_self->root_dir_info);
 
12789
          __pyx_v_self->root_dir_info = Py_None;
 
12790
          goto __pyx_L31;
 
12791
        }
 
12792
        /*else*/ {
 
12793
 
 
12794
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1553
 
12795
 *                 else:
 
12796
 *                     # some other random error: hand it up.
 
12797
 *                     raise             # <<<<<<<<<<<<<<
 
12798
 *             else:
 
12799
 *                 self.root_dir_info = ('', self.current_root,
 
12800
 */
 
12801
          __Pyx_GIVEREF(__pyx_t_4);
 
12802
          __Pyx_GIVEREF(__pyx_t_3);
 
12803
          __Pyx_GIVEREF(__pyx_t_2);
 
12804
          __Pyx_ErrRestore(__pyx_t_4, __pyx_t_3, __pyx_t_2);
 
12805
          __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; 
 
12806
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1553; __pyx_clineno = __LINE__; goto __pyx_L21_except_error;}
 
12807
        }
 
12808
        __pyx_L31:;
 
12809
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
12810
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12811
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
12812
        goto __pyx_L20_exception_handled;
 
12813
      }
 
12814
      __pyx_L21_except_error:;
 
12815
      __Pyx_XGIVEREF(__pyx_save_exc_type);
 
12816
      __Pyx_XGIVEREF(__pyx_save_exc_value);
 
12817
      __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
12818
      __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
12819
      goto __pyx_L1_error;
 
12820
      __pyx_L20_exception_handled:;
 
12821
      __Pyx_XGIVEREF(__pyx_save_exc_type);
 
12822
      __Pyx_XGIVEREF(__pyx_save_exc_value);
 
12823
      __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
12824
      __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
12825
      __pyx_L26_try_end:;
 
12826
    }
 
12827
 
 
12828
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1563
 
12829
 *                         self.root_dir_info = self.root_dir_info[:2] + \
 
12830
 *                             ('tree-reference',) + self.root_dir_info[3:]
 
12831
 *             if not self.root_entries and not self.root_dir_info:             # <<<<<<<<<<<<<<
 
12832
 *                 # this specified path is not present at all, skip it.
 
12833
 *                 # (tail recursion, can do a loop once the full structure is
 
12834
 */
 
12835
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->root_entries); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12836
    __pyx_t_1 = (!__pyx_t_7);
 
12837
    if (__pyx_t_1) {
 
12838
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->root_dir_info); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12839
      __pyx_t_11 = (!__pyx_t_7);
 
12840
      __pyx_t_7 = __pyx_t_11;
 
12841
    } else {
 
12842
      __pyx_t_7 = __pyx_t_1;
 
12843
    }
 
12844
    if (__pyx_t_7) {
 
12845
 
 
12846
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1567
 
12847
 *                 # (tail recursion, can do a loop once the full structure is
 
12848
 *                 # known).
 
12849
 *                 return self._iter_next()             # <<<<<<<<<<<<<<
 
12850
 *             path_handled = 0
 
12851
 *             self.root_entries_pos = 0
 
12852
 */
 
12853
      __Pyx_XDECREF(__pyx_r);
 
12854
      __pyx_t_2 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_iter_next(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12855
      __Pyx_GOTREF(__pyx_t_2);
 
12856
      __pyx_r = __pyx_t_2;
 
12857
      __pyx_t_2 = 0;
 
12858
      goto __pyx_L0;
 
12859
      goto __pyx_L32;
 
12860
    }
 
12861
    __pyx_L32:;
 
12862
 
 
12863
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1568
 
12864
 *                 # known).
 
12865
 *                 return self._iter_next()
 
12866
 *             path_handled = 0             # <<<<<<<<<<<<<<
 
12867
 *             self.root_entries_pos = 0
 
12868
 *             # XXX Clarity: This loop is duplicated a out the self.current_root
 
12869
 */
 
12870
    __pyx_v_path_handled = 0;
 
12871
 
 
12872
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1569
 
12873
 *                 return self._iter_next()
 
12874
 *             path_handled = 0
 
12875
 *             self.root_entries_pos = 0             # <<<<<<<<<<<<<<
 
12876
 *             # XXX Clarity: This loop is duplicated a out the self.current_root
 
12877
 *             # is None guard above: if we return from it, it completes there
 
12878
 */
 
12879
    __pyx_v_self->root_entries_pos = 0;
 
12880
 
 
12881
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1574
 
12882
 *             # (and the following if block cannot trigger because
 
12883
 *             # path_handled must be true, so the if block is not # duplicated.
 
12884
 *             while self.root_entries_pos < self.root_entries_len:             # <<<<<<<<<<<<<<
 
12885
 *                 entry = self.root_entries[self.root_entries_pos]
 
12886
 *                 self.root_entries_pos = self.root_entries_pos + 1
 
12887
 */
 
12888
    while (1) {
 
12889
      __pyx_t_7 = (__pyx_v_self->root_entries_pos < __pyx_v_self->root_entries_len);
 
12890
      if (!__pyx_t_7) break;
 
12891
 
 
12892
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1575
 
12893
 *             # path_handled must be true, so the if block is not # duplicated.
 
12894
 *             while self.root_entries_pos < self.root_entries_len:
 
12895
 *                 entry = self.root_entries[self.root_entries_pos]             # <<<<<<<<<<<<<<
 
12896
 *                 self.root_entries_pos = self.root_entries_pos + 1
 
12897
 *                 result, changed = self._process_entry(entry, self.root_dir_info)
 
12898
 */
 
12899
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_self->root_entries, __pyx_v_self->root_entries_pos, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12900
      __Pyx_GOTREF(__pyx_t_2);
 
12901
      __Pyx_DECREF(__pyx_v_entry);
 
12902
      __pyx_v_entry = __pyx_t_2;
 
12903
      __pyx_t_2 = 0;
 
12904
 
 
12905
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1576
 
12906
 *             while self.root_entries_pos < self.root_entries_len:
 
12907
 *                 entry = self.root_entries[self.root_entries_pos]
 
12908
 *                 self.root_entries_pos = self.root_entries_pos + 1             # <<<<<<<<<<<<<<
 
12909
 *                 result, changed = self._process_entry(entry, self.root_dir_info)
 
12910
 *                 if changed is not None:
 
12911
 */
 
12912
      __pyx_v_self->root_entries_pos = (__pyx_v_self->root_entries_pos + 1);
 
12913
 
 
12914
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1577
 
12915
 *                 entry = self.root_entries[self.root_entries_pos]
 
12916
 *                 self.root_entries_pos = self.root_entries_pos + 1
 
12917
 *                 result, changed = self._process_entry(entry, self.root_dir_info)             # <<<<<<<<<<<<<<
 
12918
 *                 if changed is not None:
 
12919
 *                     path_handled = -1
 
12920
 */
 
12921
      __pyx_t_2 = __pyx_v_self->root_dir_info;
 
12922
      __Pyx_INCREF(__pyx_t_2);
 
12923
      __pyx_t_3 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self, __pyx_v_entry, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12924
      __Pyx_GOTREF(__pyx_t_3);
 
12925
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
12926
      if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
 
12927
        PyObject* tuple = __pyx_t_3;
 
12928
        __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
 
12929
        __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
 
12930
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12931
        __Pyx_DECREF(__pyx_v_result);
 
12932
        __pyx_v_result = __pyx_t_2;
 
12933
        __pyx_t_2 = 0;
 
12934
        __Pyx_DECREF(__pyx_v_changed);
 
12935
        __pyx_v_changed = __pyx_t_4;
 
12936
        __pyx_t_4 = 0;
 
12937
      } else {
 
12938
        __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12939
        __Pyx_GOTREF(__pyx_t_9);
 
12940
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
12941
        __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_9, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12942
        __Pyx_GOTREF(__pyx_t_2);
 
12943
        __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_9, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12944
        __Pyx_GOTREF(__pyx_t_4);
 
12945
        if (__Pyx_EndUnpack(__pyx_t_9, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12946
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
12947
        __Pyx_DECREF(__pyx_v_result);
 
12948
        __pyx_v_result = __pyx_t_2;
 
12949
        __pyx_t_2 = 0;
 
12950
        __Pyx_DECREF(__pyx_v_changed);
 
12951
        __pyx_v_changed = __pyx_t_4;
 
12952
        __pyx_t_4 = 0;
 
12953
      }
 
12954
 
 
12955
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1578
 
12956
 *                 self.root_entries_pos = self.root_entries_pos + 1
 
12957
 *                 result, changed = self._process_entry(entry, self.root_dir_info)
 
12958
 *                 if changed is not None:             # <<<<<<<<<<<<<<
 
12959
 *                     path_handled = -1
 
12960
 *                     if changed:
 
12961
 */
 
12962
      __pyx_t_7 = (__pyx_v_changed != Py_None);
 
12963
      if (__pyx_t_7) {
 
12964
 
 
12965
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1579
 
12966
 *                 result, changed = self._process_entry(entry, self.root_dir_info)
 
12967
 *                 if changed is not None:
 
12968
 *                     path_handled = -1             # <<<<<<<<<<<<<<
 
12969
 *                     if changed:
 
12970
 *                         self._gather_result_for_consistency(result)
 
12971
 */
 
12972
        __pyx_v_path_handled = -1;
 
12973
 
 
12974
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1580
 
12975
 *                 if changed is not None:
 
12976
 *                     path_handled = -1
 
12977
 *                     if changed:             # <<<<<<<<<<<<<<
 
12978
 *                         self._gather_result_for_consistency(result)
 
12979
 *                     if changed or self.include_unchanged:
 
12980
 */
 
12981
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_changed); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12982
        if (__pyx_t_7) {
 
12983
 
 
12984
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1581
 
12985
 *                     path_handled = -1
 
12986
 *                     if changed:
 
12987
 *                         self._gather_result_for_consistency(result)             # <<<<<<<<<<<<<<
 
12988
 *                     if changed or self.include_unchanged:
 
12989
 *                         return result
 
12990
 */
 
12991
          __pyx_t_6 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_gather_result_for_consistency(__pyx_v_self, __pyx_v_result); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
12992
          goto __pyx_L36;
 
12993
        }
 
12994
        __pyx_L36:;
 
12995
 
 
12996
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1582
 
12997
 *                     if changed:
 
12998
 *                         self._gather_result_for_consistency(result)
 
12999
 *                     if changed or self.include_unchanged:             # <<<<<<<<<<<<<<
 
13000
 *                         return result
 
13001
 *             # handle unversioned specified paths:
 
13002
 */
 
13003
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_changed); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13004
        if (!__pyx_t_7) {
 
13005
          __pyx_t_1 = __pyx_v_self->include_unchanged;
 
13006
        } else {
 
13007
          __pyx_t_1 = __pyx_t_7;
 
13008
        }
 
13009
        if (__pyx_t_1) {
 
13010
 
 
13011
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1583
 
13012
 *                         self._gather_result_for_consistency(result)
 
13013
 *                     if changed or self.include_unchanged:
 
13014
 *                         return result             # <<<<<<<<<<<<<<
 
13015
 *             # handle unversioned specified paths:
 
13016
 *             if self.want_unversioned and not path_handled and self.root_dir_info:
 
13017
 */
 
13018
          __Pyx_XDECREF(__pyx_r);
 
13019
          __Pyx_INCREF(__pyx_v_result);
 
13020
          __pyx_r = __pyx_v_result;
 
13021
          goto __pyx_L0;
 
13022
          goto __pyx_L37;
 
13023
        }
 
13024
        __pyx_L37:;
 
13025
        goto __pyx_L35;
 
13026
      }
 
13027
      __pyx_L35:;
 
13028
    }
 
13029
 
 
13030
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1585
 
13031
 *                         return result
 
13032
 *             # handle unversioned specified paths:
 
13033
 *             if self.want_unversioned and not path_handled and self.root_dir_info:             # <<<<<<<<<<<<<<
 
13034
 *                 new_executable = bool(
 
13035
 *                     stat.S_ISREG(self.root_dir_info[3].st_mode)
 
13036
 */
 
13037
    if (__pyx_v_self->want_unversioned) {
 
13038
      __pyx_t_1 = (!__pyx_v_path_handled);
 
13039
      if (__pyx_t_1) {
 
13040
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->root_dir_info); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13041
        __pyx_t_11 = __pyx_t_7;
 
13042
      } else {
 
13043
        __pyx_t_11 = __pyx_t_1;
 
13044
      }
 
13045
      __pyx_t_1 = __pyx_t_11;
 
13046
    } else {
 
13047
      __pyx_t_1 = __pyx_v_self->want_unversioned;
 
13048
    }
 
13049
    if (__pyx_t_1) {
 
13050
 
 
13051
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1587
 
13052
 *             if self.want_unversioned and not path_handled and self.root_dir_info:
 
13053
 *                 new_executable = bool(
 
13054
 *                     stat.S_ISREG(self.root_dir_info[3].st_mode)             # <<<<<<<<<<<<<<
 
13055
 *                     and stat.S_IEXEC & self.root_dir_info[3].st_mode)
 
13056
 *                 return (None,
 
13057
 */
 
13058
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__stat); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13059
      __Pyx_GOTREF(__pyx_t_3);
 
13060
      __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__S_ISREG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13061
      __Pyx_GOTREF(__pyx_t_4);
 
13062
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
13063
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13064
      __Pyx_GOTREF(__pyx_t_3);
 
13065
      __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__st_mode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13066
      __Pyx_GOTREF(__pyx_t_2);
 
13067
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
13068
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13069
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
13070
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
 
13071
      __Pyx_GIVEREF(__pyx_t_2);
 
13072
      __pyx_t_2 = 0;
 
13073
      __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13074
      __Pyx_GOTREF(__pyx_t_2);
 
13075
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
13076
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
13077
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13078
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
13079
      if (__pyx_t_1) {
 
13080
 
 
13081
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1588
 
13082
 *                 new_executable = bool(
 
13083
 *                     stat.S_ISREG(self.root_dir_info[3].st_mode)
 
13084
 *                     and stat.S_IEXEC & self.root_dir_info[3].st_mode)             # <<<<<<<<<<<<<<
 
13085
 *                 return (None,
 
13086
 *                        (None, self.current_root_unicode),
 
13087
 */
 
13088
        __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__stat); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13089
        __Pyx_GOTREF(__pyx_t_2);
 
13090
        __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__S_IEXEC); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13091
        __Pyx_GOTREF(__pyx_t_3);
 
13092
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
13093
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13094
        __Pyx_GOTREF(__pyx_t_2);
 
13095
        __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__st_mode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13096
        __Pyx_GOTREF(__pyx_t_4);
 
13097
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
13098
        __pyx_t_2 = PyNumber_And(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13099
        __Pyx_GOTREF(__pyx_t_2);
 
13100
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
13101
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
13102
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13103
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
13104
        __pyx_t_7 = __pyx_t_11;
 
13105
      } else {
 
13106
        __pyx_t_7 = __pyx_t_1;
 
13107
      }
 
13108
      __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_7))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13109
      __Pyx_GOTREF(__pyx_t_2);
 
13110
      __Pyx_DECREF(__pyx_v_new_executable);
 
13111
      __pyx_v_new_executable = __pyx_t_2;
 
13112
      __pyx_t_2 = 0;
 
13113
 
 
13114
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1589
 
13115
 *                     stat.S_ISREG(self.root_dir_info[3].st_mode)
 
13116
 *                     and stat.S_IEXEC & self.root_dir_info[3].st_mode)
 
13117
 *                 return (None,             # <<<<<<<<<<<<<<
 
13118
 *                        (None, self.current_root_unicode),
 
13119
 *                        True,
 
13120
 */
 
13121
      __Pyx_XDECREF(__pyx_r);
 
13122
 
 
13123
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1590
 
13124
 *                     and stat.S_IEXEC & self.root_dir_info[3].st_mode)
 
13125
 *                 return (None,
 
13126
 *                        (None, self.current_root_unicode),             # <<<<<<<<<<<<<<
 
13127
 *                        True,
 
13128
 *                        (False, False),
 
13129
 */
 
13130
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13131
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
13132
      __Pyx_INCREF(Py_None);
 
13133
      PyTuple_SET_ITEM(__pyx_t_2, 0, Py_None);
 
13134
      __Pyx_GIVEREF(Py_None);
 
13135
      __Pyx_INCREF(__pyx_v_self->current_root_unicode);
 
13136
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->current_root_unicode);
 
13137
      __Pyx_GIVEREF(__pyx_v_self->current_root_unicode);
 
13138
 
 
13139
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1591
 
13140
 *                 return (None,
 
13141
 *                        (None, self.current_root_unicode),
 
13142
 *                        True,             # <<<<<<<<<<<<<<
 
13143
 *                        (False, False),
 
13144
 *                        (None, None),
 
13145
 */
 
13146
      __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13147
      __Pyx_GOTREF(__pyx_t_4);
 
13148
 
 
13149
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1592
 
13150
 *                        (None, self.current_root_unicode),
 
13151
 *                        True,
 
13152
 *                        (False, False),             # <<<<<<<<<<<<<<
 
13153
 *                        (None, None),
 
13154
 *                        (None, splitpath(self.current_root_unicode)[-1]),
 
13155
 */
 
13156
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13157
      __Pyx_GOTREF(__pyx_t_3);
 
13158
      __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13159
      __Pyx_GOTREF(__pyx_t_9);
 
13160
      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13161
      __Pyx_GOTREF(((PyObject *)__pyx_t_10));
 
13162
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3);
 
13163
      __Pyx_GIVEREF(__pyx_t_3);
 
13164
      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
 
13165
      __Pyx_GIVEREF(__pyx_t_9);
 
13166
      __pyx_t_3 = 0;
 
13167
      __pyx_t_9 = 0;
 
13168
 
 
13169
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1594
 
13170
 *                        (False, False),
 
13171
 *                        (None, None),
 
13172
 *                        (None, splitpath(self.current_root_unicode)[-1]),             # <<<<<<<<<<<<<<
 
13173
 *                        (None, self.root_dir_info[2]),
 
13174
 *                        (None, new_executable)
 
13175
 */
 
13176
      __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__splitpath); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13177
      __Pyx_GOTREF(__pyx_t_9);
 
13178
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13179
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
13180
      __Pyx_INCREF(__pyx_v_self->current_root_unicode);
 
13181
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->current_root_unicode);
 
13182
      __Pyx_GIVEREF(__pyx_v_self->current_root_unicode);
 
13183
      __pyx_t_5 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13184
      __Pyx_GOTREF(__pyx_t_5);
 
13185
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
13186
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
13187
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13188
      __Pyx_GOTREF(__pyx_t_3);
 
13189
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
13190
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13191
      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
 
13192
      __Pyx_INCREF(Py_None);
 
13193
      PyTuple_SET_ITEM(__pyx_t_5, 0, Py_None);
 
13194
      __Pyx_GIVEREF(Py_None);
 
13195
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
 
13196
      __Pyx_GIVEREF(__pyx_t_3);
 
13197
      __pyx_t_3 = 0;
 
13198
 
 
13199
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1595
 
13200
 *                        (None, None),
 
13201
 *                        (None, splitpath(self.current_root_unicode)[-1]),
 
13202
 *                        (None, self.root_dir_info[2]),             # <<<<<<<<<<<<<<
 
13203
 *                        (None, new_executable)
 
13204
 *                       )
 
13205
 */
 
13206
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13207
      __Pyx_GOTREF(__pyx_t_3);
 
13208
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13209
      __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
13210
      __Pyx_INCREF(Py_None);
 
13211
      PyTuple_SET_ITEM(__pyx_t_9, 0, Py_None);
 
13212
      __Pyx_GIVEREF(Py_None);
 
13213
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3);
 
13214
      __Pyx_GIVEREF(__pyx_t_3);
 
13215
      __pyx_t_3 = 0;
 
13216
 
 
13217
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1596
 
13218
 *                        (None, splitpath(self.current_root_unicode)[-1]),
 
13219
 *                        (None, self.root_dir_info[2]),
 
13220
 *                        (None, new_executable)             # <<<<<<<<<<<<<<
 
13221
 *                       )
 
13222
 *             # If we reach here, the outer flow continues, which enters into the
 
13223
 */
 
13224
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13225
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
13226
      __Pyx_INCREF(Py_None);
 
13227
      PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
 
13228
      __Pyx_GIVEREF(Py_None);
 
13229
      __Pyx_INCREF(__pyx_v_new_executable);
 
13230
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_new_executable);
 
13231
      __Pyx_GIVEREF(__pyx_v_new_executable);
 
13232
      __pyx_t_12 = PyTuple_New(8); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13233
      __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
13234
      __Pyx_INCREF(Py_None);
 
13235
      PyTuple_SET_ITEM(__pyx_t_12, 0, Py_None);
 
13236
      __Pyx_GIVEREF(Py_None);
 
13237
      PyTuple_SET_ITEM(__pyx_t_12, 1, ((PyObject *)__pyx_t_2));
 
13238
      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
 
13239
      PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_4);
 
13240
      __Pyx_GIVEREF(__pyx_t_4);
 
13241
      PyTuple_SET_ITEM(__pyx_t_12, 3, ((PyObject *)__pyx_t_10));
 
13242
      __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
 
13243
      __Pyx_INCREF(((PyObject *)__pyx_k_tuple_51));
 
13244
      PyTuple_SET_ITEM(__pyx_t_12, 4, ((PyObject *)__pyx_k_tuple_51));
 
13245
      __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51));
 
13246
      PyTuple_SET_ITEM(__pyx_t_12, 5, ((PyObject *)__pyx_t_5));
 
13247
      __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
 
13248
      PyTuple_SET_ITEM(__pyx_t_12, 6, ((PyObject *)__pyx_t_9));
 
13249
      __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
 
13250
      PyTuple_SET_ITEM(__pyx_t_12, 7, ((PyObject *)__pyx_t_3));
 
13251
      __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
 
13252
      __pyx_t_2 = 0;
 
13253
      __pyx_t_4 = 0;
 
13254
      __pyx_t_10 = 0;
 
13255
      __pyx_t_5 = 0;
 
13256
      __pyx_t_9 = 0;
 
13257
      __pyx_t_3 = 0;
 
13258
      __pyx_r = ((PyObject *)__pyx_t_12);
 
13259
      __pyx_t_12 = 0;
 
13260
      goto __pyx_L0;
 
13261
      goto __pyx_L38;
 
13262
    }
 
13263
    __pyx_L38:;
 
13264
    goto __pyx_L8;
 
13265
  }
 
13266
  __pyx_L8:;
 
13267
 
 
13268
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1600
 
13269
 *             # If we reach here, the outer flow continues, which enters into the
 
13270
 *             # per-root setup logic.
 
13271
 *         if (self.current_dir_info is None and self.current_block is None and not             # <<<<<<<<<<<<<<
 
13272
 *             self.doing_consistency_expansion):
 
13273
 *             # setup iteration of this root:
 
13274
 */
 
13275
  __pyx_t_7 = (__pyx_v_self->current_dir_info == Py_None);
 
13276
  if (__pyx_t_7) {
 
13277
    __pyx_t_1 = (__pyx_v_self->current_block == Py_None);
 
13278
    if (__pyx_t_1) {
 
13279
 
 
13280
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1601
 
13281
 *             # per-root setup logic.
 
13282
 *         if (self.current_dir_info is None and self.current_block is None and not
 
13283
 *             self.doing_consistency_expansion):             # <<<<<<<<<<<<<<
 
13284
 *             # setup iteration of this root:
 
13285
 *             self.current_dir_list = None
 
13286
 */
 
13287
      __pyx_t_11 = (!__pyx_v_self->doing_consistency_expansion);
 
13288
      __pyx_t_13 = __pyx_t_11;
 
13289
    } else {
 
13290
      __pyx_t_13 = __pyx_t_1;
 
13291
    }
 
13292
    __pyx_t_1 = __pyx_t_13;
 
13293
  } else {
 
13294
    __pyx_t_1 = __pyx_t_7;
 
13295
  }
 
13296
  if (__pyx_t_1) {
 
13297
 
 
13298
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1603
 
13299
 *             self.doing_consistency_expansion):
 
13300
 *             # setup iteration of this root:
 
13301
 *             self.current_dir_list = None             # <<<<<<<<<<<<<<
 
13302
 *             if self.root_dir_info and self.root_dir_info[2] == 'tree-reference':
 
13303
 *                 self.current_dir_info = None
 
13304
 */
 
13305
    __Pyx_INCREF(Py_None);
 
13306
    __Pyx_GIVEREF(Py_None);
 
13307
    __Pyx_GOTREF(__pyx_v_self->current_dir_list);
 
13308
    __Pyx_DECREF(__pyx_v_self->current_dir_list);
 
13309
    __pyx_v_self->current_dir_list = Py_None;
 
13310
 
 
13311
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1604
 
13312
 *             # setup iteration of this root:
 
13313
 *             self.current_dir_list = None
 
13314
 *             if self.root_dir_info and self.root_dir_info[2] == 'tree-reference':             # <<<<<<<<<<<<<<
 
13315
 *                 self.current_dir_info = None
 
13316
 *             else:
 
13317
 */
 
13318
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->root_dir_info); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13319
    if (__pyx_t_1) {
 
13320
      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_self->root_dir_info, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13321
      __Pyx_GOTREF(__pyx_t_12);
 
13322
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_12, ((PyObject *)__pyx_kp_s_37), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13323
      __Pyx_GOTREF(__pyx_t_3);
 
13324
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
13325
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13326
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
13327
      __pyx_t_13 = __pyx_t_7;
 
13328
    } else {
 
13329
      __pyx_t_13 = __pyx_t_1;
 
13330
    }
 
13331
    if (__pyx_t_13) {
 
13332
 
 
13333
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1605
 
13334
 *             self.current_dir_list = None
 
13335
 *             if self.root_dir_info and self.root_dir_info[2] == 'tree-reference':
 
13336
 *                 self.current_dir_info = None             # <<<<<<<<<<<<<<
 
13337
 *             else:
 
13338
 *                 self.dir_iterator = osutils._walkdirs_utf8(self.root_abspath,
 
13339
 */
 
13340
      __Pyx_INCREF(Py_None);
 
13341
      __Pyx_GIVEREF(Py_None);
 
13342
      __Pyx_GOTREF(__pyx_v_self->current_dir_info);
 
13343
      __Pyx_DECREF(__pyx_v_self->current_dir_info);
 
13344
      __pyx_v_self->current_dir_info = Py_None;
 
13345
      goto __pyx_L40;
 
13346
    }
 
13347
    /*else*/ {
 
13348
 
 
13349
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1607
 
13350
 *                 self.current_dir_info = None
 
13351
 *             else:
 
13352
 *                 self.dir_iterator = osutils._walkdirs_utf8(self.root_abspath,             # <<<<<<<<<<<<<<
 
13353
 *                     prefix=self.current_root)
 
13354
 *                 self.path_index = 0
 
13355
 */
 
13356
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__osutils); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13357
      __Pyx_GOTREF(__pyx_t_3);
 
13358
      __pyx_t_12 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s___walkdirs_utf8); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13359
      __Pyx_GOTREF(__pyx_t_12);
 
13360
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
13361
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13362
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
13363
      __Pyx_INCREF(__pyx_v_self->root_abspath);
 
13364
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->root_abspath);
 
13365
      __Pyx_GIVEREF(__pyx_v_self->root_abspath);
 
13366
      __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13367
      __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
13368
 
 
13369
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1608
 
13370
 *             else:
 
13371
 *                 self.dir_iterator = osutils._walkdirs_utf8(self.root_abspath,
 
13372
 *                     prefix=self.current_root)             # <<<<<<<<<<<<<<
 
13373
 *                 self.path_index = 0
 
13374
 *                 try:
 
13375
 */
 
13376
      if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__prefix), __pyx_v_self->current_root) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13377
      __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_12, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13378
      __Pyx_GOTREF(__pyx_t_5);
 
13379
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
13380
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
13381
      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
13382
 
 
13383
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1607
 
13384
 *                 self.current_dir_info = None
 
13385
 *             else:
 
13386
 *                 self.dir_iterator = osutils._walkdirs_utf8(self.root_abspath,             # <<<<<<<<<<<<<<
 
13387
 *                     prefix=self.current_root)
 
13388
 *                 self.path_index = 0
 
13389
 */
 
13390
      __Pyx_GIVEREF(__pyx_t_5);
 
13391
      __Pyx_GOTREF(__pyx_v_self->dir_iterator);
 
13392
      __Pyx_DECREF(__pyx_v_self->dir_iterator);
 
13393
      __pyx_v_self->dir_iterator = __pyx_t_5;
 
13394
      __pyx_t_5 = 0;
 
13395
 
 
13396
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1609
 
13397
 *                 self.dir_iterator = osutils._walkdirs_utf8(self.root_abspath,
 
13398
 *                     prefix=self.current_root)
 
13399
 *                 self.path_index = 0             # <<<<<<<<<<<<<<
 
13400
 *                 try:
 
13401
 *                     self.current_dir_info = self.dir_iterator.next()
 
13402
 */
 
13403
      __pyx_v_self->path_index = 0;
 
13404
 
 
13405
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1610
 
13406
 *                     prefix=self.current_root)
 
13407
 *                 self.path_index = 0
 
13408
 *                 try:             # <<<<<<<<<<<<<<
 
13409
 *                     self.current_dir_info = self.dir_iterator.next()
 
13410
 *                     self.current_dir_list = self.current_dir_info[1]
 
13411
 */
 
13412
      {
 
13413
        PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
 
13414
        __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
 
13415
        __Pyx_XGOTREF(__pyx_save_exc_type);
 
13416
        __Pyx_XGOTREF(__pyx_save_exc_value);
 
13417
        __Pyx_XGOTREF(__pyx_save_exc_tb);
 
13418
        /*try:*/ {
 
13419
 
 
13420
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1611
 
13421
 *                 self.path_index = 0
 
13422
 *                 try:
 
13423
 *                     self.current_dir_info = self.dir_iterator.next()             # <<<<<<<<<<<<<<
 
13424
 *                     self.current_dir_list = self.current_dir_info[1]
 
13425
 *                 except OSError, e:
 
13426
 */
 
13427
          __pyx_t_5 = PyObject_GetAttr(__pyx_v_self->dir_iterator, __pyx_n_s__next); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L41_error;}
 
13428
          __Pyx_GOTREF(__pyx_t_5);
 
13429
          __pyx_t_9 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L41_error;}
 
13430
          __Pyx_GOTREF(__pyx_t_9);
 
13431
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
13432
          __Pyx_GIVEREF(__pyx_t_9);
 
13433
          __Pyx_GOTREF(__pyx_v_self->current_dir_info);
 
13434
          __Pyx_DECREF(__pyx_v_self->current_dir_info);
 
13435
          __pyx_v_self->current_dir_info = __pyx_t_9;
 
13436
          __pyx_t_9 = 0;
 
13437
 
 
13438
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1612
 
13439
 *                 try:
 
13440
 *                     self.current_dir_info = self.dir_iterator.next()
 
13441
 *                     self.current_dir_list = self.current_dir_info[1]             # <<<<<<<<<<<<<<
 
13442
 *                 except OSError, e:
 
13443
 *                     # there may be directories in the inventory even though
 
13444
 */
 
13445
          __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L41_error;}
 
13446
          __Pyx_GOTREF(__pyx_t_9);
 
13447
          __Pyx_GIVEREF(__pyx_t_9);
 
13448
          __Pyx_GOTREF(__pyx_v_self->current_dir_list);
 
13449
          __Pyx_DECREF(__pyx_v_self->current_dir_list);
 
13450
          __pyx_v_self->current_dir_list = __pyx_t_9;
 
13451
          __pyx_t_9 = 0;
 
13452
        }
 
13453
        /*else:*/ {
 
13454
 
 
13455
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1636
 
13456
 *                         raise
 
13457
 *                 else:
 
13458
 *                     if self.current_dir_info[0][0] == '':             # <<<<<<<<<<<<<<
 
13459
 *                         # remove .bzr from iteration
 
13460
 *                         bzr_index = self.bisect_left(self.current_dir_list, ('.bzr',))
 
13461
 */
 
13462
          __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13463
          __Pyx_GOTREF(__pyx_t_9);
 
13464
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_9, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13465
          __Pyx_GOTREF(__pyx_t_5);
 
13466
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
13467
          __pyx_t_9 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_kp_s_5), Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13468
          __Pyx_GOTREF(__pyx_t_9);
 
13469
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
13470
          __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13471
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
13472
          if (__pyx_t_13) {
 
13473
 
 
13474
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1638
 
13475
 *                     if self.current_dir_info[0][0] == '':
 
13476
 *                         # remove .bzr from iteration
 
13477
 *                         bzr_index = self.bisect_left(self.current_dir_list, ('.bzr',))             # <<<<<<<<<<<<<<
 
13478
 *                         if self.current_dir_list[bzr_index][0] != '.bzr':
 
13479
 *                             raise AssertionError()
 
13480
 */
 
13481
            __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13482
            __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
13483
            __Pyx_INCREF(__pyx_v_self->current_dir_list);
 
13484
            PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self->current_dir_list);
 
13485
            __Pyx_GIVEREF(__pyx_v_self->current_dir_list);
 
13486
            __Pyx_INCREF(((PyObject *)__pyx_k_tuple_53));
 
13487
            PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_k_tuple_53));
 
13488
            __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53));
 
13489
            __pyx_t_5 = PyObject_Call(__pyx_v_self->bisect_left, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13490
            __Pyx_GOTREF(__pyx_t_5);
 
13491
            __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
13492
            __Pyx_DECREF(__pyx_v_bzr_index);
 
13493
            __pyx_v_bzr_index = __pyx_t_5;
 
13494
            __pyx_t_5 = 0;
 
13495
 
 
13496
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1639
 
13497
 *                         # remove .bzr from iteration
 
13498
 *                         bzr_index = self.bisect_left(self.current_dir_list, ('.bzr',))
 
13499
 *                         if self.current_dir_list[bzr_index][0] != '.bzr':             # <<<<<<<<<<<<<<
 
13500
 *                             raise AssertionError()
 
13501
 *                         del self.current_dir_list[bzr_index]
 
13502
 */
 
13503
            __pyx_t_5 = PyObject_GetItem(__pyx_v_self->current_dir_list, __pyx_v_bzr_index); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13504
            __Pyx_GOTREF(__pyx_t_5);
 
13505
            __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13506
            __Pyx_GOTREF(__pyx_t_9);
 
13507
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
13508
            __pyx_t_5 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)__pyx_kp_s_52), Py_NE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13509
            __Pyx_GOTREF(__pyx_t_5);
 
13510
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
13511
            __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13512
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
13513
            if (__pyx_t_13) {
 
13514
 
 
13515
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1640
 
13516
 *                         bzr_index = self.bisect_left(self.current_dir_list, ('.bzr',))
 
13517
 *                         if self.current_dir_list[bzr_index][0] != '.bzr':
 
13518
 *                             raise AssertionError()             # <<<<<<<<<<<<<<
 
13519
 *                         del self.current_dir_list[bzr_index]
 
13520
 *             initial_key = (self.current_root, '', '')
 
13521
 */
 
13522
              __pyx_t_5 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13523
              __Pyx_GOTREF(__pyx_t_5);
 
13524
              __Pyx_Raise(__pyx_t_5, 0, 0);
 
13525
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
13526
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1640; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13527
              goto __pyx_L50;
 
13528
            }
 
13529
            __pyx_L50:;
 
13530
 
 
13531
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1641
 
13532
 *                         if self.current_dir_list[bzr_index][0] != '.bzr':
 
13533
 *                             raise AssertionError()
 
13534
 *                         del self.current_dir_list[bzr_index]             # <<<<<<<<<<<<<<
 
13535
 *             initial_key = (self.current_root, '', '')
 
13536
 *             self.block_index, _ = self.state._find_block_index_from_key(initial_key)
 
13537
 */
 
13538
            if (PyObject_DelItem(__pyx_v_self->current_dir_list, __pyx_v_bzr_index) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13539
            goto __pyx_L49;
 
13540
          }
 
13541
          __pyx_L49:;
 
13542
        }
 
13543
        __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
 
13544
        __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
 
13545
        __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
 
13546
        goto __pyx_L48_try_end;
 
13547
        __pyx_L41_error:;
 
13548
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
 
13549
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
 
13550
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
 
13551
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
 
13552
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
13553
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
 
13554
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
 
13555
 
 
13556
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1613
 
13557
 *                     self.current_dir_info = self.dir_iterator.next()
 
13558
 *                     self.current_dir_list = self.current_dir_info[1]
 
13559
 *                 except OSError, e:             # <<<<<<<<<<<<<<
 
13560
 *                     # there may be directories in the inventory even though
 
13561
 *                     # this path is not a file on disk: so mark it as end of
 
13562
 */
 
13563
        __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_OSError);
 
13564
        if (__pyx_t_6) {
 
13565
          __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._iter_next");
 
13566
          if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1613; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13567
          __Pyx_GOTREF(__pyx_t_5);
 
13568
          __Pyx_GOTREF(__pyx_t_9);
 
13569
          __Pyx_GOTREF(__pyx_t_3);
 
13570
          __Pyx_INCREF(__pyx_t_9);
 
13571
          __Pyx_DECREF(__pyx_v_e);
 
13572
          __pyx_v_e = __pyx_t_9;
 
13573
 
 
13574
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1617
 
13575
 *                     # this path is not a file on disk: so mark it as end of
 
13576
 *                     # iterator
 
13577
 *                     if e.errno in (errno.ENOENT, errno.ENOTDIR, errno.EINVAL):             # <<<<<<<<<<<<<<
 
13578
 *                         self.current_dir_info = None
 
13579
 *                     elif sys.platform == 'win32':
 
13580
 */
 
13581
          __pyx_t_12 = PyObject_GetAttr(__pyx_v_e, __pyx_n_s__errno); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13582
          __Pyx_GOTREF(__pyx_t_12);
 
13583
          __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__errno); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13584
          __Pyx_GOTREF(__pyx_t_10);
 
13585
          __pyx_t_4 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__ENOENT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13586
          __Pyx_GOTREF(__pyx_t_4);
 
13587
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
13588
          __pyx_t_10 = PyObject_RichCompare(__pyx_t_12, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13589
          __Pyx_GOTREF(__pyx_t_10);
 
13590
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
13591
          __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13592
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
13593
          __pyx_t_1 = __pyx_t_13;
 
13594
          if (!__pyx_t_1) {
 
13595
            __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__errno); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13596
            __Pyx_GOTREF(__pyx_t_10);
 
13597
            __pyx_t_4 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__ENOTDIR); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13598
            __Pyx_GOTREF(__pyx_t_4);
 
13599
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
13600
            __pyx_t_10 = PyObject_RichCompare(__pyx_t_12, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13601
            __Pyx_GOTREF(__pyx_t_10);
 
13602
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
13603
            __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13604
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
13605
            __pyx_t_7 = __pyx_t_13;
 
13606
            __pyx_t_13 = __pyx_t_7;
 
13607
          } else {
 
13608
            __pyx_t_13 = __pyx_t_1;
 
13609
          }
 
13610
          if (!__pyx_t_13) {
 
13611
            __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__errno); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13612
            __Pyx_GOTREF(__pyx_t_10);
 
13613
            __pyx_t_4 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__EINVAL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13614
            __Pyx_GOTREF(__pyx_t_4);
 
13615
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
13616
            __pyx_t_10 = PyObject_RichCompare(__pyx_t_12, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13617
            __Pyx_GOTREF(__pyx_t_10);
 
13618
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
13619
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13620
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
13621
            __pyx_t_7 = __pyx_t_1;
 
13622
            __pyx_t_1 = __pyx_t_7;
 
13623
          } else {
 
13624
            __pyx_t_1 = __pyx_t_13;
 
13625
          }
 
13626
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
13627
          __pyx_t_13 = __pyx_t_1;
 
13628
          if (__pyx_t_13) {
 
13629
 
 
13630
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1618
 
13631
 *                     # iterator
 
13632
 *                     if e.errno in (errno.ENOENT, errno.ENOTDIR, errno.EINVAL):
 
13633
 *                         self.current_dir_info = None             # <<<<<<<<<<<<<<
 
13634
 *                     elif sys.platform == 'win32':
 
13635
 *                         # on win32, python2.4 has e.errno == ERROR_DIRECTORY, but
 
13636
 */
 
13637
            __Pyx_INCREF(Py_None);
 
13638
            __Pyx_GIVEREF(Py_None);
 
13639
            __Pyx_GOTREF(__pyx_v_self->current_dir_info);
 
13640
            __Pyx_DECREF(__pyx_v_self->current_dir_info);
 
13641
            __pyx_v_self->current_dir_info = Py_None;
 
13642
            goto __pyx_L53;
 
13643
          }
 
13644
 
 
13645
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1619
 
13646
 *                     if e.errno in (errno.ENOENT, errno.ENOTDIR, errno.EINVAL):
 
13647
 *                         self.current_dir_info = None
 
13648
 *                     elif sys.platform == 'win32':             # <<<<<<<<<<<<<<
 
13649
 *                         # on win32, python2.4 has e.errno == ERROR_DIRECTORY, but
 
13650
 *                         # python 2.5 has e.errno == EINVAL,
 
13651
 */
 
13652
          __pyx_t_12 = __Pyx_GetName(__pyx_m, __pyx_n_s__sys); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13653
          __Pyx_GOTREF(__pyx_t_12);
 
13654
          __pyx_t_10 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__platform); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13655
          __Pyx_GOTREF(__pyx_t_10);
 
13656
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
13657
          __pyx_t_12 = PyObject_RichCompare(__pyx_t_10, ((PyObject *)__pyx_n_s__win32), Py_EQ); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13658
          __Pyx_GOTREF(__pyx_t_12);
 
13659
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
13660
          __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13661
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
13662
          if (__pyx_t_13) {
 
13663
 
 
13664
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1623
 
13665
 *                         # python 2.5 has e.errno == EINVAL,
 
13666
 *                         #            and e.winerror == ERROR_DIRECTORY
 
13667
 *                         try:             # <<<<<<<<<<<<<<
 
13668
 *                             e_winerror = e.winerror
 
13669
 *                         except AttributeError, _:
 
13670
 */
 
13671
            {
 
13672
              PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
 
13673
              __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
 
13674
              __Pyx_XGOTREF(__pyx_save_exc_type);
 
13675
              __Pyx_XGOTREF(__pyx_save_exc_value);
 
13676
              __Pyx_XGOTREF(__pyx_save_exc_tb);
 
13677
              /*try:*/ {
 
13678
 
 
13679
                /* "bzrlib/_dirstate_helpers_pyx.pyx":1624
 
13680
 *                         #            and e.winerror == ERROR_DIRECTORY
 
13681
 *                         try:
 
13682
 *                             e_winerror = e.winerror             # <<<<<<<<<<<<<<
 
13683
 *                         except AttributeError, _:
 
13684
 *                             e_winerror = None
 
13685
 */
 
13686
                __pyx_t_12 = PyObject_GetAttr(__pyx_v_e, __pyx_n_s__winerror); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L54_error;}
 
13687
                __Pyx_GOTREF(__pyx_t_12);
 
13688
                __Pyx_DECREF(__pyx_v_e_winerror);
 
13689
                __pyx_v_e_winerror = __pyx_t_12;
 
13690
                __pyx_t_12 = 0;
 
13691
              }
 
13692
              __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
 
13693
              __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
 
13694
              __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
 
13695
              goto __pyx_L61_try_end;
 
13696
              __pyx_L54_error:;
 
13697
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
 
13698
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
 
13699
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
 
13700
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
 
13701
 
 
13702
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1625
 
13703
 *                         try:
 
13704
 *                             e_winerror = e.winerror
 
13705
 *                         except AttributeError, _:             # <<<<<<<<<<<<<<
 
13706
 *                             e_winerror = None
 
13707
 *                         win_errors = (ERROR_DIRECTORY, ERROR_PATH_NOT_FOUND)
 
13708
 */
 
13709
              __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
 
13710
              if (__pyx_t_6) {
 
13711
                __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._iter_next");
 
13712
                if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_10, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L56_except_error;}
 
13713
                __Pyx_GOTREF(__pyx_t_12);
 
13714
                __Pyx_GOTREF(__pyx_t_10);
 
13715
                __Pyx_GOTREF(__pyx_t_4);
 
13716
                __Pyx_INCREF(__pyx_t_10);
 
13717
                __Pyx_DECREF(__pyx_v__);
 
13718
                __pyx_v__ = __pyx_t_10;
 
13719
 
 
13720
                /* "bzrlib/_dirstate_helpers_pyx.pyx":1626
 
13721
 *                             e_winerror = e.winerror
 
13722
 *                         except AttributeError, _:
 
13723
 *                             e_winerror = None             # <<<<<<<<<<<<<<
 
13724
 *                         win_errors = (ERROR_DIRECTORY, ERROR_PATH_NOT_FOUND)
 
13725
 *                         if (e.errno in win_errors or e_winerror in win_errors):
 
13726
 */
 
13727
                __Pyx_INCREF(Py_None);
 
13728
                __Pyx_DECREF(__pyx_v_e_winerror);
 
13729
                __pyx_v_e_winerror = Py_None;
 
13730
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
13731
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
13732
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
13733
                goto __pyx_L55_exception_handled;
 
13734
              }
 
13735
              __pyx_L56_except_error:;
 
13736
              __Pyx_XGIVEREF(__pyx_save_exc_type);
 
13737
              __Pyx_XGIVEREF(__pyx_save_exc_value);
 
13738
              __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
13739
              __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
13740
              goto __pyx_L43_except_error;
 
13741
              __pyx_L55_exception_handled:;
 
13742
              __Pyx_XGIVEREF(__pyx_save_exc_type);
 
13743
              __Pyx_XGIVEREF(__pyx_save_exc_value);
 
13744
              __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
13745
              __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
13746
              __pyx_L61_try_end:;
 
13747
            }
 
13748
 
 
13749
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1627
 
13750
 *                         except AttributeError, _:
 
13751
 *                             e_winerror = None
 
13752
 *                         win_errors = (ERROR_DIRECTORY, ERROR_PATH_NOT_FOUND)             # <<<<<<<<<<<<<<
 
13753
 *                         if (e.errno in win_errors or e_winerror in win_errors):
 
13754
 *                             self.current_dir_info = None
 
13755
 */
 
13756
            __pyx_t_4 = PyInt_FromLong(__pyx_v_6bzrlib_21_dirstate_helpers_pyx_ERROR_DIRECTORY); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13757
            __Pyx_GOTREF(__pyx_t_4);
 
13758
            __pyx_t_10 = PyInt_FromLong(__pyx_v_6bzrlib_21_dirstate_helpers_pyx_ERROR_PATH_NOT_FOUND); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13759
            __Pyx_GOTREF(__pyx_t_10);
 
13760
            __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13761
            __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
13762
            PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4);
 
13763
            __Pyx_GIVEREF(__pyx_t_4);
 
13764
            PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
 
13765
            __Pyx_GIVEREF(__pyx_t_10);
 
13766
            __pyx_t_4 = 0;
 
13767
            __pyx_t_10 = 0;
 
13768
            __Pyx_DECREF(((PyObject *)__pyx_v_win_errors));
 
13769
            __pyx_v_win_errors = __pyx_t_12;
 
13770
            __pyx_t_12 = 0;
 
13771
 
 
13772
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1628
 
13773
 *                             e_winerror = None
 
13774
 *                         win_errors = (ERROR_DIRECTORY, ERROR_PATH_NOT_FOUND)
 
13775
 *                         if (e.errno in win_errors or e_winerror in win_errors):             # <<<<<<<<<<<<<<
 
13776
 *                             self.current_dir_info = None
 
13777
 *                         else:
 
13778
 */
 
13779
            __pyx_t_12 = PyObject_GetAttr(__pyx_v_e, __pyx_n_s__errno); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13780
            __Pyx_GOTREF(__pyx_t_12);
 
13781
            __pyx_t_13 = ((PySequence_Contains(((PyObject *)__pyx_v_win_errors), __pyx_t_12))); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13782
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
13783
            if (!__pyx_t_13) {
 
13784
              __pyx_t_1 = ((PySequence_Contains(((PyObject *)__pyx_v_win_errors), __pyx_v_e_winerror))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13785
              __pyx_t_7 = __pyx_t_1;
 
13786
            } else {
 
13787
              __pyx_t_7 = __pyx_t_13;
 
13788
            }
 
13789
            if (__pyx_t_7) {
 
13790
 
 
13791
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1629
 
13792
 *                         win_errors = (ERROR_DIRECTORY, ERROR_PATH_NOT_FOUND)
 
13793
 *                         if (e.errno in win_errors or e_winerror in win_errors):
 
13794
 *                             self.current_dir_info = None             # <<<<<<<<<<<<<<
 
13795
 *                         else:
 
13796
 *                             # Will this really raise the right exception ?
 
13797
 */
 
13798
              __Pyx_INCREF(Py_None);
 
13799
              __Pyx_GIVEREF(Py_None);
 
13800
              __Pyx_GOTREF(__pyx_v_self->current_dir_info);
 
13801
              __Pyx_DECREF(__pyx_v_self->current_dir_info);
 
13802
              __pyx_v_self->current_dir_info = Py_None;
 
13803
              goto __pyx_L64;
 
13804
            }
 
13805
            /*else*/ {
 
13806
 
 
13807
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1632
 
13808
 *                         else:
 
13809
 *                             # Will this really raise the right exception ?
 
13810
 *                             raise             # <<<<<<<<<<<<<<
 
13811
 *                     else:
 
13812
 *                         raise
 
13813
 */
 
13814
              __Pyx_GIVEREF(__pyx_t_5);
 
13815
              __Pyx_GIVEREF(__pyx_t_9);
 
13816
              __Pyx_GIVEREF(__pyx_t_3);
 
13817
              __Pyx_ErrRestore(__pyx_t_5, __pyx_t_9, __pyx_t_3);
 
13818
              __pyx_t_5 = 0; __pyx_t_9 = 0; __pyx_t_3 = 0; 
 
13819
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1632; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13820
            }
 
13821
            __pyx_L64:;
 
13822
            goto __pyx_L53;
 
13823
          }
 
13824
          /*else*/ {
 
13825
 
 
13826
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1634
 
13827
 *                             raise
 
13828
 *                     else:
 
13829
 *                         raise             # <<<<<<<<<<<<<<
 
13830
 *                 else:
 
13831
 *                     if self.current_dir_info[0][0] == '':
 
13832
 */
 
13833
            __Pyx_GIVEREF(__pyx_t_5);
 
13834
            __Pyx_GIVEREF(__pyx_t_9);
 
13835
            __Pyx_GIVEREF(__pyx_t_3);
 
13836
            __Pyx_ErrRestore(__pyx_t_5, __pyx_t_9, __pyx_t_3);
 
13837
            __pyx_t_5 = 0; __pyx_t_9 = 0; __pyx_t_3 = 0; 
 
13838
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L43_except_error;}
 
13839
          }
 
13840
          __pyx_L53:;
 
13841
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
13842
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
13843
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
13844
          goto __pyx_L42_exception_handled;
 
13845
        }
 
13846
        __pyx_L43_except_error:;
 
13847
        __Pyx_XGIVEREF(__pyx_save_exc_type);
 
13848
        __Pyx_XGIVEREF(__pyx_save_exc_value);
 
13849
        __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
13850
        __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
13851
        goto __pyx_L1_error;
 
13852
        __pyx_L42_exception_handled:;
 
13853
        __Pyx_XGIVEREF(__pyx_save_exc_type);
 
13854
        __Pyx_XGIVEREF(__pyx_save_exc_value);
 
13855
        __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
13856
        __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
13857
        __pyx_L48_try_end:;
 
13858
      }
 
13859
    }
 
13860
    __pyx_L40:;
 
13861
 
 
13862
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1642
 
13863
 *                             raise AssertionError()
 
13864
 *                         del self.current_dir_list[bzr_index]
 
13865
 *             initial_key = (self.current_root, '', '')             # <<<<<<<<<<<<<<
 
13866
 *             self.block_index, _ = self.state._find_block_index_from_key(initial_key)
 
13867
 *             if self.block_index == 0:
 
13868
 */
 
13869
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13870
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
13871
    __Pyx_INCREF(__pyx_v_self->current_root);
 
13872
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->current_root);
 
13873
    __Pyx_GIVEREF(__pyx_v_self->current_root);
 
13874
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
 
13875
    PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_kp_s_5));
 
13876
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
 
13877
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
 
13878
    PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_kp_s_5));
 
13879
    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
 
13880
    __Pyx_DECREF(((PyObject *)__pyx_v_initial_key));
 
13881
    __pyx_v_initial_key = __pyx_t_3;
 
13882
    __pyx_t_3 = 0;
 
13883
 
 
13884
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1643
 
13885
 *                         del self.current_dir_list[bzr_index]
 
13886
 *             initial_key = (self.current_root, '', '')
 
13887
 *             self.block_index, _ = self.state._find_block_index_from_key(initial_key)             # <<<<<<<<<<<<<<
 
13888
 *             if self.block_index == 0:
 
13889
 *                 # we have processed the total root already, but because the
 
13890
 */
 
13891
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s_54); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13892
    __Pyx_GOTREF(__pyx_t_3);
 
13893
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13894
    __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
13895
    __Pyx_INCREF(((PyObject *)__pyx_v_initial_key));
 
13896
    PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_initial_key));
 
13897
    __Pyx_GIVEREF(((PyObject *)__pyx_v_initial_key));
 
13898
    __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13899
    __Pyx_GOTREF(__pyx_t_5);
 
13900
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
13901
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
13902
    if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 2)) {
 
13903
      PyObject* tuple = __pyx_t_5;
 
13904
      __pyx_t_9 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_9);
 
13905
      __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13906
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
13907
      __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
 
13908
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
13909
      __pyx_v_self->block_index = __pyx_t_6;
 
13910
      __Pyx_DECREF(__pyx_v__);
 
13911
      __pyx_v__ = __pyx_t_3;
 
13912
      __pyx_t_3 = 0;
 
13913
    } else {
 
13914
      __pyx_t_12 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13915
      __Pyx_GOTREF(__pyx_t_12);
 
13916
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
13917
      __pyx_t_9 = __Pyx_UnpackItem(__pyx_t_12, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13918
      __Pyx_GOTREF(__pyx_t_9);
 
13919
      __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_9); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13920
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
13921
      __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_12, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13922
      __Pyx_GOTREF(__pyx_t_3);
 
13923
      if (__Pyx_EndUnpack(__pyx_t_12, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13924
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
13925
      __pyx_v_self->block_index = __pyx_t_6;
 
13926
      __Pyx_DECREF(__pyx_v__);
 
13927
      __pyx_v__ = __pyx_t_3;
 
13928
      __pyx_t_3 = 0;
 
13929
    }
 
13930
 
 
13931
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1644
 
13932
 *             initial_key = (self.current_root, '', '')
 
13933
 *             self.block_index, _ = self.state._find_block_index_from_key(initial_key)
 
13934
 *             if self.block_index == 0:             # <<<<<<<<<<<<<<
 
13935
 *                 # we have processed the total root already, but because the
 
13936
 *                 # initial key matched it we should skip it here.
 
13937
 */
 
13938
    __pyx_t_7 = (__pyx_v_self->block_index == 0);
 
13939
    if (__pyx_t_7) {
 
13940
 
 
13941
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1647
 
13942
 *                 # we have processed the total root already, but because the
 
13943
 *                 # initial key matched it we should skip it here.
 
13944
 *                 self.block_index = self.block_index + 1             # <<<<<<<<<<<<<<
 
13945
 *             self._update_current_block()
 
13946
 *         # walk until both the directory listing and the versioned metadata
 
13947
 */
 
13948
      __pyx_v_self->block_index = (__pyx_v_self->block_index + 1);
 
13949
      goto __pyx_L65;
 
13950
    }
 
13951
    __pyx_L65:;
 
13952
 
 
13953
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1648
 
13954
 *                 # initial key matched it we should skip it here.
 
13955
 *                 self.block_index = self.block_index + 1
 
13956
 *             self._update_current_block()             # <<<<<<<<<<<<<<
 
13957
 *         # walk until both the directory listing and the versioned metadata
 
13958
 *         # are exhausted.
 
13959
 */
 
13960
    __pyx_t_6 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_update_current_block(__pyx_v_self); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13961
    goto __pyx_L39;
 
13962
  }
 
13963
  __pyx_L39:;
 
13964
 
 
13965
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1651
 
13966
 *         # walk until both the directory listing and the versioned metadata
 
13967
 *         # are exhausted.
 
13968
 *         while (self.current_dir_info is not None             # <<<<<<<<<<<<<<
 
13969
 *             or self.current_block is not None):
 
13970
 *             # Uncommon case - a missing directory or an unversioned directory:
 
13971
 */
 
13972
  while (1) {
 
13973
 
 
13974
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1652
 
13975
 *         # are exhausted.
 
13976
 *         while (self.current_dir_info is not None
 
13977
 *             or self.current_block is not None):             # <<<<<<<<<<<<<<
 
13978
 *             # Uncommon case - a missing directory or an unversioned directory:
 
13979
 *             if (self.current_dir_info and self.current_block
 
13980
 */
 
13981
    __pyx_t_7 = (__pyx_v_self->current_dir_info != Py_None);
 
13982
    if (!__pyx_t_7) {
 
13983
      __pyx_t_13 = (__pyx_v_self->current_block != Py_None);
 
13984
      __pyx_t_1 = __pyx_t_13;
 
13985
    } else {
 
13986
      __pyx_t_1 = __pyx_t_7;
 
13987
    }
 
13988
    if (!__pyx_t_1) break;
 
13989
 
 
13990
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1654
 
13991
 *             or self.current_block is not None):
 
13992
 *             # Uncommon case - a missing directory or an unversioned directory:
 
13993
 *             if (self.current_dir_info and self.current_block             # <<<<<<<<<<<<<<
 
13994
 *                 and self.current_dir_info[0][0] != self.current_block[0]):
 
13995
 *                 # Work around pyrex broken heuristic - current_dirname has
 
13996
 */
 
13997
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->current_dir_info); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
13998
    if (__pyx_t_1) {
 
13999
 
 
14000
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1655
 
14001
 *             # Uncommon case - a missing directory or an unversioned directory:
 
14002
 *             if (self.current_dir_info and self.current_block
 
14003
 *                 and self.current_dir_info[0][0] != self.current_block[0]):             # <<<<<<<<<<<<<<
 
14004
 *                 # Work around pyrex broken heuristic - current_dirname has
 
14005
 *                 # the same scope as current_dirname_c
 
14006
 */
 
14007
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->current_block); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14008
      if (__pyx_t_7) {
 
14009
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14010
        __Pyx_GOTREF(__pyx_t_5);
 
14011
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14012
        __Pyx_GOTREF(__pyx_t_3);
 
14013
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
14014
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_self->current_block, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14015
        __Pyx_GOTREF(__pyx_t_5);
 
14016
        __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_NE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14017
        __Pyx_GOTREF(__pyx_t_9);
 
14018
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
14019
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
14020
        __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14021
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
14022
        __pyx_t_11 = __pyx_t_13;
 
14023
      } else {
 
14024
        __pyx_t_11 = __pyx_t_7;
 
14025
      }
 
14026
      __pyx_t_7 = __pyx_t_11;
 
14027
    } else {
 
14028
      __pyx_t_7 = __pyx_t_1;
 
14029
    }
 
14030
    if (__pyx_t_7) {
 
14031
 
 
14032
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1658
 
14033
 *                 # Work around pyrex broken heuristic - current_dirname has
 
14034
 *                 # the same scope as current_dirname_c
 
14035
 *                 current_dirname = self.current_dir_info[0][0]             # <<<<<<<<<<<<<<
 
14036
 *                 current_dirname_c = PyString_AS_STRING_void(
 
14037
 *                     <void *>current_dirname)
 
14038
 */
 
14039
      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14040
      __Pyx_GOTREF(__pyx_t_9);
 
14041
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_9, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14042
      __Pyx_GOTREF(__pyx_t_5);
 
14043
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
14044
      __Pyx_DECREF(__pyx_v_current_dirname);
 
14045
      __pyx_v_current_dirname = __pyx_t_5;
 
14046
      __pyx_t_5 = 0;
 
14047
 
 
14048
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1660
 
14049
 *                 current_dirname = self.current_dir_info[0][0]
 
14050
 *                 current_dirname_c = PyString_AS_STRING_void(
 
14051
 *                     <void *>current_dirname)             # <<<<<<<<<<<<<<
 
14052
 *                 current_blockname = self.current_block[0]
 
14053
 *                 current_blockname_c = PyString_AS_STRING_void(
 
14054
 */
 
14055
      __pyx_v_current_dirname_c = PyString_AS_STRING(((void *)__pyx_v_current_dirname));
 
14056
 
 
14057
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1661
 
14058
 *                 current_dirname_c = PyString_AS_STRING_void(
 
14059
 *                     <void *>current_dirname)
 
14060
 *                 current_blockname = self.current_block[0]             # <<<<<<<<<<<<<<
 
14061
 *                 current_blockname_c = PyString_AS_STRING_void(
 
14062
 *                     <void *>current_blockname)
 
14063
 */
 
14064
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_self->current_block, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14065
      __Pyx_GOTREF(__pyx_t_5);
 
14066
      __Pyx_DECREF(__pyx_v_current_blockname);
 
14067
      __pyx_v_current_blockname = __pyx_t_5;
 
14068
      __pyx_t_5 = 0;
 
14069
 
 
14070
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1663
 
14071
 *                 current_blockname = self.current_block[0]
 
14072
 *                 current_blockname_c = PyString_AS_STRING_void(
 
14073
 *                     <void *>current_blockname)             # <<<<<<<<<<<<<<
 
14074
 *                 # In the python generator we evaluate this if block once per
 
14075
 *                 # dir+block; because we reenter in the pyrex version its being
 
14076
 */
 
14077
      __pyx_v_current_blockname_c = PyString_AS_STRING(((void *)__pyx_v_current_blockname));
 
14078
 
 
14079
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1671
 
14080
 *                     PyString_Size(current_dirname),
 
14081
 *                     current_blockname_c,
 
14082
 *                     PyString_Size(current_blockname)) < 0:             # <<<<<<<<<<<<<<
 
14083
 *                     # filesystem data refers to paths not covered by the
 
14084
 *                     # dirblock.  this has two possibilities:
 
14085
 */
 
14086
      __pyx_t_7 = (__pyx_f_6bzrlib_21_dirstate_helpers_pyx__cmp_by_dirs(__pyx_v_current_dirname_c, PyString_Size(__pyx_v_current_dirname), __pyx_v_current_blockname_c, PyString_Size(__pyx_v_current_blockname)) < 0);
 
14087
      if (__pyx_t_7) {
 
14088
 
 
14089
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1682
 
14090
 *                     # recurse into unknown directories.
 
14091
 *                     # We are doing a loop
 
14092
 *                     while self.path_index < len(self.current_dir_list):             # <<<<<<<<<<<<<<
 
14093
 *                         current_path_info = self.current_dir_list[self.path_index]
 
14094
 *                         # dont descend into this unversioned path if it is
 
14095
 */
 
14096
        while (1) {
 
14097
          __pyx_t_5 = __pyx_v_self->current_dir_list;
 
14098
          __Pyx_INCREF(__pyx_t_5);
 
14099
          __pyx_t_8 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14100
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
14101
          __pyx_t_7 = (__pyx_v_self->path_index < __pyx_t_8);
 
14102
          if (!__pyx_t_7) break;
 
14103
 
 
14104
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1683
 
14105
 *                     # We are doing a loop
 
14106
 *                     while self.path_index < len(self.current_dir_list):
 
14107
 *                         current_path_info = self.current_dir_list[self.path_index]             # <<<<<<<<<<<<<<
 
14108
 *                         # dont descend into this unversioned path if it is
 
14109
 *                         # a dir
 
14110
 */
 
14111
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_self->current_dir_list, __pyx_v_self->path_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14112
          __Pyx_GOTREF(__pyx_t_5);
 
14113
          __Pyx_DECREF(__pyx_v_current_path_info);
 
14114
          __pyx_v_current_path_info = __pyx_t_5;
 
14115
          __pyx_t_5 = 0;
 
14116
 
 
14117
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1686
 
14118
 *                         # dont descend into this unversioned path if it is
 
14119
 *                         # a dir
 
14120
 *                         if current_path_info[2] in ('directory',             # <<<<<<<<<<<<<<
 
14121
 *                                                     'tree-reference'):
 
14122
 *                             del self.current_dir_list[self.path_index]
 
14123
 */
 
14124
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14125
          __Pyx_GOTREF(__pyx_t_5);
 
14126
          __pyx_t_9 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__directory), Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14127
          __Pyx_GOTREF(__pyx_t_9);
 
14128
          __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14129
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
14130
          __pyx_t_1 = __pyx_t_7;
 
14131
          if (!__pyx_t_1) {
 
14132
            __pyx_t_9 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_kp_s_37), Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14133
            __Pyx_GOTREF(__pyx_t_9);
 
14134
            __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14135
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
14136
            __pyx_t_11 = __pyx_t_7;
 
14137
            __pyx_t_7 = __pyx_t_11;
 
14138
          } else {
 
14139
            __pyx_t_7 = __pyx_t_1;
 
14140
          }
 
14141
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
14142
          __pyx_t_1 = __pyx_t_7;
 
14143
          if (__pyx_t_1) {
 
14144
 
 
14145
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1688
 
14146
 *                         if current_path_info[2] in ('directory',
 
14147
 *                                                     'tree-reference'):
 
14148
 *                             del self.current_dir_list[self.path_index]             # <<<<<<<<<<<<<<
 
14149
 *                             self.path_index = self.path_index - 1
 
14150
 *                         self.path_index = self.path_index + 1
 
14151
 */
 
14152
            if (__Pyx_DelItemInt(__pyx_v_self->current_dir_list, __pyx_v_self->path_index, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14153
 
 
14154
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1689
 
14155
 *                                                     'tree-reference'):
 
14156
 *                             del self.current_dir_list[self.path_index]
 
14157
 *                             self.path_index = self.path_index - 1             # <<<<<<<<<<<<<<
 
14158
 *                         self.path_index = self.path_index + 1
 
14159
 *                         if self.want_unversioned:
 
14160
 */
 
14161
            __pyx_v_self->path_index = (__pyx_v_self->path_index - 1);
 
14162
            goto __pyx_L72;
 
14163
          }
 
14164
          __pyx_L72:;
 
14165
 
 
14166
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1690
 
14167
 *                             del self.current_dir_list[self.path_index]
 
14168
 *                             self.path_index = self.path_index - 1
 
14169
 *                         self.path_index = self.path_index + 1             # <<<<<<<<<<<<<<
 
14170
 *                         if self.want_unversioned:
 
14171
 *                             if current_path_info[2] == 'directory':
 
14172
 */
 
14173
          __pyx_v_self->path_index = (__pyx_v_self->path_index + 1);
 
14174
 
 
14175
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1691
 
14176
 *                             self.path_index = self.path_index - 1
 
14177
 *                         self.path_index = self.path_index + 1
 
14178
 *                         if self.want_unversioned:             # <<<<<<<<<<<<<<
 
14179
 *                             if current_path_info[2] == 'directory':
 
14180
 *                                 if self.tree._directory_is_tree_reference(
 
14181
 */
 
14182
          if (__pyx_v_self->want_unversioned) {
 
14183
 
 
14184
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1692
 
14185
 *                         self.path_index = self.path_index + 1
 
14186
 *                         if self.want_unversioned:
 
14187
 *                             if current_path_info[2] == 'directory':             # <<<<<<<<<<<<<<
 
14188
 *                                 if self.tree._directory_is_tree_reference(
 
14189
 *                                     self.utf8_decode(current_path_info[0])[0]):
 
14190
 */
 
14191
            __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14192
            __Pyx_GOTREF(__pyx_t_5);
 
14193
            __pyx_t_9 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_n_s__directory), Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14194
            __Pyx_GOTREF(__pyx_t_9);
 
14195
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
14196
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14197
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
14198
            if (__pyx_t_1) {
 
14199
 
 
14200
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1693
 
14201
 *                         if self.want_unversioned:
 
14202
 *                             if current_path_info[2] == 'directory':
 
14203
 *                                 if self.tree._directory_is_tree_reference(             # <<<<<<<<<<<<<<
 
14204
 *                                     self.utf8_decode(current_path_info[0])[0]):
 
14205
 *                                     current_path_info = current_path_info[:2] + \
 
14206
 */
 
14207
              __pyx_t_9 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n_s_49); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14208
              __Pyx_GOTREF(__pyx_t_9);
 
14209
 
 
14210
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1694
 
14211
 *                             if current_path_info[2] == 'directory':
 
14212
 *                                 if self.tree._directory_is_tree_reference(
 
14213
 *                                     self.utf8_decode(current_path_info[0])[0]):             # <<<<<<<<<<<<<<
 
14214
 *                                     current_path_info = current_path_info[:2] + \
 
14215
 *                                         ('tree-reference',) + current_path_info[3:]
 
14216
 */
 
14217
              __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14218
              __Pyx_GOTREF(__pyx_t_5);
 
14219
              __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14220
              __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
14221
              PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
 
14222
              __Pyx_GIVEREF(__pyx_t_5);
 
14223
              __pyx_t_5 = 0;
 
14224
              __pyx_t_5 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14225
              __Pyx_GOTREF(__pyx_t_5);
 
14226
              __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
14227
              __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14228
              __Pyx_GOTREF(__pyx_t_3);
 
14229
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
14230
              __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14231
              __Pyx_GOTREF(((PyObject *)__pyx_t_5));
 
14232
              PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
 
14233
              __Pyx_GIVEREF(__pyx_t_3);
 
14234
              __pyx_t_3 = 0;
 
14235
              __pyx_t_3 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14236
              __Pyx_GOTREF(__pyx_t_3);
 
14237
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
14238
              __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
 
14239
              __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14240
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
14241
              if (__pyx_t_1) {
 
14242
 
 
14243
                /* "bzrlib/_dirstate_helpers_pyx.pyx":1695
 
14244
 *                                 if self.tree._directory_is_tree_reference(
 
14245
 *                                     self.utf8_decode(current_path_info[0])[0]):
 
14246
 *                                     current_path_info = current_path_info[:2] + \             # <<<<<<<<<<<<<<
 
14247
 *                                         ('tree-reference',) + current_path_info[3:]
 
14248
 *                             new_executable = bool(
 
14249
 */
 
14250
                __pyx_t_3 = __Pyx_PySequence_GetSlice(__pyx_v_current_path_info, 0, 2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14251
                __Pyx_GOTREF(__pyx_t_3);
 
14252
 
 
14253
                /* "bzrlib/_dirstate_helpers_pyx.pyx":1696
 
14254
 *                                     self.utf8_decode(current_path_info[0])[0]):
 
14255
 *                                     current_path_info = current_path_info[:2] + \
 
14256
 *                                         ('tree-reference',) + current_path_info[3:]             # <<<<<<<<<<<<<<
 
14257
 *                             new_executable = bool(
 
14258
 *                                 stat.S_ISREG(current_path_info[3].st_mode)
 
14259
 */
 
14260
                __pyx_t_5 = PyNumber_Add(__pyx_t_3, ((PyObject *)__pyx_k_tuple_56)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14261
                __Pyx_GOTREF(__pyx_t_5);
 
14262
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
14263
                __pyx_t_3 = __Pyx_PySequence_GetSlice(__pyx_v_current_path_info, 3, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14264
                __Pyx_GOTREF(__pyx_t_3);
 
14265
                __pyx_t_9 = PyNumber_Add(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14266
                __Pyx_GOTREF(__pyx_t_9);
 
14267
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
14268
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
14269
                __Pyx_DECREF(__pyx_v_current_path_info);
 
14270
                __pyx_v_current_path_info = __pyx_t_9;
 
14271
                __pyx_t_9 = 0;
 
14272
                goto __pyx_L75;
 
14273
              }
 
14274
              __pyx_L75:;
 
14275
              goto __pyx_L74;
 
14276
            }
 
14277
            __pyx_L74:;
 
14278
 
 
14279
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1698
 
14280
 *                                         ('tree-reference',) + current_path_info[3:]
 
14281
 *                             new_executable = bool(
 
14282
 *                                 stat.S_ISREG(current_path_info[3].st_mode)             # <<<<<<<<<<<<<<
 
14283
 *                                 and stat.S_IEXEC & current_path_info[3].st_mode)
 
14284
 *                             return (None,
 
14285
 */
 
14286
            __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__stat); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14287
            __Pyx_GOTREF(__pyx_t_9);
 
14288
            __pyx_t_3 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__S_ISREG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14289
            __Pyx_GOTREF(__pyx_t_3);
 
14290
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
14291
            __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_current_path_info, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14292
            __Pyx_GOTREF(__pyx_t_9);
 
14293
            __pyx_t_5 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__st_mode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14294
            __Pyx_GOTREF(__pyx_t_5);
 
14295
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
14296
            __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14297
            __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
14298
            PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5);
 
14299
            __Pyx_GIVEREF(__pyx_t_5);
 
14300
            __pyx_t_5 = 0;
 
14301
            __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14302
            __Pyx_GOTREF(__pyx_t_5);
 
14303
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
14304
            __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
14305
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14306
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
14307
            if (__pyx_t_1) {
 
14308
 
 
14309
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1699
 
14310
 *                             new_executable = bool(
 
14311
 *                                 stat.S_ISREG(current_path_info[3].st_mode)
 
14312
 *                                 and stat.S_IEXEC & current_path_info[3].st_mode)             # <<<<<<<<<<<<<<
 
14313
 *                             return (None,
 
14314
 *                                 (None, self.utf8_decode(current_path_info[0])[0]),
 
14315
 */
 
14316
              __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__stat); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14317
              __Pyx_GOTREF(__pyx_t_5);
 
14318
              __pyx_t_9 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__S_IEXEC); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14319
              __Pyx_GOTREF(__pyx_t_9);
 
14320
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
14321
              __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_current_path_info, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14322
              __Pyx_GOTREF(__pyx_t_5);
 
14323
              __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__st_mode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14324
              __Pyx_GOTREF(__pyx_t_3);
 
14325
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
14326
              __pyx_t_5 = PyNumber_And(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14327
              __Pyx_GOTREF(__pyx_t_5);
 
14328
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
14329
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
14330
              __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14331
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
14332
              __pyx_t_11 = __pyx_t_7;
 
14333
            } else {
 
14334
              __pyx_t_11 = __pyx_t_1;
 
14335
            }
 
14336
            __pyx_t_5 = __Pyx_PyBool_FromLong((!(!__pyx_t_11))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14337
            __Pyx_GOTREF(__pyx_t_5);
 
14338
            __Pyx_DECREF(__pyx_v_new_executable);
 
14339
            __pyx_v_new_executable = __pyx_t_5;
 
14340
            __pyx_t_5 = 0;
 
14341
 
 
14342
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1700
 
14343
 *                                 stat.S_ISREG(current_path_info[3].st_mode)
 
14344
 *                                 and stat.S_IEXEC & current_path_info[3].st_mode)
 
14345
 *                             return (None,             # <<<<<<<<<<<<<<
 
14346
 *                                 (None, self.utf8_decode(current_path_info[0])[0]),
 
14347
 *                                 True,
 
14348
 */
 
14349
            __Pyx_XDECREF(__pyx_r);
 
14350
 
 
14351
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1701
 
14352
 *                                 and stat.S_IEXEC & current_path_info[3].st_mode)
 
14353
 *                             return (None,
 
14354
 *                                 (None, self.utf8_decode(current_path_info[0])[0]),             # <<<<<<<<<<<<<<
 
14355
 *                                 True,
 
14356
 *                                 (False, False),
 
14357
 */
 
14358
            __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14359
            __Pyx_GOTREF(__pyx_t_5);
 
14360
            __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14361
            __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
14362
            PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
 
14363
            __Pyx_GIVEREF(__pyx_t_5);
 
14364
            __pyx_t_5 = 0;
 
14365
            __pyx_t_5 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14366
            __Pyx_GOTREF(__pyx_t_5);
 
14367
            __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
14368
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14369
            __Pyx_GOTREF(__pyx_t_3);
 
14370
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
14371
            __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14372
            __Pyx_GOTREF(((PyObject *)__pyx_t_5));
 
14373
            __Pyx_INCREF(Py_None);
 
14374
            PyTuple_SET_ITEM(__pyx_t_5, 0, Py_None);
 
14375
            __Pyx_GIVEREF(Py_None);
 
14376
            PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
 
14377
            __Pyx_GIVEREF(__pyx_t_3);
 
14378
            __pyx_t_3 = 0;
 
14379
 
 
14380
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1702
 
14381
 *                             return (None,
 
14382
 *                                 (None, self.utf8_decode(current_path_info[0])[0]),
 
14383
 *                                 True,             # <<<<<<<<<<<<<<
 
14384
 *                                 (False, False),
 
14385
 *                                 (None, None),
 
14386
 */
 
14387
            __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14388
            __Pyx_GOTREF(__pyx_t_3);
 
14389
 
 
14390
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1703
 
14391
 *                                 (None, self.utf8_decode(current_path_info[0])[0]),
 
14392
 *                                 True,
 
14393
 *                                 (False, False),             # <<<<<<<<<<<<<<
 
14394
 *                                 (None, None),
 
14395
 *                                 (None, self.utf8_decode(current_path_info[1])[0]),
 
14396
 */
 
14397
            __pyx_t_9 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14398
            __Pyx_GOTREF(__pyx_t_9);
 
14399
            __pyx_t_12 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14400
            __Pyx_GOTREF(__pyx_t_12);
 
14401
            __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14402
            __Pyx_GOTREF(((PyObject *)__pyx_t_10));
 
14403
            PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
 
14404
            __Pyx_GIVEREF(__pyx_t_9);
 
14405
            PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_12);
 
14406
            __Pyx_GIVEREF(__pyx_t_12);
 
14407
            __pyx_t_9 = 0;
 
14408
            __pyx_t_12 = 0;
 
14409
 
 
14410
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1705
 
14411
 *                                 (False, False),
 
14412
 *                                 (None, None),
 
14413
 *                                 (None, self.utf8_decode(current_path_info[1])[0]),             # <<<<<<<<<<<<<<
 
14414
 *                                 (None, current_path_info[2]),
 
14415
 *                                 (None, new_executable))
 
14416
 */
 
14417
            __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_current_path_info, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14418
            __Pyx_GOTREF(__pyx_t_12);
 
14419
            __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14420
            __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
14421
            PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_12);
 
14422
            __Pyx_GIVEREF(__pyx_t_12);
 
14423
            __pyx_t_12 = 0;
 
14424
            __pyx_t_12 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14425
            __Pyx_GOTREF(__pyx_t_12);
 
14426
            __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
14427
            __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_12, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14428
            __Pyx_GOTREF(__pyx_t_9);
 
14429
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
14430
            __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14431
            __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
14432
            __Pyx_INCREF(Py_None);
 
14433
            PyTuple_SET_ITEM(__pyx_t_12, 0, Py_None);
 
14434
            __Pyx_GIVEREF(Py_None);
 
14435
            PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_9);
 
14436
            __Pyx_GIVEREF(__pyx_t_9);
 
14437
            __pyx_t_9 = 0;
 
14438
 
 
14439
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1706
 
14440
 *                                 (None, None),
 
14441
 *                                 (None, self.utf8_decode(current_path_info[1])[0]),
 
14442
 *                                 (None, current_path_info[2]),             # <<<<<<<<<<<<<<
 
14443
 *                                 (None, new_executable))
 
14444
 *                     # This dir info has been handled, go to the next
 
14445
 */
 
14446
            __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14447
            __Pyx_GOTREF(__pyx_t_9);
 
14448
            __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14449
            __Pyx_GOTREF(((PyObject *)__pyx_t_4));
 
14450
            __Pyx_INCREF(Py_None);
 
14451
            PyTuple_SET_ITEM(__pyx_t_4, 0, Py_None);
 
14452
            __Pyx_GIVEREF(Py_None);
 
14453
            PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_9);
 
14454
            __Pyx_GIVEREF(__pyx_t_9);
 
14455
            __pyx_t_9 = 0;
 
14456
 
 
14457
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1707
 
14458
 *                                 (None, self.utf8_decode(current_path_info[1])[0]),
 
14459
 *                                 (None, current_path_info[2]),
 
14460
 *                                 (None, new_executable))             # <<<<<<<<<<<<<<
 
14461
 *                     # This dir info has been handled, go to the next
 
14462
 *                     self.path_index = 0
 
14463
 */
 
14464
            __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14465
            __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
14466
            __Pyx_INCREF(Py_None);
 
14467
            PyTuple_SET_ITEM(__pyx_t_9, 0, Py_None);
 
14468
            __Pyx_GIVEREF(Py_None);
 
14469
            __Pyx_INCREF(__pyx_v_new_executable);
 
14470
            PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_new_executable);
 
14471
            __Pyx_GIVEREF(__pyx_v_new_executable);
 
14472
            __pyx_t_2 = PyTuple_New(8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14473
            __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
14474
            __Pyx_INCREF(Py_None);
 
14475
            PyTuple_SET_ITEM(__pyx_t_2, 0, Py_None);
 
14476
            __Pyx_GIVEREF(Py_None);
 
14477
            PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_t_5));
 
14478
            __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
 
14479
            PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_3);
 
14480
            __Pyx_GIVEREF(__pyx_t_3);
 
14481
            PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_t_10));
 
14482
            __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
 
14483
            __Pyx_INCREF(((PyObject *)__pyx_k_tuple_57));
 
14484
            PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_k_tuple_57));
 
14485
            __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57));
 
14486
            PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_t_12));
 
14487
            __Pyx_GIVEREF(((PyObject *)__pyx_t_12));
 
14488
            PyTuple_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_t_4));
 
14489
            __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
 
14490
            PyTuple_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_t_9));
 
14491
            __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
 
14492
            __pyx_t_5 = 0;
 
14493
            __pyx_t_3 = 0;
 
14494
            __pyx_t_10 = 0;
 
14495
            __pyx_t_12 = 0;
 
14496
            __pyx_t_4 = 0;
 
14497
            __pyx_t_9 = 0;
 
14498
            __pyx_r = ((PyObject *)__pyx_t_2);
 
14499
            __pyx_t_2 = 0;
 
14500
            goto __pyx_L0;
 
14501
            goto __pyx_L73;
 
14502
          }
 
14503
          __pyx_L73:;
 
14504
        }
 
14505
 
 
14506
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1709
 
14507
 *                                 (None, new_executable))
 
14508
 *                     # This dir info has been handled, go to the next
 
14509
 *                     self.path_index = 0             # <<<<<<<<<<<<<<
 
14510
 *                     self.current_dir_list = None
 
14511
 *                     try:
 
14512
 */
 
14513
        __pyx_v_self->path_index = 0;
 
14514
 
 
14515
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1710
 
14516
 *                     # This dir info has been handled, go to the next
 
14517
 *                     self.path_index = 0
 
14518
 *                     self.current_dir_list = None             # <<<<<<<<<<<<<<
 
14519
 *                     try:
 
14520
 *                         self.current_dir_info = self.dir_iterator.next()
 
14521
 */
 
14522
        __Pyx_INCREF(Py_None);
 
14523
        __Pyx_GIVEREF(Py_None);
 
14524
        __Pyx_GOTREF(__pyx_v_self->current_dir_list);
 
14525
        __Pyx_DECREF(__pyx_v_self->current_dir_list);
 
14526
        __pyx_v_self->current_dir_list = Py_None;
 
14527
 
 
14528
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1711
 
14529
 *                     self.path_index = 0
 
14530
 *                     self.current_dir_list = None
 
14531
 *                     try:             # <<<<<<<<<<<<<<
 
14532
 *                         self.current_dir_info = self.dir_iterator.next()
 
14533
 *                         self.current_dir_list = self.current_dir_info[1]
 
14534
 */
 
14535
        {
 
14536
          PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
 
14537
          __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
 
14538
          __Pyx_XGOTREF(__pyx_save_exc_type);
 
14539
          __Pyx_XGOTREF(__pyx_save_exc_value);
 
14540
          __Pyx_XGOTREF(__pyx_save_exc_tb);
 
14541
          /*try:*/ {
 
14542
 
 
14543
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1712
 
14544
 *                     self.current_dir_list = None
 
14545
 *                     try:
 
14546
 *                         self.current_dir_info = self.dir_iterator.next()             # <<<<<<<<<<<<<<
 
14547
 *                         self.current_dir_list = self.current_dir_info[1]
 
14548
 *                     except StopIteration, _:
 
14549
 */
 
14550
            __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->dir_iterator, __pyx_n_s__next); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L76_error;}
 
14551
            __Pyx_GOTREF(__pyx_t_2);
 
14552
            __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L76_error;}
 
14553
            __Pyx_GOTREF(__pyx_t_9);
 
14554
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
14555
            __Pyx_GIVEREF(__pyx_t_9);
 
14556
            __Pyx_GOTREF(__pyx_v_self->current_dir_info);
 
14557
            __Pyx_DECREF(__pyx_v_self->current_dir_info);
 
14558
            __pyx_v_self->current_dir_info = __pyx_t_9;
 
14559
            __pyx_t_9 = 0;
 
14560
 
 
14561
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1713
 
14562
 *                     try:
 
14563
 *                         self.current_dir_info = self.dir_iterator.next()
 
14564
 *                         self.current_dir_list = self.current_dir_info[1]             # <<<<<<<<<<<<<<
 
14565
 *                     except StopIteration, _:
 
14566
 *                         self.current_dir_info = None
 
14567
 */
 
14568
            __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __pyx_L76_error;}
 
14569
            __Pyx_GOTREF(__pyx_t_9);
 
14570
            __Pyx_GIVEREF(__pyx_t_9);
 
14571
            __Pyx_GOTREF(__pyx_v_self->current_dir_list);
 
14572
            __Pyx_DECREF(__pyx_v_self->current_dir_list);
 
14573
            __pyx_v_self->current_dir_list = __pyx_t_9;
 
14574
            __pyx_t_9 = 0;
 
14575
          }
 
14576
          __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
 
14577
          __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
 
14578
          __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
 
14579
          goto __pyx_L83_try_end;
 
14580
          __pyx_L76_error:;
 
14581
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
 
14582
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
14583
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
 
14584
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
 
14585
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
 
14586
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
 
14587
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
 
14588
 
 
14589
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1714
 
14590
 *                         self.current_dir_info = self.dir_iterator.next()
 
14591
 *                         self.current_dir_list = self.current_dir_info[1]
 
14592
 *                     except StopIteration, _:             # <<<<<<<<<<<<<<
 
14593
 *                         self.current_dir_info = None
 
14594
 *                 else: #(dircmp > 0)
 
14595
 */
 
14596
          __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
 
14597
          if (__pyx_t_6) {
 
14598
            __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._iter_next");
 
14599
            if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_2, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1714; __pyx_clineno = __LINE__; goto __pyx_L78_except_error;}
 
14600
            __Pyx_GOTREF(__pyx_t_9);
 
14601
            __Pyx_GOTREF(__pyx_t_2);
 
14602
            __Pyx_GOTREF(__pyx_t_4);
 
14603
            __Pyx_INCREF(__pyx_t_2);
 
14604
            __Pyx_DECREF(__pyx_v__);
 
14605
            __pyx_v__ = __pyx_t_2;
 
14606
 
 
14607
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1715
 
14608
 *                         self.current_dir_list = self.current_dir_info[1]
 
14609
 *                     except StopIteration, _:
 
14610
 *                         self.current_dir_info = None             # <<<<<<<<<<<<<<
 
14611
 *                 else: #(dircmp > 0)
 
14612
 *                     # We have a dirblock entry for this location, but there
 
14613
 */
 
14614
            __Pyx_INCREF(Py_None);
 
14615
            __Pyx_GIVEREF(Py_None);
 
14616
            __Pyx_GOTREF(__pyx_v_self->current_dir_info);
 
14617
            __Pyx_DECREF(__pyx_v_self->current_dir_info);
 
14618
            __pyx_v_self->current_dir_info = Py_None;
 
14619
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
14620
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
14621
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
14622
            goto __pyx_L77_exception_handled;
 
14623
          }
 
14624
          __pyx_L78_except_error:;
 
14625
          __Pyx_XGIVEREF(__pyx_save_exc_type);
 
14626
          __Pyx_XGIVEREF(__pyx_save_exc_value);
 
14627
          __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
14628
          __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
14629
          goto __pyx_L1_error;
 
14630
          __pyx_L77_exception_handled:;
 
14631
          __Pyx_XGIVEREF(__pyx_save_exc_type);
 
14632
          __Pyx_XGIVEREF(__pyx_save_exc_value);
 
14633
          __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
14634
          __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
14635
          __pyx_L83_try_end:;
 
14636
        }
 
14637
        goto __pyx_L69;
 
14638
      }
 
14639
      /*else*/ {
 
14640
 
 
14641
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1724
 
14642
 *                     # need to handle all of the files that are contained
 
14643
 *                     # within.
 
14644
 *                     while self.current_block_pos < len(self.current_block_list):             # <<<<<<<<<<<<<<
 
14645
 *                         current_entry = self.current_block_list[self.current_block_pos]
 
14646
 *                         self.current_block_pos = self.current_block_pos + 1
 
14647
 */
 
14648
        while (1) {
 
14649
          __pyx_t_4 = __pyx_v_self->current_block_list;
 
14650
          __Pyx_INCREF(__pyx_t_4);
 
14651
          __pyx_t_8 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14652
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
14653
          __pyx_t_11 = (__pyx_v_self->current_block_pos < __pyx_t_8);
 
14654
          if (!__pyx_t_11) break;
 
14655
 
 
14656
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1725
 
14657
 *                     # within.
 
14658
 *                     while self.current_block_pos < len(self.current_block_list):
 
14659
 *                         current_entry = self.current_block_list[self.current_block_pos]             # <<<<<<<<<<<<<<
 
14660
 *                         self.current_block_pos = self.current_block_pos + 1
 
14661
 *                         # entry referring to file not present on disk.
 
14662
 */
 
14663
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_self->current_block_list, __pyx_v_self->current_block_pos, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14664
          __Pyx_GOTREF(__pyx_t_4);
 
14665
          __Pyx_DECREF(__pyx_v_current_entry);
 
14666
          __pyx_v_current_entry = __pyx_t_4;
 
14667
          __pyx_t_4 = 0;
 
14668
 
 
14669
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1726
 
14670
 *                     while self.current_block_pos < len(self.current_block_list):
 
14671
 *                         current_entry = self.current_block_list[self.current_block_pos]
 
14672
 *                         self.current_block_pos = self.current_block_pos + 1             # <<<<<<<<<<<<<<
 
14673
 *                         # entry referring to file not present on disk.
 
14674
 *                         # advance the entry only, after processing.
 
14675
 */
 
14676
          __pyx_v_self->current_block_pos = (__pyx_v_self->current_block_pos + 1);
 
14677
 
 
14678
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1729
 
14679
 *                         # entry referring to file not present on disk.
 
14680
 *                         # advance the entry only, after processing.
 
14681
 *                         result, changed = self._process_entry(current_entry, None)             # <<<<<<<<<<<<<<
 
14682
 *                         if changed is not None:
 
14683
 *                             if changed:
 
14684
 */
 
14685
          __pyx_t_4 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self, __pyx_v_current_entry, Py_None); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14686
          __Pyx_GOTREF(__pyx_t_4);
 
14687
          if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
 
14688
            PyObject* tuple = __pyx_t_4;
 
14689
            __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
 
14690
            __pyx_t_9 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_9);
 
14691
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
14692
            __Pyx_DECREF(__pyx_v_result);
 
14693
            __pyx_v_result = __pyx_t_2;
 
14694
            __pyx_t_2 = 0;
 
14695
            __Pyx_DECREF(__pyx_v_changed);
 
14696
            __pyx_v_changed = __pyx_t_9;
 
14697
            __pyx_t_9 = 0;
 
14698
          } else {
 
14699
            __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14700
            __Pyx_GOTREF(__pyx_t_12);
 
14701
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
14702
            __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_12, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14703
            __Pyx_GOTREF(__pyx_t_2);
 
14704
            __pyx_t_9 = __Pyx_UnpackItem(__pyx_t_12, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14705
            __Pyx_GOTREF(__pyx_t_9);
 
14706
            if (__Pyx_EndUnpack(__pyx_t_12, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14707
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
14708
            __Pyx_DECREF(__pyx_v_result);
 
14709
            __pyx_v_result = __pyx_t_2;
 
14710
            __pyx_t_2 = 0;
 
14711
            __Pyx_DECREF(__pyx_v_changed);
 
14712
            __pyx_v_changed = __pyx_t_9;
 
14713
            __pyx_t_9 = 0;
 
14714
          }
 
14715
 
 
14716
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1730
 
14717
 *                         # advance the entry only, after processing.
 
14718
 *                         result, changed = self._process_entry(current_entry, None)
 
14719
 *                         if changed is not None:             # <<<<<<<<<<<<<<
 
14720
 *                             if changed:
 
14721
 *                                 self._gather_result_for_consistency(result)
 
14722
 */
 
14723
          __pyx_t_11 = (__pyx_v_changed != Py_None);
 
14724
          if (__pyx_t_11) {
 
14725
 
 
14726
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1731
 
14727
 *                         result, changed = self._process_entry(current_entry, None)
 
14728
 *                         if changed is not None:
 
14729
 *                             if changed:             # <<<<<<<<<<<<<<
 
14730
 *                                 self._gather_result_for_consistency(result)
 
14731
 *                             if changed or self.include_unchanged:
 
14732
 */
 
14733
            __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_changed); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14734
            if (__pyx_t_11) {
 
14735
 
 
14736
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1732
 
14737
 *                         if changed is not None:
 
14738
 *                             if changed:
 
14739
 *                                 self._gather_result_for_consistency(result)             # <<<<<<<<<<<<<<
 
14740
 *                             if changed or self.include_unchanged:
 
14741
 *                                 return result
 
14742
 */
 
14743
              __pyx_t_6 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_gather_result_for_consistency(__pyx_v_self, __pyx_v_result); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14744
              goto __pyx_L89;
 
14745
            }
 
14746
            __pyx_L89:;
 
14747
 
 
14748
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1733
 
14749
 *                             if changed:
 
14750
 *                                 self._gather_result_for_consistency(result)
 
14751
 *                             if changed or self.include_unchanged:             # <<<<<<<<<<<<<<
 
14752
 *                                 return result
 
14753
 *                     self.block_index = self.block_index + 1
 
14754
 */
 
14755
            __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_changed); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14756
            if (!__pyx_t_11) {
 
14757
              __pyx_t_1 = __pyx_v_self->include_unchanged;
 
14758
            } else {
 
14759
              __pyx_t_1 = __pyx_t_11;
 
14760
            }
 
14761
            if (__pyx_t_1) {
 
14762
 
 
14763
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1734
 
14764
 *                                 self._gather_result_for_consistency(result)
 
14765
 *                             if changed or self.include_unchanged:
 
14766
 *                                 return result             # <<<<<<<<<<<<<<
 
14767
 *                     self.block_index = self.block_index + 1
 
14768
 *                     self._update_current_block()
 
14769
 */
 
14770
              __Pyx_XDECREF(__pyx_r);
 
14771
              __Pyx_INCREF(__pyx_v_result);
 
14772
              __pyx_r = __pyx_v_result;
 
14773
              goto __pyx_L0;
 
14774
              goto __pyx_L90;
 
14775
            }
 
14776
            __pyx_L90:;
 
14777
            goto __pyx_L88;
 
14778
          }
 
14779
          __pyx_L88:;
 
14780
        }
 
14781
 
 
14782
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1735
 
14783
 *                             if changed or self.include_unchanged:
 
14784
 *                                 return result
 
14785
 *                     self.block_index = self.block_index + 1             # <<<<<<<<<<<<<<
 
14786
 *                     self._update_current_block()
 
14787
 *                 continue # next loop-on-block/dir
 
14788
 */
 
14789
        __pyx_v_self->block_index = (__pyx_v_self->block_index + 1);
 
14790
 
 
14791
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1736
 
14792
 *                                 return result
 
14793
 *                     self.block_index = self.block_index + 1
 
14794
 *                     self._update_current_block()             # <<<<<<<<<<<<<<
 
14795
 *                 continue # next loop-on-block/dir
 
14796
 *             result = self._loop_one_block()
 
14797
 */
 
14798
        __pyx_t_6 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_update_current_block(__pyx_v_self); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14799
      }
 
14800
      __pyx_L69:;
 
14801
 
 
14802
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1737
 
14803
 *                     self.block_index = self.block_index + 1
 
14804
 *                     self._update_current_block()
 
14805
 *                 continue # next loop-on-block/dir             # <<<<<<<<<<<<<<
 
14806
 *             result = self._loop_one_block()
 
14807
 *             if result is not None:
 
14808
 */
 
14809
      goto __pyx_L66_continue;
 
14810
      goto __pyx_L68;
 
14811
    }
 
14812
    __pyx_L68:;
 
14813
 
 
14814
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1738
 
14815
 *                     self._update_current_block()
 
14816
 *                 continue # next loop-on-block/dir
 
14817
 *             result = self._loop_one_block()             # <<<<<<<<<<<<<<
 
14818
 *             if result is not None:
 
14819
 *                 return result
 
14820
 */
 
14821
    __pyx_t_4 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_loop_one_block(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14822
    __Pyx_GOTREF(__pyx_t_4);
 
14823
    __Pyx_DECREF(__pyx_v_result);
 
14824
    __pyx_v_result = __pyx_t_4;
 
14825
    __pyx_t_4 = 0;
 
14826
 
 
14827
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1739
 
14828
 *                 continue # next loop-on-block/dir
 
14829
 *             result = self._loop_one_block()
 
14830
 *             if result is not None:             # <<<<<<<<<<<<<<
 
14831
 *                 return result
 
14832
 *         if len(self.search_specific_files):
 
14833
 */
 
14834
    __pyx_t_1 = (__pyx_v_result != Py_None);
 
14835
    if (__pyx_t_1) {
 
14836
 
 
14837
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1740
 
14838
 *             result = self._loop_one_block()
 
14839
 *             if result is not None:
 
14840
 *                 return result             # <<<<<<<<<<<<<<
 
14841
 *         if len(self.search_specific_files):
 
14842
 *             # More supplied paths to process
 
14843
 */
 
14844
      __Pyx_XDECREF(__pyx_r);
 
14845
      __Pyx_INCREF(__pyx_v_result);
 
14846
      __pyx_r = __pyx_v_result;
 
14847
      goto __pyx_L0;
 
14848
      goto __pyx_L91;
 
14849
    }
 
14850
    __pyx_L91:;
 
14851
    __pyx_L66_continue:;
 
14852
  }
 
14853
 
 
14854
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1741
 
14855
 *             if result is not None:
 
14856
 *                 return result
 
14857
 *         if len(self.search_specific_files):             # <<<<<<<<<<<<<<
 
14858
 *             # More supplied paths to process
 
14859
 *             self.current_root = None
 
14860
 */
 
14861
  __pyx_t_4 = __pyx_v_self->search_specific_files;
 
14862
  __Pyx_INCREF(__pyx_t_4);
 
14863
  __pyx_t_8 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14864
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
14865
  if (__pyx_t_8) {
 
14866
 
 
14867
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1743
 
14868
 *         if len(self.search_specific_files):
 
14869
 *             # More supplied paths to process
 
14870
 *             self.current_root = None             # <<<<<<<<<<<<<<
 
14871
 *             return self._iter_next()
 
14872
 *         # Start expanding more conservatively, adding paths the user may not
 
14873
 */
 
14874
    __Pyx_INCREF(Py_None);
 
14875
    __Pyx_GIVEREF(Py_None);
 
14876
    __Pyx_GOTREF(__pyx_v_self->current_root);
 
14877
    __Pyx_DECREF(__pyx_v_self->current_root);
 
14878
    __pyx_v_self->current_root = Py_None;
 
14879
 
 
14880
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1744
 
14881
 *             # More supplied paths to process
 
14882
 *             self.current_root = None
 
14883
 *             return self._iter_next()             # <<<<<<<<<<<<<<
 
14884
 *         # Start expanding more conservatively, adding paths the user may not
 
14885
 *         # have intended but required for consistent deltas.
 
14886
 */
 
14887
    __Pyx_XDECREF(__pyx_r);
 
14888
    __pyx_t_4 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_iter_next(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14889
    __Pyx_GOTREF(__pyx_t_4);
 
14890
    __pyx_r = __pyx_t_4;
 
14891
    __pyx_t_4 = 0;
 
14892
    goto __pyx_L0;
 
14893
    goto __pyx_L92;
 
14894
  }
 
14895
  __pyx_L92:;
 
14896
 
 
14897
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1747
 
14898
 *         # Start expanding more conservatively, adding paths the user may not
 
14899
 *         # have intended but required for consistent deltas.
 
14900
 *         self.doing_consistency_expansion = 1             # <<<<<<<<<<<<<<
 
14901
 *         if not self._pending_consistent_entries:
 
14902
 *             self._pending_consistent_entries = self._next_consistent_entries()
 
14903
 */
 
14904
  __pyx_v_self->doing_consistency_expansion = 1;
 
14905
 
 
14906
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1748
 
14907
 *         # have intended but required for consistent deltas.
 
14908
 *         self.doing_consistency_expansion = 1
 
14909
 *         if not self._pending_consistent_entries:             # <<<<<<<<<<<<<<
 
14910
 *             self._pending_consistent_entries = self._next_consistent_entries()
 
14911
 *         while self._pending_consistent_entries:
 
14912
 */
 
14913
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_pending_consistent_entries); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14914
  __pyx_t_11 = (!__pyx_t_1);
 
14915
  if (__pyx_t_11) {
 
14916
 
 
14917
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1749
 
14918
 *         self.doing_consistency_expansion = 1
 
14919
 *         if not self._pending_consistent_entries:
 
14920
 *             self._pending_consistent_entries = self._next_consistent_entries()             # <<<<<<<<<<<<<<
 
14921
 *         while self._pending_consistent_entries:
 
14922
 *             result, changed = self._pending_consistent_entries.pop()
 
14923
 */
 
14924
    __pyx_t_4 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_next_consistent_entries(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14925
    __Pyx_GOTREF(__pyx_t_4);
 
14926
    __Pyx_GIVEREF(__pyx_t_4);
 
14927
    __Pyx_GOTREF(__pyx_v_self->_pending_consistent_entries);
 
14928
    __Pyx_DECREF(__pyx_v_self->_pending_consistent_entries);
 
14929
    __pyx_v_self->_pending_consistent_entries = __pyx_t_4;
 
14930
    __pyx_t_4 = 0;
 
14931
    goto __pyx_L93;
 
14932
  }
 
14933
  __pyx_L93:;
 
14934
 
 
14935
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1750
 
14936
 *         if not self._pending_consistent_entries:
 
14937
 *             self._pending_consistent_entries = self._next_consistent_entries()
 
14938
 *         while self._pending_consistent_entries:             # <<<<<<<<<<<<<<
 
14939
 *             result, changed = self._pending_consistent_entries.pop()
 
14940
 *             if changed is not None:
 
14941
 */
 
14942
  while (1) {
 
14943
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_self->_pending_consistent_entries); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14944
    if (!__pyx_t_11) break;
 
14945
 
 
14946
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1751
 
14947
 *             self._pending_consistent_entries = self._next_consistent_entries()
 
14948
 *         while self._pending_consistent_entries:
 
14949
 *             result, changed = self._pending_consistent_entries.pop()             # <<<<<<<<<<<<<<
 
14950
 *             if changed is not None:
 
14951
 *                 return result
 
14952
 */
 
14953
    __pyx_t_4 = __Pyx_PyObject_Pop(__pyx_v_self->_pending_consistent_entries); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14954
    __Pyx_GOTREF(__pyx_t_4);
 
14955
    if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
 
14956
      PyObject* tuple = __pyx_t_4;
 
14957
      __pyx_t_9 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_9);
 
14958
      __pyx_t_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_2);
 
14959
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
14960
      __Pyx_DECREF(__pyx_v_result);
 
14961
      __pyx_v_result = __pyx_t_9;
 
14962
      __pyx_t_9 = 0;
 
14963
      __Pyx_DECREF(__pyx_v_changed);
 
14964
      __pyx_v_changed = __pyx_t_2;
 
14965
      __pyx_t_2 = 0;
 
14966
    } else {
 
14967
      __pyx_t_12 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14968
      __Pyx_GOTREF(__pyx_t_12);
 
14969
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
14970
      __pyx_t_9 = __Pyx_UnpackItem(__pyx_t_12, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14971
      __Pyx_GOTREF(__pyx_t_9);
 
14972
      __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_12, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14973
      __Pyx_GOTREF(__pyx_t_2);
 
14974
      if (__Pyx_EndUnpack(__pyx_t_12, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
14975
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
14976
      __Pyx_DECREF(__pyx_v_result);
 
14977
      __pyx_v_result = __pyx_t_9;
 
14978
      __pyx_t_9 = 0;
 
14979
      __Pyx_DECREF(__pyx_v_changed);
 
14980
      __pyx_v_changed = __pyx_t_2;
 
14981
      __pyx_t_2 = 0;
 
14982
    }
 
14983
 
 
14984
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1752
 
14985
 *         while self._pending_consistent_entries:
 
14986
 *             result, changed = self._pending_consistent_entries.pop()
 
14987
 *             if changed is not None:             # <<<<<<<<<<<<<<
 
14988
 *                 return result
 
14989
 *         raise StopIteration()
 
14990
 */
 
14991
    __pyx_t_11 = (__pyx_v_changed != Py_None);
 
14992
    if (__pyx_t_11) {
 
14993
 
 
14994
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1753
 
14995
 *             result, changed = self._pending_consistent_entries.pop()
 
14996
 *             if changed is not None:
 
14997
 *                 return result             # <<<<<<<<<<<<<<
 
14998
 *         raise StopIteration()
 
14999
 * 
 
15000
 */
 
15001
      __Pyx_XDECREF(__pyx_r);
 
15002
      __Pyx_INCREF(__pyx_v_result);
 
15003
      __pyx_r = __pyx_v_result;
 
15004
      goto __pyx_L0;
 
15005
      goto __pyx_L96;
 
15006
    }
 
15007
    __pyx_L96:;
 
15008
  }
 
15009
 
 
15010
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1754
 
15011
 *             if changed is not None:
 
15012
 *                 return result
 
15013
 *         raise StopIteration()             # <<<<<<<<<<<<<<
 
15014
 * 
 
15015
 *     cdef object _maybe_tree_ref(self, current_path_info):
 
15016
 */
 
15017
  __pyx_t_4 = PyObject_Call(__pyx_builtin_StopIteration, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15018
  __Pyx_GOTREF(__pyx_t_4);
 
15019
  __Pyx_Raise(__pyx_t_4, 0, 0);
 
15020
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
15021
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15022
 
 
15023
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
15024
  goto __pyx_L0;
 
15025
  __pyx_L1_error:;
 
15026
  __Pyx_XDECREF(__pyx_t_2);
 
15027
  __Pyx_XDECREF(__pyx_t_3);
 
15028
  __Pyx_XDECREF(__pyx_t_4);
 
15029
  __Pyx_XDECREF(__pyx_t_5);
 
15030
  __Pyx_XDECREF(__pyx_t_9);
 
15031
  __Pyx_XDECREF(__pyx_t_10);
 
15032
  __Pyx_XDECREF(__pyx_t_12);
 
15033
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._iter_next");
 
15034
  __pyx_r = 0;
 
15035
  __pyx_L0:;
 
15036
  __Pyx_DECREF(__pyx_v_current_dirname);
 
15037
  __Pyx_DECREF(__pyx_v_current_blockname);
 
15038
  __Pyx_DECREF(__pyx_v_searched_specific_files);
 
15039
  __Pyx_DECREF(__pyx_v_entry);
 
15040
  __Pyx_DECREF(__pyx_v_result);
 
15041
  __Pyx_DECREF(__pyx_v_changed);
 
15042
  __Pyx_DECREF(__pyx_v__);
 
15043
  __Pyx_DECREF(__pyx_v_root_stat);
 
15044
  __Pyx_DECREF(__pyx_v_e);
 
15045
  __Pyx_DECREF(__pyx_v_new_executable);
 
15046
  __Pyx_DECREF(__pyx_v_e_winerror);
 
15047
  __Pyx_DECREF(__pyx_v_win_errors);
 
15048
  __Pyx_DECREF(__pyx_v_bzr_index);
 
15049
  __Pyx_DECREF(__pyx_v_initial_key);
 
15050
  __Pyx_DECREF(__pyx_v_current_path_info);
 
15051
  __Pyx_DECREF(__pyx_v_current_entry);
 
15052
  __Pyx_XGIVEREF(__pyx_r);
 
15053
  __Pyx_RefNannyFinishContext();
 
15054
  return __pyx_r;
 
15055
}
 
15056
 
 
15057
/* "bzrlib/_dirstate_helpers_pyx.pyx":1756
 
15058
 *         raise StopIteration()
 
15059
 * 
 
15060
 *     cdef object _maybe_tree_ref(self, current_path_info):             # <<<<<<<<<<<<<<
 
15061
 *         if self.tree._directory_is_tree_reference(
 
15062
 *             self.utf8_decode(current_path_info[0])[0]):
 
15063
 */
 
15064
 
 
15065
static  PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__maybe_tree_ref(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self, PyObject *__pyx_v_current_path_info) {
 
15066
  PyObject *__pyx_r = NULL;
 
15067
  PyObject *__pyx_t_1 = NULL;
 
15068
  PyObject *__pyx_t_2 = NULL;
 
15069
  PyObject *__pyx_t_3 = NULL;
 
15070
  int __pyx_t_4;
 
15071
  __Pyx_RefNannySetupContext("_maybe_tree_ref");
 
15072
 
 
15073
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1757
 
15074
 * 
 
15075
 *     cdef object _maybe_tree_ref(self, current_path_info):
 
15076
 *         if self.tree._directory_is_tree_reference(             # <<<<<<<<<<<<<<
 
15077
 *             self.utf8_decode(current_path_info[0])[0]):
 
15078
 *             return current_path_info[:2] + \
 
15079
 */
 
15080
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n_s_49); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15081
  __Pyx_GOTREF(__pyx_t_1);
 
15082
 
 
15083
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1758
 
15084
 *     cdef object _maybe_tree_ref(self, current_path_info):
 
15085
 *         if self.tree._directory_is_tree_reference(
 
15086
 *             self.utf8_decode(current_path_info[0])[0]):             # <<<<<<<<<<<<<<
 
15087
 *             return current_path_info[:2] + \
 
15088
 *                 ('tree-reference',) + current_path_info[3:]
 
15089
 */
 
15090
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15091
  __Pyx_GOTREF(__pyx_t_2);
 
15092
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15093
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
15094
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
 
15095
  __Pyx_GIVEREF(__pyx_t_2);
 
15096
  __pyx_t_2 = 0;
 
15097
  __pyx_t_2 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15098
  __Pyx_GOTREF(__pyx_t_2);
 
15099
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
15100
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15101
  __Pyx_GOTREF(__pyx_t_3);
 
15102
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
15103
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15104
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
15105
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
 
15106
  __Pyx_GIVEREF(__pyx_t_3);
 
15107
  __pyx_t_3 = 0;
 
15108
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15109
  __Pyx_GOTREF(__pyx_t_3);
 
15110
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
15111
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
15112
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15113
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
15114
  if (__pyx_t_4) {
 
15115
 
 
15116
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1759
 
15117
 *         if self.tree._directory_is_tree_reference(
 
15118
 *             self.utf8_decode(current_path_info[0])[0]):
 
15119
 *             return current_path_info[:2] + \             # <<<<<<<<<<<<<<
 
15120
 *                 ('tree-reference',) + current_path_info[3:]
 
15121
 *         else:
 
15122
 */
 
15123
    __Pyx_XDECREF(__pyx_r);
 
15124
 
 
15125
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1760
 
15126
 *             self.utf8_decode(current_path_info[0])[0]):
 
15127
 *             return current_path_info[:2] + \
 
15128
 *                 ('tree-reference',) + current_path_info[3:]             # <<<<<<<<<<<<<<
 
15129
 *         else:
 
15130
 *             return current_path_info
 
15131
 */
 
15132
    __pyx_t_3 = __Pyx_PySequence_GetSlice(__pyx_v_current_path_info, 0, 2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15133
    __Pyx_GOTREF(__pyx_t_3);
 
15134
    __pyx_t_2 = PyNumber_Add(__pyx_t_3, ((PyObject *)__pyx_k_tuple_59)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15135
    __Pyx_GOTREF(__pyx_t_2);
 
15136
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
15137
    __pyx_t_3 = __Pyx_PySequence_GetSlice(__pyx_v_current_path_info, 3, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15138
    __Pyx_GOTREF(__pyx_t_3);
 
15139
    __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15140
    __Pyx_GOTREF(__pyx_t_1);
 
15141
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
15142
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
15143
    __pyx_r = __pyx_t_1;
 
15144
    __pyx_t_1 = 0;
 
15145
    goto __pyx_L0;
 
15146
    goto __pyx_L3;
 
15147
  }
 
15148
  /*else*/ {
 
15149
 
 
15150
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1762
 
15151
 *                 ('tree-reference',) + current_path_info[3:]
 
15152
 *         else:
 
15153
 *             return current_path_info             # <<<<<<<<<<<<<<
 
15154
 * 
 
15155
 *     cdef object _loop_one_block(self):
 
15156
 */
 
15157
    __Pyx_XDECREF(__pyx_r);
 
15158
    __Pyx_INCREF(__pyx_v_current_path_info);
 
15159
    __pyx_r = __pyx_v_current_path_info;
 
15160
    goto __pyx_L0;
 
15161
  }
 
15162
  __pyx_L3:;
 
15163
 
 
15164
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
15165
  goto __pyx_L0;
 
15166
  __pyx_L1_error:;
 
15167
  __Pyx_XDECREF(__pyx_t_1);
 
15168
  __Pyx_XDECREF(__pyx_t_2);
 
15169
  __Pyx_XDECREF(__pyx_t_3);
 
15170
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._maybe_tree_ref");
 
15171
  __pyx_r = 0;
 
15172
  __pyx_L0:;
 
15173
  __Pyx_XGIVEREF(__pyx_r);
 
15174
  __Pyx_RefNannyFinishContext();
 
15175
  return __pyx_r;
 
15176
}
 
15177
 
 
15178
/* "bzrlib/_dirstate_helpers_pyx.pyx":1764
 
15179
 *             return current_path_info
 
15180
 * 
 
15181
 *     cdef object _loop_one_block(self):             # <<<<<<<<<<<<<<
 
15182
 *             # current_dir_info and current_block refer to the same directory -
 
15183
 *             # this is the common case code.
 
15184
 */
 
15185
 
 
15186
static  PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__loop_one_block(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self) {
 
15187
  PyObject *__pyx_v_current_entry;
 
15188
  PyObject *__pyx_v_current_path_info;
 
15189
  int __pyx_v_path_handled;
 
15190
  char __pyx_v_minikind;
 
15191
  int __pyx_v_cmp_result;
 
15192
  PyObject *__pyx_v_disk_kind;
 
15193
  long __pyx_v_advance_entry;
 
15194
  long __pyx_v_advance_path;
 
15195
  PyObject *__pyx_v_result;
 
15196
  PyObject *__pyx_v_changed;
 
15197
  PyObject *__pyx_v_new_executable;
 
15198
  PyObject *__pyx_v_relpath_unicode;
 
15199
  PyObject *__pyx_v__;
 
15200
  PyObject *__pyx_r = NULL;
 
15201
  int __pyx_t_1;
 
15202
  PyObject *__pyx_t_2 = NULL;
 
15203
  int __pyx_t_3;
 
15204
  int __pyx_t_4;
 
15205
  PyObject *__pyx_t_5 = NULL;
 
15206
  PyObject *__pyx_t_6 = NULL;
 
15207
  PyObject *__pyx_t_7 = NULL;
 
15208
  char __pyx_t_8;
 
15209
  int __pyx_t_9;
 
15210
  PyObject *__pyx_t_10 = NULL;
 
15211
  PyObject *__pyx_t_11 = NULL;
 
15212
  PyObject *__pyx_t_12 = NULL;
 
15213
  Py_ssize_t __pyx_t_13;
 
15214
  __Pyx_RefNannySetupContext("_loop_one_block");
 
15215
  __pyx_v_current_entry = Py_None; __Pyx_INCREF(Py_None);
 
15216
  __pyx_v_current_path_info = Py_None; __Pyx_INCREF(Py_None);
 
15217
  __pyx_v_disk_kind = Py_None; __Pyx_INCREF(Py_None);
 
15218
  __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
 
15219
  __pyx_v_changed = Py_None; __Pyx_INCREF(Py_None);
 
15220
  __pyx_v_new_executable = Py_None; __Pyx_INCREF(Py_None);
 
15221
  __pyx_v_relpath_unicode = Py_None; __Pyx_INCREF(Py_None);
 
15222
  __pyx_v__ = Py_None; __Pyx_INCREF(Py_None);
 
15223
 
 
15224
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1777
 
15225
 *             # PyString_AsStringAndSize(disk_kind, &temp_str, &temp_str_length)
 
15226
 *             # if not strncmp(temp_str, "directory", temp_str_length):
 
15227
 *             if (self.current_block is not None and             # <<<<<<<<<<<<<<
 
15228
 *                 self.current_block_pos < PyList_GET_SIZE(self.current_block_list)):
 
15229
 *                 current_entry = PyList_GET_ITEM(self.current_block_list,
 
15230
 */
 
15231
  __pyx_t_1 = (__pyx_v_self->current_block != Py_None);
 
15232
  if (__pyx_t_1) {
 
15233
 
 
15234
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1778
 
15235
 *             # if not strncmp(temp_str, "directory", temp_str_length):
 
15236
 *             if (self.current_block is not None and
 
15237
 *                 self.current_block_pos < PyList_GET_SIZE(self.current_block_list)):             # <<<<<<<<<<<<<<
 
15238
 *                 current_entry = PyList_GET_ITEM(self.current_block_list,
 
15239
 *                     self.current_block_pos)
 
15240
 */
 
15241
    __pyx_t_2 = __pyx_v_self->current_block_list;
 
15242
    __Pyx_INCREF(__pyx_t_2);
 
15243
    __pyx_t_3 = (__pyx_v_self->current_block_pos < PyList_GET_SIZE(__pyx_t_2));
 
15244
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
15245
    __pyx_t_4 = __pyx_t_3;
 
15246
  } else {
 
15247
    __pyx_t_4 = __pyx_t_1;
 
15248
  }
 
15249
  if (__pyx_t_4) {
 
15250
 
 
15251
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1779
 
15252
 *             if (self.current_block is not None and
 
15253
 *                 self.current_block_pos < PyList_GET_SIZE(self.current_block_list)):
 
15254
 *                 current_entry = PyList_GET_ITEM(self.current_block_list,             # <<<<<<<<<<<<<<
 
15255
 *                     self.current_block_pos)
 
15256
 *                 # accomodate pyrex
 
15257
 */
 
15258
    __pyx_t_2 = __pyx_v_self->current_block_list;
 
15259
    __Pyx_INCREF(__pyx_t_2);
 
15260
 
 
15261
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1780
 
15262
 *                 self.current_block_pos < PyList_GET_SIZE(self.current_block_list)):
 
15263
 *                 current_entry = PyList_GET_ITEM(self.current_block_list,
 
15264
 *                     self.current_block_pos)             # <<<<<<<<<<<<<<
 
15265
 *                 # accomodate pyrex
 
15266
 *                 Py_INCREF(current_entry)
 
15267
 */
 
15268
    __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_v_self->current_block_pos); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15269
    __Pyx_GOTREF(__pyx_t_5);
 
15270
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
15271
    __Pyx_DECREF(__pyx_v_current_entry);
 
15272
    __pyx_v_current_entry = __pyx_t_5;
 
15273
    __pyx_t_5 = 0;
 
15274
 
 
15275
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1782
 
15276
 *                     self.current_block_pos)
 
15277
 *                 # accomodate pyrex
 
15278
 *                 Py_INCREF(current_entry)             # <<<<<<<<<<<<<<
 
15279
 *             else:
 
15280
 *                 current_entry = None
 
15281
 */
 
15282
    Py_INCREF(__pyx_v_current_entry);
 
15283
    goto __pyx_L3;
 
15284
  }
 
15285
  /*else*/ {
 
15286
 
 
15287
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1784
 
15288
 *                 Py_INCREF(current_entry)
 
15289
 *             else:
 
15290
 *                 current_entry = None             # <<<<<<<<<<<<<<
 
15291
 *             if (self.current_dir_info is not None and
 
15292
 *                 self.path_index < PyList_GET_SIZE(self.current_dir_list)):
 
15293
 */
 
15294
    __Pyx_INCREF(Py_None);
 
15295
    __Pyx_DECREF(__pyx_v_current_entry);
 
15296
    __pyx_v_current_entry = Py_None;
 
15297
  }
 
15298
  __pyx_L3:;
 
15299
 
 
15300
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1785
 
15301
 *             else:
 
15302
 *                 current_entry = None
 
15303
 *             if (self.current_dir_info is not None and             # <<<<<<<<<<<<<<
 
15304
 *                 self.path_index < PyList_GET_SIZE(self.current_dir_list)):
 
15305
 *                 current_path_info = PyList_GET_ITEM(self.current_dir_list,
 
15306
 */
 
15307
  __pyx_t_4 = (__pyx_v_self->current_dir_info != Py_None);
 
15308
  if (__pyx_t_4) {
 
15309
 
 
15310
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1786
 
15311
 *                 current_entry = None
 
15312
 *             if (self.current_dir_info is not None and
 
15313
 *                 self.path_index < PyList_GET_SIZE(self.current_dir_list)):             # <<<<<<<<<<<<<<
 
15314
 *                 current_path_info = PyList_GET_ITEM(self.current_dir_list,
 
15315
 *                     self.path_index)
 
15316
 */
 
15317
    __pyx_t_5 = __pyx_v_self->current_dir_list;
 
15318
    __Pyx_INCREF(__pyx_t_5);
 
15319
    __pyx_t_1 = (__pyx_v_self->path_index < PyList_GET_SIZE(__pyx_t_5));
 
15320
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
15321
    __pyx_t_3 = __pyx_t_1;
 
15322
  } else {
 
15323
    __pyx_t_3 = __pyx_t_4;
 
15324
  }
 
15325
  if (__pyx_t_3) {
 
15326
 
 
15327
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1787
 
15328
 *             if (self.current_dir_info is not None and
 
15329
 *                 self.path_index < PyList_GET_SIZE(self.current_dir_list)):
 
15330
 *                 current_path_info = PyList_GET_ITEM(self.current_dir_list,             # <<<<<<<<<<<<<<
 
15331
 *                     self.path_index)
 
15332
 *                 # accomodate pyrex
 
15333
 */
 
15334
    __pyx_t_5 = __pyx_v_self->current_dir_list;
 
15335
    __Pyx_INCREF(__pyx_t_5);
 
15336
 
 
15337
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1788
 
15338
 *                 self.path_index < PyList_GET_SIZE(self.current_dir_list)):
 
15339
 *                 current_path_info = PyList_GET_ITEM(self.current_dir_list,
 
15340
 *                     self.path_index)             # <<<<<<<<<<<<<<
 
15341
 *                 # accomodate pyrex
 
15342
 *                 Py_INCREF(current_path_info)
 
15343
 */
 
15344
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_v_self->path_index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15345
    __Pyx_GOTREF(__pyx_t_2);
 
15346
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
15347
    __Pyx_DECREF(__pyx_v_current_path_info);
 
15348
    __pyx_v_current_path_info = __pyx_t_2;
 
15349
    __pyx_t_2 = 0;
 
15350
 
 
15351
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1790
 
15352
 *                     self.path_index)
 
15353
 *                 # accomodate pyrex
 
15354
 *                 Py_INCREF(current_path_info)             # <<<<<<<<<<<<<<
 
15355
 *                 disk_kind = PyTuple_GET_ITEM(current_path_info, 2)
 
15356
 *                 # accomodate pyrex
 
15357
 */
 
15358
    Py_INCREF(__pyx_v_current_path_info);
 
15359
 
 
15360
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1791
 
15361
 *                 # accomodate pyrex
 
15362
 *                 Py_INCREF(current_path_info)
 
15363
 *                 disk_kind = PyTuple_GET_ITEM(current_path_info, 2)             # <<<<<<<<<<<<<<
 
15364
 *                 # accomodate pyrex
 
15365
 *                 Py_INCREF(disk_kind)
 
15366
 */
 
15367
    __pyx_t_2 = PyTuple_GET_ITEM(__pyx_v_current_path_info, 2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15368
    __Pyx_GOTREF(__pyx_t_2);
 
15369
    __Pyx_DECREF(__pyx_v_disk_kind);
 
15370
    __pyx_v_disk_kind = __pyx_t_2;
 
15371
    __pyx_t_2 = 0;
 
15372
 
 
15373
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1793
 
15374
 *                 disk_kind = PyTuple_GET_ITEM(current_path_info, 2)
 
15375
 *                 # accomodate pyrex
 
15376
 *                 Py_INCREF(disk_kind)             # <<<<<<<<<<<<<<
 
15377
 *                 if disk_kind == "directory":
 
15378
 *                     current_path_info = self._maybe_tree_ref(current_path_info)
 
15379
 */
 
15380
    Py_INCREF(__pyx_v_disk_kind);
 
15381
 
 
15382
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1794
 
15383
 *                 # accomodate pyrex
 
15384
 *                 Py_INCREF(disk_kind)
 
15385
 *                 if disk_kind == "directory":             # <<<<<<<<<<<<<<
 
15386
 *                     current_path_info = self._maybe_tree_ref(current_path_info)
 
15387
 *             else:
 
15388
 */
 
15389
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_disk_kind, ((PyObject *)__pyx_n_s__directory), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15390
    __Pyx_GOTREF(__pyx_t_2);
 
15391
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15392
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
15393
    if (__pyx_t_3) {
 
15394
 
 
15395
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1795
 
15396
 *                 Py_INCREF(disk_kind)
 
15397
 *                 if disk_kind == "directory":
 
15398
 *                     current_path_info = self._maybe_tree_ref(current_path_info)             # <<<<<<<<<<<<<<
 
15399
 *             else:
 
15400
 *                 current_path_info = None
 
15401
 */
 
15402
      __pyx_t_2 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_maybe_tree_ref(__pyx_v_self, __pyx_v_current_path_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15403
      __Pyx_GOTREF(__pyx_t_2);
 
15404
      __Pyx_DECREF(__pyx_v_current_path_info);
 
15405
      __pyx_v_current_path_info = __pyx_t_2;
 
15406
      __pyx_t_2 = 0;
 
15407
      goto __pyx_L5;
 
15408
    }
 
15409
    __pyx_L5:;
 
15410
    goto __pyx_L4;
 
15411
  }
 
15412
  /*else*/ {
 
15413
 
 
15414
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1797
 
15415
 *                     current_path_info = self._maybe_tree_ref(current_path_info)
 
15416
 *             else:
 
15417
 *                 current_path_info = None             # <<<<<<<<<<<<<<
 
15418
 *             while (current_entry is not None or current_path_info is not None):
 
15419
 *                 advance_entry = -1
 
15420
 */
 
15421
    __Pyx_INCREF(Py_None);
 
15422
    __Pyx_DECREF(__pyx_v_current_path_info);
 
15423
    __pyx_v_current_path_info = Py_None;
 
15424
  }
 
15425
  __pyx_L4:;
 
15426
 
 
15427
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1798
 
15428
 *             else:
 
15429
 *                 current_path_info = None
 
15430
 *             while (current_entry is not None or current_path_info is not None):             # <<<<<<<<<<<<<<
 
15431
 *                 advance_entry = -1
 
15432
 *                 advance_path = -1
 
15433
 */
 
15434
  while (1) {
 
15435
    __pyx_t_3 = (__pyx_v_current_entry != Py_None);
 
15436
    if (!__pyx_t_3) {
 
15437
      __pyx_t_4 = (__pyx_v_current_path_info != Py_None);
 
15438
      __pyx_t_1 = __pyx_t_4;
 
15439
    } else {
 
15440
      __pyx_t_1 = __pyx_t_3;
 
15441
    }
 
15442
    if (!__pyx_t_1) break;
 
15443
 
 
15444
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1799
 
15445
 *                 current_path_info = None
 
15446
 *             while (current_entry is not None or current_path_info is not None):
 
15447
 *                 advance_entry = -1             # <<<<<<<<<<<<<<
 
15448
 *                 advance_path = -1
 
15449
 *                 result = None
 
15450
 */
 
15451
    __pyx_v_advance_entry = -1;
 
15452
 
 
15453
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1800
 
15454
 *             while (current_entry is not None or current_path_info is not None):
 
15455
 *                 advance_entry = -1
 
15456
 *                 advance_path = -1             # <<<<<<<<<<<<<<
 
15457
 *                 result = None
 
15458
 *                 changed = None
 
15459
 */
 
15460
    __pyx_v_advance_path = -1;
 
15461
 
 
15462
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1801
 
15463
 *                 advance_entry = -1
 
15464
 *                 advance_path = -1
 
15465
 *                 result = None             # <<<<<<<<<<<<<<
 
15466
 *                 changed = None
 
15467
 *                 path_handled = 0
 
15468
 */
 
15469
    __Pyx_INCREF(Py_None);
 
15470
    __Pyx_DECREF(__pyx_v_result);
 
15471
    __pyx_v_result = Py_None;
 
15472
 
 
15473
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1802
 
15474
 *                 advance_path = -1
 
15475
 *                 result = None
 
15476
 *                 changed = None             # <<<<<<<<<<<<<<
 
15477
 *                 path_handled = 0
 
15478
 *                 if current_entry is None:
 
15479
 */
 
15480
    __Pyx_INCREF(Py_None);
 
15481
    __Pyx_DECREF(__pyx_v_changed);
 
15482
    __pyx_v_changed = Py_None;
 
15483
 
 
15484
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1803
 
15485
 *                 result = None
 
15486
 *                 changed = None
 
15487
 *                 path_handled = 0             # <<<<<<<<<<<<<<
 
15488
 *                 if current_entry is None:
 
15489
 *                     # unversioned -  the check for path_handled when the path
 
15490
 */
 
15491
    __pyx_v_path_handled = 0;
 
15492
 
 
15493
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1804
 
15494
 *                 changed = None
 
15495
 *                 path_handled = 0
 
15496
 *                 if current_entry is None:             # <<<<<<<<<<<<<<
 
15497
 *                     # unversioned -  the check for path_handled when the path
 
15498
 *                     # is advanced will yield this path if needed.
 
15499
 */
 
15500
    __pyx_t_1 = (__pyx_v_current_entry == Py_None);
 
15501
    if (__pyx_t_1) {
 
15502
      goto __pyx_L8;
 
15503
    }
 
15504
 
 
15505
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1808
 
15506
 *                     # is advanced will yield this path if needed.
 
15507
 *                     pass
 
15508
 *                 elif current_path_info is None:             # <<<<<<<<<<<<<<
 
15509
 *                     # no path is fine: the per entry code will handle it.
 
15510
 *                     result, changed = self._process_entry(current_entry,
 
15511
 */
 
15512
    __pyx_t_1 = (__pyx_v_current_path_info == Py_None);
 
15513
    if (__pyx_t_1) {
 
15514
 
 
15515
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1811
 
15516
 *                     # no path is fine: the per entry code will handle it.
 
15517
 *                     result, changed = self._process_entry(current_entry,
 
15518
 *                         current_path_info)             # <<<<<<<<<<<<<<
 
15519
 *                 else:
 
15520
 *                     minikind = _minikind_from_string(
 
15521
 */
 
15522
      __pyx_t_2 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self, __pyx_v_current_entry, __pyx_v_current_path_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15523
      __Pyx_GOTREF(__pyx_t_2);
 
15524
      if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
 
15525
        PyObject* tuple = __pyx_t_2;
 
15526
        __pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
 
15527
        __pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
 
15528
 
 
15529
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1810
 
15530
 *                 elif current_path_info is None:
 
15531
 *                     # no path is fine: the per entry code will handle it.
 
15532
 *                     result, changed = self._process_entry(current_entry,             # <<<<<<<<<<<<<<
 
15533
 *                         current_path_info)
 
15534
 *                 else:
 
15535
 */
 
15536
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
15537
        __Pyx_DECREF(__pyx_v_result);
 
15538
        __pyx_v_result = __pyx_t_5;
 
15539
        __pyx_t_5 = 0;
 
15540
        __Pyx_DECREF(__pyx_v_changed);
 
15541
        __pyx_v_changed = __pyx_t_6;
 
15542
        __pyx_t_6 = 0;
 
15543
      } else {
 
15544
        __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15545
        __Pyx_GOTREF(__pyx_t_7);
 
15546
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
15547
        __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15548
        __Pyx_GOTREF(__pyx_t_5);
 
15549
        __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15550
        __Pyx_GOTREF(__pyx_t_6);
 
15551
        if (__Pyx_EndUnpack(__pyx_t_7, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15552
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
15553
        __Pyx_DECREF(__pyx_v_result);
 
15554
        __pyx_v_result = __pyx_t_5;
 
15555
        __pyx_t_5 = 0;
 
15556
        __Pyx_DECREF(__pyx_v_changed);
 
15557
        __pyx_v_changed = __pyx_t_6;
 
15558
        __pyx_t_6 = 0;
 
15559
      }
 
15560
      goto __pyx_L8;
 
15561
    }
 
15562
    /*else*/ {
 
15563
 
 
15564
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1814
 
15565
 *                 else:
 
15566
 *                     minikind = _minikind_from_string(
 
15567
 *                         current_entry[1][self.target_index][0])             # <<<<<<<<<<<<<<
 
15568
 *                     cmp_result = cmp(current_path_info[1], current_entry[0][1])
 
15569
 *                     if (cmp_result or minikind == c'a' or minikind == c'r'):
 
15570
 */
 
15571
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_current_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15572
      __Pyx_GOTREF(__pyx_t_2);
 
15573
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_self->target_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15574
      __Pyx_GOTREF(__pyx_t_6);
 
15575
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
15576
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_6, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15577
      __Pyx_GOTREF(__pyx_t_2);
 
15578
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
15579
      __pyx_t_8 = __pyx_f_6bzrlib_21_dirstate_helpers_pyx__minikind_from_string(__pyx_t_2); if (unlikely(__pyx_t_8 == -1 && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15580
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
15581
      __pyx_v_minikind = __pyx_t_8;
 
15582
 
 
15583
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1815
 
15584
 *                     minikind = _minikind_from_string(
 
15585
 *                         current_entry[1][self.target_index][0])
 
15586
 *                     cmp_result = cmp(current_path_info[1], current_entry[0][1])             # <<<<<<<<<<<<<<
 
15587
 *                     if (cmp_result or minikind == c'a' or minikind == c'r'):
 
15588
 *                         # The current path on disk doesn't match the dirblock
 
15589
 */
 
15590
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_current_path_info, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15591
      __Pyx_GOTREF(__pyx_t_2);
 
15592
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_current_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15593
      __Pyx_GOTREF(__pyx_t_6);
 
15594
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15595
      __Pyx_GOTREF(__pyx_t_5);
 
15596
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
15597
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15598
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
15599
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
 
15600
      __Pyx_GIVEREF(__pyx_t_2);
 
15601
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
 
15602
      __Pyx_GIVEREF(__pyx_t_5);
 
15603
      __pyx_t_2 = 0;
 
15604
      __pyx_t_5 = 0;
 
15605
      __pyx_t_5 = PyObject_Call(__pyx_builtin_cmp, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15606
      __Pyx_GOTREF(__pyx_t_5);
 
15607
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
15608
      __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15609
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
15610
      __pyx_v_cmp_result = __pyx_t_9;
 
15611
 
 
15612
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1816
 
15613
 *                         current_entry[1][self.target_index][0])
 
15614
 *                     cmp_result = cmp(current_path_info[1], current_entry[0][1])
 
15615
 *                     if (cmp_result or minikind == c'a' or minikind == c'r'):             # <<<<<<<<<<<<<<
 
15616
 *                         # The current path on disk doesn't match the dirblock
 
15617
 *                         # record. Either the dirblock record is marked as
 
15618
 */
 
15619
      if (!__pyx_v_cmp_result) {
 
15620
        switch (__pyx_v_minikind) {
 
15621
          case 'a':
 
15622
          case 'r':
 
15623
          __pyx_t_1 = 1;
 
15624
          break;
 
15625
          default:
 
15626
          __pyx_t_1 = 0;
 
15627
          break;
 
15628
        }
 
15629
        __pyx_t_3 = __pyx_t_1;
 
15630
      } else {
 
15631
        __pyx_t_3 = __pyx_v_cmp_result;
 
15632
      }
 
15633
      if (__pyx_t_3) {
 
15634
 
 
15635
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1825
 
15636
 *                         # Compare the basename for these files to determine
 
15637
 *                         # which comes first
 
15638
 *                         if cmp_result < 0:             # <<<<<<<<<<<<<<
 
15639
 *                             # extra file on disk: pass for now, but only
 
15640
 *                             # increment the path, not the entry
 
15641
 */
 
15642
        __pyx_t_3 = (__pyx_v_cmp_result < 0);
 
15643
        if (__pyx_t_3) {
 
15644
 
 
15645
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1828
 
15646
 *                             # extra file on disk: pass for now, but only
 
15647
 *                             # increment the path, not the entry
 
15648
 *                             advance_entry = 0             # <<<<<<<<<<<<<<
 
15649
 *                         else:
 
15650
 *                             # entry referring to file not present on disk.
 
15651
 */
 
15652
          __pyx_v_advance_entry = 0;
 
15653
          goto __pyx_L10;
 
15654
        }
 
15655
        /*else*/ {
 
15656
 
 
15657
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1833
 
15658
 *                             # advance the entry only, after processing.
 
15659
 *                             result, changed = self._process_entry(current_entry,
 
15660
 *                                 None)             # <<<<<<<<<<<<<<
 
15661
 *                             advance_path = 0
 
15662
 *                     else:
 
15663
 */
 
15664
          __pyx_t_5 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self, __pyx_v_current_entry, Py_None); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15665
          __Pyx_GOTREF(__pyx_t_5);
 
15666
          if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 2)) {
 
15667
            PyObject* tuple = __pyx_t_5;
 
15668
            __pyx_t_6 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_6);
 
15669
            __pyx_t_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_2);
 
15670
 
 
15671
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1832
 
15672
 *                             # entry referring to file not present on disk.
 
15673
 *                             # advance the entry only, after processing.
 
15674
 *                             result, changed = self._process_entry(current_entry,             # <<<<<<<<<<<<<<
 
15675
 *                                 None)
 
15676
 *                             advance_path = 0
 
15677
 */
 
15678
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
15679
            __Pyx_DECREF(__pyx_v_result);
 
15680
            __pyx_v_result = __pyx_t_6;
 
15681
            __pyx_t_6 = 0;
 
15682
            __Pyx_DECREF(__pyx_v_changed);
 
15683
            __pyx_v_changed = __pyx_t_2;
 
15684
            __pyx_t_2 = 0;
 
15685
          } else {
 
15686
            __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15687
            __Pyx_GOTREF(__pyx_t_7);
 
15688
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
15689
            __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15690
            __Pyx_GOTREF(__pyx_t_6);
 
15691
            __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15692
            __Pyx_GOTREF(__pyx_t_2);
 
15693
            if (__Pyx_EndUnpack(__pyx_t_7, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15694
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
15695
            __Pyx_DECREF(__pyx_v_result);
 
15696
            __pyx_v_result = __pyx_t_6;
 
15697
            __pyx_t_6 = 0;
 
15698
            __Pyx_DECREF(__pyx_v_changed);
 
15699
            __pyx_v_changed = __pyx_t_2;
 
15700
            __pyx_t_2 = 0;
 
15701
          }
 
15702
 
 
15703
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1834
 
15704
 *                             result, changed = self._process_entry(current_entry,
 
15705
 *                                 None)
 
15706
 *                             advance_path = 0             # <<<<<<<<<<<<<<
 
15707
 *                     else:
 
15708
 *                         # paths are the same,and the dirstate entry is not
 
15709
 */
 
15710
          __pyx_v_advance_path = 0;
 
15711
        }
 
15712
        __pyx_L10:;
 
15713
        goto __pyx_L9;
 
15714
      }
 
15715
      /*else*/ {
 
15716
 
 
15717
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1839
 
15718
 *                         # absent or renamed.
 
15719
 *                         result, changed = self._process_entry(current_entry,
 
15720
 *                             current_path_info)             # <<<<<<<<<<<<<<
 
15721
 *                         if changed is not None:
 
15722
 *                             path_handled = -1
 
15723
 */
 
15724
        __pyx_t_5 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self, __pyx_v_current_entry, __pyx_v_current_path_info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15725
        __Pyx_GOTREF(__pyx_t_5);
 
15726
        if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 2)) {
 
15727
          PyObject* tuple = __pyx_t_5;
 
15728
          __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
 
15729
          __pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
 
15730
 
 
15731
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1838
 
15732
 *                         # paths are the same,and the dirstate entry is not
 
15733
 *                         # absent or renamed.
 
15734
 *                         result, changed = self._process_entry(current_entry,             # <<<<<<<<<<<<<<
 
15735
 *                             current_path_info)
 
15736
 *                         if changed is not None:
 
15737
 */
 
15738
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
15739
          __Pyx_DECREF(__pyx_v_result);
 
15740
          __pyx_v_result = __pyx_t_2;
 
15741
          __pyx_t_2 = 0;
 
15742
          __Pyx_DECREF(__pyx_v_changed);
 
15743
          __pyx_v_changed = __pyx_t_6;
 
15744
          __pyx_t_6 = 0;
 
15745
        } else {
 
15746
          __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15747
          __Pyx_GOTREF(__pyx_t_7);
 
15748
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
15749
          __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15750
          __Pyx_GOTREF(__pyx_t_2);
 
15751
          __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15752
          __Pyx_GOTREF(__pyx_t_6);
 
15753
          if (__Pyx_EndUnpack(__pyx_t_7, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15754
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
15755
          __Pyx_DECREF(__pyx_v_result);
 
15756
          __pyx_v_result = __pyx_t_2;
 
15757
          __pyx_t_2 = 0;
 
15758
          __Pyx_DECREF(__pyx_v_changed);
 
15759
          __pyx_v_changed = __pyx_t_6;
 
15760
          __pyx_t_6 = 0;
 
15761
        }
 
15762
 
 
15763
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1840
 
15764
 *                         result, changed = self._process_entry(current_entry,
 
15765
 *                             current_path_info)
 
15766
 *                         if changed is not None:             # <<<<<<<<<<<<<<
 
15767
 *                             path_handled = -1
 
15768
 *                             if not changed and not self.include_unchanged:
 
15769
 */
 
15770
        __pyx_t_3 = (__pyx_v_changed != Py_None);
 
15771
        if (__pyx_t_3) {
 
15772
 
 
15773
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1841
 
15774
 *                             current_path_info)
 
15775
 *                         if changed is not None:
 
15776
 *                             path_handled = -1             # <<<<<<<<<<<<<<
 
15777
 *                             if not changed and not self.include_unchanged:
 
15778
 *                                 changed = None
 
15779
 */
 
15780
          __pyx_v_path_handled = -1;
 
15781
 
 
15782
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1842
 
15783
 *                         if changed is not None:
 
15784
 *                             path_handled = -1
 
15785
 *                             if not changed and not self.include_unchanged:             # <<<<<<<<<<<<<<
 
15786
 *                                 changed = None
 
15787
 *                 # >- loop control starts here:
 
15788
 */
 
15789
          __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_changed); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15790
          __pyx_t_1 = (!__pyx_t_3);
 
15791
          if (__pyx_t_1) {
 
15792
            __pyx_t_3 = (!__pyx_v_self->include_unchanged);
 
15793
            __pyx_t_4 = __pyx_t_3;
 
15794
          } else {
 
15795
            __pyx_t_4 = __pyx_t_1;
 
15796
          }
 
15797
          if (__pyx_t_4) {
 
15798
 
 
15799
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1843
 
15800
 *                             path_handled = -1
 
15801
 *                             if not changed and not self.include_unchanged:
 
15802
 *                                 changed = None             # <<<<<<<<<<<<<<
 
15803
 *                 # >- loop control starts here:
 
15804
 *                 # >- entry
 
15805
 */
 
15806
            __Pyx_INCREF(Py_None);
 
15807
            __Pyx_DECREF(__pyx_v_changed);
 
15808
            __pyx_v_changed = Py_None;
 
15809
            goto __pyx_L12;
 
15810
          }
 
15811
          __pyx_L12:;
 
15812
          goto __pyx_L11;
 
15813
        }
 
15814
        __pyx_L11:;
 
15815
      }
 
15816
      __pyx_L9:;
 
15817
    }
 
15818
    __pyx_L8:;
 
15819
 
 
15820
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1846
 
15821
 *                 # >- loop control starts here:
 
15822
 *                 # >- entry
 
15823
 *                 if advance_entry and current_entry is not None:             # <<<<<<<<<<<<<<
 
15824
 *                     self.current_block_pos = self.current_block_pos + 1
 
15825
 *                     if self.current_block_pos < PyList_GET_SIZE(self.current_block_list):
 
15826
 */
 
15827
    if (__pyx_v_advance_entry) {
 
15828
      __pyx_t_4 = (__pyx_v_current_entry != Py_None);
 
15829
      __pyx_t_1 = __pyx_t_4;
 
15830
    } else {
 
15831
      __pyx_t_1 = __pyx_v_advance_entry;
 
15832
    }
 
15833
    if (__pyx_t_1) {
 
15834
 
 
15835
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1847
 
15836
 *                 # >- entry
 
15837
 *                 if advance_entry and current_entry is not None:
 
15838
 *                     self.current_block_pos = self.current_block_pos + 1             # <<<<<<<<<<<<<<
 
15839
 *                     if self.current_block_pos < PyList_GET_SIZE(self.current_block_list):
 
15840
 *                         current_entry = self.current_block_list[self.current_block_pos]
 
15841
 */
 
15842
      __pyx_v_self->current_block_pos = (__pyx_v_self->current_block_pos + 1);
 
15843
 
 
15844
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1848
 
15845
 *                 if advance_entry and current_entry is not None:
 
15846
 *                     self.current_block_pos = self.current_block_pos + 1
 
15847
 *                     if self.current_block_pos < PyList_GET_SIZE(self.current_block_list):             # <<<<<<<<<<<<<<
 
15848
 *                         current_entry = self.current_block_list[self.current_block_pos]
 
15849
 *                     else:
 
15850
 */
 
15851
      __pyx_t_5 = __pyx_v_self->current_block_list;
 
15852
      __Pyx_INCREF(__pyx_t_5);
 
15853
      __pyx_t_1 = (__pyx_v_self->current_block_pos < PyList_GET_SIZE(__pyx_t_5));
 
15854
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
15855
      if (__pyx_t_1) {
 
15856
 
 
15857
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1849
 
15858
 *                     self.current_block_pos = self.current_block_pos + 1
 
15859
 *                     if self.current_block_pos < PyList_GET_SIZE(self.current_block_list):
 
15860
 *                         current_entry = self.current_block_list[self.current_block_pos]             # <<<<<<<<<<<<<<
 
15861
 *                     else:
 
15862
 *                         current_entry = None
 
15863
 */
 
15864
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_self->current_block_list, __pyx_v_self->current_block_pos, sizeof(int), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15865
        __Pyx_GOTREF(__pyx_t_5);
 
15866
        __Pyx_DECREF(__pyx_v_current_entry);
 
15867
        __pyx_v_current_entry = __pyx_t_5;
 
15868
        __pyx_t_5 = 0;
 
15869
        goto __pyx_L14;
 
15870
      }
 
15871
      /*else*/ {
 
15872
 
 
15873
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1851
 
15874
 *                         current_entry = self.current_block_list[self.current_block_pos]
 
15875
 *                     else:
 
15876
 *                         current_entry = None             # <<<<<<<<<<<<<<
 
15877
 *                 # >- path
 
15878
 *                 if advance_path and current_path_info is not None:
 
15879
 */
 
15880
        __Pyx_INCREF(Py_None);
 
15881
        __Pyx_DECREF(__pyx_v_current_entry);
 
15882
        __pyx_v_current_entry = Py_None;
 
15883
      }
 
15884
      __pyx_L14:;
 
15885
      goto __pyx_L13;
 
15886
    }
 
15887
    __pyx_L13:;
 
15888
 
 
15889
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1853
 
15890
 *                         current_entry = None
 
15891
 *                 # >- path
 
15892
 *                 if advance_path and current_path_info is not None:             # <<<<<<<<<<<<<<
 
15893
 *                     if not path_handled:
 
15894
 *                         # unversioned in all regards
 
15895
 */
 
15896
    if (__pyx_v_advance_path) {
 
15897
      __pyx_t_1 = (__pyx_v_current_path_info != Py_None);
 
15898
      __pyx_t_4 = __pyx_t_1;
 
15899
    } else {
 
15900
      __pyx_t_4 = __pyx_v_advance_path;
 
15901
    }
 
15902
    if (__pyx_t_4) {
 
15903
 
 
15904
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1854
 
15905
 *                 # >- path
 
15906
 *                 if advance_path and current_path_info is not None:
 
15907
 *                     if not path_handled:             # <<<<<<<<<<<<<<
 
15908
 *                         # unversioned in all regards
 
15909
 *                         if self.want_unversioned:
 
15910
 */
 
15911
      __pyx_t_4 = (!__pyx_v_path_handled);
 
15912
      if (__pyx_t_4) {
 
15913
 
 
15914
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1856
 
15915
 *                     if not path_handled:
 
15916
 *                         # unversioned in all regards
 
15917
 *                         if self.want_unversioned:             # <<<<<<<<<<<<<<
 
15918
 *                             new_executable = bool(
 
15919
 *                                 stat.S_ISREG(current_path_info[3].st_mode)
 
15920
 */
 
15921
        if (__pyx_v_self->want_unversioned) {
 
15922
 
 
15923
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1858
 
15924
 *                         if self.want_unversioned:
 
15925
 *                             new_executable = bool(
 
15926
 *                                 stat.S_ISREG(current_path_info[3].st_mode)             # <<<<<<<<<<<<<<
 
15927
 *                                 and stat.S_IEXEC & current_path_info[3].st_mode)
 
15928
 *                             try:
 
15929
 */
 
15930
          __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__stat); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15931
          __Pyx_GOTREF(__pyx_t_5);
 
15932
          __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__S_ISREG); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15933
          __Pyx_GOTREF(__pyx_t_6);
 
15934
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
15935
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_current_path_info, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15936
          __Pyx_GOTREF(__pyx_t_5);
 
15937
          __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__st_mode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15938
          __Pyx_GOTREF(__pyx_t_2);
 
15939
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
15940
          __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15941
          __Pyx_GOTREF(((PyObject *)__pyx_t_5));
 
15942
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
 
15943
          __Pyx_GIVEREF(__pyx_t_2);
 
15944
          __pyx_t_2 = 0;
 
15945
          __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15946
          __Pyx_GOTREF(__pyx_t_2);
 
15947
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
15948
          __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
 
15949
          __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15950
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
15951
          if (__pyx_t_4) {
 
15952
 
 
15953
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1859
 
15954
 *                             new_executable = bool(
 
15955
 *                                 stat.S_ISREG(current_path_info[3].st_mode)
 
15956
 *                                 and stat.S_IEXEC & current_path_info[3].st_mode)             # <<<<<<<<<<<<<<
 
15957
 *                             try:
 
15958
 *                                 relpath_unicode = self.utf8_decode(current_path_info[0])[0]
 
15959
 */
 
15960
            __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__stat); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15961
            __Pyx_GOTREF(__pyx_t_2);
 
15962
            __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__S_IEXEC); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15963
            __Pyx_GOTREF(__pyx_t_5);
 
15964
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
15965
            __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_current_path_info, 3, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15966
            __Pyx_GOTREF(__pyx_t_2);
 
15967
            __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__st_mode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15968
            __Pyx_GOTREF(__pyx_t_6);
 
15969
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
15970
            __pyx_t_2 = PyNumber_And(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15971
            __Pyx_GOTREF(__pyx_t_2);
 
15972
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
15973
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
15974
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15975
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
15976
            __pyx_t_3 = __pyx_t_1;
 
15977
          } else {
 
15978
            __pyx_t_3 = __pyx_t_4;
 
15979
          }
 
15980
          __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
15981
          __Pyx_GOTREF(__pyx_t_2);
 
15982
          __Pyx_DECREF(__pyx_v_new_executable);
 
15983
          __pyx_v_new_executable = __pyx_t_2;
 
15984
          __pyx_t_2 = 0;
 
15985
 
 
15986
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1860
 
15987
 *                                 stat.S_ISREG(current_path_info[3].st_mode)
 
15988
 *                                 and stat.S_IEXEC & current_path_info[3].st_mode)
 
15989
 *                             try:             # <<<<<<<<<<<<<<
 
15990
 *                                 relpath_unicode = self.utf8_decode(current_path_info[0])[0]
 
15991
 *                             except UnicodeDecodeError, _:
 
15992
 */
 
15993
          {
 
15994
            PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
 
15995
            __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
 
15996
            __Pyx_XGOTREF(__pyx_save_exc_type);
 
15997
            __Pyx_XGOTREF(__pyx_save_exc_value);
 
15998
            __Pyx_XGOTREF(__pyx_save_exc_tb);
 
15999
            /*try:*/ {
 
16000
 
 
16001
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1861
 
16002
 *                                 and stat.S_IEXEC & current_path_info[3].st_mode)
 
16003
 *                             try:
 
16004
 *                                 relpath_unicode = self.utf8_decode(current_path_info[0])[0]             # <<<<<<<<<<<<<<
 
16005
 *                             except UnicodeDecodeError, _:
 
16006
 *                                 raise errors.BadFilenameEncoding(
 
16007
 */
 
16008
              __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
 
16009
              __Pyx_GOTREF(__pyx_t_2);
 
16010
              __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
 
16011
              __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
16012
              PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
 
16013
              __Pyx_GIVEREF(__pyx_t_2);
 
16014
              __pyx_t_2 = 0;
 
16015
              __pyx_t_2 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
 
16016
              __Pyx_GOTREF(__pyx_t_2);
 
16017
              __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
16018
              __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_2, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L18_error;}
 
16019
              __Pyx_GOTREF(__pyx_t_6);
 
16020
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
16021
              __Pyx_DECREF(__pyx_v_relpath_unicode);
 
16022
              __pyx_v_relpath_unicode = __pyx_t_6;
 
16023
              __pyx_t_6 = 0;
 
16024
            }
 
16025
            __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
 
16026
            __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
 
16027
            __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
 
16028
            goto __pyx_L25_try_end;
 
16029
            __pyx_L18_error:;
 
16030
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
 
16031
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
 
16032
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
 
16033
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 
16034
 
 
16035
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1862
 
16036
 *                             try:
 
16037
 *                                 relpath_unicode = self.utf8_decode(current_path_info[0])[0]
 
16038
 *                             except UnicodeDecodeError, _:             # <<<<<<<<<<<<<<
 
16039
 *                                 raise errors.BadFilenameEncoding(
 
16040
 *                                     current_path_info[0], osutils._fs_enc)
 
16041
 */
 
16042
            __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
 
16043
            if (__pyx_t_9) {
 
16044
              __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._loop_one_block");
 
16045
              if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_2, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
 
16046
              __Pyx_GOTREF(__pyx_t_6);
 
16047
              __Pyx_GOTREF(__pyx_t_2);
 
16048
              __Pyx_GOTREF(__pyx_t_5);
 
16049
              __Pyx_INCREF(__pyx_t_2);
 
16050
              __Pyx_DECREF(__pyx_v__);
 
16051
              __pyx_v__ = __pyx_t_2;
 
16052
 
 
16053
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1863
 
16054
 *                                 relpath_unicode = self.utf8_decode(current_path_info[0])[0]
 
16055
 *                             except UnicodeDecodeError, _:
 
16056
 *                                 raise errors.BadFilenameEncoding(             # <<<<<<<<<<<<<<
 
16057
 *                                     current_path_info[0], osutils._fs_enc)
 
16058
 *                             if changed is not None:
 
16059
 */
 
16060
              __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__errors); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
 
16061
              __Pyx_GOTREF(__pyx_t_7);
 
16062
              __pyx_t_10 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__BadFilenameEncoding); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
 
16063
              __Pyx_GOTREF(__pyx_t_10);
 
16064
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
16065
 
 
16066
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1864
 
16067
 *                             except UnicodeDecodeError, _:
 
16068
 *                                 raise errors.BadFilenameEncoding(
 
16069
 *                                     current_path_info[0], osutils._fs_enc)             # <<<<<<<<<<<<<<
 
16070
 *                             if changed is not None:
 
16071
 *                                 raise AssertionError(
 
16072
 */
 
16073
              __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_current_path_info, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
 
16074
              __Pyx_GOTREF(__pyx_t_7);
 
16075
              __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__osutils); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
 
16076
              __Pyx_GOTREF(__pyx_t_11);
 
16077
              __pyx_t_12 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s___fs_enc); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
 
16078
              __Pyx_GOTREF(__pyx_t_12);
 
16079
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
 
16080
              __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
 
16081
              __Pyx_GOTREF(((PyObject *)__pyx_t_11));
 
16082
              PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
 
16083
              __Pyx_GIVEREF(__pyx_t_7);
 
16084
              PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12);
 
16085
              __Pyx_GIVEREF(__pyx_t_12);
 
16086
              __pyx_t_7 = 0;
 
16087
              __pyx_t_12 = 0;
 
16088
              __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
 
16089
              __Pyx_GOTREF(__pyx_t_12);
 
16090
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
16091
              __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
 
16092
              __Pyx_Raise(__pyx_t_12, 0, 0);
 
16093
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
16094
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L20_except_error;}
 
16095
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
16096
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
16097
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
16098
              goto __pyx_L19_exception_handled;
 
16099
            }
 
16100
            __pyx_L20_except_error:;
 
16101
            __Pyx_XGIVEREF(__pyx_save_exc_type);
 
16102
            __Pyx_XGIVEREF(__pyx_save_exc_value);
 
16103
            __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
16104
            __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
16105
            goto __pyx_L1_error;
 
16106
            __pyx_L19_exception_handled:;
 
16107
            __Pyx_XGIVEREF(__pyx_save_exc_type);
 
16108
            __Pyx_XGIVEREF(__pyx_save_exc_value);
 
16109
            __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
16110
            __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
16111
            __pyx_L25_try_end:;
 
16112
          }
 
16113
 
 
16114
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1865
 
16115
 *                                 raise errors.BadFilenameEncoding(
 
16116
 *                                     current_path_info[0], osutils._fs_enc)
 
16117
 *                             if changed is not None:             # <<<<<<<<<<<<<<
 
16118
 *                                 raise AssertionError(
 
16119
 *                                     "result is not None: %r" % result)
 
16120
 */
 
16121
          __pyx_t_3 = (__pyx_v_changed != Py_None);
 
16122
          if (__pyx_t_3) {
 
16123
 
 
16124
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1867
 
16125
 *                             if changed is not None:
 
16126
 *                                 raise AssertionError(
 
16127
 *                                     "result is not None: %r" % result)             # <<<<<<<<<<<<<<
 
16128
 *                             result = (None,
 
16129
 *                                 (None, relpath_unicode),
 
16130
 */
 
16131
            __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_60), __pyx_v_result); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16132
            __Pyx_GOTREF(((PyObject *)__pyx_t_5));
 
16133
            __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16134
            __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
16135
            PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_5));
 
16136
            __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
 
16137
            __pyx_t_5 = 0;
 
16138
            __pyx_t_5 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16139
            __Pyx_GOTREF(__pyx_t_5);
 
16140
            __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
16141
            __Pyx_Raise(__pyx_t_5, 0, 0);
 
16142
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
16143
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16144
            goto __pyx_L28;
 
16145
          }
 
16146
          __pyx_L28:;
 
16147
 
 
16148
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1869
 
16149
 *                                     "result is not None: %r" % result)
 
16150
 *                             result = (None,
 
16151
 *                                 (None, relpath_unicode),             # <<<<<<<<<<<<<<
 
16152
 *                                 True,
 
16153
 *                                 (False, False),
 
16154
 */
 
16155
          __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16156
          __Pyx_GOTREF(((PyObject *)__pyx_t_5));
 
16157
          __Pyx_INCREF(Py_None);
 
16158
          PyTuple_SET_ITEM(__pyx_t_5, 0, Py_None);
 
16159
          __Pyx_GIVEREF(Py_None);
 
16160
          __Pyx_INCREF(__pyx_v_relpath_unicode);
 
16161
          PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_relpath_unicode);
 
16162
          __Pyx_GIVEREF(__pyx_v_relpath_unicode);
 
16163
 
 
16164
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1870
 
16165
 *                             result = (None,
 
16166
 *                                 (None, relpath_unicode),
 
16167
 *                                 True,             # <<<<<<<<<<<<<<
 
16168
 *                                 (False, False),
 
16169
 *                                 (None, None),
 
16170
 */
 
16171
          __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16172
          __Pyx_GOTREF(__pyx_t_2);
 
16173
 
 
16174
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1871
 
16175
 *                                 (None, relpath_unicode),
 
16176
 *                                 True,
 
16177
 *                                 (False, False),             # <<<<<<<<<<<<<<
 
16178
 *                                 (None, None),
 
16179
 *                                 (None, self.utf8_decode(current_path_info[1])[0]),
 
16180
 */
 
16181
          __pyx_t_6 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16182
          __Pyx_GOTREF(__pyx_t_6);
 
16183
          __pyx_t_12 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16184
          __Pyx_GOTREF(__pyx_t_12);
 
16185
          __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16186
          __Pyx_GOTREF(((PyObject *)__pyx_t_11));
 
16187
          PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6);
 
16188
          __Pyx_GIVEREF(__pyx_t_6);
 
16189
          PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12);
 
16190
          __Pyx_GIVEREF(__pyx_t_12);
 
16191
          __pyx_t_6 = 0;
 
16192
          __pyx_t_12 = 0;
 
16193
 
 
16194
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1873
 
16195
 *                                 (False, False),
 
16196
 *                                 (None, None),
 
16197
 *                                 (None, self.utf8_decode(current_path_info[1])[0]),             # <<<<<<<<<<<<<<
 
16198
 *                                 (None, current_path_info[2]),
 
16199
 *                                 (None, new_executable))
 
16200
 */
 
16201
          __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_current_path_info, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16202
          __Pyx_GOTREF(__pyx_t_12);
 
16203
          __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16204
          __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
16205
          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_12);
 
16206
          __Pyx_GIVEREF(__pyx_t_12);
 
16207
          __pyx_t_12 = 0;
 
16208
          __pyx_t_12 = PyObject_Call(__pyx_v_self->utf8_decode, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16209
          __Pyx_GOTREF(__pyx_t_12);
 
16210
          __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
 
16211
          __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_12, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16212
          __Pyx_GOTREF(__pyx_t_6);
 
16213
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
 
16214
          __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16215
          __Pyx_GOTREF(((PyObject *)__pyx_t_12));
 
16216
          __Pyx_INCREF(Py_None);
 
16217
          PyTuple_SET_ITEM(__pyx_t_12, 0, Py_None);
 
16218
          __Pyx_GIVEREF(Py_None);
 
16219
          PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_6);
 
16220
          __Pyx_GIVEREF(__pyx_t_6);
 
16221
          __pyx_t_6 = 0;
 
16222
 
 
16223
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1874
 
16224
 *                                 (None, None),
 
16225
 *                                 (None, self.utf8_decode(current_path_info[1])[0]),
 
16226
 *                                 (None, current_path_info[2]),             # <<<<<<<<<<<<<<
 
16227
 *                                 (None, new_executable))
 
16228
 *                             changed = True
 
16229
 */
 
16230
          __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16231
          __Pyx_GOTREF(__pyx_t_6);
 
16232
          __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16233
          __Pyx_GOTREF(((PyObject *)__pyx_t_10));
 
16234
          __Pyx_INCREF(Py_None);
 
16235
          PyTuple_SET_ITEM(__pyx_t_10, 0, Py_None);
 
16236
          __Pyx_GIVEREF(Py_None);
 
16237
          PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
 
16238
          __Pyx_GIVEREF(__pyx_t_6);
 
16239
          __pyx_t_6 = 0;
 
16240
 
 
16241
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1875
 
16242
 *                                 (None, self.utf8_decode(current_path_info[1])[0]),
 
16243
 *                                 (None, current_path_info[2]),
 
16244
 *                                 (None, new_executable))             # <<<<<<<<<<<<<<
 
16245
 *                             changed = True
 
16246
 *                         # dont descend into this unversioned path if it is
 
16247
 */
 
16248
          __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16249
          __Pyx_GOTREF(((PyObject *)__pyx_t_6));
 
16250
          __Pyx_INCREF(Py_None);
 
16251
          PyTuple_SET_ITEM(__pyx_t_6, 0, Py_None);
 
16252
          __Pyx_GIVEREF(Py_None);
 
16253
          __Pyx_INCREF(__pyx_v_new_executable);
 
16254
          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_new_executable);
 
16255
          __Pyx_GIVEREF(__pyx_v_new_executable);
 
16256
          __pyx_t_7 = PyTuple_New(8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16257
          __Pyx_GOTREF(((PyObject *)__pyx_t_7));
 
16258
          __Pyx_INCREF(Py_None);
 
16259
          PyTuple_SET_ITEM(__pyx_t_7, 0, Py_None);
 
16260
          __Pyx_GIVEREF(Py_None);
 
16261
          PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_t_5));
 
16262
          __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
 
16263
          PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_2);
 
16264
          __Pyx_GIVEREF(__pyx_t_2);
 
16265
          PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_t_11));
 
16266
          __Pyx_GIVEREF(((PyObject *)__pyx_t_11));
 
16267
          __Pyx_INCREF(((PyObject *)__pyx_k_tuple_61));
 
16268
          PyTuple_SET_ITEM(__pyx_t_7, 4, ((PyObject *)__pyx_k_tuple_61));
 
16269
          __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61));
 
16270
          PyTuple_SET_ITEM(__pyx_t_7, 5, ((PyObject *)__pyx_t_12));
 
16271
          __Pyx_GIVEREF(((PyObject *)__pyx_t_12));
 
16272
          PyTuple_SET_ITEM(__pyx_t_7, 6, ((PyObject *)__pyx_t_10));
 
16273
          __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
 
16274
          PyTuple_SET_ITEM(__pyx_t_7, 7, ((PyObject *)__pyx_t_6));
 
16275
          __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
 
16276
          __pyx_t_5 = 0;
 
16277
          __pyx_t_2 = 0;
 
16278
          __pyx_t_11 = 0;
 
16279
          __pyx_t_12 = 0;
 
16280
          __pyx_t_10 = 0;
 
16281
          __pyx_t_6 = 0;
 
16282
          __Pyx_DECREF(__pyx_v_result);
 
16283
          __pyx_v_result = ((PyObject *)__pyx_t_7);
 
16284
          __pyx_t_7 = 0;
 
16285
 
 
16286
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1876
 
16287
 *                                 (None, current_path_info[2]),
 
16288
 *                                 (None, new_executable))
 
16289
 *                             changed = True             # <<<<<<<<<<<<<<
 
16290
 *                         # dont descend into this unversioned path if it is
 
16291
 *                         # a dir
 
16292
 */
 
16293
          __pyx_t_7 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16294
          __Pyx_GOTREF(__pyx_t_7);
 
16295
          __Pyx_DECREF(__pyx_v_changed);
 
16296
          __pyx_v_changed = __pyx_t_7;
 
16297
          __pyx_t_7 = 0;
 
16298
          goto __pyx_L17;
 
16299
        }
 
16300
        __pyx_L17:;
 
16301
 
 
16302
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1879
 
16303
 *                         # dont descend into this unversioned path if it is
 
16304
 *                         # a dir
 
16305
 *                         if current_path_info[2] in ('directory'):             # <<<<<<<<<<<<<<
 
16306
 *                             del self.current_dir_list[self.path_index]
 
16307
 *                             self.path_index = self.path_index - 1
 
16308
 */
 
16309
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16310
        __Pyx_GOTREF(__pyx_t_7);
 
16311
        __pyx_t_3 = ((PySequence_Contains(((PyObject *)__pyx_n_s__directory), __pyx_t_7))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16312
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
16313
        if (__pyx_t_3) {
 
16314
 
 
16315
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1880
 
16316
 *                         # a dir
 
16317
 *                         if current_path_info[2] in ('directory'):
 
16318
 *                             del self.current_dir_list[self.path_index]             # <<<<<<<<<<<<<<
 
16319
 *                             self.path_index = self.path_index - 1
 
16320
 *                     # dont descend the disk iterator into any tree
 
16321
 */
 
16322
          if (__Pyx_DelItemInt(__pyx_v_self->current_dir_list, __pyx_v_self->path_index, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16323
 
 
16324
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1881
 
16325
 *                         if current_path_info[2] in ('directory'):
 
16326
 *                             del self.current_dir_list[self.path_index]
 
16327
 *                             self.path_index = self.path_index - 1             # <<<<<<<<<<<<<<
 
16328
 *                     # dont descend the disk iterator into any tree
 
16329
 *                     # paths.
 
16330
 */
 
16331
          __pyx_v_self->path_index = (__pyx_v_self->path_index - 1);
 
16332
          goto __pyx_L29;
 
16333
        }
 
16334
        __pyx_L29:;
 
16335
        goto __pyx_L16;
 
16336
      }
 
16337
      __pyx_L16:;
 
16338
 
 
16339
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1884
 
16340
 *                     # dont descend the disk iterator into any tree
 
16341
 *                     # paths.
 
16342
 *                     if current_path_info[2] == 'tree-reference':             # <<<<<<<<<<<<<<
 
16343
 *                         del self.current_dir_list[self.path_index]
 
16344
 *                         self.path_index = self.path_index - 1
 
16345
 */
 
16346
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16347
      __Pyx_GOTREF(__pyx_t_7);
 
16348
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, ((PyObject *)__pyx_kp_s_37), Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16349
      __Pyx_GOTREF(__pyx_t_6);
 
16350
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
16351
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16352
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
16353
      if (__pyx_t_3) {
 
16354
 
 
16355
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1885
 
16356
 *                     # paths.
 
16357
 *                     if current_path_info[2] == 'tree-reference':
 
16358
 *                         del self.current_dir_list[self.path_index]             # <<<<<<<<<<<<<<
 
16359
 *                         self.path_index = self.path_index - 1
 
16360
 *                     self.path_index = self.path_index + 1
 
16361
 */
 
16362
        if (__Pyx_DelItemInt(__pyx_v_self->current_dir_list, __pyx_v_self->path_index, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16363
 
 
16364
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1886
 
16365
 *                     if current_path_info[2] == 'tree-reference':
 
16366
 *                         del self.current_dir_list[self.path_index]
 
16367
 *                         self.path_index = self.path_index - 1             # <<<<<<<<<<<<<<
 
16368
 *                     self.path_index = self.path_index + 1
 
16369
 *                     if self.path_index < len(self.current_dir_list):
 
16370
 */
 
16371
        __pyx_v_self->path_index = (__pyx_v_self->path_index - 1);
 
16372
        goto __pyx_L30;
 
16373
      }
 
16374
      __pyx_L30:;
 
16375
 
 
16376
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1887
 
16377
 *                         del self.current_dir_list[self.path_index]
 
16378
 *                         self.path_index = self.path_index - 1
 
16379
 *                     self.path_index = self.path_index + 1             # <<<<<<<<<<<<<<
 
16380
 *                     if self.path_index < len(self.current_dir_list):
 
16381
 *                         current_path_info = self.current_dir_list[self.path_index]
 
16382
 */
 
16383
      __pyx_v_self->path_index = (__pyx_v_self->path_index + 1);
 
16384
 
 
16385
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1888
 
16386
 *                         self.path_index = self.path_index - 1
 
16387
 *                     self.path_index = self.path_index + 1
 
16388
 *                     if self.path_index < len(self.current_dir_list):             # <<<<<<<<<<<<<<
 
16389
 *                         current_path_info = self.current_dir_list[self.path_index]
 
16390
 *                         if current_path_info[2] == 'directory':
 
16391
 */
 
16392
      __pyx_t_6 = __pyx_v_self->current_dir_list;
 
16393
      __Pyx_INCREF(__pyx_t_6);
 
16394
      __pyx_t_13 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16395
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
16396
      __pyx_t_3 = (__pyx_v_self->path_index < __pyx_t_13);
 
16397
      if (__pyx_t_3) {
 
16398
 
 
16399
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1889
 
16400
 *                     self.path_index = self.path_index + 1
 
16401
 *                     if self.path_index < len(self.current_dir_list):
 
16402
 *                         current_path_info = self.current_dir_list[self.path_index]             # <<<<<<<<<<<<<<
 
16403
 *                         if current_path_info[2] == 'directory':
 
16404
 *                             current_path_info = self._maybe_tree_ref(
 
16405
 */
 
16406
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_self->current_dir_list, __pyx_v_self->path_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16407
        __Pyx_GOTREF(__pyx_t_6);
 
16408
        __Pyx_DECREF(__pyx_v_current_path_info);
 
16409
        __pyx_v_current_path_info = __pyx_t_6;
 
16410
        __pyx_t_6 = 0;
 
16411
 
 
16412
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1890
 
16413
 *                     if self.path_index < len(self.current_dir_list):
 
16414
 *                         current_path_info = self.current_dir_list[self.path_index]
 
16415
 *                         if current_path_info[2] == 'directory':             # <<<<<<<<<<<<<<
 
16416
 *                             current_path_info = self._maybe_tree_ref(
 
16417
 *                                 current_path_info)
 
16418
 */
 
16419
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_current_path_info, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16420
        __Pyx_GOTREF(__pyx_t_6);
 
16421
        __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, ((PyObject *)__pyx_n_s__directory), Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16422
        __Pyx_GOTREF(__pyx_t_7);
 
16423
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
16424
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16425
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
16426
        if (__pyx_t_3) {
 
16427
 
 
16428
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1892
 
16429
 *                         if current_path_info[2] == 'directory':
 
16430
 *                             current_path_info = self._maybe_tree_ref(
 
16431
 *                                 current_path_info)             # <<<<<<<<<<<<<<
 
16432
 *                     else:
 
16433
 *                         current_path_info = None
 
16434
 */
 
16435
          __pyx_t_7 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_maybe_tree_ref(__pyx_v_self, __pyx_v_current_path_info); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16436
          __Pyx_GOTREF(__pyx_t_7);
 
16437
          __Pyx_DECREF(__pyx_v_current_path_info);
 
16438
          __pyx_v_current_path_info = __pyx_t_7;
 
16439
          __pyx_t_7 = 0;
 
16440
          goto __pyx_L32;
 
16441
        }
 
16442
        __pyx_L32:;
 
16443
        goto __pyx_L31;
 
16444
      }
 
16445
      /*else*/ {
 
16446
 
 
16447
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1894
 
16448
 *                                 current_path_info)
 
16449
 *                     else:
 
16450
 *                         current_path_info = None             # <<<<<<<<<<<<<<
 
16451
 *                 if changed is not None:
 
16452
 *                     # Found a result on this pass, yield it
 
16453
 */
 
16454
        __Pyx_INCREF(Py_None);
 
16455
        __Pyx_DECREF(__pyx_v_current_path_info);
 
16456
        __pyx_v_current_path_info = Py_None;
 
16457
      }
 
16458
      __pyx_L31:;
 
16459
      goto __pyx_L15;
 
16460
    }
 
16461
    __pyx_L15:;
 
16462
 
 
16463
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1895
 
16464
 *                     else:
 
16465
 *                         current_path_info = None
 
16466
 *                 if changed is not None:             # <<<<<<<<<<<<<<
 
16467
 *                     # Found a result on this pass, yield it
 
16468
 *                     if changed:
 
16469
 */
 
16470
    __pyx_t_3 = (__pyx_v_changed != Py_None);
 
16471
    if (__pyx_t_3) {
 
16472
 
 
16473
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1897
 
16474
 *                 if changed is not None:
 
16475
 *                     # Found a result on this pass, yield it
 
16476
 *                     if changed:             # <<<<<<<<<<<<<<
 
16477
 *                         self._gather_result_for_consistency(result)
 
16478
 *                     if changed or self.include_unchanged:
 
16479
 */
 
16480
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_changed); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16481
      if (__pyx_t_3) {
 
16482
 
 
16483
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1898
 
16484
 *                     # Found a result on this pass, yield it
 
16485
 *                     if changed:
 
16486
 *                         self._gather_result_for_consistency(result)             # <<<<<<<<<<<<<<
 
16487
 *                     if changed or self.include_unchanged:
 
16488
 *                         return result
 
16489
 */
 
16490
        __pyx_t_9 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_gather_result_for_consistency(__pyx_v_self, __pyx_v_result); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16491
        goto __pyx_L34;
 
16492
      }
 
16493
      __pyx_L34:;
 
16494
 
 
16495
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1899
 
16496
 *                     if changed:
 
16497
 *                         self._gather_result_for_consistency(result)
 
16498
 *                     if changed or self.include_unchanged:             # <<<<<<<<<<<<<<
 
16499
 *                         return result
 
16500
 *             if self.current_block is not None:
 
16501
 */
 
16502
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_changed); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16503
      if (!__pyx_t_3) {
 
16504
        __pyx_t_4 = __pyx_v_self->include_unchanged;
 
16505
      } else {
 
16506
        __pyx_t_4 = __pyx_t_3;
 
16507
      }
 
16508
      if (__pyx_t_4) {
 
16509
 
 
16510
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1900
 
16511
 *                         self._gather_result_for_consistency(result)
 
16512
 *                     if changed or self.include_unchanged:
 
16513
 *                         return result             # <<<<<<<<<<<<<<
 
16514
 *             if self.current_block is not None:
 
16515
 *                 self.block_index = self.block_index + 1
 
16516
 */
 
16517
        __Pyx_XDECREF(__pyx_r);
 
16518
        __Pyx_INCREF(__pyx_v_result);
 
16519
        __pyx_r = __pyx_v_result;
 
16520
        goto __pyx_L0;
 
16521
        goto __pyx_L35;
 
16522
      }
 
16523
      __pyx_L35:;
 
16524
      goto __pyx_L33;
 
16525
    }
 
16526
    __pyx_L33:;
 
16527
  }
 
16528
 
 
16529
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1901
 
16530
 *                     if changed or self.include_unchanged:
 
16531
 *                         return result
 
16532
 *             if self.current_block is not None:             # <<<<<<<<<<<<<<
 
16533
 *                 self.block_index = self.block_index + 1
 
16534
 *                 self._update_current_block()
 
16535
 */
 
16536
  __pyx_t_4 = (__pyx_v_self->current_block != Py_None);
 
16537
  if (__pyx_t_4) {
 
16538
 
 
16539
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1902
 
16540
 *                         return result
 
16541
 *             if self.current_block is not None:
 
16542
 *                 self.block_index = self.block_index + 1             # <<<<<<<<<<<<<<
 
16543
 *                 self._update_current_block()
 
16544
 *             if self.current_dir_info is not None:
 
16545
 */
 
16546
    __pyx_v_self->block_index = (__pyx_v_self->block_index + 1);
 
16547
 
 
16548
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1903
 
16549
 *             if self.current_block is not None:
 
16550
 *                 self.block_index = self.block_index + 1
 
16551
 *                 self._update_current_block()             # <<<<<<<<<<<<<<
 
16552
 *             if self.current_dir_info is not None:
 
16553
 *                 self.path_index = 0
 
16554
 */
 
16555
    __pyx_t_9 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_update_current_block(__pyx_v_self); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16556
    goto __pyx_L36;
 
16557
  }
 
16558
  __pyx_L36:;
 
16559
 
 
16560
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1904
 
16561
 *                 self.block_index = self.block_index + 1
 
16562
 *                 self._update_current_block()
 
16563
 *             if self.current_dir_info is not None:             # <<<<<<<<<<<<<<
 
16564
 *                 self.path_index = 0
 
16565
 *                 self.current_dir_list = None
 
16566
 */
 
16567
  __pyx_t_4 = (__pyx_v_self->current_dir_info != Py_None);
 
16568
  if (__pyx_t_4) {
 
16569
 
 
16570
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1905
 
16571
 *                 self._update_current_block()
 
16572
 *             if self.current_dir_info is not None:
 
16573
 *                 self.path_index = 0             # <<<<<<<<<<<<<<
 
16574
 *                 self.current_dir_list = None
 
16575
 *                 try:
 
16576
 */
 
16577
    __pyx_v_self->path_index = 0;
 
16578
 
 
16579
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1906
 
16580
 *             if self.current_dir_info is not None:
 
16581
 *                 self.path_index = 0
 
16582
 *                 self.current_dir_list = None             # <<<<<<<<<<<<<<
 
16583
 *                 try:
 
16584
 *                     self.current_dir_info = self.dir_iterator.next()
 
16585
 */
 
16586
    __Pyx_INCREF(Py_None);
 
16587
    __Pyx_GIVEREF(Py_None);
 
16588
    __Pyx_GOTREF(__pyx_v_self->current_dir_list);
 
16589
    __Pyx_DECREF(__pyx_v_self->current_dir_list);
 
16590
    __pyx_v_self->current_dir_list = Py_None;
 
16591
 
 
16592
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1907
 
16593
 *                 self.path_index = 0
 
16594
 *                 self.current_dir_list = None
 
16595
 *                 try:             # <<<<<<<<<<<<<<
 
16596
 *                     self.current_dir_info = self.dir_iterator.next()
 
16597
 *                     self.current_dir_list = self.current_dir_info[1]
 
16598
 */
 
16599
    {
 
16600
      PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
 
16601
      __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
 
16602
      __Pyx_XGOTREF(__pyx_save_exc_type);
 
16603
      __Pyx_XGOTREF(__pyx_save_exc_value);
 
16604
      __Pyx_XGOTREF(__pyx_save_exc_tb);
 
16605
      /*try:*/ {
 
16606
 
 
16607
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1908
 
16608
 *                 self.current_dir_list = None
 
16609
 *                 try:
 
16610
 *                     self.current_dir_info = self.dir_iterator.next()             # <<<<<<<<<<<<<<
 
16611
 *                     self.current_dir_list = self.current_dir_info[1]
 
16612
 *                 except StopIteration, _:
 
16613
 */
 
16614
        __pyx_t_7 = PyObject_GetAttr(__pyx_v_self->dir_iterator, __pyx_n_s__next); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L38_error;}
 
16615
        __Pyx_GOTREF(__pyx_t_7);
 
16616
        __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L38_error;}
 
16617
        __Pyx_GOTREF(__pyx_t_6);
 
16618
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
16619
        __Pyx_GIVEREF(__pyx_t_6);
 
16620
        __Pyx_GOTREF(__pyx_v_self->current_dir_info);
 
16621
        __Pyx_DECREF(__pyx_v_self->current_dir_info);
 
16622
        __pyx_v_self->current_dir_info = __pyx_t_6;
 
16623
        __pyx_t_6 = 0;
 
16624
 
 
16625
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1909
 
16626
 *                 try:
 
16627
 *                     self.current_dir_info = self.dir_iterator.next()
 
16628
 *                     self.current_dir_list = self.current_dir_info[1]             # <<<<<<<<<<<<<<
 
16629
 *                 except StopIteration, _:
 
16630
 *                     self.current_dir_info = None
 
16631
 */
 
16632
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_self->current_dir_info, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L38_error;}
 
16633
        __Pyx_GOTREF(__pyx_t_6);
 
16634
        __Pyx_GIVEREF(__pyx_t_6);
 
16635
        __Pyx_GOTREF(__pyx_v_self->current_dir_list);
 
16636
        __Pyx_DECREF(__pyx_v_self->current_dir_list);
 
16637
        __pyx_v_self->current_dir_list = __pyx_t_6;
 
16638
        __pyx_t_6 = 0;
 
16639
      }
 
16640
      __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
 
16641
      __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
 
16642
      __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
 
16643
      goto __pyx_L45_try_end;
 
16644
      __pyx_L38_error:;
 
16645
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
 
16646
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
 
16647
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
 
16648
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
 
16649
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
 
16650
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
 
16651
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
 
16652
 
 
16653
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1910
 
16654
 *                     self.current_dir_info = self.dir_iterator.next()
 
16655
 *                     self.current_dir_list = self.current_dir_info[1]
 
16656
 *                 except StopIteration, _:             # <<<<<<<<<<<<<<
 
16657
 *                     self.current_dir_info = None
 
16658
 * 
 
16659
 */
 
16660
      __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
 
16661
      if (__pyx_t_9) {
 
16662
        __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._loop_one_block");
 
16663
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L40_except_error;}
 
16664
        __Pyx_GOTREF(__pyx_t_6);
 
16665
        __Pyx_GOTREF(__pyx_t_7);
 
16666
        __Pyx_GOTREF(__pyx_t_10);
 
16667
        __Pyx_INCREF(__pyx_t_7);
 
16668
        __Pyx_DECREF(__pyx_v__);
 
16669
        __pyx_v__ = __pyx_t_7;
 
16670
 
 
16671
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1911
 
16672
 *                     self.current_dir_list = self.current_dir_info[1]
 
16673
 *                 except StopIteration, _:
 
16674
 *                     self.current_dir_info = None             # <<<<<<<<<<<<<<
 
16675
 * 
 
16676
 *     cdef object _next_consistent_entries(self):
 
16677
 */
 
16678
        __Pyx_INCREF(Py_None);
 
16679
        __Pyx_GIVEREF(Py_None);
 
16680
        __Pyx_GOTREF(__pyx_v_self->current_dir_info);
 
16681
        __Pyx_DECREF(__pyx_v_self->current_dir_info);
 
16682
        __pyx_v_self->current_dir_info = Py_None;
 
16683
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
16684
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
16685
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
16686
        goto __pyx_L39_exception_handled;
 
16687
      }
 
16688
      __pyx_L40_except_error:;
 
16689
      __Pyx_XGIVEREF(__pyx_save_exc_type);
 
16690
      __Pyx_XGIVEREF(__pyx_save_exc_value);
 
16691
      __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
16692
      __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
16693
      goto __pyx_L1_error;
 
16694
      __pyx_L39_exception_handled:;
 
16695
      __Pyx_XGIVEREF(__pyx_save_exc_type);
 
16696
      __Pyx_XGIVEREF(__pyx_save_exc_value);
 
16697
      __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
16698
      __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
16699
      __pyx_L45_try_end:;
 
16700
    }
 
16701
    goto __pyx_L37;
 
16702
  }
 
16703
  __pyx_L37:;
 
16704
 
 
16705
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
16706
  goto __pyx_L0;
 
16707
  __pyx_L1_error:;
 
16708
  __Pyx_XDECREF(__pyx_t_2);
 
16709
  __Pyx_XDECREF(__pyx_t_5);
 
16710
  __Pyx_XDECREF(__pyx_t_6);
 
16711
  __Pyx_XDECREF(__pyx_t_7);
 
16712
  __Pyx_XDECREF(__pyx_t_10);
 
16713
  __Pyx_XDECREF(__pyx_t_11);
 
16714
  __Pyx_XDECREF(__pyx_t_12);
 
16715
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._loop_one_block");
 
16716
  __pyx_r = 0;
 
16717
  __pyx_L0:;
 
16718
  __Pyx_DECREF(__pyx_v_current_entry);
 
16719
  __Pyx_DECREF(__pyx_v_current_path_info);
 
16720
  __Pyx_DECREF(__pyx_v_disk_kind);
 
16721
  __Pyx_DECREF(__pyx_v_result);
 
16722
  __Pyx_DECREF(__pyx_v_changed);
 
16723
  __Pyx_DECREF(__pyx_v_new_executable);
 
16724
  __Pyx_DECREF(__pyx_v_relpath_unicode);
 
16725
  __Pyx_DECREF(__pyx_v__);
 
16726
  __Pyx_XGIVEREF(__pyx_r);
 
16727
  __Pyx_RefNannyFinishContext();
 
16728
  return __pyx_r;
 
16729
}
 
16730
 
 
16731
/* "bzrlib/_dirstate_helpers_pyx.pyx":1913
 
16732
 *                     self.current_dir_info = None
 
16733
 * 
 
16734
 *     cdef object _next_consistent_entries(self):             # <<<<<<<<<<<<<<
 
16735
 *         """Grabs the next specific file parent case to consider.
 
16736
 * 
 
16737
 */
 
16738
 
 
16739
static  PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__next_consistent_entries(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self) {
 
16740
  PyObject *__pyx_v_results;
 
16741
  PyObject *__pyx_v_path_utf8;
 
16742
  PyObject *__pyx_v_path_entries;
 
16743
  PyObject *__pyx_v_selected_entries;
 
16744
  int __pyx_v_found_item;
 
16745
  PyObject *__pyx_v_candidate_entry;
 
16746
  PyObject *__pyx_v_path_info;
 
16747
  PyObject *__pyx_v_entry;
 
16748
  PyObject *__pyx_v_result;
 
16749
  PyObject *__pyx_v_changed;
 
16750
  PyObject *__pyx_v_entry_path_utf8;
 
16751
  PyObject *__pyx_v_initial_key;
 
16752
  PyObject *__pyx_v_block_index;
 
16753
  PyObject *__pyx_v__;
 
16754
  PyObject *__pyx_v_current_block;
 
16755
  PyObject *__pyx_r = NULL;
 
16756
  PyObject *__pyx_t_1 = NULL;
 
16757
  int __pyx_t_2;
 
16758
  PyObject *__pyx_t_3 = NULL;
 
16759
  PyObject *__pyx_t_4 = NULL;
 
16760
  Py_ssize_t __pyx_t_5;
 
16761
  int __pyx_t_6;
 
16762
  int __pyx_t_7;
 
16763
  int __pyx_t_8;
 
16764
  PyObject *__pyx_t_9 = NULL;
 
16765
  PyObject *__pyx_t_10 = NULL;
 
16766
  Py_ssize_t __pyx_t_11;
 
16767
  __Pyx_RefNannySetupContext("_next_consistent_entries");
 
16768
  __pyx_v_results = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
 
16769
  __pyx_v_path_utf8 = Py_None; __Pyx_INCREF(Py_None);
 
16770
  __pyx_v_path_entries = Py_None; __Pyx_INCREF(Py_None);
 
16771
  __pyx_v_selected_entries = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
 
16772
  __pyx_v_candidate_entry = Py_None; __Pyx_INCREF(Py_None);
 
16773
  __pyx_v_path_info = Py_None; __Pyx_INCREF(Py_None);
 
16774
  __pyx_v_entry = Py_None; __Pyx_INCREF(Py_None);
 
16775
  __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
 
16776
  __pyx_v_changed = Py_None; __Pyx_INCREF(Py_None);
 
16777
  __pyx_v_entry_path_utf8 = Py_None; __Pyx_INCREF(Py_None);
 
16778
  __pyx_v_initial_key = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
 
16779
  __pyx_v_block_index = Py_None; __Pyx_INCREF(Py_None);
 
16780
  __pyx_v__ = Py_None; __Pyx_INCREF(Py_None);
 
16781
  __pyx_v_current_block = Py_None; __Pyx_INCREF(Py_None);
 
16782
 
 
16783
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1918
 
16784
 *         :return: A list of the results, each of which is as for _process_entry.
 
16785
 *         """
 
16786
 *         results = []             # <<<<<<<<<<<<<<
 
16787
 *         while self.search_specific_file_parents:
 
16788
 *             # Process the parent directories for the paths we were iterating.
 
16789
 */
 
16790
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16791
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
16792
  __Pyx_DECREF(((PyObject *)__pyx_v_results));
 
16793
  __pyx_v_results = __pyx_t_1;
 
16794
  __pyx_t_1 = 0;
 
16795
 
 
16796
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1919
 
16797
 *         """
 
16798
 *         results = []
 
16799
 *         while self.search_specific_file_parents:             # <<<<<<<<<<<<<<
 
16800
 *             # Process the parent directories for the paths we were iterating.
 
16801
 *             # Even in extremely large trees this should be modest, so currently
 
16802
 */
 
16803
  while (1) {
 
16804
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->search_specific_file_parents); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16805
    if (!__pyx_t_2) break;
 
16806
 
 
16807
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1923
 
16808
 *             # Even in extremely large trees this should be modest, so currently
 
16809
 *             # no attempt is made to optimise.
 
16810
 *             path_utf8 = self.search_specific_file_parents.pop()             # <<<<<<<<<<<<<<
 
16811
 *             if path_utf8 in self.searched_exact_paths:
 
16812
 *                 # We've examined this path.
 
16813
 */
 
16814
    __pyx_t_1 = __Pyx_PyObject_Pop(__pyx_v_self->search_specific_file_parents); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16815
    __Pyx_GOTREF(__pyx_t_1);
 
16816
    __Pyx_DECREF(__pyx_v_path_utf8);
 
16817
    __pyx_v_path_utf8 = __pyx_t_1;
 
16818
    __pyx_t_1 = 0;
 
16819
 
 
16820
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1924
 
16821
 *             # no attempt is made to optimise.
 
16822
 *             path_utf8 = self.search_specific_file_parents.pop()
 
16823
 *             if path_utf8 in self.searched_exact_paths:             # <<<<<<<<<<<<<<
 
16824
 *                 # We've examined this path.
 
16825
 *                 continue
 
16826
 */
 
16827
    __pyx_t_2 = ((PySequence_Contains(__pyx_v_self->searched_exact_paths, __pyx_v_path_utf8))); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16828
    if (__pyx_t_2) {
 
16829
 
 
16830
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1926
 
16831
 *             if path_utf8 in self.searched_exact_paths:
 
16832
 *                 # We've examined this path.
 
16833
 *                 continue             # <<<<<<<<<<<<<<
 
16834
 *             if osutils.is_inside_any(self.searched_specific_files, path_utf8):
 
16835
 *                 # We've examined this path.
 
16836
 */
 
16837
      goto __pyx_L3_continue;
 
16838
      goto __pyx_L5;
 
16839
    }
 
16840
    __pyx_L5:;
 
16841
 
 
16842
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1927
 
16843
 *                 # We've examined this path.
 
16844
 *                 continue
 
16845
 *             if osutils.is_inside_any(self.searched_specific_files, path_utf8):             # <<<<<<<<<<<<<<
 
16846
 *                 # We've examined this path.
 
16847
 *                 continue
 
16848
 */
 
16849
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__osutils); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16850
    __Pyx_GOTREF(__pyx_t_1);
 
16851
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__is_inside_any); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16852
    __Pyx_GOTREF(__pyx_t_3);
 
16853
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
16854
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16855
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
16856
    __Pyx_INCREF(__pyx_v_self->searched_specific_files);
 
16857
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->searched_specific_files);
 
16858
    __Pyx_GIVEREF(__pyx_v_self->searched_specific_files);
 
16859
    __Pyx_INCREF(__pyx_v_path_utf8);
 
16860
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_path_utf8);
 
16861
    __Pyx_GIVEREF(__pyx_v_path_utf8);
 
16862
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16863
    __Pyx_GOTREF(__pyx_t_4);
 
16864
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
16865
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
16866
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16867
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
16868
    if (__pyx_t_2) {
 
16869
 
 
16870
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1929
 
16871
 *             if osutils.is_inside_any(self.searched_specific_files, path_utf8):
 
16872
 *                 # We've examined this path.
 
16873
 *                 continue             # <<<<<<<<<<<<<<
 
16874
 *             path_entries = self.state._entries_for_path(path_utf8)
 
16875
 *             # We need either one or two entries. If the path in
 
16876
 */
 
16877
      goto __pyx_L3_continue;
 
16878
      goto __pyx_L6;
 
16879
    }
 
16880
    __pyx_L6:;
 
16881
 
 
16882
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1930
 
16883
 *                 # We've examined this path.
 
16884
 *                 continue
 
16885
 *             path_entries = self.state._entries_for_path(path_utf8)             # <<<<<<<<<<<<<<
 
16886
 *             # We need either one or two entries. If the path in
 
16887
 *             # self.target_index has moved (so the entry in source_index is in
 
16888
 */
 
16889
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___entries_for_path); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16890
    __Pyx_GOTREF(__pyx_t_4);
 
16891
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16892
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
16893
    __Pyx_INCREF(__pyx_v_path_utf8);
 
16894
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_path_utf8);
 
16895
    __Pyx_GIVEREF(__pyx_v_path_utf8);
 
16896
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16897
    __Pyx_GOTREF(__pyx_t_3);
 
16898
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
16899
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
16900
    __Pyx_DECREF(__pyx_v_path_entries);
 
16901
    __pyx_v_path_entries = __pyx_t_3;
 
16902
    __pyx_t_3 = 0;
 
16903
 
 
16904
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1935
 
16905
 *             # 'ar') then we need to also look for the entry for this path in
 
16906
 *             # self.source_index, to output the appropriate delete-or-rename.
 
16907
 *             selected_entries = []             # <<<<<<<<<<<<<<
 
16908
 *             found_item = False
 
16909
 *             for candidate_entry in path_entries:
 
16910
 */
 
16911
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16912
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
16913
    __Pyx_DECREF(((PyObject *)__pyx_v_selected_entries));
 
16914
    __pyx_v_selected_entries = __pyx_t_3;
 
16915
    __pyx_t_3 = 0;
 
16916
 
 
16917
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1936
 
16918
 *             # self.source_index, to output the appropriate delete-or-rename.
 
16919
 *             selected_entries = []
 
16920
 *             found_item = False             # <<<<<<<<<<<<<<
 
16921
 *             for candidate_entry in path_entries:
 
16922
 *                 # Find entries present in target at this path:
 
16923
 */
 
16924
    __pyx_v_found_item = 0;
 
16925
 
 
16926
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1937
 
16927
 *             selected_entries = []
 
16928
 *             found_item = False
 
16929
 *             for candidate_entry in path_entries:             # <<<<<<<<<<<<<<
 
16930
 *                 # Find entries present in target at this path:
 
16931
 *                 if candidate_entry[1][self.target_index][0] not in 'ar':
 
16932
 */
 
16933
    if (PyList_CheckExact(__pyx_v_path_entries) || PyTuple_CheckExact(__pyx_v_path_entries)) {
 
16934
      __pyx_t_5 = 0; __pyx_t_3 = __pyx_v_path_entries; __Pyx_INCREF(__pyx_t_3);
 
16935
    } else {
 
16936
      __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_path_entries); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16937
      __Pyx_GOTREF(__pyx_t_3);
 
16938
    }
 
16939
    for (;;) {
 
16940
      if (likely(PyList_CheckExact(__pyx_t_3))) {
 
16941
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
 
16942
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++;
 
16943
      } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
 
16944
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
 
16945
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++;
 
16946
      } else {
 
16947
        __pyx_t_1 = PyIter_Next(__pyx_t_3);
 
16948
        if (!__pyx_t_1) {
 
16949
          if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16950
          break;
 
16951
        }
 
16952
        __Pyx_GOTREF(__pyx_t_1);
 
16953
      }
 
16954
      __Pyx_DECREF(__pyx_v_candidate_entry);
 
16955
      __pyx_v_candidate_entry = __pyx_t_1;
 
16956
      __pyx_t_1 = 0;
 
16957
 
 
16958
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1939
 
16959
 *             for candidate_entry in path_entries:
 
16960
 *                 # Find entries present in target at this path:
 
16961
 *                 if candidate_entry[1][self.target_index][0] not in 'ar':             # <<<<<<<<<<<<<<
 
16962
 *                     found_item = True
 
16963
 *                     selected_entries.append(candidate_entry)
 
16964
 */
 
16965
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_candidate_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16966
      __Pyx_GOTREF(__pyx_t_1);
 
16967
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_self->target_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16968
      __Pyx_GOTREF(__pyx_t_4);
 
16969
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
16970
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16971
      __Pyx_GOTREF(__pyx_t_1);
 
16972
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
16973
      __pyx_t_2 = (__Pyx_NegateNonNeg(PySequence_Contains(((PyObject *)__pyx_n_s__ar), __pyx_t_1))); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16974
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
16975
      if (__pyx_t_2) {
 
16976
 
 
16977
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1940
 
16978
 *                 # Find entries present in target at this path:
 
16979
 *                 if candidate_entry[1][self.target_index][0] not in 'ar':
 
16980
 *                     found_item = True             # <<<<<<<<<<<<<<
 
16981
 *                     selected_entries.append(candidate_entry)
 
16982
 *                 # Find entries present in source at this path:
 
16983
 */
 
16984
        __pyx_v_found_item = 1;
 
16985
 
 
16986
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1941
 
16987
 *                 if candidate_entry[1][self.target_index][0] not in 'ar':
 
16988
 *                     found_item = True
 
16989
 *                     selected_entries.append(candidate_entry)             # <<<<<<<<<<<<<<
 
16990
 *                 # Find entries present in source at this path:
 
16991
 *                 elif (self.source_index is not None and
 
16992
 */
 
16993
        if (unlikely(__pyx_v_selected_entries == Py_None)) {
 
16994
          PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
 
16995
        }
 
16996
        __pyx_t_6 = PyList_Append(__pyx_v_selected_entries, __pyx_v_candidate_entry); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
16997
        goto __pyx_L9;
 
16998
      }
 
16999
 
 
17000
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1943
 
17001
 *                     selected_entries.append(candidate_entry)
 
17002
 *                 # Find entries present in source at this path:
 
17003
 *                 elif (self.source_index is not None and             # <<<<<<<<<<<<<<
 
17004
 *                     candidate_entry[1][self.source_index][0] not in 'ar'):
 
17005
 *                     found_item = True
 
17006
 */
 
17007
      __pyx_t_1 = PyInt_FromLong(__pyx_v_self->source_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17008
      __Pyx_GOTREF(__pyx_t_1);
 
17009
      __pyx_t_2 = (__pyx_t_1 != Py_None);
 
17010
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
17011
      if (__pyx_t_2) {
 
17012
 
 
17013
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1944
 
17014
 *                 # Find entries present in source at this path:
 
17015
 *                 elif (self.source_index is not None and
 
17016
 *                     candidate_entry[1][self.source_index][0] not in 'ar'):             # <<<<<<<<<<<<<<
 
17017
 *                     found_item = True
 
17018
 *                     if candidate_entry[1][self.target_index][0] == 'a':
 
17019
 */
 
17020
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_candidate_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17021
        __Pyx_GOTREF(__pyx_t_1);
 
17022
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_self->source_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17023
        __Pyx_GOTREF(__pyx_t_4);
 
17024
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
17025
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17026
        __Pyx_GOTREF(__pyx_t_1);
 
17027
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
17028
        __pyx_t_7 = (__Pyx_NegateNonNeg(PySequence_Contains(((PyObject *)__pyx_n_s__ar), __pyx_t_1))); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17029
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
17030
        __pyx_t_8 = __pyx_t_7;
 
17031
      } else {
 
17032
        __pyx_t_8 = __pyx_t_2;
 
17033
      }
 
17034
      if (__pyx_t_8) {
 
17035
 
 
17036
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1945
 
17037
 *                 elif (self.source_index is not None and
 
17038
 *                     candidate_entry[1][self.source_index][0] not in 'ar'):
 
17039
 *                     found_item = True             # <<<<<<<<<<<<<<
 
17040
 *                     if candidate_entry[1][self.target_index][0] == 'a':
 
17041
 *                         # Deleted, emit it here.
 
17042
 */
 
17043
        __pyx_v_found_item = 1;
 
17044
 
 
17045
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1946
 
17046
 *                     candidate_entry[1][self.source_index][0] not in 'ar'):
 
17047
 *                     found_item = True
 
17048
 *                     if candidate_entry[1][self.target_index][0] == 'a':             # <<<<<<<<<<<<<<
 
17049
 *                         # Deleted, emit it here.
 
17050
 *                         selected_entries.append(candidate_entry)
 
17051
 */
 
17052
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_candidate_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17053
        __Pyx_GOTREF(__pyx_t_1);
 
17054
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_self->target_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17055
        __Pyx_GOTREF(__pyx_t_4);
 
17056
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
17057
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17058
        __Pyx_GOTREF(__pyx_t_1);
 
17059
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
17060
        __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__a), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17061
        __Pyx_GOTREF(__pyx_t_4);
 
17062
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
17063
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17064
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
17065
        if (__pyx_t_8) {
 
17066
 
 
17067
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1948
 
17068
 *                     if candidate_entry[1][self.target_index][0] == 'a':
 
17069
 *                         # Deleted, emit it here.
 
17070
 *                         selected_entries.append(candidate_entry)             # <<<<<<<<<<<<<<
 
17071
 *                     else:
 
17072
 *                         # renamed, emit it when we process the directory it
 
17073
 */
 
17074
          if (unlikely(__pyx_v_selected_entries == Py_None)) {
 
17075
            PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
 
17076
          }
 
17077
          __pyx_t_6 = PyList_Append(__pyx_v_selected_entries, __pyx_v_candidate_entry); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17078
          goto __pyx_L10;
 
17079
        }
 
17080
        /*else*/ {
 
17081
 
 
17082
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1952
 
17083
 *                         # renamed, emit it when we process the directory it
 
17084
 *                         # ended up at.
 
17085
 *                         self.search_specific_file_parents.add(             # <<<<<<<<<<<<<<
 
17086
 *                             candidate_entry[1][self.target_index][1])
 
17087
 *             if not found_item:
 
17088
 */
 
17089
          __pyx_t_4 = PyObject_GetAttr(__pyx_v_self->search_specific_file_parents, __pyx_n_s__add); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17090
          __Pyx_GOTREF(__pyx_t_4);
 
17091
 
 
17092
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1953
 
17093
 *                         # ended up at.
 
17094
 *                         self.search_specific_file_parents.add(
 
17095
 *                             candidate_entry[1][self.target_index][1])             # <<<<<<<<<<<<<<
 
17096
 *             if not found_item:
 
17097
 *                 raise AssertionError(
 
17098
 */
 
17099
          __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_candidate_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17100
          __Pyx_GOTREF(__pyx_t_1);
 
17101
          __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_self->target_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17102
          __Pyx_GOTREF(__pyx_t_9);
 
17103
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
17104
          __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_9, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17105
          __Pyx_GOTREF(__pyx_t_1);
 
17106
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17107
          __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17108
          __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
17109
          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
 
17110
          __Pyx_GIVEREF(__pyx_t_1);
 
17111
          __pyx_t_1 = 0;
 
17112
          __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17113
          __Pyx_GOTREF(__pyx_t_1);
 
17114
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
17115
          __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
17116
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
17117
        }
 
17118
        __pyx_L10:;
 
17119
        goto __pyx_L9;
 
17120
      }
 
17121
      __pyx_L9:;
 
17122
    }
 
17123
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17124
 
 
17125
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1954
 
17126
 *                         self.search_specific_file_parents.add(
 
17127
 *                             candidate_entry[1][self.target_index][1])
 
17128
 *             if not found_item:             # <<<<<<<<<<<<<<
 
17129
 *                 raise AssertionError(
 
17130
 *                     "Missing entry for specific path parent %r, %r" % (
 
17131
 */
 
17132
    __pyx_t_8 = (!__pyx_v_found_item);
 
17133
    if (__pyx_t_8) {
 
17134
 
 
17135
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1957
 
17136
 *                 raise AssertionError(
 
17137
 *                     "Missing entry for specific path parent %r, %r" % (
 
17138
 *                     path_utf8, path_entries))             # <<<<<<<<<<<<<<
 
17139
 *             path_info = self._path_info(path_utf8, path_utf8.decode('utf8'))
 
17140
 *             for entry in selected_entries:
 
17141
 */
 
17142
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17143
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
17144
      __Pyx_INCREF(__pyx_v_path_utf8);
 
17145
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_path_utf8);
 
17146
      __Pyx_GIVEREF(__pyx_v_path_utf8);
 
17147
      __Pyx_INCREF(__pyx_v_path_entries);
 
17148
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_path_entries);
 
17149
      __Pyx_GIVEREF(__pyx_v_path_entries);
 
17150
      __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_62), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17151
      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
17152
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
17153
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17154
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
17155
      PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1));
 
17156
      __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
 
17157
      __pyx_t_1 = 0;
 
17158
      __pyx_t_1 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17159
      __Pyx_GOTREF(__pyx_t_1);
 
17160
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
17161
      __Pyx_Raise(__pyx_t_1, 0, 0);
 
17162
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
17163
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17164
      goto __pyx_L11;
 
17165
    }
 
17166
    __pyx_L11:;
 
17167
 
 
17168
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1958
 
17169
 *                     "Missing entry for specific path parent %r, %r" % (
 
17170
 *                     path_utf8, path_entries))
 
17171
 *             path_info = self._path_info(path_utf8, path_utf8.decode('utf8'))             # <<<<<<<<<<<<<<
 
17172
 *             for entry in selected_entries:
 
17173
 *                 if entry[0][2] in self.seen_ids:
 
17174
 */
 
17175
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_path_utf8, __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17176
    __Pyx_GOTREF(__pyx_t_1);
 
17177
    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17178
    __Pyx_GOTREF(__pyx_t_3);
 
17179
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
17180
    __pyx_t_1 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_path_info(__pyx_v_self, __pyx_v_path_utf8, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17181
    __Pyx_GOTREF(__pyx_t_1);
 
17182
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17183
    __Pyx_DECREF(__pyx_v_path_info);
 
17184
    __pyx_v_path_info = __pyx_t_1;
 
17185
    __pyx_t_1 = 0;
 
17186
 
 
17187
    /* "bzrlib/_dirstate_helpers_pyx.pyx":1959
 
17188
 *                     path_utf8, path_entries))
 
17189
 *             path_info = self._path_info(path_utf8, path_utf8.decode('utf8'))
 
17190
 *             for entry in selected_entries:             # <<<<<<<<<<<<<<
 
17191
 *                 if entry[0][2] in self.seen_ids:
 
17192
 *                     continue
 
17193
 */
 
17194
    if (unlikely(__pyx_v_selected_entries == Py_None)) {
 
17195
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
 
17196
    }
 
17197
    __pyx_t_5 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_selected_entries); __Pyx_INCREF(__pyx_t_1);
 
17198
    for (;;) {
 
17199
      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
 
17200
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
 
17201
      __Pyx_DECREF(__pyx_v_entry);
 
17202
      __pyx_v_entry = __pyx_t_3;
 
17203
      __pyx_t_3 = 0;
 
17204
 
 
17205
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1960
 
17206
 *             path_info = self._path_info(path_utf8, path_utf8.decode('utf8'))
 
17207
 *             for entry in selected_entries:
 
17208
 *                 if entry[0][2] in self.seen_ids:             # <<<<<<<<<<<<<<
 
17209
 *                     continue
 
17210
 *                 result, changed = self._process_entry(entry, path_info)
 
17211
 */
 
17212
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17213
      __Pyx_GOTREF(__pyx_t_3);
 
17214
      __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_3, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17215
      __Pyx_GOTREF(__pyx_t_9);
 
17216
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17217
      __pyx_t_8 = ((PySequence_Contains(__pyx_v_self->seen_ids, __pyx_t_9))); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17218
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17219
      if (__pyx_t_8) {
 
17220
 
 
17221
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1961
 
17222
 *             for entry in selected_entries:
 
17223
 *                 if entry[0][2] in self.seen_ids:
 
17224
 *                     continue             # <<<<<<<<<<<<<<
 
17225
 *                 result, changed = self._process_entry(entry, path_info)
 
17226
 *                 if changed is None:
 
17227
 */
 
17228
        goto __pyx_L12_continue;
 
17229
        goto __pyx_L14;
 
17230
      }
 
17231
      __pyx_L14:;
 
17232
 
 
17233
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1962
 
17234
 *                 if entry[0][2] in self.seen_ids:
 
17235
 *                     continue
 
17236
 *                 result, changed = self._process_entry(entry, path_info)             # <<<<<<<<<<<<<<
 
17237
 *                 if changed is None:
 
17238
 *                     raise AssertionError(
 
17239
 */
 
17240
      __pyx_t_9 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_process_entry(__pyx_v_self, __pyx_v_entry, __pyx_v_path_info); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17241
      __Pyx_GOTREF(__pyx_t_9);
 
17242
      if (PyTuple_CheckExact(__pyx_t_9) && likely(PyTuple_GET_SIZE(__pyx_t_9) == 2)) {
 
17243
        PyObject* tuple = __pyx_t_9;
 
17244
        __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
 
17245
        __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
 
17246
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17247
        __Pyx_DECREF(__pyx_v_result);
 
17248
        __pyx_v_result = __pyx_t_3;
 
17249
        __pyx_t_3 = 0;
 
17250
        __Pyx_DECREF(__pyx_v_changed);
 
17251
        __pyx_v_changed = __pyx_t_4;
 
17252
        __pyx_t_4 = 0;
 
17253
      } else {
 
17254
        __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17255
        __Pyx_GOTREF(__pyx_t_10);
 
17256
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17257
        __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_10, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17258
        __Pyx_GOTREF(__pyx_t_3);
 
17259
        __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_10, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17260
        __Pyx_GOTREF(__pyx_t_4);
 
17261
        if (__Pyx_EndUnpack(__pyx_t_10, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17262
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
17263
        __Pyx_DECREF(__pyx_v_result);
 
17264
        __pyx_v_result = __pyx_t_3;
 
17265
        __pyx_t_3 = 0;
 
17266
        __Pyx_DECREF(__pyx_v_changed);
 
17267
        __pyx_v_changed = __pyx_t_4;
 
17268
        __pyx_t_4 = 0;
 
17269
      }
 
17270
 
 
17271
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1963
 
17272
 *                     continue
 
17273
 *                 result, changed = self._process_entry(entry, path_info)
 
17274
 *                 if changed is None:             # <<<<<<<<<<<<<<
 
17275
 *                     raise AssertionError(
 
17276
 *                         "Got entry<->path mismatch for specific path "
 
17277
 */
 
17278
      __pyx_t_8 = (__pyx_v_changed == Py_None);
 
17279
      if (__pyx_t_8) {
 
17280
 
 
17281
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1967
 
17282
 *                         "Got entry<->path mismatch for specific path "
 
17283
 *                         "%r entry %r path_info %r " % (
 
17284
 *                         path_utf8, entry, path_info))             # <<<<<<<<<<<<<<
 
17285
 *                 # Only include changes - we're outside the users requested
 
17286
 *                 # expansion.
 
17287
 */
 
17288
        __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17289
        __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
17290
        __Pyx_INCREF(__pyx_v_path_utf8);
 
17291
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_path_utf8);
 
17292
        __Pyx_GIVEREF(__pyx_v_path_utf8);
 
17293
        __Pyx_INCREF(__pyx_v_entry);
 
17294
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_entry);
 
17295
        __Pyx_GIVEREF(__pyx_v_entry);
 
17296
        __Pyx_INCREF(__pyx_v_path_info);
 
17297
        PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_path_info);
 
17298
        __Pyx_GIVEREF(__pyx_v_path_info);
 
17299
        __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_64), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17300
        __Pyx_GOTREF(((PyObject *)__pyx_t_4));
 
17301
        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
17302
        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17303
        __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
17304
        PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_4));
 
17305
        __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
 
17306
        __pyx_t_4 = 0;
 
17307
        __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17308
        __Pyx_GOTREF(__pyx_t_4);
 
17309
        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
17310
        __Pyx_Raise(__pyx_t_4, 0, 0);
 
17311
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
17312
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17313
        goto __pyx_L15;
 
17314
      }
 
17315
      __pyx_L15:;
 
17316
 
 
17317
      /* "bzrlib/_dirstate_helpers_pyx.pyx":1970
 
17318
 *                 # Only include changes - we're outside the users requested
 
17319
 *                 # expansion.
 
17320
 *                 if changed:             # <<<<<<<<<<<<<<
 
17321
 *                     self._gather_result_for_consistency(result)
 
17322
 *                     if (result[6][0] == 'directory' and
 
17323
 */
 
17324
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_changed); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17325
      if (__pyx_t_8) {
 
17326
 
 
17327
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1971
 
17328
 *                 # expansion.
 
17329
 *                 if changed:
 
17330
 *                     self._gather_result_for_consistency(result)             # <<<<<<<<<<<<<<
 
17331
 *                     if (result[6][0] == 'directory' and
 
17332
 *                         result[6][1] != 'directory'):
 
17333
 */
 
17334
        __pyx_t_6 = ((struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self->__pyx_vtab)->_gather_result_for_consistency(__pyx_v_self, __pyx_v_result); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17335
 
 
17336
        /* "bzrlib/_dirstate_helpers_pyx.pyx":1972
 
17337
 *                 if changed:
 
17338
 *                     self._gather_result_for_consistency(result)
 
17339
 *                     if (result[6][0] == 'directory' and             # <<<<<<<<<<<<<<
 
17340
 *                         result[6][1] != 'directory'):
 
17341
 *                         # This stopped being a directory, the old children have
 
17342
 */
 
17343
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_result, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17344
        __Pyx_GOTREF(__pyx_t_4);
 
17345
        __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_4, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17346
        __Pyx_GOTREF(__pyx_t_9);
 
17347
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
17348
        __pyx_t_4 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)__pyx_n_s__directory), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17349
        __Pyx_GOTREF(__pyx_t_4);
 
17350
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17351
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17352
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
17353
        if (__pyx_t_8) {
 
17354
 
 
17355
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1973
 
17356
 *                     self._gather_result_for_consistency(result)
 
17357
 *                     if (result[6][0] == 'directory' and
 
17358
 *                         result[6][1] != 'directory'):             # <<<<<<<<<<<<<<
 
17359
 *                         # This stopped being a directory, the old children have
 
17360
 *                         # to be included.
 
17361
 */
 
17362
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_result, 6, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17363
          __Pyx_GOTREF(__pyx_t_4);
 
17364
          __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_4, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17365
          __Pyx_GOTREF(__pyx_t_9);
 
17366
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
17367
          __pyx_t_4 = PyObject_RichCompare(__pyx_t_9, ((PyObject *)__pyx_n_s__directory), Py_NE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17368
          __Pyx_GOTREF(__pyx_t_4);
 
17369
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17370
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17371
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
17372
          __pyx_t_7 = __pyx_t_2;
 
17373
        } else {
 
17374
          __pyx_t_7 = __pyx_t_8;
 
17375
        }
 
17376
        if (__pyx_t_7) {
 
17377
 
 
17378
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1976
 
17379
 *                         # This stopped being a directory, the old children have
 
17380
 *                         # to be included.
 
17381
 *                         if entry[1][self.source_index][0] == 'r':             # <<<<<<<<<<<<<<
 
17382
 *                             # renamed, take the source path
 
17383
 *                             entry_path_utf8 = entry[1][self.source_index][1]
 
17384
 */
 
17385
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17386
          __Pyx_GOTREF(__pyx_t_4);
 
17387
          __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_self->source_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17388
          __Pyx_GOTREF(__pyx_t_9);
 
17389
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
17390
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_9, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17391
          __Pyx_GOTREF(__pyx_t_4);
 
17392
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17393
          __pyx_t_9 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_n_s__r), Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17394
          __Pyx_GOTREF(__pyx_t_9);
 
17395
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
17396
          __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17397
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17398
          if (__pyx_t_7) {
 
17399
 
 
17400
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1978
 
17401
 *                         if entry[1][self.source_index][0] == 'r':
 
17402
 *                             # renamed, take the source path
 
17403
 *                             entry_path_utf8 = entry[1][self.source_index][1]             # <<<<<<<<<<<<<<
 
17404
 *                         else:
 
17405
 *                             entry_path_utf8 = path_utf8
 
17406
 */
 
17407
            __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17408
            __Pyx_GOTREF(__pyx_t_9);
 
17409
            __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_9, __pyx_v_self->source_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17410
            __Pyx_GOTREF(__pyx_t_4);
 
17411
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17412
            __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_4, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17413
            __Pyx_GOTREF(__pyx_t_9);
 
17414
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
17415
            __Pyx_DECREF(__pyx_v_entry_path_utf8);
 
17416
            __pyx_v_entry_path_utf8 = __pyx_t_9;
 
17417
            __pyx_t_9 = 0;
 
17418
            goto __pyx_L18;
 
17419
          }
 
17420
          /*else*/ {
 
17421
 
 
17422
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1980
 
17423
 *                             entry_path_utf8 = entry[1][self.source_index][1]
 
17424
 *                         else:
 
17425
 *                             entry_path_utf8 = path_utf8             # <<<<<<<<<<<<<<
 
17426
 *                         initial_key = (entry_path_utf8, '', '')
 
17427
 *                         block_index, _ = self.state._find_block_index_from_key(
 
17428
 */
 
17429
            __Pyx_INCREF(__pyx_v_path_utf8);
 
17430
            __Pyx_DECREF(__pyx_v_entry_path_utf8);
 
17431
            __pyx_v_entry_path_utf8 = __pyx_v_path_utf8;
 
17432
          }
 
17433
          __pyx_L18:;
 
17434
 
 
17435
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1981
 
17436
 *                         else:
 
17437
 *                             entry_path_utf8 = path_utf8
 
17438
 *                         initial_key = (entry_path_utf8, '', '')             # <<<<<<<<<<<<<<
 
17439
 *                         block_index, _ = self.state._find_block_index_from_key(
 
17440
 *                             initial_key)
 
17441
 */
 
17442
          __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17443
          __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
17444
          __Pyx_INCREF(__pyx_v_entry_path_utf8);
 
17445
          PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_entry_path_utf8);
 
17446
          __Pyx_GIVEREF(__pyx_v_entry_path_utf8);
 
17447
          __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
 
17448
          PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_kp_s_5));
 
17449
          __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
 
17450
          __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
 
17451
          PyTuple_SET_ITEM(__pyx_t_9, 2, ((PyObject *)__pyx_kp_s_5));
 
17452
          __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
 
17453
          __Pyx_DECREF(((PyObject *)__pyx_v_initial_key));
 
17454
          __pyx_v_initial_key = __pyx_t_9;
 
17455
          __pyx_t_9 = 0;
 
17456
 
 
17457
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1982
 
17458
 *                             entry_path_utf8 = path_utf8
 
17459
 *                         initial_key = (entry_path_utf8, '', '')
 
17460
 *                         block_index, _ = self.state._find_block_index_from_key(             # <<<<<<<<<<<<<<
 
17461
 *                             initial_key)
 
17462
 *                         if block_index == 0:
 
17463
 */
 
17464
          __pyx_t_9 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s_54); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17465
          __Pyx_GOTREF(__pyx_t_9);
 
17466
 
 
17467
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1983
 
17468
 *                         initial_key = (entry_path_utf8, '', '')
 
17469
 *                         block_index, _ = self.state._find_block_index_from_key(
 
17470
 *                             initial_key)             # <<<<<<<<<<<<<<
 
17471
 *                         if block_index == 0:
 
17472
 *                             # The children of the root are in block index 1.
 
17473
 */
 
17474
          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17475
          __Pyx_GOTREF(((PyObject *)__pyx_t_4));
 
17476
          __Pyx_INCREF(((PyObject *)__pyx_v_initial_key));
 
17477
          PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_initial_key));
 
17478
          __Pyx_GIVEREF(((PyObject *)__pyx_v_initial_key));
 
17479
          __pyx_t_3 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17480
          __Pyx_GOTREF(__pyx_t_3);
 
17481
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17482
          __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
 
17483
          if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
 
17484
            PyObject* tuple = __pyx_t_3;
 
17485
            __pyx_t_4 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_4);
 
17486
            __pyx_t_9 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_9);
 
17487
 
 
17488
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1982
 
17489
 *                             entry_path_utf8 = path_utf8
 
17490
 *                         initial_key = (entry_path_utf8, '', '')
 
17491
 *                         block_index, _ = self.state._find_block_index_from_key(             # <<<<<<<<<<<<<<
 
17492
 *                             initial_key)
 
17493
 *                         if block_index == 0:
 
17494
 */
 
17495
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17496
            __Pyx_DECREF(__pyx_v_block_index);
 
17497
            __pyx_v_block_index = __pyx_t_4;
 
17498
            __pyx_t_4 = 0;
 
17499
            __Pyx_DECREF(__pyx_v__);
 
17500
            __pyx_v__ = __pyx_t_9;
 
17501
            __pyx_t_9 = 0;
 
17502
          } else {
 
17503
            __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17504
            __Pyx_GOTREF(__pyx_t_10);
 
17505
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17506
            __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_10, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17507
            __Pyx_GOTREF(__pyx_t_4);
 
17508
            __pyx_t_9 = __Pyx_UnpackItem(__pyx_t_10, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17509
            __Pyx_GOTREF(__pyx_t_9);
 
17510
            if (__Pyx_EndUnpack(__pyx_t_10, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17511
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
17512
            __Pyx_DECREF(__pyx_v_block_index);
 
17513
            __pyx_v_block_index = __pyx_t_4;
 
17514
            __pyx_t_4 = 0;
 
17515
            __Pyx_DECREF(__pyx_v__);
 
17516
            __pyx_v__ = __pyx_t_9;
 
17517
            __pyx_t_9 = 0;
 
17518
          }
 
17519
 
 
17520
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1984
 
17521
 *                         block_index, _ = self.state._find_block_index_from_key(
 
17522
 *                             initial_key)
 
17523
 *                         if block_index == 0:             # <<<<<<<<<<<<<<
 
17524
 *                             # The children of the root are in block index 1.
 
17525
 *                             block_index = block_index + 1
 
17526
 */
 
17527
          __pyx_t_3 = PyObject_RichCompare(__pyx_v_block_index, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17528
          __Pyx_GOTREF(__pyx_t_3);
 
17529
          __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17530
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17531
          if (__pyx_t_7) {
 
17532
 
 
17533
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1986
 
17534
 *                         if block_index == 0:
 
17535
 *                             # The children of the root are in block index 1.
 
17536
 *                             block_index = block_index + 1             # <<<<<<<<<<<<<<
 
17537
 *                         current_block = None
 
17538
 *                         if block_index < len(self.state._dirblocks):
 
17539
 */
 
17540
            __pyx_t_3 = PyNumber_Add(__pyx_v_block_index, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17541
            __Pyx_GOTREF(__pyx_t_3);
 
17542
            __Pyx_DECREF(__pyx_v_block_index);
 
17543
            __pyx_v_block_index = __pyx_t_3;
 
17544
            __pyx_t_3 = 0;
 
17545
            goto __pyx_L19;
 
17546
          }
 
17547
          __pyx_L19:;
 
17548
 
 
17549
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1987
 
17550
 *                             # The children of the root are in block index 1.
 
17551
 *                             block_index = block_index + 1
 
17552
 *                         current_block = None             # <<<<<<<<<<<<<<
 
17553
 *                         if block_index < len(self.state._dirblocks):
 
17554
 *                             current_block = self.state._dirblocks[block_index]
 
17555
 */
 
17556
          __Pyx_INCREF(Py_None);
 
17557
          __Pyx_DECREF(__pyx_v_current_block);
 
17558
          __pyx_v_current_block = Py_None;
 
17559
 
 
17560
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1988
 
17561
 *                             block_index = block_index + 1
 
17562
 *                         current_block = None
 
17563
 *                         if block_index < len(self.state._dirblocks):             # <<<<<<<<<<<<<<
 
17564
 *                             current_block = self.state._dirblocks[block_index]
 
17565
 *                             if not osutils.is_inside(
 
17566
 */
 
17567
          __pyx_t_3 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___dirblocks); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17568
          __Pyx_GOTREF(__pyx_t_3);
 
17569
          __pyx_t_11 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17570
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17571
          __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17572
          __Pyx_GOTREF(__pyx_t_3);
 
17573
          __pyx_t_9 = PyObject_RichCompare(__pyx_v_block_index, __pyx_t_3, Py_LT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17574
          __Pyx_GOTREF(__pyx_t_9);
 
17575
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17576
          __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17577
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17578
          if (__pyx_t_7) {
 
17579
 
 
17580
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1989
 
17581
 *                         current_block = None
 
17582
 *                         if block_index < len(self.state._dirblocks):
 
17583
 *                             current_block = self.state._dirblocks[block_index]             # <<<<<<<<<<<<<<
 
17584
 *                             if not osutils.is_inside(
 
17585
 *                                 entry_path_utf8, current_block[0]):
 
17586
 */
 
17587
            __pyx_t_9 = PyObject_GetAttr(__pyx_v_self->state, __pyx_n_s___dirblocks); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17588
            __Pyx_GOTREF(__pyx_t_9);
 
17589
            __pyx_t_3 = PyObject_GetItem(__pyx_t_9, __pyx_v_block_index); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17590
            __Pyx_GOTREF(__pyx_t_3);
 
17591
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17592
            __Pyx_DECREF(__pyx_v_current_block);
 
17593
            __pyx_v_current_block = __pyx_t_3;
 
17594
            __pyx_t_3 = 0;
 
17595
 
 
17596
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1990
 
17597
 *                         if block_index < len(self.state._dirblocks):
 
17598
 *                             current_block = self.state._dirblocks[block_index]
 
17599
 *                             if not osutils.is_inside(             # <<<<<<<<<<<<<<
 
17600
 *                                 entry_path_utf8, current_block[0]):
 
17601
 *                                 # No entries for this directory at all.
 
17602
 */
 
17603
            __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__osutils); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17604
            __Pyx_GOTREF(__pyx_t_3);
 
17605
            __pyx_t_9 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__is_inside); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17606
            __Pyx_GOTREF(__pyx_t_9);
 
17607
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17608
 
 
17609
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1991
 
17610
 *                             current_block = self.state._dirblocks[block_index]
 
17611
 *                             if not osutils.is_inside(
 
17612
 *                                 entry_path_utf8, current_block[0]):             # <<<<<<<<<<<<<<
 
17613
 *                                 # No entries for this directory at all.
 
17614
 *                                 current_block = None
 
17615
 */
 
17616
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_current_block, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17617
            __Pyx_GOTREF(__pyx_t_3);
 
17618
            __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17619
            __Pyx_GOTREF(((PyObject *)__pyx_t_4));
 
17620
            __Pyx_INCREF(__pyx_v_entry_path_utf8);
 
17621
            PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_entry_path_utf8);
 
17622
            __Pyx_GIVEREF(__pyx_v_entry_path_utf8);
 
17623
            PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
 
17624
            __Pyx_GIVEREF(__pyx_t_3);
 
17625
            __pyx_t_3 = 0;
 
17626
            __pyx_t_3 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17627
            __Pyx_GOTREF(__pyx_t_3);
 
17628
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17629
            __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
 
17630
            __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17631
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17632
            __pyx_t_8 = (!__pyx_t_7);
 
17633
            if (__pyx_t_8) {
 
17634
 
 
17635
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1993
 
17636
 *                                 entry_path_utf8, current_block[0]):
 
17637
 *                                 # No entries for this directory at all.
 
17638
 *                                 current_block = None             # <<<<<<<<<<<<<<
 
17639
 *                         if current_block is not None:
 
17640
 *                             for entry in current_block[1]:
 
17641
 */
 
17642
              __Pyx_INCREF(Py_None);
 
17643
              __Pyx_DECREF(__pyx_v_current_block);
 
17644
              __pyx_v_current_block = Py_None;
 
17645
              goto __pyx_L21;
 
17646
            }
 
17647
            __pyx_L21:;
 
17648
            goto __pyx_L20;
 
17649
          }
 
17650
          __pyx_L20:;
 
17651
 
 
17652
          /* "bzrlib/_dirstate_helpers_pyx.pyx":1994
 
17653
 *                                 # No entries for this directory at all.
 
17654
 *                                 current_block = None
 
17655
 *                         if current_block is not None:             # <<<<<<<<<<<<<<
 
17656
 *                             for entry in current_block[1]:
 
17657
 *                                 if entry[1][self.source_index][0] in 'ar':
 
17658
 */
 
17659
          __pyx_t_8 = (__pyx_v_current_block != Py_None);
 
17660
          if (__pyx_t_8) {
 
17661
 
 
17662
            /* "bzrlib/_dirstate_helpers_pyx.pyx":1995
 
17663
 *                                 current_block = None
 
17664
 *                         if current_block is not None:
 
17665
 *                             for entry in current_block[1]:             # <<<<<<<<<<<<<<
 
17666
 *                                 if entry[1][self.source_index][0] in 'ar':
 
17667
 *                                     # Not in the source tree, so doesn't have to be
 
17668
 */
 
17669
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_current_block, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17670
            __Pyx_GOTREF(__pyx_t_3);
 
17671
            if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
 
17672
              __pyx_t_11 = 0; __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4);
 
17673
            } else {
 
17674
              __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17675
              __Pyx_GOTREF(__pyx_t_4);
 
17676
            }
 
17677
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17678
            for (;;) {
 
17679
              if (likely(PyList_CheckExact(__pyx_t_4))) {
 
17680
                if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break;
 
17681
                __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++;
 
17682
              } else if (likely(PyTuple_CheckExact(__pyx_t_4))) {
 
17683
                if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
 
17684
                __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++;
 
17685
              } else {
 
17686
                __pyx_t_3 = PyIter_Next(__pyx_t_4);
 
17687
                if (!__pyx_t_3) {
 
17688
                  if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17689
                  break;
 
17690
                }
 
17691
                __Pyx_GOTREF(__pyx_t_3);
 
17692
              }
 
17693
              __Pyx_DECREF(__pyx_v_entry);
 
17694
              __pyx_v_entry = __pyx_t_3;
 
17695
              __pyx_t_3 = 0;
 
17696
 
 
17697
              /* "bzrlib/_dirstate_helpers_pyx.pyx":1996
 
17698
 *                         if current_block is not None:
 
17699
 *                             for entry in current_block[1]:
 
17700
 *                                 if entry[1][self.source_index][0] in 'ar':             # <<<<<<<<<<<<<<
 
17701
 *                                     # Not in the source tree, so doesn't have to be
 
17702
 *                                     # included.
 
17703
 */
 
17704
              __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entry, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17705
              __Pyx_GOTREF(__pyx_t_3);
 
17706
              __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_self->source_index, sizeof(int), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17707
              __Pyx_GOTREF(__pyx_t_9);
 
17708
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17709
              __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_9, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17710
              __Pyx_GOTREF(__pyx_t_3);
 
17711
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17712
              __pyx_t_8 = ((PySequence_Contains(((PyObject *)__pyx_n_s__ar), __pyx_t_3))); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17713
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17714
              if (__pyx_t_8) {
 
17715
 
 
17716
                /* "bzrlib/_dirstate_helpers_pyx.pyx":1999
 
17717
 *                                     # Not in the source tree, so doesn't have to be
 
17718
 *                                     # included.
 
17719
 *                                     continue             # <<<<<<<<<<<<<<
 
17720
 *                                 # Path of the entry itself.
 
17721
 *                                 self.search_specific_file_parents.add(
 
17722
 */
 
17723
                goto __pyx_L23_continue;
 
17724
                goto __pyx_L25;
 
17725
              }
 
17726
              __pyx_L25:;
 
17727
 
 
17728
              /* "bzrlib/_dirstate_helpers_pyx.pyx":2001
 
17729
 *                                     continue
 
17730
 *                                 # Path of the entry itself.
 
17731
 *                                 self.search_specific_file_parents.add(             # <<<<<<<<<<<<<<
 
17732
 *                                     self.pathjoin(*entry[0][:2]))
 
17733
 *                 if changed or self.include_unchanged:
 
17734
 */
 
17735
              __pyx_t_3 = PyObject_GetAttr(__pyx_v_self->search_specific_file_parents, __pyx_n_s__add); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17736
              __Pyx_GOTREF(__pyx_t_3);
 
17737
 
 
17738
              /* "bzrlib/_dirstate_helpers_pyx.pyx":2002
 
17739
 *                                 # Path of the entry itself.
 
17740
 *                                 self.search_specific_file_parents.add(
 
17741
 *                                     self.pathjoin(*entry[0][:2]))             # <<<<<<<<<<<<<<
 
17742
 *                 if changed or self.include_unchanged:
 
17743
 *                     results.append((result, changed))
 
17744
 */
 
17745
              __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_entry, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17746
              __Pyx_GOTREF(__pyx_t_9);
 
17747
              __pyx_t_10 = __Pyx_PySequence_GetSlice(__pyx_t_9, 0, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17748
              __Pyx_GOTREF(__pyx_t_10);
 
17749
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
 
17750
              __pyx_t_9 = PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17751
              __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
17752
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
17753
              __pyx_t_10 = PyObject_Call(__pyx_v_self->pathjoin, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17754
              __Pyx_GOTREF(__pyx_t_10);
 
17755
              __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
17756
              __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17757
              __Pyx_GOTREF(((PyObject *)__pyx_t_9));
 
17758
              PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10);
 
17759
              __Pyx_GIVEREF(__pyx_t_10);
 
17760
              __pyx_t_10 = 0;
 
17761
              __pyx_t_10 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17762
              __Pyx_GOTREF(__pyx_t_10);
 
17763
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17764
              __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
 
17765
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
17766
              __pyx_L23_continue:;
 
17767
            }
 
17768
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 
17769
            goto __pyx_L22;
 
17770
          }
 
17771
          __pyx_L22:;
 
17772
          goto __pyx_L17;
 
17773
        }
 
17774
        __pyx_L17:;
 
17775
        goto __pyx_L16;
 
17776
      }
 
17777
      __pyx_L16:;
 
17778
 
 
17779
      /* "bzrlib/_dirstate_helpers_pyx.pyx":2003
 
17780
 *                                 self.search_specific_file_parents.add(
 
17781
 *                                     self.pathjoin(*entry[0][:2]))
 
17782
 *                 if changed or self.include_unchanged:             # <<<<<<<<<<<<<<
 
17783
 *                     results.append((result, changed))
 
17784
 *             self.searched_exact_paths.add(path_utf8)
 
17785
 */
 
17786
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_changed); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17787
      if (!__pyx_t_8) {
 
17788
        __pyx_t_7 = __pyx_v_self->include_unchanged;
 
17789
      } else {
 
17790
        __pyx_t_7 = __pyx_t_8;
 
17791
      }
 
17792
      if (__pyx_t_7) {
 
17793
 
 
17794
        /* "bzrlib/_dirstate_helpers_pyx.pyx":2004
 
17795
 *                                     self.pathjoin(*entry[0][:2]))
 
17796
 *                 if changed or self.include_unchanged:
 
17797
 *                     results.append((result, changed))             # <<<<<<<<<<<<<<
 
17798
 *             self.searched_exact_paths.add(path_utf8)
 
17799
 *         return results
 
17800
 */
 
17801
        if (unlikely(__pyx_v_results == Py_None)) {
 
17802
          PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
 
17803
        }
 
17804
        __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17805
        __Pyx_GOTREF(((PyObject *)__pyx_t_4));
 
17806
        __Pyx_INCREF(__pyx_v_result);
 
17807
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_result);
 
17808
        __Pyx_GIVEREF(__pyx_v_result);
 
17809
        __Pyx_INCREF(__pyx_v_changed);
 
17810
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_changed);
 
17811
        __Pyx_GIVEREF(__pyx_v_changed);
 
17812
        __pyx_t_6 = PyList_Append(__pyx_v_results, ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17813
        __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
 
17814
        goto __pyx_L26;
 
17815
      }
 
17816
      __pyx_L26:;
 
17817
      __pyx_L12_continue:;
 
17818
    }
 
17819
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
17820
 
 
17821
    /* "bzrlib/_dirstate_helpers_pyx.pyx":2005
 
17822
 *                 if changed or self.include_unchanged:
 
17823
 *                     results.append((result, changed))
 
17824
 *             self.searched_exact_paths.add(path_utf8)             # <<<<<<<<<<<<<<
 
17825
 *         return results
 
17826
 * 
 
17827
 */
 
17828
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->searched_exact_paths, __pyx_n_s__add); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17829
    __Pyx_GOTREF(__pyx_t_1);
 
17830
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17831
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
 
17832
    __Pyx_INCREF(__pyx_v_path_utf8);
 
17833
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_path_utf8);
 
17834
    __Pyx_GIVEREF(__pyx_v_path_utf8);
 
17835
    __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17836
    __Pyx_GOTREF(__pyx_t_10);
 
17837
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
17838
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
 
17839
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
 
17840
    __pyx_L3_continue:;
 
17841
  }
 
17842
 
 
17843
  /* "bzrlib/_dirstate_helpers_pyx.pyx":2006
 
17844
 *                     results.append((result, changed))
 
17845
 *             self.searched_exact_paths.add(path_utf8)
 
17846
 *         return results             # <<<<<<<<<<<<<<
 
17847
 * 
 
17848
 *     cdef object _path_info(self, utf8_path, unicode_path):
 
17849
 */
 
17850
  __Pyx_XDECREF(__pyx_r);
 
17851
  __Pyx_INCREF(((PyObject *)__pyx_v_results));
 
17852
  __pyx_r = ((PyObject *)__pyx_v_results);
 
17853
  goto __pyx_L0;
 
17854
 
 
17855
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
17856
  goto __pyx_L0;
 
17857
  __pyx_L1_error:;
 
17858
  __Pyx_XDECREF(__pyx_t_1);
 
17859
  __Pyx_XDECREF(__pyx_t_3);
 
17860
  __Pyx_XDECREF(__pyx_t_4);
 
17861
  __Pyx_XDECREF(__pyx_t_9);
 
17862
  __Pyx_XDECREF(__pyx_t_10);
 
17863
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._next_consistent_entries");
 
17864
  __pyx_r = 0;
 
17865
  __pyx_L0:;
 
17866
  __Pyx_DECREF(__pyx_v_results);
 
17867
  __Pyx_DECREF(__pyx_v_path_utf8);
 
17868
  __Pyx_DECREF(__pyx_v_path_entries);
 
17869
  __Pyx_DECREF(__pyx_v_selected_entries);
 
17870
  __Pyx_DECREF(__pyx_v_candidate_entry);
 
17871
  __Pyx_DECREF(__pyx_v_path_info);
 
17872
  __Pyx_DECREF(__pyx_v_entry);
 
17873
  __Pyx_DECREF(__pyx_v_result);
 
17874
  __Pyx_DECREF(__pyx_v_changed);
 
17875
  __Pyx_DECREF(__pyx_v_entry_path_utf8);
 
17876
  __Pyx_DECREF(__pyx_v_initial_key);
 
17877
  __Pyx_DECREF(__pyx_v_block_index);
 
17878
  __Pyx_DECREF(__pyx_v__);
 
17879
  __Pyx_DECREF(__pyx_v_current_block);
 
17880
  __Pyx_XGIVEREF(__pyx_r);
 
17881
  __Pyx_RefNannyFinishContext();
 
17882
  return __pyx_r;
 
17883
}
 
17884
 
 
17885
/* "bzrlib/_dirstate_helpers_pyx.pyx":2008
 
17886
 *         return results
 
17887
 * 
 
17888
 *     cdef object _path_info(self, utf8_path, unicode_path):             # <<<<<<<<<<<<<<
 
17889
 *         """Generate path_info for unicode_path.
 
17890
 * 
 
17891
 */
 
17892
 
 
17893
static  PyObject *__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__path_info(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *__pyx_v_self, PyObject *__pyx_v_utf8_path, PyObject *__pyx_v_unicode_path) {
 
17894
  PyObject *__pyx_v_abspath;
 
17895
  PyObject *__pyx_v_stat;
 
17896
  PyObject *__pyx_v_e;
 
17897
  PyObject *__pyx_v_utf8_basename;
 
17898
  PyObject *__pyx_v_dir_info;
 
17899
  PyObject *__pyx_r = NULL;
 
17900
  PyObject *__pyx_t_1 = NULL;
 
17901
  PyObject *__pyx_t_2 = NULL;
 
17902
  PyObject *__pyx_t_3 = NULL;
 
17903
  int __pyx_t_4;
 
17904
  PyObject *__pyx_t_5 = NULL;
 
17905
  PyObject *__pyx_t_6 = NULL;
 
17906
  PyObject *__pyx_t_7 = NULL;
 
17907
  int __pyx_t_8;
 
17908
  __Pyx_RefNannySetupContext("_path_info");
 
17909
  __pyx_v_abspath = Py_None; __Pyx_INCREF(Py_None);
 
17910
  __pyx_v_stat = Py_None; __Pyx_INCREF(Py_None);
 
17911
  __pyx_v_e = Py_None; __Pyx_INCREF(Py_None);
 
17912
  __pyx_v_utf8_basename = Py_None; __Pyx_INCREF(Py_None);
 
17913
  __pyx_v_dir_info = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
 
17914
 
 
17915
  /* "bzrlib/_dirstate_helpers_pyx.pyx":2013
 
17916
 *         :return: None if unicode_path does not exist, or a path_info tuple.
 
17917
 *         """
 
17918
 *         abspath = self.tree.abspath(unicode_path)             # <<<<<<<<<<<<<<
 
17919
 *         try:
 
17920
 *             stat = os.lstat(abspath)
 
17921
 */
 
17922
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n_s__abspath); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17923
  __Pyx_GOTREF(__pyx_t_1);
 
17924
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17925
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
17926
  __Pyx_INCREF(__pyx_v_unicode_path);
 
17927
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_unicode_path);
 
17928
  __Pyx_GIVEREF(__pyx_v_unicode_path);
 
17929
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
17930
  __Pyx_GOTREF(__pyx_t_3);
 
17931
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
17932
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
17933
  __Pyx_DECREF(__pyx_v_abspath);
 
17934
  __pyx_v_abspath = __pyx_t_3;
 
17935
  __pyx_t_3 = 0;
 
17936
 
 
17937
  /* "bzrlib/_dirstate_helpers_pyx.pyx":2014
 
17938
 *         """
 
17939
 *         abspath = self.tree.abspath(unicode_path)
 
17940
 *         try:             # <<<<<<<<<<<<<<
 
17941
 *             stat = os.lstat(abspath)
 
17942
 *         except OSError, e:
 
17943
 */
 
17944
  {
 
17945
    PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
 
17946
    __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
 
17947
    __Pyx_XGOTREF(__pyx_save_exc_type);
 
17948
    __Pyx_XGOTREF(__pyx_save_exc_value);
 
17949
    __Pyx_XGOTREF(__pyx_save_exc_tb);
 
17950
    /*try:*/ {
 
17951
 
 
17952
      /* "bzrlib/_dirstate_helpers_pyx.pyx":2015
 
17953
 *         abspath = self.tree.abspath(unicode_path)
 
17954
 *         try:
 
17955
 *             stat = os.lstat(abspath)             # <<<<<<<<<<<<<<
 
17956
 *         except OSError, e:
 
17957
 *             if e.errno == errno.ENOENT:
 
17958
 */
 
17959
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
17960
      __Pyx_GOTREF(__pyx_t_3);
 
17961
      __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__lstat); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
17962
      __Pyx_GOTREF(__pyx_t_2);
 
17963
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17964
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
17965
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
 
17966
      __Pyx_INCREF(__pyx_v_abspath);
 
17967
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_abspath);
 
17968
      __Pyx_GIVEREF(__pyx_v_abspath);
 
17969
      __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
 
17970
      __Pyx_GOTREF(__pyx_t_1);
 
17971
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
17972
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
 
17973
      __Pyx_DECREF(__pyx_v_stat);
 
17974
      __pyx_v_stat = __pyx_t_1;
 
17975
      __pyx_t_1 = 0;
 
17976
    }
 
17977
    __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
 
17978
    __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
 
17979
    __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
 
17980
    goto __pyx_L10_try_end;
 
17981
    __pyx_L3_error:;
 
17982
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
 
17983
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
 
17984
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
 
17985
 
 
17986
    /* "bzrlib/_dirstate_helpers_pyx.pyx":2016
 
17987
 *         try:
 
17988
 *             stat = os.lstat(abspath)
 
17989
 *         except OSError, e:             # <<<<<<<<<<<<<<
 
17990
 *             if e.errno == errno.ENOENT:
 
17991
 *                 # the path does not exist.
 
17992
 */
 
17993
    __pyx_t_4 = PyErr_ExceptionMatches(__pyx_builtin_OSError);
 
17994
    if (__pyx_t_4) {
 
17995
      __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._path_info");
 
17996
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
 
17997
      __Pyx_GOTREF(__pyx_t_1);
 
17998
      __Pyx_GOTREF(__pyx_t_3);
 
17999
      __Pyx_GOTREF(__pyx_t_2);
 
18000
      __Pyx_INCREF(__pyx_t_3);
 
18001
      __Pyx_DECREF(__pyx_v_e);
 
18002
      __pyx_v_e = __pyx_t_3;
 
18003
 
 
18004
      /* "bzrlib/_dirstate_helpers_pyx.pyx":2017
 
18005
 *             stat = os.lstat(abspath)
 
18006
 *         except OSError, e:
 
18007
 *             if e.errno == errno.ENOENT:             # <<<<<<<<<<<<<<
 
18008
 *                 # the path does not exist.
 
18009
 *                 return None
 
18010
 */
 
18011
      __pyx_t_5 = PyObject_GetAttr(__pyx_v_e, __pyx_n_s__errno); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
 
18012
      __Pyx_GOTREF(__pyx_t_5);
 
18013
      __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__errno); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
 
18014
      __Pyx_GOTREF(__pyx_t_6);
 
18015
      __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__ENOENT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
 
18016
      __Pyx_GOTREF(__pyx_t_7);
 
18017
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
18018
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_7, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
 
18019
      __Pyx_GOTREF(__pyx_t_6);
 
18020
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 
18021
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 
18022
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2017; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
 
18023
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 
18024
      if (__pyx_t_8) {
 
18025
 
 
18026
        /* "bzrlib/_dirstate_helpers_pyx.pyx":2019
 
18027
 *             if e.errno == errno.ENOENT:
 
18028
 *                 # the path does not exist.
 
18029
 *                 return None             # <<<<<<<<<<<<<<
 
18030
 *             else:
 
18031
 *                 raise
 
18032
 */
 
18033
        __Pyx_XDECREF(__pyx_r);
 
18034
        __Pyx_INCREF(Py_None);
 
18035
        __pyx_r = Py_None;
 
18036
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
18037
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
18038
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
18039
        goto __pyx_L6_except_return;
 
18040
        goto __pyx_L13;
 
18041
      }
 
18042
      /*else*/ {
 
18043
 
 
18044
        /* "bzrlib/_dirstate_helpers_pyx.pyx":2021
 
18045
 *                 return None
 
18046
 *             else:
 
18047
 *                 raise             # <<<<<<<<<<<<<<
 
18048
 *         utf8_basename = utf8_path.rsplit('/', 1)[-1]
 
18049
 *         dir_info = (utf8_path, utf8_basename,
 
18050
 */
 
18051
        __Pyx_GIVEREF(__pyx_t_1);
 
18052
        __Pyx_GIVEREF(__pyx_t_3);
 
18053
        __Pyx_GIVEREF(__pyx_t_2);
 
18054
        __Pyx_ErrRestore(__pyx_t_1, __pyx_t_3, __pyx_t_2);
 
18055
        __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; 
 
18056
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
 
18057
      }
 
18058
      __pyx_L13:;
 
18059
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
18060
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
18061
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
18062
      goto __pyx_L4_exception_handled;
 
18063
    }
 
18064
    __pyx_L5_except_error:;
 
18065
    __Pyx_XGIVEREF(__pyx_save_exc_type);
 
18066
    __Pyx_XGIVEREF(__pyx_save_exc_value);
 
18067
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
18068
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
18069
    goto __pyx_L1_error;
 
18070
    __pyx_L6_except_return:;
 
18071
    __Pyx_XGIVEREF(__pyx_save_exc_type);
 
18072
    __Pyx_XGIVEREF(__pyx_save_exc_value);
 
18073
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
18074
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
18075
    goto __pyx_L0;
 
18076
    __pyx_L4_exception_handled:;
 
18077
    __Pyx_XGIVEREF(__pyx_save_exc_type);
 
18078
    __Pyx_XGIVEREF(__pyx_save_exc_value);
 
18079
    __Pyx_XGIVEREF(__pyx_save_exc_tb);
 
18080
    __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
 
18081
    __pyx_L10_try_end:;
 
18082
  }
 
18083
 
 
18084
  /* "bzrlib/_dirstate_helpers_pyx.pyx":2022
 
18085
 *             else:
 
18086
 *                 raise
 
18087
 *         utf8_basename = utf8_path.rsplit('/', 1)[-1]             # <<<<<<<<<<<<<<
 
18088
 *         dir_info = (utf8_path, utf8_basename,
 
18089
 *             osutils.file_kind_from_stat_mode(stat.st_mode), stat,
 
18090
 */
 
18091
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_utf8_path, __pyx_n_s__rsplit); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18092
  __Pyx_GOTREF(__pyx_t_2);
 
18093
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_66), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18094
  __Pyx_GOTREF(__pyx_t_3);
 
18095
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
18096
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18097
  __Pyx_GOTREF(__pyx_t_2);
 
18098
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
18099
  __Pyx_DECREF(__pyx_v_utf8_basename);
 
18100
  __pyx_v_utf8_basename = __pyx_t_2;
 
18101
  __pyx_t_2 = 0;
 
18102
 
 
18103
  /* "bzrlib/_dirstate_helpers_pyx.pyx":2024
 
18104
 *         utf8_basename = utf8_path.rsplit('/', 1)[-1]
 
18105
 *         dir_info = (utf8_path, utf8_basename,
 
18106
 *             osutils.file_kind_from_stat_mode(stat.st_mode), stat,             # <<<<<<<<<<<<<<
 
18107
 *             abspath)
 
18108
 *         if dir_info[2] == 'directory':
 
18109
 */
 
18110
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__osutils); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18111
  __Pyx_GOTREF(__pyx_t_2);
 
18112
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s_48); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18113
  __Pyx_GOTREF(__pyx_t_3);
 
18114
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
18115
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_stat, __pyx_n_s__st_mode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18116
  __Pyx_GOTREF(__pyx_t_2);
 
18117
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18118
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
18119
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
 
18120
  __Pyx_GIVEREF(__pyx_t_2);
 
18121
  __pyx_t_2 = 0;
 
18122
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18123
  __Pyx_GOTREF(__pyx_t_2);
 
18124
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
18125
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
18126
 
 
18127
  /* "bzrlib/_dirstate_helpers_pyx.pyx":2025
 
18128
 *         dir_info = (utf8_path, utf8_basename,
 
18129
 *             osutils.file_kind_from_stat_mode(stat.st_mode), stat,
 
18130
 *             abspath)             # <<<<<<<<<<<<<<
 
18131
 *         if dir_info[2] == 'directory':
 
18132
 *             if self.tree._directory_is_tree_reference(
 
18133
 */
 
18134
  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18135
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
18136
  __Pyx_INCREF(__pyx_v_utf8_path);
 
18137
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_utf8_path);
 
18138
  __Pyx_GIVEREF(__pyx_v_utf8_path);
 
18139
  __Pyx_INCREF(__pyx_v_utf8_basename);
 
18140
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_utf8_basename);
 
18141
  __Pyx_GIVEREF(__pyx_v_utf8_basename);
 
18142
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
 
18143
  __Pyx_GIVEREF(__pyx_t_2);
 
18144
  __Pyx_INCREF(__pyx_v_stat);
 
18145
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_stat);
 
18146
  __Pyx_GIVEREF(__pyx_v_stat);
 
18147
  __Pyx_INCREF(__pyx_v_abspath);
 
18148
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_abspath);
 
18149
  __Pyx_GIVEREF(__pyx_v_abspath);
 
18150
  __pyx_t_2 = 0;
 
18151
  __Pyx_DECREF(((PyObject *)__pyx_v_dir_info));
 
18152
  __pyx_v_dir_info = __pyx_t_1;
 
18153
  __pyx_t_1 = 0;
 
18154
 
 
18155
  /* "bzrlib/_dirstate_helpers_pyx.pyx":2026
 
18156
 *             osutils.file_kind_from_stat_mode(stat.st_mode), stat,
 
18157
 *             abspath)
 
18158
 *         if dir_info[2] == 'directory':             # <<<<<<<<<<<<<<
 
18159
 *             if self.tree._directory_is_tree_reference(
 
18160
 *                 unicode_path):
 
18161
 */
 
18162
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_dir_info), 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18163
  __Pyx_GOTREF(__pyx_t_1);
 
18164
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_n_s__directory), Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18165
  __Pyx_GOTREF(__pyx_t_2);
 
18166
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
18167
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18168
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
18169
  if (__pyx_t_8) {
 
18170
 
 
18171
    /* "bzrlib/_dirstate_helpers_pyx.pyx":2027
 
18172
 *             abspath)
 
18173
 *         if dir_info[2] == 'directory':
 
18174
 *             if self.tree._directory_is_tree_reference(             # <<<<<<<<<<<<<<
 
18175
 *                 unicode_path):
 
18176
 *                 self.root_dir_info = self.root_dir_info[:2] + \
 
18177
 */
 
18178
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->tree, __pyx_n_s_49); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18179
    __Pyx_GOTREF(__pyx_t_2);
 
18180
 
 
18181
    /* "bzrlib/_dirstate_helpers_pyx.pyx":2028
 
18182
 *         if dir_info[2] == 'directory':
 
18183
 *             if self.tree._directory_is_tree_reference(
 
18184
 *                 unicode_path):             # <<<<<<<<<<<<<<
 
18185
 *                 self.root_dir_info = self.root_dir_info[:2] + \
 
18186
 *                     ('tree-reference',) + self.root_dir_info[3:]
 
18187
 */
 
18188
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18189
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
18190
    __Pyx_INCREF(__pyx_v_unicode_path);
 
18191
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_unicode_path);
 
18192
    __Pyx_GIVEREF(__pyx_v_unicode_path);
 
18193
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18194
    __Pyx_GOTREF(__pyx_t_3);
 
18195
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
18196
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
18197
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18198
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
18199
    if (__pyx_t_8) {
 
18200
 
 
18201
      /* "bzrlib/_dirstate_helpers_pyx.pyx":2029
 
18202
 *             if self.tree._directory_is_tree_reference(
 
18203
 *                 unicode_path):
 
18204
 *                 self.root_dir_info = self.root_dir_info[:2] + \             # <<<<<<<<<<<<<<
 
18205
 *                     ('tree-reference',) + self.root_dir_info[3:]
 
18206
 *         return dir_info
 
18207
 */
 
18208
      __pyx_t_3 = __Pyx_PySequence_GetSlice(__pyx_v_self->root_dir_info, 0, 2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18209
      __Pyx_GOTREF(__pyx_t_3);
 
18210
 
 
18211
      /* "bzrlib/_dirstate_helpers_pyx.pyx":2030
 
18212
 *                 unicode_path):
 
18213
 *                 self.root_dir_info = self.root_dir_info[:2] + \
 
18214
 *                     ('tree-reference',) + self.root_dir_info[3:]             # <<<<<<<<<<<<<<
 
18215
 *         return dir_info
 
18216
 */
 
18217
      __pyx_t_1 = PyNumber_Add(__pyx_t_3, ((PyObject *)__pyx_k_tuple_67)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18218
      __Pyx_GOTREF(__pyx_t_1);
 
18219
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
18220
      __pyx_t_3 = __Pyx_PySequence_GetSlice(__pyx_v_self->root_dir_info, 3, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18221
      __Pyx_GOTREF(__pyx_t_3);
 
18222
      __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
18223
      __Pyx_GOTREF(__pyx_t_2);
 
18224
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
18225
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
18226
 
 
18227
      /* "bzrlib/_dirstate_helpers_pyx.pyx":2029
 
18228
 *             if self.tree._directory_is_tree_reference(
 
18229
 *                 unicode_path):
 
18230
 *                 self.root_dir_info = self.root_dir_info[:2] + \             # <<<<<<<<<<<<<<
 
18231
 *                     ('tree-reference',) + self.root_dir_info[3:]
 
18232
 *         return dir_info
 
18233
 */
 
18234
      __Pyx_GIVEREF(__pyx_t_2);
 
18235
      __Pyx_GOTREF(__pyx_v_self->root_dir_info);
 
18236
      __Pyx_DECREF(__pyx_v_self->root_dir_info);
 
18237
      __pyx_v_self->root_dir_info = __pyx_t_2;
 
18238
      __pyx_t_2 = 0;
 
18239
      goto __pyx_L15;
 
18240
    }
 
18241
    __pyx_L15:;
 
18242
    goto __pyx_L14;
 
18243
  }
 
18244
  __pyx_L14:;
 
18245
 
 
18246
  /* "bzrlib/_dirstate_helpers_pyx.pyx":2031
 
18247
 *                 self.root_dir_info = self.root_dir_info[:2] + \
 
18248
 *                     ('tree-reference',) + self.root_dir_info[3:]
 
18249
 *         return dir_info             # <<<<<<<<<<<<<<
 
18250
 */
 
18251
  __Pyx_XDECREF(__pyx_r);
 
18252
  __Pyx_INCREF(((PyObject *)__pyx_v_dir_info));
 
18253
  __pyx_r = ((PyObject *)__pyx_v_dir_info);
 
18254
  goto __pyx_L0;
 
18255
 
 
18256
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
18257
  goto __pyx_L0;
 
18258
  __pyx_L1_error:;
 
18259
  __Pyx_XDECREF(__pyx_t_1);
 
18260
  __Pyx_XDECREF(__pyx_t_2);
 
18261
  __Pyx_XDECREF(__pyx_t_3);
 
18262
  __Pyx_XDECREF(__pyx_t_5);
 
18263
  __Pyx_XDECREF(__pyx_t_6);
 
18264
  __Pyx_XDECREF(__pyx_t_7);
 
18265
  __Pyx_AddTraceback("bzrlib._dirstate_helpers_pyx.ProcessEntryC._path_info");
 
18266
  __pyx_r = 0;
 
18267
  __pyx_L0:;
 
18268
  __Pyx_DECREF(__pyx_v_abspath);
 
18269
  __Pyx_DECREF(__pyx_v_stat);
 
18270
  __Pyx_DECREF(__pyx_v_e);
 
18271
  __Pyx_DECREF(__pyx_v_utf8_basename);
 
18272
  __Pyx_DECREF(__pyx_v_dir_info);
 
18273
  __Pyx_XGIVEREF(__pyx_r);
 
18274
  __Pyx_RefNannyFinishContext();
 
18275
  return __pyx_r;
 
18276
}
 
18277
 
 
18278
/* "bzrlib/_dirstate_helpers_pyx.pyx":1031
 
18279
 *     cdef object use_filesystem_for_exec
 
18280
 *     cdef object utf8_decode
 
18281
 *     cdef readonly object searched_specific_files             # <<<<<<<<<<<<<<
 
18282
 *     cdef readonly object searched_exact_paths
 
18283
 *     cdef object search_specific_files
 
18284
 */
 
18285
 
 
18286
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_23searched_specific_files___get__(PyObject *__pyx_v_self); /*proto*/
 
18287
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_23searched_specific_files___get__(PyObject *__pyx_v_self) {
 
18288
  PyObject *__pyx_r = NULL;
 
18289
  __Pyx_RefNannySetupContext("__get__");
 
18290
  __Pyx_XDECREF(__pyx_r);
 
18291
  __Pyx_INCREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->searched_specific_files);
 
18292
  __pyx_r = ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->searched_specific_files;
 
18293
  goto __pyx_L0;
 
18294
 
 
18295
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
18296
  __pyx_L0:;
 
18297
  __Pyx_XGIVEREF(__pyx_r);
 
18298
  __Pyx_RefNannyFinishContext();
 
18299
  return __pyx_r;
 
18300
}
 
18301
 
 
18302
/* "bzrlib/_dirstate_helpers_pyx.pyx":1032
 
18303
 *     cdef object utf8_decode
 
18304
 *     cdef readonly object searched_specific_files
 
18305
 *     cdef readonly object searched_exact_paths             # <<<<<<<<<<<<<<
 
18306
 *     cdef object search_specific_files
 
18307
 *     # The parents up to the root of the paths we are searching.
 
18308
 */
 
18309
 
 
18310
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_20searched_exact_paths___get__(PyObject *__pyx_v_self); /*proto*/
 
18311
static PyObject *__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_20searched_exact_paths___get__(PyObject *__pyx_v_self) {
 
18312
  PyObject *__pyx_r = NULL;
 
18313
  __Pyx_RefNannySetupContext("__get__");
 
18314
  __Pyx_XDECREF(__pyx_r);
 
18315
  __Pyx_INCREF(((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->searched_exact_paths);
 
18316
  __pyx_r = ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)__pyx_v_self)->searched_exact_paths;
 
18317
  goto __pyx_L0;
 
18318
 
 
18319
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
 
18320
  __pyx_L0:;
 
18321
  __Pyx_XGIVEREF(__pyx_r);
 
18322
  __Pyx_RefNannyFinishContext();
 
18323
  return __pyx_r;
 
18324
}
 
18325
static struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_Reader __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_Reader;
 
18326
 
 
18327
static PyObject *__pyx_tp_new_6bzrlib_21_dirstate_helpers_pyx_Reader(PyTypeObject *t, PyObject *a, PyObject *k) {
 
18328
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *p;
 
18329
  PyObject *o = (*t->tp_alloc)(t, 0);
 
18330
  if (!o) return 0;
 
18331
  p = ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)o);
 
18332
  p->__pyx_vtab = __pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_Reader;
 
18333
  p->state = Py_None; Py_INCREF(Py_None);
 
18334
  p->text = Py_None; Py_INCREF(Py_None);
 
18335
  return o;
 
18336
}
 
18337
 
 
18338
static void __pyx_tp_dealloc_6bzrlib_21_dirstate_helpers_pyx_Reader(PyObject *o) {
 
18339
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *p = (struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)o;
 
18340
  Py_XDECREF(p->state);
 
18341
  Py_XDECREF(p->text);
 
18342
  (*Py_TYPE(o)->tp_free)(o);
 
18343
}
 
18344
 
 
18345
static int __pyx_tp_traverse_6bzrlib_21_dirstate_helpers_pyx_Reader(PyObject *o, visitproc v, void *a) {
 
18346
  int e;
 
18347
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *p = (struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)o;
 
18348
  if (p->state) {
 
18349
    e = (*v)(p->state, a); if (e) return e;
 
18350
  }
 
18351
  if (p->text) {
 
18352
    e = (*v)(p->text, a); if (e) return e;
 
18353
  }
 
18354
  return 0;
 
18355
}
 
18356
 
 
18357
static int __pyx_tp_clear_6bzrlib_21_dirstate_helpers_pyx_Reader(PyObject *o) {
 
18358
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *p = (struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *)o;
 
18359
  PyObject* tmp;
 
18360
  tmp = ((PyObject*)p->state);
 
18361
  p->state = Py_None; Py_INCREF(Py_None);
 
18362
  Py_XDECREF(tmp);
 
18363
  tmp = ((PyObject*)p->text);
 
18364
  p->text = Py_None; Py_INCREF(Py_None);
 
18365
  Py_XDECREF(tmp);
 
18366
  return 0;
 
18367
}
 
18368
 
 
18369
static PyMethodDef __pyx_methods_6bzrlib_21_dirstate_helpers_pyx_Reader[] = {
 
18370
  {__Pyx_NAMESTR("_parse_dirblocks"), (PyCFunction)__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_6Reader_1_parse_dirblocks, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_6bzrlib_21_dirstate_helpers_pyx_6Reader_1_parse_dirblocks)},
 
18371
  {0, 0, 0, 0}
 
18372
};
 
18373
 
 
18374
static PyNumberMethods __pyx_tp_as_number_Reader = {
 
18375
  0, /*nb_add*/
 
18376
  0, /*nb_subtract*/
 
18377
  0, /*nb_multiply*/
 
18378
  #if PY_MAJOR_VERSION < 3
 
18379
  0, /*nb_divide*/
 
18380
  #endif
 
18381
  0, /*nb_remainder*/
 
18382
  0, /*nb_divmod*/
 
18383
  0, /*nb_power*/
 
18384
  0, /*nb_negative*/
 
18385
  0, /*nb_positive*/
 
18386
  0, /*nb_absolute*/
 
18387
  0, /*nb_nonzero*/
 
18388
  0, /*nb_invert*/
 
18389
  0, /*nb_lshift*/
 
18390
  0, /*nb_rshift*/
 
18391
  0, /*nb_and*/
 
18392
  0, /*nb_xor*/
 
18393
  0, /*nb_or*/
 
18394
  #if PY_MAJOR_VERSION < 3
 
18395
  0, /*nb_coerce*/
 
18396
  #endif
 
18397
  0, /*nb_int*/
 
18398
  #if PY_MAJOR_VERSION < 3
 
18399
  0, /*nb_long*/
 
18400
  #else
 
18401
  0, /*reserved*/
 
18402
  #endif
 
18403
  0, /*nb_float*/
 
18404
  #if PY_MAJOR_VERSION < 3
 
18405
  0, /*nb_oct*/
 
18406
  #endif
 
18407
  #if PY_MAJOR_VERSION < 3
 
18408
  0, /*nb_hex*/
 
18409
  #endif
 
18410
  0, /*nb_inplace_add*/
 
18411
  0, /*nb_inplace_subtract*/
 
18412
  0, /*nb_inplace_multiply*/
 
18413
  #if PY_MAJOR_VERSION < 3
 
18414
  0, /*nb_inplace_divide*/
 
18415
  #endif
 
18416
  0, /*nb_inplace_remainder*/
 
18417
  0, /*nb_inplace_power*/
 
18418
  0, /*nb_inplace_lshift*/
 
18419
  0, /*nb_inplace_rshift*/
 
18420
  0, /*nb_inplace_and*/
 
18421
  0, /*nb_inplace_xor*/
 
18422
  0, /*nb_inplace_or*/
 
18423
  0, /*nb_floor_divide*/
 
18424
  0, /*nb_true_divide*/
 
18425
  0, /*nb_inplace_floor_divide*/
 
18426
  0, /*nb_inplace_true_divide*/
 
18427
  #if PY_VERSION_HEX >= 0x02050000
 
18428
  0, /*nb_index*/
 
18429
  #endif
 
18430
};
 
18431
 
 
18432
static PySequenceMethods __pyx_tp_as_sequence_Reader = {
 
18433
  0, /*sq_length*/
 
18434
  0, /*sq_concat*/
 
18435
  0, /*sq_repeat*/
 
18436
  0, /*sq_item*/
 
18437
  0, /*sq_slice*/
 
18438
  0, /*sq_ass_item*/
 
18439
  0, /*sq_ass_slice*/
 
18440
  0, /*sq_contains*/
 
18441
  0, /*sq_inplace_concat*/
 
18442
  0, /*sq_inplace_repeat*/
 
18443
};
 
18444
 
 
18445
static PyMappingMethods __pyx_tp_as_mapping_Reader = {
 
18446
  0, /*mp_length*/
 
18447
  0, /*mp_subscript*/
 
18448
  0, /*mp_ass_subscript*/
 
18449
};
 
18450
 
 
18451
static PyBufferProcs __pyx_tp_as_buffer_Reader = {
 
18452
  #if PY_MAJOR_VERSION < 3
 
18453
  0, /*bf_getreadbuffer*/
 
18454
  #endif
 
18455
  #if PY_MAJOR_VERSION < 3
 
18456
  0, /*bf_getwritebuffer*/
 
18457
  #endif
 
18458
  #if PY_MAJOR_VERSION < 3
 
18459
  0, /*bf_getsegcount*/
 
18460
  #endif
 
18461
  #if PY_MAJOR_VERSION < 3
 
18462
  0, /*bf_getcharbuffer*/
 
18463
  #endif
 
18464
  #if PY_VERSION_HEX >= 0x02060000
 
18465
  0, /*bf_getbuffer*/
 
18466
  #endif
 
18467
  #if PY_VERSION_HEX >= 0x02060000
 
18468
  0, /*bf_releasebuffer*/
 
18469
  #endif
 
18470
};
 
18471
 
 
18472
static PyTypeObject __pyx_type_6bzrlib_21_dirstate_helpers_pyx_Reader = {
 
18473
  PyVarObject_HEAD_INIT(0, 0)
 
18474
  __Pyx_NAMESTR("bzrlib._dirstate_helpers_pyx.Reader"), /*tp_name*/
 
18475
  sizeof(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader), /*tp_basicsize*/
 
18476
  0, /*tp_itemsize*/
 
18477
  __pyx_tp_dealloc_6bzrlib_21_dirstate_helpers_pyx_Reader, /*tp_dealloc*/
 
18478
  0, /*tp_print*/
 
18479
  0, /*tp_getattr*/
 
18480
  0, /*tp_setattr*/
 
18481
  #if PY_MAJOR_VERSION < 3
 
18482
  0, /*tp_compare*/
 
18483
  #else
 
18484
  0, /*reserved*/
 
18485
  #endif
 
18486
  0, /*tp_repr*/
 
18487
  &__pyx_tp_as_number_Reader, /*tp_as_number*/
 
18488
  &__pyx_tp_as_sequence_Reader, /*tp_as_sequence*/
 
18489
  &__pyx_tp_as_mapping_Reader, /*tp_as_mapping*/
 
18490
  0, /*tp_hash*/
 
18491
  0, /*tp_call*/
 
18492
  0, /*tp_str*/
 
18493
  0, /*tp_getattro*/
 
18494
  0, /*tp_setattro*/
 
18495
  &__pyx_tp_as_buffer_Reader, /*tp_as_buffer*/
 
18496
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
 
18497
  __Pyx_DOCSTR("Maintain the current location, and return fields as you parse them."), /*tp_doc*/
 
18498
  __pyx_tp_traverse_6bzrlib_21_dirstate_helpers_pyx_Reader, /*tp_traverse*/
 
18499
  __pyx_tp_clear_6bzrlib_21_dirstate_helpers_pyx_Reader, /*tp_clear*/
 
18500
  0, /*tp_richcompare*/
 
18501
  0, /*tp_weaklistoffset*/
 
18502
  0, /*tp_iter*/
 
18503
  0, /*tp_iternext*/
 
18504
  __pyx_methods_6bzrlib_21_dirstate_helpers_pyx_Reader, /*tp_methods*/
 
18505
  0, /*tp_members*/
 
18506
  0, /*tp_getset*/
 
18507
  0, /*tp_base*/
 
18508
  0, /*tp_dict*/
 
18509
  0, /*tp_descr_get*/
 
18510
  0, /*tp_descr_set*/
 
18511
  0, /*tp_dictoffset*/
 
18512
  __pyx_pf_6bzrlib_21_dirstate_helpers_pyx_6Reader___init__, /*tp_init*/
 
18513
  0, /*tp_alloc*/
 
18514
  __pyx_tp_new_6bzrlib_21_dirstate_helpers_pyx_Reader, /*tp_new*/
 
18515
  0, /*tp_free*/
 
18516
  0, /*tp_is_gc*/
 
18517
  0, /*tp_bases*/
 
18518
  0, /*tp_mro*/
 
18519
  0, /*tp_cache*/
 
18520
  0, /*tp_subclasses*/
 
18521
  0, /*tp_weaklist*/
 
18522
  0, /*tp_del*/
 
18523
  #if PY_VERSION_HEX >= 0x02060000
 
18524
  0, /*tp_version_tag*/
 
18525
  #endif
 
18526
};
 
18527
static struct __pyx_vtabstruct_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC;
 
18528
 
 
18529
static PyObject *__pyx_tp_new_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC(PyTypeObject *t, PyObject *a, PyObject *k) {
 
18530
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *p;
 
18531
  PyObject *o = (*t->tp_alloc)(t, 0);
 
18532
  if (!o) return 0;
 
18533
  p = ((struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)o);
 
18534
  p->__pyx_vtab = __pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC;
 
18535
  p->old_dirname_to_file_id = Py_None; Py_INCREF(Py_None);
 
18536
  p->new_dirname_to_file_id = Py_None; Py_INCREF(Py_None);
 
18537
  p->last_source_parent = Py_None; Py_INCREF(Py_None);
 
18538
  p->last_target_parent = Py_None; Py_INCREF(Py_None);
 
18539
  p->use_filesystem_for_exec = Py_None; Py_INCREF(Py_None);
 
18540
  p->utf8_decode = Py_None; Py_INCREF(Py_None);
 
18541
  p->searched_specific_files = Py_None; Py_INCREF(Py_None);
 
18542
  p->searched_exact_paths = Py_None; Py_INCREF(Py_None);
 
18543
  p->search_specific_files = Py_None; Py_INCREF(Py_None);
 
18544
  p->search_specific_file_parents = Py_None; Py_INCREF(Py_None);
 
18545
  p->state = Py_None; Py_INCREF(Py_None);
 
18546
  p->current_root = Py_None; Py_INCREF(Py_None);
 
18547
  p->current_root_unicode = Py_None; Py_INCREF(Py_None);
 
18548
  p->root_entries = Py_None; Py_INCREF(Py_None);
 
18549
  p->root_abspath = Py_None; Py_INCREF(Py_None);
 
18550
  p->tree = Py_None; Py_INCREF(Py_None);
 
18551
  p->dir_iterator = Py_None; Py_INCREF(Py_None);
 
18552
  p->current_block = Py_None; Py_INCREF(Py_None);
 
18553
  p->current_block_list = Py_None; Py_INCREF(Py_None);
 
18554
  p->current_dir_info = Py_None; Py_INCREF(Py_None);
 
18555
  p->current_dir_list = Py_None; Py_INCREF(Py_None);
 
18556
  p->_pending_consistent_entries = Py_None; Py_INCREF(Py_None);
 
18557
  p->root_dir_info = Py_None; Py_INCREF(Py_None);
 
18558
  p->bisect_left = Py_None; Py_INCREF(Py_None);
 
18559
  p->pathjoin = Py_None; Py_INCREF(Py_None);
 
18560
  p->fstat = Py_None; Py_INCREF(Py_None);
 
18561
  p->seen_ids = Py_None; Py_INCREF(Py_None);
 
18562
  p->sha_file = Py_None; Py_INCREF(Py_None);
 
18563
  return o;
 
18564
}
 
18565
 
 
18566
static void __pyx_tp_dealloc_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC(PyObject *o) {
 
18567
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *p = (struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)o;
 
18568
  Py_XDECREF(p->old_dirname_to_file_id);
 
18569
  Py_XDECREF(p->new_dirname_to_file_id);
 
18570
  Py_XDECREF(p->last_source_parent);
 
18571
  Py_XDECREF(p->last_target_parent);
 
18572
  Py_XDECREF(p->use_filesystem_for_exec);
 
18573
  Py_XDECREF(p->utf8_decode);
 
18574
  Py_XDECREF(p->searched_specific_files);
 
18575
  Py_XDECREF(p->searched_exact_paths);
 
18576
  Py_XDECREF(p->search_specific_files);
 
18577
  Py_XDECREF(p->search_specific_file_parents);
 
18578
  Py_XDECREF(p->state);
 
18579
  Py_XDECREF(p->current_root);
 
18580
  Py_XDECREF(p->current_root_unicode);
 
18581
  Py_XDECREF(p->root_entries);
 
18582
  Py_XDECREF(p->root_abspath);
 
18583
  Py_XDECREF(p->tree);
 
18584
  Py_XDECREF(p->dir_iterator);
 
18585
  Py_XDECREF(p->current_block);
 
18586
  Py_XDECREF(p->current_block_list);
 
18587
  Py_XDECREF(p->current_dir_info);
 
18588
  Py_XDECREF(p->current_dir_list);
 
18589
  Py_XDECREF(p->_pending_consistent_entries);
 
18590
  Py_XDECREF(p->root_dir_info);
 
18591
  Py_XDECREF(p->bisect_left);
 
18592
  Py_XDECREF(p->pathjoin);
 
18593
  Py_XDECREF(p->fstat);
 
18594
  Py_XDECREF(p->seen_ids);
 
18595
  Py_XDECREF(p->sha_file);
 
18596
  (*Py_TYPE(o)->tp_free)(o);
 
18597
}
 
18598
 
 
18599
static int __pyx_tp_traverse_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC(PyObject *o, visitproc v, void *a) {
 
18600
  int e;
 
18601
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *p = (struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)o;
 
18602
  if (p->old_dirname_to_file_id) {
 
18603
    e = (*v)(p->old_dirname_to_file_id, a); if (e) return e;
 
18604
  }
 
18605
  if (p->new_dirname_to_file_id) {
 
18606
    e = (*v)(p->new_dirname_to_file_id, a); if (e) return e;
 
18607
  }
 
18608
  if (p->last_source_parent) {
 
18609
    e = (*v)(p->last_source_parent, a); if (e) return e;
 
18610
  }
 
18611
  if (p->last_target_parent) {
 
18612
    e = (*v)(p->last_target_parent, a); if (e) return e;
 
18613
  }
 
18614
  if (p->use_filesystem_for_exec) {
 
18615
    e = (*v)(p->use_filesystem_for_exec, a); if (e) return e;
 
18616
  }
 
18617
  if (p->utf8_decode) {
 
18618
    e = (*v)(p->utf8_decode, a); if (e) return e;
 
18619
  }
 
18620
  if (p->searched_specific_files) {
 
18621
    e = (*v)(p->searched_specific_files, a); if (e) return e;
 
18622
  }
 
18623
  if (p->searched_exact_paths) {
 
18624
    e = (*v)(p->searched_exact_paths, a); if (e) return e;
 
18625
  }
 
18626
  if (p->search_specific_files) {
 
18627
    e = (*v)(p->search_specific_files, a); if (e) return e;
 
18628
  }
 
18629
  if (p->search_specific_file_parents) {
 
18630
    e = (*v)(p->search_specific_file_parents, a); if (e) return e;
 
18631
  }
 
18632
  if (p->state) {
 
18633
    e = (*v)(p->state, a); if (e) return e;
 
18634
  }
 
18635
  if (p->current_root) {
 
18636
    e = (*v)(p->current_root, a); if (e) return e;
 
18637
  }
 
18638
  if (p->current_root_unicode) {
 
18639
    e = (*v)(p->current_root_unicode, a); if (e) return e;
 
18640
  }
 
18641
  if (p->root_entries) {
 
18642
    e = (*v)(p->root_entries, a); if (e) return e;
 
18643
  }
 
18644
  if (p->root_abspath) {
 
18645
    e = (*v)(p->root_abspath, a); if (e) return e;
 
18646
  }
 
18647
  if (p->tree) {
 
18648
    e = (*v)(p->tree, a); if (e) return e;
 
18649
  }
 
18650
  if (p->dir_iterator) {
 
18651
    e = (*v)(p->dir_iterator, a); if (e) return e;
 
18652
  }
 
18653
  if (p->current_block) {
 
18654
    e = (*v)(p->current_block, a); if (e) return e;
 
18655
  }
 
18656
  if (p->current_block_list) {
 
18657
    e = (*v)(p->current_block_list, a); if (e) return e;
 
18658
  }
 
18659
  if (p->current_dir_info) {
 
18660
    e = (*v)(p->current_dir_info, a); if (e) return e;
 
18661
  }
 
18662
  if (p->current_dir_list) {
 
18663
    e = (*v)(p->current_dir_list, a); if (e) return e;
 
18664
  }
 
18665
  if (p->_pending_consistent_entries) {
 
18666
    e = (*v)(p->_pending_consistent_entries, a); if (e) return e;
 
18667
  }
 
18668
  if (p->root_dir_info) {
 
18669
    e = (*v)(p->root_dir_info, a); if (e) return e;
 
18670
  }
 
18671
  if (p->bisect_left) {
 
18672
    e = (*v)(p->bisect_left, a); if (e) return e;
 
18673
  }
 
18674
  if (p->pathjoin) {
 
18675
    e = (*v)(p->pathjoin, a); if (e) return e;
 
18676
  }
 
18677
  if (p->fstat) {
 
18678
    e = (*v)(p->fstat, a); if (e) return e;
 
18679
  }
 
18680
  if (p->seen_ids) {
 
18681
    e = (*v)(p->seen_ids, a); if (e) return e;
 
18682
  }
 
18683
  if (p->sha_file) {
 
18684
    e = (*v)(p->sha_file, a); if (e) return e;
 
18685
  }
 
18686
  return 0;
 
18687
}
 
18688
 
 
18689
static int __pyx_tp_clear_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC(PyObject *o) {
 
18690
  struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *p = (struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *)o;
 
18691
  PyObject* tmp;
 
18692
  tmp = ((PyObject*)p->old_dirname_to_file_id);
 
18693
  p->old_dirname_to_file_id = Py_None; Py_INCREF(Py_None);
 
18694
  Py_XDECREF(tmp);
 
18695
  tmp = ((PyObject*)p->new_dirname_to_file_id);
 
18696
  p->new_dirname_to_file_id = Py_None; Py_INCREF(Py_None);
 
18697
  Py_XDECREF(tmp);
 
18698
  tmp = ((PyObject*)p->last_source_parent);
 
18699
  p->last_source_parent = Py_None; Py_INCREF(Py_None);
 
18700
  Py_XDECREF(tmp);
 
18701
  tmp = ((PyObject*)p->last_target_parent);
 
18702
  p->last_target_parent = Py_None; Py_INCREF(Py_None);
 
18703
  Py_XDECREF(tmp);
 
18704
  tmp = ((PyObject*)p->use_filesystem_for_exec);
 
18705
  p->use_filesystem_for_exec = Py_None; Py_INCREF(Py_None);
 
18706
  Py_XDECREF(tmp);
 
18707
  tmp = ((PyObject*)p->utf8_decode);
 
18708
  p->utf8_decode = Py_None; Py_INCREF(Py_None);
 
18709
  Py_XDECREF(tmp);
 
18710
  tmp = ((PyObject*)p->searched_specific_files);
 
18711
  p->searched_specific_files = Py_None; Py_INCREF(Py_None);
 
18712
  Py_XDECREF(tmp);
 
18713
  tmp = ((PyObject*)p->searched_exact_paths);
 
18714
  p->searched_exact_paths = Py_None; Py_INCREF(Py_None);
 
18715
  Py_XDECREF(tmp);
 
18716
  tmp = ((PyObject*)p->search_specific_files);
 
18717
  p->search_specific_files = Py_None; Py_INCREF(Py_None);
 
18718
  Py_XDECREF(tmp);
 
18719
  tmp = ((PyObject*)p->search_specific_file_parents);
 
18720
  p->search_specific_file_parents = Py_None; Py_INCREF(Py_None);
 
18721
  Py_XDECREF(tmp);
 
18722
  tmp = ((PyObject*)p->state);
 
18723
  p->state = Py_None; Py_INCREF(Py_None);
 
18724
  Py_XDECREF(tmp);
 
18725
  tmp = ((PyObject*)p->current_root);
 
18726
  p->current_root = Py_None; Py_INCREF(Py_None);
 
18727
  Py_XDECREF(tmp);
 
18728
  tmp = ((PyObject*)p->current_root_unicode);
 
18729
  p->current_root_unicode = Py_None; Py_INCREF(Py_None);
 
18730
  Py_XDECREF(tmp);
 
18731
  tmp = ((PyObject*)p->root_entries);
 
18732
  p->root_entries = Py_None; Py_INCREF(Py_None);
 
18733
  Py_XDECREF(tmp);
 
18734
  tmp = ((PyObject*)p->root_abspath);
 
18735
  p->root_abspath = Py_None; Py_INCREF(Py_None);
 
18736
  Py_XDECREF(tmp);
 
18737
  tmp = ((PyObject*)p->tree);
 
18738
  p->tree = Py_None; Py_INCREF(Py_None);
 
18739
  Py_XDECREF(tmp);
 
18740
  tmp = ((PyObject*)p->dir_iterator);
 
18741
  p->dir_iterator = Py_None; Py_INCREF(Py_None);
 
18742
  Py_XDECREF(tmp);
 
18743
  tmp = ((PyObject*)p->current_block);
 
18744
  p->current_block = Py_None; Py_INCREF(Py_None);
 
18745
  Py_XDECREF(tmp);
 
18746
  tmp = ((PyObject*)p->current_block_list);
 
18747
  p->current_block_list = Py_None; Py_INCREF(Py_None);
 
18748
  Py_XDECREF(tmp);
 
18749
  tmp = ((PyObject*)p->current_dir_info);
 
18750
  p->current_dir_info = Py_None; Py_INCREF(Py_None);
 
18751
  Py_XDECREF(tmp);
 
18752
  tmp = ((PyObject*)p->current_dir_list);
 
18753
  p->current_dir_list = Py_None; Py_INCREF(Py_None);
 
18754
  Py_XDECREF(tmp);
 
18755
  tmp = ((PyObject*)p->_pending_consistent_entries);
 
18756
  p->_pending_consistent_entries = Py_None; Py_INCREF(Py_None);
 
18757
  Py_XDECREF(tmp);
 
18758
  tmp = ((PyObject*)p->root_dir_info);
 
18759
  p->root_dir_info = Py_None; Py_INCREF(Py_None);
 
18760
  Py_XDECREF(tmp);
 
18761
  tmp = ((PyObject*)p->bisect_left);
 
18762
  p->bisect_left = Py_None; Py_INCREF(Py_None);
 
18763
  Py_XDECREF(tmp);
 
18764
  tmp = ((PyObject*)p->pathjoin);
 
18765
  p->pathjoin = Py_None; Py_INCREF(Py_None);
 
18766
  Py_XDECREF(tmp);
 
18767
  tmp = ((PyObject*)p->fstat);
 
18768
  p->fstat = Py_None; Py_INCREF(Py_None);
 
18769
  Py_XDECREF(tmp);
 
18770
  tmp = ((PyObject*)p->seen_ids);
 
18771
  p->seen_ids = Py_None; Py_INCREF(Py_None);
 
18772
  Py_XDECREF(tmp);
 
18773
  tmp = ((PyObject*)p->sha_file);
 
18774
  p->sha_file = Py_None; Py_INCREF(Py_None);
 
18775
  Py_XDECREF(tmp);
 
18776
  return 0;
 
18777
}
 
18778
 
 
18779
static PyObject *__pyx_getprop_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_searched_specific_files(PyObject *o, void *x) {
 
18780
  return __pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_23searched_specific_files___get__(o);
 
18781
}
 
18782
 
 
18783
static PyObject *__pyx_getprop_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_searched_exact_paths(PyObject *o, void *x) {
 
18784
  return __pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_20searched_exact_paths___get__(o);
 
18785
}
 
18786
 
 
18787
static PyMethodDef __pyx_methods_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC[] = {
 
18788
  {__Pyx_NAMESTR("iter_changes"), (PyCFunction)__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_2iter_changes, METH_NOARGS, __Pyx_DOCSTR(0)},
 
18789
  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
 
18790
  {0, 0, 0, 0}
 
18791
};
 
18792
 
 
18793
static struct PyGetSetDef __pyx_getsets_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC[] = {
 
18794
  {(char *)"searched_specific_files", __pyx_getprop_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_searched_specific_files, 0, 0, 0},
 
18795
  {(char *)"searched_exact_paths", __pyx_getprop_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_searched_exact_paths, 0, 0, 0},
 
18796
  {0, 0, 0, 0, 0}
 
18797
};
 
18798
 
 
18799
static PyNumberMethods __pyx_tp_as_number_ProcessEntryC = {
 
18800
  0, /*nb_add*/
 
18801
  0, /*nb_subtract*/
 
18802
  0, /*nb_multiply*/
 
18803
  #if PY_MAJOR_VERSION < 3
 
18804
  0, /*nb_divide*/
 
18805
  #endif
 
18806
  0, /*nb_remainder*/
 
18807
  0, /*nb_divmod*/
 
18808
  0, /*nb_power*/
 
18809
  0, /*nb_negative*/
 
18810
  0, /*nb_positive*/
 
18811
  0, /*nb_absolute*/
 
18812
  0, /*nb_nonzero*/
 
18813
  0, /*nb_invert*/
 
18814
  0, /*nb_lshift*/
 
18815
  0, /*nb_rshift*/
 
18816
  0, /*nb_and*/
 
18817
  0, /*nb_xor*/
 
18818
  0, /*nb_or*/
 
18819
  #if PY_MAJOR_VERSION < 3
 
18820
  0, /*nb_coerce*/
 
18821
  #endif
 
18822
  0, /*nb_int*/
 
18823
  #if PY_MAJOR_VERSION < 3
 
18824
  0, /*nb_long*/
 
18825
  #else
 
18826
  0, /*reserved*/
 
18827
  #endif
 
18828
  0, /*nb_float*/
 
18829
  #if PY_MAJOR_VERSION < 3
 
18830
  0, /*nb_oct*/
 
18831
  #endif
 
18832
  #if PY_MAJOR_VERSION < 3
 
18833
  0, /*nb_hex*/
 
18834
  #endif
 
18835
  0, /*nb_inplace_add*/
 
18836
  0, /*nb_inplace_subtract*/
 
18837
  0, /*nb_inplace_multiply*/
 
18838
  #if PY_MAJOR_VERSION < 3
 
18839
  0, /*nb_inplace_divide*/
 
18840
  #endif
 
18841
  0, /*nb_inplace_remainder*/
 
18842
  0, /*nb_inplace_power*/
 
18843
  0, /*nb_inplace_lshift*/
 
18844
  0, /*nb_inplace_rshift*/
 
18845
  0, /*nb_inplace_and*/
 
18846
  0, /*nb_inplace_xor*/
 
18847
  0, /*nb_inplace_or*/
 
18848
  0, /*nb_floor_divide*/
 
18849
  0, /*nb_true_divide*/
 
18850
  0, /*nb_inplace_floor_divide*/
 
18851
  0, /*nb_inplace_true_divide*/
 
18852
  #if PY_VERSION_HEX >= 0x02050000
 
18853
  0, /*nb_index*/
 
18854
  #endif
 
18855
};
 
18856
 
 
18857
static PySequenceMethods __pyx_tp_as_sequence_ProcessEntryC = {
 
18858
  0, /*sq_length*/
 
18859
  0, /*sq_concat*/
 
18860
  0, /*sq_repeat*/
 
18861
  0, /*sq_item*/
 
18862
  0, /*sq_slice*/
 
18863
  0, /*sq_ass_item*/
 
18864
  0, /*sq_ass_slice*/
 
18865
  0, /*sq_contains*/
 
18866
  0, /*sq_inplace_concat*/
 
18867
  0, /*sq_inplace_repeat*/
 
18868
};
 
18869
 
 
18870
static PyMappingMethods __pyx_tp_as_mapping_ProcessEntryC = {
 
18871
  0, /*mp_length*/
 
18872
  0, /*mp_subscript*/
 
18873
  0, /*mp_ass_subscript*/
 
18874
};
 
18875
 
 
18876
static PyBufferProcs __pyx_tp_as_buffer_ProcessEntryC = {
 
18877
  #if PY_MAJOR_VERSION < 3
 
18878
  0, /*bf_getreadbuffer*/
 
18879
  #endif
 
18880
  #if PY_MAJOR_VERSION < 3
 
18881
  0, /*bf_getwritebuffer*/
 
18882
  #endif
 
18883
  #if PY_MAJOR_VERSION < 3
 
18884
  0, /*bf_getsegcount*/
 
18885
  #endif
 
18886
  #if PY_MAJOR_VERSION < 3
 
18887
  0, /*bf_getcharbuffer*/
 
18888
  #endif
 
18889
  #if PY_VERSION_HEX >= 0x02060000
 
18890
  0, /*bf_getbuffer*/
 
18891
  #endif
 
18892
  #if PY_VERSION_HEX >= 0x02060000
 
18893
  0, /*bf_releasebuffer*/
 
18894
  #endif
 
18895
};
 
18896
 
 
18897
static PyTypeObject __pyx_type_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC = {
 
18898
  PyVarObject_HEAD_INIT(0, 0)
 
18899
  __Pyx_NAMESTR("bzrlib._dirstate_helpers_pyx.ProcessEntryC"), /*tp_name*/
 
18900
  sizeof(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC), /*tp_basicsize*/
 
18901
  0, /*tp_itemsize*/
 
18902
  __pyx_tp_dealloc_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC, /*tp_dealloc*/
 
18903
  0, /*tp_print*/
 
18904
  0, /*tp_getattr*/
 
18905
  0, /*tp_setattr*/
 
18906
  #if PY_MAJOR_VERSION < 3
 
18907
  0, /*tp_compare*/
 
18908
  #else
 
18909
  0, /*reserved*/
 
18910
  #endif
 
18911
  0, /*tp_repr*/
 
18912
  &__pyx_tp_as_number_ProcessEntryC, /*tp_as_number*/
 
18913
  &__pyx_tp_as_sequence_ProcessEntryC, /*tp_as_sequence*/
 
18914
  &__pyx_tp_as_mapping_ProcessEntryC, /*tp_as_mapping*/
 
18915
  0, /*tp_hash*/
 
18916
  0, /*tp_call*/
 
18917
  0, /*tp_str*/
 
18918
  0, /*tp_getattro*/
 
18919
  0, /*tp_setattro*/
 
18920
  &__pyx_tp_as_buffer_ProcessEntryC, /*tp_as_buffer*/
 
18921
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
 
18922
  0, /*tp_doc*/
 
18923
  __pyx_tp_traverse_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC, /*tp_traverse*/
 
18924
  __pyx_tp_clear_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC, /*tp_clear*/
 
18925
  0, /*tp_richcompare*/
 
18926
  0, /*tp_weaklistoffset*/
 
18927
  __pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_1__iter__, /*tp_iter*/
 
18928
  __pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC_3__next__, /*tp_iternext*/
 
18929
  __pyx_methods_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC, /*tp_methods*/
 
18930
  0, /*tp_members*/
 
18931
  __pyx_getsets_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC, /*tp_getset*/
 
18932
  0, /*tp_base*/
 
18933
  0, /*tp_dict*/
 
18934
  0, /*tp_descr_get*/
 
18935
  0, /*tp_descr_set*/
 
18936
  0, /*tp_dictoffset*/
 
18937
  __pyx_pf_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC___init__, /*tp_init*/
 
18938
  0, /*tp_alloc*/
 
18939
  __pyx_tp_new_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC, /*tp_new*/
 
18940
  0, /*tp_free*/
 
18941
  0, /*tp_is_gc*/
 
18942
  0, /*tp_bases*/
 
18943
  0, /*tp_mro*/
 
18944
  0, /*tp_cache*/
 
18945
  0, /*tp_subclasses*/
 
18946
  0, /*tp_weaklist*/
 
18947
  0, /*tp_del*/
 
18948
  #if PY_VERSION_HEX >= 0x02060000
 
18949
  0, /*tp_version_tag*/
 
18950
  #endif
 
18951
};
 
18952
 
 
18953
static PyMethodDef __pyx_methods[] = {
 
18954
  {0, 0, 0, 0}
 
18955
};
 
18956
 
 
18957
#if PY_MAJOR_VERSION >= 3
 
18958
static struct PyModuleDef __pyx_moduledef = {
 
18959
    PyModuleDef_HEAD_INIT,
 
18960
    __Pyx_NAMESTR("_dirstate_helpers_pyx"),
 
18961
    __Pyx_DOCSTR(__pyx_k_68), /* m_doc */
 
18962
    -1, /* m_size */
 
18963
    __pyx_methods /* m_methods */,
 
18964
    NULL, /* m_reload */
 
18965
    NULL, /* m_traverse */
 
18966
    NULL, /* m_clear */
 
18967
    NULL /* m_free */
 
18968
};
 
18969
#endif
 
18970
 
 
18971
static __Pyx_StringTabEntry __pyx_string_tab[] = {
 
18972
  {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
 
18973
  {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
 
18974
  {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0},
 
18975
  {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0},
 
18976
  {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0},
 
18977
  {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0},
 
18978
  {&__pyx_n_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 1},
 
18979
  {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
 
18980
  {&__pyx_n_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 1},
 
18981
  {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
 
18982
  {&__pyx_n_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 1},
 
18983
  {&__pyx_n_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 1},
 
18984
  {&__pyx_n_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 1},
 
18985
  {&__pyx_n_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 1},
 
18986
  {&__pyx_n_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 1},
 
18987
  {&__pyx_n_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 1},
 
18988
  {&__pyx_n_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 1},
 
18989
  {&__pyx_n_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 1},
 
18990
  {&__pyx_n_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 1},
 
18991
  {&__pyx_n_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 1},
 
18992
  {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
 
18993
  {&__pyx_n_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 1},
 
18994
  {&__pyx_n_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 1},
 
18995
  {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0},
 
18996
  {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0},
 
18997
  {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0},
 
18998
  {&__pyx_kp_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 0},
 
18999
  {&__pyx_kp_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 0},
 
19000
  {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0},
 
19001
  {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0},
 
19002
  {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0},
 
19003
  {&__pyx_n_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 1},
 
19004
  {&__pyx_n_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 1},
 
19005
  {&__pyx_n_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 1},
 
19006
  {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
 
19007
  {&__pyx_kp_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 0},
 
19008
  {&__pyx_n_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 1},
 
19009
  {&__pyx_n_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 1},
 
19010
  {&__pyx_n_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 1},
 
19011
  {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
 
19012
  {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0},
 
19013
  {&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0},
 
19014
  {&__pyx_kp_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 0},
 
19015
  {&__pyx_kp_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 0},
 
19016
  {&__pyx_n_s_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 0, 1, 1},
 
19017
  {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0},
 
19018
  {&__pyx_n_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 1},
 
19019
  {&__pyx_n_s_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 0, 1, 1},
 
19020
  {&__pyx_n_s_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 1},
 
19021
  {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
 
19022
  {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
 
19023
  {&__pyx_n_s__AssertionError, __pyx_k__AssertionError, sizeof(__pyx_k__AssertionError), 0, 0, 1, 1},
 
19024
  {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1},
 
19025
  {&__pyx_n_s__BadFileKindError, __pyx_k__BadFileKindError, sizeof(__pyx_k__BadFileKindError), 0, 0, 1, 1},
 
19026
  {&__pyx_n_s__BadFilenameEncoding, __pyx_k__BadFilenameEncoding, sizeof(__pyx_k__BadFilenameEncoding), 0, 0, 1, 1},
 
19027
  {&__pyx_n_s__BzrError, __pyx_k__BzrError, sizeof(__pyx_k__BzrError), 0, 0, 1, 1},
 
19028
  {&__pyx_n_s__CorruptDirstate, __pyx_k__CorruptDirstate, sizeof(__pyx_k__CorruptDirstate), 0, 0, 1, 1},
 
19029
  {&__pyx_n_s__DirState, __pyx_k__DirState, sizeof(__pyx_k__DirState), 0, 0, 1, 1},
 
19030
  {&__pyx_n_s__DirstateCorrupt, __pyx_k__DirstateCorrupt, sizeof(__pyx_k__DirstateCorrupt), 0, 0, 1, 1},
 
19031
  {&__pyx_n_s__EINVAL, __pyx_k__EINVAL, sizeof(__pyx_k__EINVAL), 0, 0, 1, 1},
 
19032
  {&__pyx_n_s__ENOENT, __pyx_k__ENOENT, sizeof(__pyx_k__ENOENT), 0, 0, 1, 1},
 
19033
  {&__pyx_n_s__ENOTDIR, __pyx_k__ENOTDIR, sizeof(__pyx_k__ENOTDIR), 0, 0, 1, 1},
 
19034
  {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
 
19035
  {&__pyx_n_s__NULLSTAT, __pyx_k__NULLSTAT, sizeof(__pyx_k__NULLSTAT), 0, 0, 1, 1},
 
19036
  {&__pyx_n_s__NULL_PARENT_DETAILS, __pyx_k__NULL_PARENT_DETAILS, sizeof(__pyx_k__NULL_PARENT_DETAILS), 0, 0, 1, 1},
 
19037
  {&__pyx_n_s__OSError, __pyx_k__OSError, sizeof(__pyx_k__OSError), 0, 0, 1, 1},
 
19038
  {&__pyx_n_s__S_IEXEC, __pyx_k__S_IEXEC, sizeof(__pyx_k__S_IEXEC), 0, 0, 1, 1},
 
19039
  {&__pyx_n_s__S_ISREG, __pyx_k__S_ISREG, sizeof(__pyx_k__S_ISREG), 0, 0, 1, 1},
 
19040
  {&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1},
 
19041
  {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
 
19042
  {&__pyx_n_s__UnicodeDecodeError, __pyx_k__UnicodeDecodeError, sizeof(__pyx_k__UnicodeDecodeError), 0, 0, 1, 1},
 
19043
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
 
19044
  {&__pyx_n_s____ne__, __pyx_k____ne__, sizeof(__pyx_k____ne__), 0, 0, 1, 1},
 
19045
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
 
19046
  {&__pyx_n_s___bisect_path_left, __pyx_k___bisect_path_left, sizeof(__pyx_k___bisect_path_left), 0, 0, 1, 1},
 
19047
  {&__pyx_n_s___bisect_path_right, __pyx_k___bisect_path_right, sizeof(__pyx_k___bisect_path_right), 0, 0, 1, 1},
 
19048
  {&__pyx_n_s___cutoff_time, __pyx_k___cutoff_time, sizeof(__pyx_k___cutoff_time), 0, 0, 1, 1},
 
19049
  {&__pyx_n_s___dirblock_state, __pyx_k___dirblock_state, sizeof(__pyx_k___dirblock_state), 0, 0, 1, 1},
 
19050
  {&__pyx_n_s___dirblocks, __pyx_k___dirblocks, sizeof(__pyx_k___dirblocks), 0, 0, 1, 1},
 
19051
  {&__pyx_n_s___encode, __pyx_k___encode, sizeof(__pyx_k___encode), 0, 0, 1, 1},
 
19052
  {&__pyx_n_s___end_of_header, __pyx_k___end_of_header, sizeof(__pyx_k___end_of_header), 0, 0, 1, 1},
 
19053
  {&__pyx_n_s___ensure_block, __pyx_k___ensure_block, sizeof(__pyx_k___ensure_block), 0, 0, 1, 1},
 
19054
  {&__pyx_n_s___entries_for_path, __pyx_k___entries_for_path, sizeof(__pyx_k___entries_for_path), 0, 0, 1, 1},
 
19055
  {&__pyx_n_s___filename, __pyx_k___filename, sizeof(__pyx_k___filename), 0, 0, 1, 1},
 
19056
  {&__pyx_n_s___fs_enc, __pyx_k___fs_enc, sizeof(__pyx_k___fs_enc), 0, 0, 1, 1},
 
19057
  {&__pyx_n_s___get_entry, __pyx_k___get_entry, sizeof(__pyx_k___get_entry), 0, 0, 1, 1},
 
19058
  {&__pyx_n_s___init, __pyx_k___init, sizeof(__pyx_k___init), 0, 0, 1, 1},
 
19059
  {&__pyx_n_s___is_executable, __pyx_k___is_executable, sizeof(__pyx_k___is_executable), 0, 0, 1, 1},
 
19060
  {&__pyx_n_s___iter_next, __pyx_k___iter_next, sizeof(__pyx_k___iter_next), 0, 0, 1, 1},
 
19061
  {&__pyx_n_s___loop_one_block, __pyx_k___loop_one_block, sizeof(__pyx_k___loop_one_block), 0, 0, 1, 1},
 
19062
  {&__pyx_n_s___mark_modified, __pyx_k___mark_modified, sizeof(__pyx_k___mark_modified), 0, 0, 1, 1},
 
19063
  {&__pyx_n_s___maybe_tree_ref, __pyx_k___maybe_tree_ref, sizeof(__pyx_k___maybe_tree_ref), 0, 0, 1, 1},
 
19064
  {&__pyx_n_s___num_entries, __pyx_k___num_entries, sizeof(__pyx_k___num_entries), 0, 0, 1, 1},
 
19065
  {&__pyx_n_s___observed_sha1, __pyx_k___observed_sha1, sizeof(__pyx_k___observed_sha1), 0, 0, 1, 1},
 
19066
  {&__pyx_n_s___parse_dirblocks, __pyx_k___parse_dirblocks, sizeof(__pyx_k___parse_dirblocks), 0, 0, 1, 1},
 
19067
  {&__pyx_n_s___path_info, __pyx_k___path_info, sizeof(__pyx_k___path_info), 0, 0, 1, 1},
 
19068
  {&__pyx_n_s___process_entry, __pyx_k___process_entry, sizeof(__pyx_k___process_entry), 0, 0, 1, 1},
 
19069
  {&__pyx_n_s___py_memrchr, __pyx_k___py_memrchr, sizeof(__pyx_k___py_memrchr), 0, 0, 1, 1},
 
19070
  {&__pyx_n_s___read_dirblocks, __pyx_k___read_dirblocks, sizeof(__pyx_k___read_dirblocks), 0, 0, 1, 1},
 
19071
  {&__pyx_n_s___read_link, __pyx_k___read_link, sizeof(__pyx_k___read_link), 0, 0, 1, 1},
 
19072
  {&__pyx_n_s___sha1_file, __pyx_k___sha1_file, sizeof(__pyx_k___sha1_file), 0, 0, 1, 1},
 
19073
  {&__pyx_n_s___sha1_provider, __pyx_k___sha1_provider, sizeof(__pyx_k___sha1_provider), 0, 0, 1, 1},
 
19074
  {&__pyx_n_s___sha_cutoff_time, __pyx_k___sha_cutoff_time, sizeof(__pyx_k___sha_cutoff_time), 0, 0, 1, 1},
 
19075
  {&__pyx_n_s___state_file, __pyx_k___state_file, sizeof(__pyx_k___state_file), 0, 0, 1, 1},
 
19076
  {&__pyx_n_s___utf8_decode, __pyx_k___utf8_decode, sizeof(__pyx_k___utf8_decode), 0, 0, 1, 1},
 
19077
  {&__pyx_n_s___walkdirs_utf8, __pyx_k___walkdirs_utf8, sizeof(__pyx_k___walkdirs_utf8), 0, 0, 1, 1},
 
19078
  {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1},
 
19079
  {&__pyx_n_s__absent, __pyx_k__absent, sizeof(__pyx_k__absent), 0, 0, 1, 1},
 
19080
  {&__pyx_n_s__abspath, __pyx_k__abspath, sizeof(__pyx_k__abspath), 0, 0, 1, 1},
 
19081
  {&__pyx_n_s__add, __pyx_k__add, sizeof(__pyx_k__add), 0, 0, 1, 1},
 
19082
  {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 0, 0, 1, 1},
 
19083
  {&__pyx_n_s__ar, __pyx_k__ar, sizeof(__pyx_k__ar), 0, 0, 1, 1},
 
19084
  {&__pyx_n_s__b2a_base64, __pyx_k__b2a_base64, sizeof(__pyx_k__b2a_base64), 0, 0, 1, 1},
 
19085
  {&__pyx_n_s__binascii, __pyx_k__binascii, sizeof(__pyx_k__binascii), 0, 0, 1, 1},
 
19086
  {&__pyx_n_s__bisect, __pyx_k__bisect, sizeof(__pyx_k__bisect), 0, 0, 1, 1},
 
19087
  {&__pyx_n_s__bisect_dirblock, __pyx_k__bisect_dirblock, sizeof(__pyx_k__bisect_dirblock), 0, 0, 1, 1},
 
19088
  {&__pyx_n_s__bisect_left, __pyx_k__bisect_left, sizeof(__pyx_k__bisect_left), 0, 0, 1, 1},
 
19089
  {&__pyx_n_s__block_index, __pyx_k__block_index, sizeof(__pyx_k__block_index), 0, 0, 1, 1},
 
19090
  {&__pyx_n_s__bzrlib, __pyx_k__bzrlib, sizeof(__pyx_k__bzrlib), 0, 0, 1, 1},
 
19091
  {&__pyx_n_s__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 1, 1},
 
19092
  {&__pyx_n_s__cache, __pyx_k__cache, sizeof(__pyx_k__cache), 0, 0, 1, 1},
 
19093
  {&__pyx_n_s__cache_utf8, __pyx_k__cache_utf8, sizeof(__pyx_k__cache_utf8), 0, 0, 1, 1},
 
19094
  {&__pyx_n_s__cmp, __pyx_k__cmp, sizeof(__pyx_k__cmp), 0, 0, 1, 1},
 
19095
  {&__pyx_n_s__cmp_by_dirs, __pyx_k__cmp_by_dirs, sizeof(__pyx_k__cmp_by_dirs), 0, 0, 1, 1},
 
19096
  {&__pyx_n_s__cur_cstr, __pyx_k__cur_cstr, sizeof(__pyx_k__cur_cstr), 0, 0, 1, 1},
 
19097
  {&__pyx_n_s__current_block, __pyx_k__current_block, sizeof(__pyx_k__current_block), 0, 0, 1, 1},
 
19098
  {&__pyx_n_s__current_block_list, __pyx_k__current_block_list, sizeof(__pyx_k__current_block_list), 0, 0, 1, 1},
 
19099
  {&__pyx_n_s__current_block_pos, __pyx_k__current_block_pos, sizeof(__pyx_k__current_block_pos), 0, 0, 1, 1},
 
19100
  {&__pyx_n_s__current_dir_info, __pyx_k__current_dir_info, sizeof(__pyx_k__current_dir_info), 0, 0, 1, 1},
 
19101
  {&__pyx_n_s__current_dir_list, __pyx_k__current_dir_list, sizeof(__pyx_k__current_dir_list), 0, 0, 1, 1},
 
19102
  {&__pyx_n_s__current_root, __pyx_k__current_root, sizeof(__pyx_k__current_root), 0, 0, 1, 1},
 
19103
  {&__pyx_n_s__d, __pyx_k__d, sizeof(__pyx_k__d), 0, 0, 1, 1},
 
19104
  {&__pyx_n_s__decode, __pyx_k__decode, sizeof(__pyx_k__decode), 0, 0, 1, 1},
 
19105
  {&__pyx_n_s__dir_iterator, __pyx_k__dir_iterator, sizeof(__pyx_k__dir_iterator), 0, 0, 1, 1},
 
19106
  {&__pyx_n_s__dirblocks, __pyx_k__dirblocks, sizeof(__pyx_k__dirblocks), 0, 0, 1, 1},
 
19107
  {&__pyx_n_s__directory, __pyx_k__directory, sizeof(__pyx_k__directory), 0, 0, 1, 1},
 
19108
  {&__pyx_n_s__dirname, __pyx_k__dirname, sizeof(__pyx_k__dirname), 0, 0, 1, 1},
 
19109
  {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1},
 
19110
  {&__pyx_n_s__end_cstr, __pyx_k__end_cstr, sizeof(__pyx_k__end_cstr), 0, 0, 1, 1},
 
19111
  {&__pyx_n_s__entry, __pyx_k__entry, sizeof(__pyx_k__entry), 0, 0, 1, 1},
 
19112
  {&__pyx_n_s__errno, __pyx_k__errno, sizeof(__pyx_k__errno), 0, 0, 1, 1},
 
19113
  {&__pyx_n_s__errors, __pyx_k__errors, sizeof(__pyx_k__errors), 0, 0, 1, 1},
 
19114
  {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1},
 
19115
  {&__pyx_n_s__file, __pyx_k__file, sizeof(__pyx_k__file), 0, 0, 1, 1},
 
19116
  {&__pyx_n_s__fstat, __pyx_k__fstat, sizeof(__pyx_k__fstat), 0, 0, 1, 1},
 
19117
  {&__pyx_n_s__get_next, __pyx_k__get_next, sizeof(__pyx_k__get_next), 0, 0, 1, 1},
 
19118
  {&__pyx_n_s__get_next_str, __pyx_k__get_next_str, sizeof(__pyx_k__get_next_str), 0, 0, 1, 1},
 
19119
  {&__pyx_n_s__hi, __pyx_k__hi, sizeof(__pyx_k__hi), 0, 0, 1, 1},
 
19120
  {&__pyx_n_s__include_unchanged, __pyx_k__include_unchanged, sizeof(__pyx_k__include_unchanged), 0, 0, 1, 1},
 
19121
  {&__pyx_n_s__is_inside, __pyx_k__is_inside, sizeof(__pyx_k__is_inside), 0, 0, 1, 1},
 
19122
  {&__pyx_n_s__is_inside_any, __pyx_k__is_inside_any, sizeof(__pyx_k__is_inside_any), 0, 0, 1, 1},
 
19123
  {&__pyx_n_s__l, __pyx_k__l, sizeof(__pyx_k__l), 0, 0, 1, 1},
 
19124
  {&__pyx_n_s__last_source_parent, __pyx_k__last_source_parent, sizeof(__pyx_k__last_source_parent), 0, 0, 1, 1},
 
19125
  {&__pyx_n_s__last_target_parent, __pyx_k__last_target_parent, sizeof(__pyx_k__last_target_parent), 0, 0, 1, 1},
 
19126
  {&__pyx_n_s__lo, __pyx_k__lo, sizeof(__pyx_k__lo), 0, 0, 1, 1},
 
19127
  {&__pyx_n_s__lstat, __pyx_k__lstat, sizeof(__pyx_k__lstat), 0, 0, 1, 1},
 
19128
  {&__pyx_n_s__next, __pyx_k__next, sizeof(__pyx_k__next), 0, 0, 1, 1},
 
19129
  {&__pyx_n_s__os, __pyx_k__os, sizeof(__pyx_k__os), 0, 0, 1, 1},
 
19130
  {&__pyx_n_s__osutils, __pyx_k__osutils, sizeof(__pyx_k__osutils), 0, 0, 1, 1},
 
19131
  {&__pyx_n_s__pack_stat, __pyx_k__pack_stat, sizeof(__pyx_k__pack_stat), 0, 0, 1, 1},
 
19132
  {&__pyx_n_s__parent_directories, __pyx_k__parent_directories, sizeof(__pyx_k__parent_directories), 0, 0, 1, 1},
 
19133
  {&__pyx_n_s__partial, __pyx_k__partial, sizeof(__pyx_k__partial), 0, 0, 1, 1},
 
19134
  {&__pyx_n_s__path, __pyx_k__path, sizeof(__pyx_k__path), 0, 0, 1, 1},
 
19135
  {&__pyx_n_s__path1, __pyx_k__path1, sizeof(__pyx_k__path1), 0, 0, 1, 1},
 
19136
  {&__pyx_n_s__path2, __pyx_k__path2, sizeof(__pyx_k__path2), 0, 0, 1, 1},
 
19137
  {&__pyx_n_s__path_index, __pyx_k__path_index, sizeof(__pyx_k__path_index), 0, 0, 1, 1},
 
19138
  {&__pyx_n_s__path_utf8, __pyx_k__path_utf8, sizeof(__pyx_k__path_utf8), 0, 0, 1, 1},
 
19139
  {&__pyx_n_s__pathjoin, __pyx_k__pathjoin, sizeof(__pyx_k__pathjoin), 0, 0, 1, 1},
 
19140
  {&__pyx_n_s__paths, __pyx_k__paths, sizeof(__pyx_k__paths), 0, 0, 1, 1},
 
19141
  {&__pyx_n_s__platform, __pyx_k__platform, sizeof(__pyx_k__platform), 0, 0, 1, 1},
 
19142
  {&__pyx_n_s__prefix, __pyx_k__prefix, sizeof(__pyx_k__prefix), 0, 0, 1, 1},
 
19143
  {&__pyx_n_s__r, __pyx_k__r, sizeof(__pyx_k__r), 0, 0, 1, 1},
 
19144
  {&__pyx_n_s__read, __pyx_k__read, sizeof(__pyx_k__read), 0, 0, 1, 1},
 
19145
  {&__pyx_n_s__relocated, __pyx_k__relocated, sizeof(__pyx_k__relocated), 0, 0, 1, 1},
 
19146
  {&__pyx_n_s__root_abspath, __pyx_k__root_abspath, sizeof(__pyx_k__root_abspath), 0, 0, 1, 1},
 
19147
  {&__pyx_n_s__root_dir_info, __pyx_k__root_dir_info, sizeof(__pyx_k__root_dir_info), 0, 0, 1, 1},
 
19148
  {&__pyx_n_s__root_entries, __pyx_k__root_entries, sizeof(__pyx_k__root_entries), 0, 0, 1, 1},
 
19149
  {&__pyx_n_s__root_entries_len, __pyx_k__root_entries_len, sizeof(__pyx_k__root_entries_len), 0, 0, 1, 1},
 
19150
  {&__pyx_n_s__root_entries_pos, __pyx_k__root_entries_pos, sizeof(__pyx_k__root_entries_pos), 0, 0, 1, 1},
 
19151
  {&__pyx_n_s__rsplit, __pyx_k__rsplit, sizeof(__pyx_k__rsplit), 0, 0, 1, 1},
 
19152
  {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1},
 
19153
  {&__pyx_n_s__seek, __pyx_k__seek, sizeof(__pyx_k__seek), 0, 0, 1, 1},
 
19154
  {&__pyx_n_s__seen_ids, __pyx_k__seen_ids, sizeof(__pyx_k__seen_ids), 0, 0, 1, 1},
 
19155
  {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1},
 
19156
  {&__pyx_n_s__sha_file, __pyx_k__sha_file, sizeof(__pyx_k__sha_file), 0, 0, 1, 1},
 
19157
  {&__pyx_n_s__source_index, __pyx_k__source_index, sizeof(__pyx_k__source_index), 0, 0, 1, 1},
 
19158
  {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1},
 
19159
  {&__pyx_n_s__splitpath, __pyx_k__splitpath, sizeof(__pyx_k__splitpath), 0, 0, 1, 1},
 
19160
  {&__pyx_n_s__st_ctime, __pyx_k__st_ctime, sizeof(__pyx_k__st_ctime), 0, 0, 1, 1},
 
19161
  {&__pyx_n_s__st_dev, __pyx_k__st_dev, sizeof(__pyx_k__st_dev), 0, 0, 1, 1},
 
19162
  {&__pyx_n_s__st_ino, __pyx_k__st_ino, sizeof(__pyx_k__st_ino), 0, 0, 1, 1},
 
19163
  {&__pyx_n_s__st_mode, __pyx_k__st_mode, sizeof(__pyx_k__st_mode), 0, 0, 1, 1},
 
19164
  {&__pyx_n_s__st_mtime, __pyx_k__st_mtime, sizeof(__pyx_k__st_mtime), 0, 0, 1, 1},
 
19165
  {&__pyx_n_s__st_size, __pyx_k__st_size, sizeof(__pyx_k__st_size), 0, 0, 1, 1},
 
19166
  {&__pyx_n_s__stat, __pyx_k__stat, sizeof(__pyx_k__stat), 0, 0, 1, 1},
 
19167
  {&__pyx_n_s__stat_and_sha1, __pyx_k__stat_and_sha1, sizeof(__pyx_k__stat_and_sha1), 0, 0, 1, 1},
 
19168
  {&__pyx_n_s__stat_value, __pyx_k__stat_value, sizeof(__pyx_k__stat_value), 0, 0, 1, 1},
 
19169
  {&__pyx_n_s__state, __pyx_k__state, sizeof(__pyx_k__state), 0, 0, 1, 1},
 
19170
  {&__pyx_n_s__symlink, __pyx_k__symlink, sizeof(__pyx_k__symlink), 0, 0, 1, 1},
 
19171
  {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1},
 
19172
  {&__pyx_n_s__target_index, __pyx_k__target_index, sizeof(__pyx_k__target_index), 0, 0, 1, 1},
 
19173
  {&__pyx_n_s__text, __pyx_k__text, sizeof(__pyx_k__text), 0, 0, 1, 1},
 
19174
  {&__pyx_n_s__text_cstr, __pyx_k__text_cstr, sizeof(__pyx_k__text_cstr), 0, 0, 1, 1},
 
19175
  {&__pyx_n_s__text_size, __pyx_k__text_size, sizeof(__pyx_k__text_size), 0, 0, 1, 1},
 
19176
  {&__pyx_n_s__tree, __pyx_k__tree, sizeof(__pyx_k__tree), 0, 0, 1, 1},
 
19177
  {&__pyx_n_s__update, __pyx_k__update, sizeof(__pyx_k__update), 0, 0, 1, 1},
 
19178
  {&__pyx_n_s__update_entry, __pyx_k__update_entry, sizeof(__pyx_k__update_entry), 0, 0, 1, 1},
 
19179
  {&__pyx_n_s__utf8, __pyx_k__utf8, sizeof(__pyx_k__utf8), 0, 0, 1, 1},
 
19180
  {&__pyx_n_s__utf8_decode, __pyx_k__utf8_decode, sizeof(__pyx_k__utf8_decode), 0, 0, 1, 1},
 
19181
  {&__pyx_n_s__want_unversioned, __pyx_k__want_unversioned, sizeof(__pyx_k__want_unversioned), 0, 0, 1, 1},
 
19182
  {&__pyx_n_s__win32, __pyx_k__win32, sizeof(__pyx_k__win32), 0, 0, 1, 1},
 
19183
  {&__pyx_n_s__winerror, __pyx_k__winerror, sizeof(__pyx_k__winerror), 0, 0, 1, 1},
 
19184
  {0, 0, 0, 0, 0, 0, 0}
 
19185
};
 
19186
static int __Pyx_InitCachedBuiltins(void) {
 
19187
  __pyx_builtin_AssertionError = __Pyx_GetName(__pyx_b, __pyx_n_s__AssertionError); if (!__pyx_builtin_AssertionError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19188
  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19189
  __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19190
  __pyx_builtin_StopIteration = __Pyx_GetName(__pyx_b, __pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19191
  __pyx_builtin_OSError = __Pyx_GetName(__pyx_b, __pyx_n_s__OSError); if (!__pyx_builtin_OSError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19192
  __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19193
  __pyx_builtin_cmp = __Pyx_GetName(__pyx_b, __pyx_n_s__cmp); if (!__pyx_builtin_cmp) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19194
  __pyx_builtin_UnicodeDecodeError = __Pyx_GetName(__pyx_b, __pyx_n_s__UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19195
  return 0;
 
19196
  __pyx_L1_error:;
 
19197
  return -1;
 
19198
}
 
19199
 
 
19200
static int __Pyx_InitCachedConstants(void) {
 
19201
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants");
 
19202
 
 
19203
  /* "bzrlib/_dirstate_helpers_pyx.pyx":558
 
19204
 * 
 
19205
 *         if self.cur_cstr == NULL:
 
19206
 *             raise AssertionError('get_next() called when cur_str is NULL')             # <<<<<<<<<<<<<<
 
19207
 *         elif self.cur_cstr >= self.end_cstr:
 
19208
 *             raise AssertionError('get_next() called when there are no chars'
 
19209
 */
 
19210
  __pyx_k_tuple_11 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19211
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_11));
 
19212
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_10));
 
19213
  PyTuple_SET_ITEM(__pyx_k_tuple_11, 0, ((PyObject *)__pyx_kp_s_10));
 
19214
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_10));
 
19215
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11));
 
19216
 
 
19217
  /* "bzrlib/_dirstate_helpers_pyx.pyx":560
 
19218
 *             raise AssertionError('get_next() called when cur_str is NULL')
 
19219
 *         elif self.cur_cstr >= self.end_cstr:
 
19220
 *             raise AssertionError('get_next() called when there are no chars'             # <<<<<<<<<<<<<<
 
19221
 *                                  ' left')
 
19222
 *         next = self.cur_cstr
 
19223
 */
 
19224
  __pyx_k_tuple_13 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19225
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_13));
 
19226
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_12));
 
19227
  PyTuple_SET_ITEM(__pyx_k_tuple_13, 0, ((PyObject *)__pyx_kp_s_12));
 
19228
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_12));
 
19229
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13));
 
19230
 
 
19231
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1126
 
19232
 *         if target_index != 0:
 
19233
 *             # A lot of code in here depends on target_index == 0
 
19234
 *             raise errors.BzrError('unsupported target index')             # <<<<<<<<<<<<<<
 
19235
 * 
 
19236
 *     cdef _process_entry(self, entry, path_info):
 
19237
 */
 
19238
  __pyx_k_tuple_33 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19239
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_33));
 
19240
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_32));
 
19241
  PyTuple_SET_ITEM(__pyx_k_tuple_33, 0, ((PyObject *)__pyx_kp_s_32));
 
19242
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_32));
 
19243
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33));
 
19244
 
 
19245
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1200
 
19246
 *                 # update the source details variable to be the real
 
19247
 *                 # location.
 
19248
 *                 if old_entry == (None, None):             # <<<<<<<<<<<<<<
 
19249
 *                     raise errors.CorruptDirstate(self.state._filename,
 
19250
 *                         "entry '%s/%s' is considered renamed from %r"
 
19251
 */
 
19252
  __pyx_k_tuple_35 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19253
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_35));
 
19254
  __Pyx_INCREF(Py_None);
 
19255
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 0, Py_None);
 
19256
  __Pyx_GIVEREF(Py_None);
 
19257
  __Pyx_INCREF(Py_None);
 
19258
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 1, Py_None);
 
19259
  __Pyx_GIVEREF(Py_None);
 
19260
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35));
 
19261
 
 
19262
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1299
 
19263
 *                     target_parent_entry = self.state._get_entry(self.target_index,
 
19264
 *                                                            path_utf8=new_dirname)
 
19265
 *                     if target_parent_entry == (None, None):             # <<<<<<<<<<<<<<
 
19266
 *                         raise AssertionError(
 
19267
 *                             "Could not find target parent in wt: %s\nparent of: %s"
 
19268
 */
 
19269
  __pyx_k_tuple_38 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19270
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_38));
 
19271
  __Pyx_INCREF(Py_None);
 
19272
  PyTuple_SET_ITEM(__pyx_k_tuple_38, 0, Py_None);
 
19273
  __Pyx_GIVEREF(Py_None);
 
19274
  __Pyx_INCREF(Py_None);
 
19275
  PyTuple_SET_ITEM(__pyx_k_tuple_38, 1, Py_None);
 
19276
  __Pyx_GIVEREF(Py_None);
 
19277
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_38));
 
19278
 
 
19279
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1381
 
19280
 *                        (None, parent_id),
 
19281
 *                        (None, self.utf8_decode(entry[0][1])[0]),
 
19282
 *                        (None, None),             # <<<<<<<<<<<<<<
 
19283
 *                        (None, False)), True
 
19284
 *         elif _versioned_minikind(source_minikind) and target_minikind == c'a':
 
19285
 */
 
19286
  __pyx_k_tuple_41 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19287
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_41));
 
19288
  __Pyx_INCREF(Py_None);
 
19289
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 0, Py_None);
 
19290
  __Pyx_GIVEREF(Py_None);
 
19291
  __Pyx_INCREF(Py_None);
 
19292
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 1, Py_None);
 
19293
  __Pyx_GIVEREF(Py_None);
 
19294
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41));
 
19295
 
 
19296
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1424
 
19297
 *                 % (source_minikind, target_minikind))
 
19298
 *             ## import pdb;pdb.set_trace()
 
19299
 *         return None, None             # <<<<<<<<<<<<<<
 
19300
 * 
 
19301
 *     def __iter__(self):
 
19302
 */
 
19303
  __pyx_k_tuple_43 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19304
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_43));
 
19305
  __Pyx_INCREF(Py_None);
 
19306
  PyTuple_SET_ITEM(__pyx_k_tuple_43, 0, Py_None);
 
19307
  __Pyx_GIVEREF(Py_None);
 
19308
  __Pyx_INCREF(Py_None);
 
19309
  PyTuple_SET_ITEM(__pyx_k_tuple_43, 1, Py_None);
 
19310
  __Pyx_GIVEREF(Py_None);
 
19311
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43));
 
19312
 
 
19313
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1446
 
19314
 *             # Not the root and not a delete: queue up the parents of the path.
 
19315
 *             self.search_specific_file_parents.update(
 
19316
 *                 osutils.parent_directories(new_path.encode('utf8')))             # <<<<<<<<<<<<<<
 
19317
 *             # Add the root directory which parent_directories does not
 
19318
 *             # provide.
 
19319
 */
 
19320
  __pyx_k_tuple_44 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19321
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_44));
 
19322
  __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8));
 
19323
  PyTuple_SET_ITEM(__pyx_k_tuple_44, 0, ((PyObject *)__pyx_n_s__utf8));
 
19324
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8));
 
19325
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_44));
 
19326
 
 
19327
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1449
 
19328
 *             # Add the root directory which parent_directories does not
 
19329
 *             # provide.
 
19330
 *             self.search_specific_file_parents.add('')             # <<<<<<<<<<<<<<
 
19331
 *         return 0
 
19332
 * 
 
19333
 */
 
19334
  __pyx_k_tuple_45 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19335
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_45));
 
19336
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_5));
 
19337
  PyTuple_SET_ITEM(__pyx_k_tuple_45, 0, ((PyObject *)__pyx_kp_s_5));
 
19338
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_5));
 
19339
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45));
 
19340
 
 
19341
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1543
 
19342
 *             self.root_entries = self.state._entries_for_path(self.current_root)
 
19343
 *             self.root_entries_len = len(self.root_entries)
 
19344
 *             self.current_root_unicode = self.current_root.decode('utf8')             # <<<<<<<<<<<<<<
 
19345
 *             self.root_abspath = self.tree.abspath(self.current_root_unicode)
 
19346
 *             try:
 
19347
 */
 
19348
  __pyx_k_tuple_47 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19349
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_47));
 
19350
  __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8));
 
19351
  PyTuple_SET_ITEM(__pyx_k_tuple_47, 0, ((PyObject *)__pyx_n_s__utf8));
 
19352
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8));
 
19353
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47));
 
19354
 
 
19355
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1562
 
19356
 *                         self.current_root_unicode):
 
19357
 *                         self.root_dir_info = self.root_dir_info[:2] + \
 
19358
 *                             ('tree-reference',) + self.root_dir_info[3:]             # <<<<<<<<<<<<<<
 
19359
 *             if not self.root_entries and not self.root_dir_info:
 
19360
 *                 # this specified path is not present at all, skip it.
 
19361
 */
 
19362
  __pyx_k_tuple_50 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19363
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_50));
 
19364
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_37));
 
19365
  PyTuple_SET_ITEM(__pyx_k_tuple_50, 0, ((PyObject *)__pyx_kp_s_37));
 
19366
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_37));
 
19367
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50));
 
19368
 
 
19369
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1593
 
19370
 *                        True,
 
19371
 *                        (False, False),
 
19372
 *                        (None, None),             # <<<<<<<<<<<<<<
 
19373
 *                        (None, splitpath(self.current_root_unicode)[-1]),
 
19374
 *                        (None, self.root_dir_info[2]),
 
19375
 */
 
19376
  __pyx_k_tuple_51 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19377
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_51));
 
19378
  __Pyx_INCREF(Py_None);
 
19379
  PyTuple_SET_ITEM(__pyx_k_tuple_51, 0, Py_None);
 
19380
  __Pyx_GIVEREF(Py_None);
 
19381
  __Pyx_INCREF(Py_None);
 
19382
  PyTuple_SET_ITEM(__pyx_k_tuple_51, 1, Py_None);
 
19383
  __Pyx_GIVEREF(Py_None);
 
19384
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51));
 
19385
 
 
19386
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1638
 
19387
 *                     if self.current_dir_info[0][0] == '':
 
19388
 *                         # remove .bzr from iteration
 
19389
 *                         bzr_index = self.bisect_left(self.current_dir_list, ('.bzr',))             # <<<<<<<<<<<<<<
 
19390
 *                         if self.current_dir_list[bzr_index][0] != '.bzr':
 
19391
 *                             raise AssertionError()
 
19392
 */
 
19393
  __pyx_k_tuple_53 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19394
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_53));
 
19395
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_52));
 
19396
  PyTuple_SET_ITEM(__pyx_k_tuple_53, 0, ((PyObject *)__pyx_kp_s_52));
 
19397
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_52));
 
19398
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53));
 
19399
 
 
19400
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1696
 
19401
 *                                     self.utf8_decode(current_path_info[0])[0]):
 
19402
 *                                     current_path_info = current_path_info[:2] + \
 
19403
 *                                         ('tree-reference',) + current_path_info[3:]             # <<<<<<<<<<<<<<
 
19404
 *                             new_executable = bool(
 
19405
 *                                 stat.S_ISREG(current_path_info[3].st_mode)
 
19406
 */
 
19407
  __pyx_k_tuple_56 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19408
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_56));
 
19409
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_37));
 
19410
  PyTuple_SET_ITEM(__pyx_k_tuple_56, 0, ((PyObject *)__pyx_kp_s_37));
 
19411
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_37));
 
19412
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56));
 
19413
 
 
19414
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1704
 
19415
 *                                 True,
 
19416
 *                                 (False, False),
 
19417
 *                                 (None, None),             # <<<<<<<<<<<<<<
 
19418
 *                                 (None, self.utf8_decode(current_path_info[1])[0]),
 
19419
 *                                 (None, current_path_info[2]),
 
19420
 */
 
19421
  __pyx_k_tuple_57 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19422
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_57));
 
19423
  __Pyx_INCREF(Py_None);
 
19424
  PyTuple_SET_ITEM(__pyx_k_tuple_57, 0, Py_None);
 
19425
  __Pyx_GIVEREF(Py_None);
 
19426
  __Pyx_INCREF(Py_None);
 
19427
  PyTuple_SET_ITEM(__pyx_k_tuple_57, 1, Py_None);
 
19428
  __Pyx_GIVEREF(Py_None);
 
19429
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57));
 
19430
 
 
19431
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1760
 
19432
 *             self.utf8_decode(current_path_info[0])[0]):
 
19433
 *             return current_path_info[:2] + \
 
19434
 *                 ('tree-reference',) + current_path_info[3:]             # <<<<<<<<<<<<<<
 
19435
 *         else:
 
19436
 *             return current_path_info
 
19437
 */
 
19438
  __pyx_k_tuple_59 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19439
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_59));
 
19440
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_37));
 
19441
  PyTuple_SET_ITEM(__pyx_k_tuple_59, 0, ((PyObject *)__pyx_kp_s_37));
 
19442
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_37));
 
19443
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59));
 
19444
 
 
19445
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1872
 
19446
 *                                 True,
 
19447
 *                                 (False, False),
 
19448
 *                                 (None, None),             # <<<<<<<<<<<<<<
 
19449
 *                                 (None, self.utf8_decode(current_path_info[1])[0]),
 
19450
 *                                 (None, current_path_info[2]),
 
19451
 */
 
19452
  __pyx_k_tuple_61 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19453
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_61));
 
19454
  __Pyx_INCREF(Py_None);
 
19455
  PyTuple_SET_ITEM(__pyx_k_tuple_61, 0, Py_None);
 
19456
  __Pyx_GIVEREF(Py_None);
 
19457
  __Pyx_INCREF(Py_None);
 
19458
  PyTuple_SET_ITEM(__pyx_k_tuple_61, 1, Py_None);
 
19459
  __Pyx_GIVEREF(Py_None);
 
19460
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61));
 
19461
 
 
19462
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1958
 
19463
 *                     "Missing entry for specific path parent %r, %r" % (
 
19464
 *                     path_utf8, path_entries))
 
19465
 *             path_info = self._path_info(path_utf8, path_utf8.decode('utf8'))             # <<<<<<<<<<<<<<
 
19466
 *             for entry in selected_entries:
 
19467
 *                 if entry[0][2] in self.seen_ids:
 
19468
 */
 
19469
  __pyx_k_tuple_63 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19470
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_63));
 
19471
  __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8));
 
19472
  PyTuple_SET_ITEM(__pyx_k_tuple_63, 0, ((PyObject *)__pyx_n_s__utf8));
 
19473
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8));
 
19474
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63));
 
19475
 
 
19476
  /* "bzrlib/_dirstate_helpers_pyx.pyx":2022
 
19477
 *             else:
 
19478
 *                 raise
 
19479
 *         utf8_basename = utf8_path.rsplit('/', 1)[-1]             # <<<<<<<<<<<<<<
 
19480
 *         dir_info = (utf8_path, utf8_basename,
 
19481
 *             osutils.file_kind_from_stat_mode(stat.st_mode), stat,
 
19482
 */
 
19483
  __pyx_k_tuple_66 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19484
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_66));
 
19485
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_65));
 
19486
  PyTuple_SET_ITEM(__pyx_k_tuple_66, 0, ((PyObject *)__pyx_kp_s_65));
 
19487
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_65));
 
19488
  __Pyx_INCREF(__pyx_int_1);
 
19489
  PyTuple_SET_ITEM(__pyx_k_tuple_66, 1, __pyx_int_1);
 
19490
  __Pyx_GIVEREF(__pyx_int_1);
 
19491
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_66));
 
19492
 
 
19493
  /* "bzrlib/_dirstate_helpers_pyx.pyx":2030
 
19494
 *                 unicode_path):
 
19495
 *                 self.root_dir_info = self.root_dir_info[:2] + \
 
19496
 *                     ('tree-reference',) + self.root_dir_info[3:]             # <<<<<<<<<<<<<<
 
19497
 *         return dir_info
 
19498
 */
 
19499
  __pyx_k_tuple_67 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19500
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_67));
 
19501
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_37));
 
19502
  PyTuple_SET_ITEM(__pyx_k_tuple_67, 0, ((PyObject *)__pyx_kp_s_37));
 
19503
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_37));
 
19504
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67));
 
19505
  __Pyx_RefNannyFinishContext();
 
19506
  return 0;
 
19507
  __pyx_L1_error:;
 
19508
  __Pyx_RefNannyFinishContext();
 
19509
  return -1;
 
19510
}
 
19511
 
 
19512
static int __Pyx_InitGlobals(void) {
 
19513
  #if PY_VERSION_HEX < 0x02040000
 
19514
  if (unlikely(__Pyx_Py23SetsImport() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19515
  #endif
 
19516
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
19517
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
19518
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
19519
  return 0;
 
19520
  __pyx_L1_error:;
 
19521
  return -1;
 
19522
}
 
19523
 
 
19524
#if PY_MAJOR_VERSION < 3
 
19525
PyMODINIT_FUNC init_dirstate_helpers_pyx(void); /*proto*/
 
19526
PyMODINIT_FUNC init_dirstate_helpers_pyx(void)
 
19527
#else
 
19528
PyMODINIT_FUNC PyInit__dirstate_helpers_pyx(void); /*proto*/
 
19529
PyMODINIT_FUNC PyInit__dirstate_helpers_pyx(void)
 
19530
#endif
 
19531
{
 
19532
  PyObject *__pyx_t_1 = NULL;
 
19533
  PyObject *__pyx_t_2 = NULL;
 
19534
  int __pyx_t_3;
 
19535
  #if CYTHON_REFNANNY
 
19536
  void* __pyx_refnanny = NULL;
 
19537
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
 
19538
  if (!__Pyx_RefNanny) {
 
19539
      PyErr_Clear();
 
19540
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
 
19541
      if (!__Pyx_RefNanny)
 
19542
          Py_FatalError("failed to import 'refnanny' module");
 
19543
  }
 
19544
  __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit__dirstate_helpers_pyx(void)", __LINE__, __FILE__);
 
19545
  #endif
 
19546
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19547
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19548
  #ifdef __pyx_binding_PyCFunctionType_USED
 
19549
  if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19550
  #endif
 
19551
  /*--- Library function declarations ---*/
 
19552
  /*--- Threads initialization code ---*/
 
19553
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
 
19554
  #ifdef WITH_THREAD /* Python build with threading support? */
 
19555
  PyEval_InitThreads();
 
19556
  #endif
 
19557
  #endif
 
19558
  /*--- Module creation code ---*/
 
19559
  #if PY_MAJOR_VERSION < 3
 
19560
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("_dirstate_helpers_pyx"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_68), 0, PYTHON_API_VERSION);
 
19561
  #else
 
19562
  __pyx_m = PyModule_Create(&__pyx_moduledef);
 
19563
  #endif
 
19564
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
19565
  #if PY_MAJOR_VERSION < 3
 
19566
  Py_INCREF(__pyx_m);
 
19567
  #endif
 
19568
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
 
19569
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
19570
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
19571
  /*--- Initialize various global constants etc. ---*/
 
19572
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19573
  if (__pyx_module_is_main_bzrlib___dirstate_helpers_pyx) {
 
19574
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
 
19575
  }
 
19576
  /*--- Builtin init code ---*/
 
19577
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19578
  /*--- Constants init code ---*/
 
19579
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19580
  /*--- Global init code ---*/
 
19581
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_absent = Py_None; Py_INCREF(Py_None);
 
19582
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_file = Py_None; Py_INCREF(Py_None);
 
19583
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_directory = Py_None; Py_INCREF(Py_None);
 
19584
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_symlink = Py_None; Py_INCREF(Py_None);
 
19585
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_relocated = Py_None; Py_INCREF(Py_None);
 
19586
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_tree_reference = Py_None; Py_INCREF(Py_None);
 
19587
  /*--- Function export code ---*/
 
19588
  /*--- Type init code ---*/
 
19589
  __pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_Reader = &__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_Reader;
 
19590
  __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_Reader.get_next = (char *(*)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *, int *))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader_get_next;
 
19591
  __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_Reader.get_next_str = (PyObject *(*)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader_get_next_str;
 
19592
  __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_Reader._init = (int (*)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader__init;
 
19593
  __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_Reader._get_entry = (PyObject *(*)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_Reader *, int, void **, int *))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_6Reader__get_entry;
 
19594
  if (PyType_Ready(&__pyx_type_6bzrlib_21_dirstate_helpers_pyx_Reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19595
  if (__Pyx_SetVtable(__pyx_type_6bzrlib_21_dirstate_helpers_pyx_Reader.tp_dict, __pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_Reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19596
  if (__Pyx_SetAttrString(__pyx_m, "Reader", (PyObject *)&__pyx_type_6bzrlib_21_dirstate_helpers_pyx_Reader) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19597
  __pyx_ptype_6bzrlib_21_dirstate_helpers_pyx_Reader = &__pyx_type_6bzrlib_21_dirstate_helpers_pyx_Reader;
 
19598
  __pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC = &__pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC;
 
19599
  __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._process_entry = (PyObject *(*)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *, PyObject *, PyObject *))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__process_entry;
 
19600
  __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._gather_result_for_consistency = (int (*)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *, PyObject *))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__gather_result_for_consistency;
 
19601
  __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._update_current_block = (int (*)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__update_current_block;
 
19602
  __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._iter_next = (PyObject *(*)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__iter_next;
 
19603
  __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._maybe_tree_ref = (PyObject *(*)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *, PyObject *))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__maybe_tree_ref;
 
19604
  __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._loop_one_block = (PyObject *(*)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__loop_one_block;
 
19605
  __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._next_consistent_entries = (PyObject *(*)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__next_consistent_entries;
 
19606
  __pyx_vtable_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC._path_info = (PyObject *(*)(struct __pyx_obj_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC *, PyObject *, PyObject *))__pyx_f_6bzrlib_21_dirstate_helpers_pyx_13ProcessEntryC__path_info;
 
19607
  if (PyType_Ready(&__pyx_type_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19608
  if (__Pyx_SetVtable(__pyx_type_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC.tp_dict, __pyx_vtabptr_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19609
  if (__Pyx_SetAttrString(__pyx_m, "ProcessEntryC", (PyObject *)&__pyx_type_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19610
  __pyx_ptype_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC = &__pyx_type_6bzrlib_21_dirstate_helpers_pyx_ProcessEntryC;
 
19611
  /*--- Type import code ---*/
 
19612
  __pyx_ptype_6bzrlib_15_static_tuple_c_StaticTuple = __Pyx_ImportType("bzrlib._static_tuple_c", "StaticTuple", sizeof(StaticTuple), 0); if (unlikely(!__pyx_ptype_6bzrlib_15_static_tuple_c_StaticTuple)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19613
  /*--- Function import code ---*/
 
19614
  /*--- Execution code ---*/
 
19615
 
 
19616
  /* "bzrlib/_dirstate_helpers_pyx.pyx":22
 
19617
 * """
 
19618
 * 
 
19619
 * import binascii             # <<<<<<<<<<<<<<
 
19620
 * import bisect
 
19621
 * import errno
 
19622
 */
 
19623
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__binascii), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19624
  __Pyx_GOTREF(__pyx_t_1);
 
19625
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__binascii, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19626
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19627
 
 
19628
  /* "bzrlib/_dirstate_helpers_pyx.pyx":23
 
19629
 * 
 
19630
 * import binascii
 
19631
 * import bisect             # <<<<<<<<<<<<<<
 
19632
 * import errno
 
19633
 * import os
 
19634
 */
 
19635
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__bisect), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19636
  __Pyx_GOTREF(__pyx_t_1);
 
19637
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__bisect, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19638
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19639
 
 
19640
  /* "bzrlib/_dirstate_helpers_pyx.pyx":24
 
19641
 * import binascii
 
19642
 * import bisect
 
19643
 * import errno             # <<<<<<<<<<<<<<
 
19644
 * import os
 
19645
 * import stat
 
19646
 */
 
19647
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__errno), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19648
  __Pyx_GOTREF(__pyx_t_1);
 
19649
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__errno, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19650
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19651
 
 
19652
  /* "bzrlib/_dirstate_helpers_pyx.pyx":25
 
19653
 * import bisect
 
19654
 * import errno
 
19655
 * import os             # <<<<<<<<<<<<<<
 
19656
 * import stat
 
19657
 * import sys
 
19658
 */
 
19659
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__os), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19660
  __Pyx_GOTREF(__pyx_t_1);
 
19661
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__os, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19662
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19663
 
 
19664
  /* "bzrlib/_dirstate_helpers_pyx.pyx":26
 
19665
 * import errno
 
19666
 * import os
 
19667
 * import stat             # <<<<<<<<<<<<<<
 
19668
 * import sys
 
19669
 * 
 
19670
 */
 
19671
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__stat), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19672
  __Pyx_GOTREF(__pyx_t_1);
 
19673
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__stat, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19674
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19675
 
 
19676
  /* "bzrlib/_dirstate_helpers_pyx.pyx":27
 
19677
 * import os
 
19678
 * import stat
 
19679
 * import sys             # <<<<<<<<<<<<<<
 
19680
 * 
 
19681
 * from bzrlib import cache_utf8, errors, osutils
 
19682
 */
 
19683
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19684
  __Pyx_GOTREF(__pyx_t_1);
 
19685
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19686
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19687
 
 
19688
  /* "bzrlib/_dirstate_helpers_pyx.pyx":29
 
19689
 * import sys
 
19690
 * 
 
19691
 * from bzrlib import cache_utf8, errors, osutils             # <<<<<<<<<<<<<<
 
19692
 * from bzrlib.dirstate import DirState
 
19693
 * from bzrlib.osutils import parent_directories, pathjoin, splitpath
 
19694
 */
 
19695
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19696
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
19697
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cache_utf8));
 
19698
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__cache_utf8));
 
19699
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cache_utf8));
 
19700
  __Pyx_INCREF(((PyObject *)__pyx_n_s__errors));
 
19701
  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__errors));
 
19702
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__errors));
 
19703
  __Pyx_INCREF(((PyObject *)__pyx_n_s__osutils));
 
19704
  PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_s__osutils));
 
19705
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__osutils));
 
19706
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__bzrlib), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19707
  __Pyx_GOTREF(__pyx_t_2);
 
19708
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
19709
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__cache_utf8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19710
  __Pyx_GOTREF(__pyx_t_1);
 
19711
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cache_utf8, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19712
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19713
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19714
  __Pyx_GOTREF(__pyx_t_1);
 
19715
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__errors, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19716
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19717
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__osutils); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19718
  __Pyx_GOTREF(__pyx_t_1);
 
19719
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__osutils, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19720
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19721
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
19722
 
 
19723
  /* "bzrlib/_dirstate_helpers_pyx.pyx":30
 
19724
 * 
 
19725
 * from bzrlib import cache_utf8, errors, osutils
 
19726
 * from bzrlib.dirstate import DirState             # <<<<<<<<<<<<<<
 
19727
 * from bzrlib.osutils import parent_directories, pathjoin, splitpath
 
19728
 * 
 
19729
 */
 
19730
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19731
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
 
19732
  __Pyx_INCREF(((PyObject *)__pyx_n_s__DirState));
 
19733
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__DirState));
 
19734
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__DirState));
 
19735
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s_69), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19736
  __Pyx_GOTREF(__pyx_t_1);
 
19737
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
 
19738
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__DirState); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19739
  __Pyx_GOTREF(__pyx_t_2);
 
19740
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__DirState, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19741
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
19742
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19743
 
 
19744
  /* "bzrlib/_dirstate_helpers_pyx.pyx":31
 
19745
 * from bzrlib import cache_utf8, errors, osutils
 
19746
 * from bzrlib.dirstate import DirState
 
19747
 * from bzrlib.osutils import parent_directories, pathjoin, splitpath             # <<<<<<<<<<<<<<
 
19748
 * 
 
19749
 * 
 
19750
 */
 
19751
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19752
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
19753
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parent_directories));
 
19754
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__parent_directories));
 
19755
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parent_directories));
 
19756
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pathjoin));
 
19757
  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__pathjoin));
 
19758
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pathjoin));
 
19759
  __Pyx_INCREF(((PyObject *)__pyx_n_s__splitpath));
 
19760
  PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_s__splitpath));
 
19761
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__splitpath));
 
19762
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_70), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19763
  __Pyx_GOTREF(__pyx_t_2);
 
19764
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
19765
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__parent_directories); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19766
  __Pyx_GOTREF(__pyx_t_1);
 
19767
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__parent_directories, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19768
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19769
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__pathjoin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19770
  __Pyx_GOTREF(__pyx_t_1);
 
19771
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pathjoin, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19772
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19773
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__splitpath); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19774
  __Pyx_GOTREF(__pyx_t_1);
 
19775
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__splitpath, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19776
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19777
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
19778
 
 
19779
  /* "bzrlib/_dirstate_helpers_pyx.pyx":39
 
19780
 * # XXX: Perhaps we could get it from a windows header ?
 
19781
 * cdef int ERROR_PATH_NOT_FOUND
 
19782
 * ERROR_PATH_NOT_FOUND = 3             # <<<<<<<<<<<<<<
 
19783
 * cdef int ERROR_DIRECTORY
 
19784
 * ERROR_DIRECTORY = 267
 
19785
 */
 
19786
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx_ERROR_PATH_NOT_FOUND = 3;
 
19787
 
 
19788
  /* "bzrlib/_dirstate_helpers_pyx.pyx":41
 
19789
 * ERROR_PATH_NOT_FOUND = 3
 
19790
 * cdef int ERROR_DIRECTORY
 
19791
 * ERROR_DIRECTORY = 267             # <<<<<<<<<<<<<<
 
19792
 * 
 
19793
 * #python2.4 support, and other platform-dependent includes
 
19794
 */
 
19795
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx_ERROR_DIRECTORY = 267;
 
19796
 
 
19797
  /* "bzrlib/_dirstate_helpers_pyx.pyx":126
 
19798
 *     StaticTuple_New, StaticTuple_SET_ITEM
 
19799
 * 
 
19800
 * import_static_tuple_c()             # <<<<<<<<<<<<<<
 
19801
 * 
 
19802
 * cdef void* _my_memrchr(void *s, int c, size_t n): # cannot_raise
 
19803
 */
 
19804
  __pyx_t_3 = import_static_tuple_c(); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19805
 
 
19806
  /* "bzrlib/_dirstate_helpers_pyx.pyx":142
 
19807
 * 
 
19808
 * 
 
19809
 * def _py_memrchr(s, c):             # <<<<<<<<<<<<<<
 
19810
 *     """Just to expose _my_memrchr for testing.
 
19811
 * 
 
19812
 */
 
19813
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6bzrlib_21_dirstate_helpers_pyx__py_memrchr, NULL, __pyx_n_s_71); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19814
  __Pyx_GOTREF(__pyx_t_2);
 
19815
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___py_memrchr, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19816
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
19817
 
 
19818
  /* "bzrlib/_dirstate_helpers_pyx.pyx":246
 
19819
 * 
 
19820
 * 
 
19821
 * def cmp_by_dirs(path1, path2):             # <<<<<<<<<<<<<<
 
19822
 *     """Compare two paths directory by directory.
 
19823
 * 
 
19824
 */
 
19825
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_1cmp_by_dirs, NULL, __pyx_n_s_71); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19826
  __Pyx_GOTREF(__pyx_t_2);
 
19827
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__cmp_by_dirs, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19828
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
19829
 
 
19830
  /* "bzrlib/_dirstate_helpers_pyx.pyx":275
 
19831
 * 
 
19832
 * 
 
19833
 * def _cmp_path_by_dirblock(path1, path2):             # <<<<<<<<<<<<<<
 
19834
 *     """Compare two paths based on what directory they are in.
 
19835
 * 
 
19836
 */
 
19837
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_2_cmp_path_by_dirblock, NULL, __pyx_n_s_71); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19838
  __Pyx_GOTREF(__pyx_t_2);
 
19839
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_72, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19840
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
19841
 
 
19842
  /* "bzrlib/_dirstate_helpers_pyx.pyx":377
 
19843
 * 
 
19844
 * 
 
19845
 * def _bisect_path_left(paths, path):             # <<<<<<<<<<<<<<
 
19846
 *     """Return the index where to insert path into paths.
 
19847
 * 
 
19848
 */
 
19849
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_3_bisect_path_left, NULL, __pyx_n_s_71); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19850
  __Pyx_GOTREF(__pyx_t_2);
 
19851
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___bisect_path_left, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19852
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
19853
 
 
19854
  /* "bzrlib/_dirstate_helpers_pyx.pyx":430
 
19855
 * 
 
19856
 * 
 
19857
 * def _bisect_path_right(paths, path):             # <<<<<<<<<<<<<<
 
19858
 *     """Return the index where to insert path into paths.
 
19859
 * 
 
19860
 */
 
19861
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_4_bisect_path_right, NULL, __pyx_n_s_71); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19862
  __Pyx_GOTREF(__pyx_t_2);
 
19863
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___bisect_path_right, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19864
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
19865
 
 
19866
  /* "bzrlib/_dirstate_helpers_pyx.pyx":483
 
19867
 * 
 
19868
 * 
 
19869
 * def bisect_dirblock(dirblocks, dirname, lo=0, hi=None, cache=None):             # <<<<<<<<<<<<<<
 
19870
 *     """Return the index where to insert dirname into the dirblocks.
 
19871
 * 
 
19872
 */
 
19873
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_5bisect_dirblock, NULL, __pyx_n_s_71); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19874
  __Pyx_GOTREF(__pyx_t_2);
 
19875
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__bisect_dirblock, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19876
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
19877
 
 
19878
  /* "bzrlib/_dirstate_helpers_pyx.pyx":779
 
19879
 * 
 
19880
 * 
 
19881
 * def _read_dirblocks(state):             # <<<<<<<<<<<<<<
 
19882
 *     """Read in the dirblocks for the given DirState object.
 
19883
 * 
 
19884
 */
 
19885
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_6_read_dirblocks, NULL, __pyx_n_s_71); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19886
  __Pyx_GOTREF(__pyx_t_2);
 
19887
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___read_dirblocks, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19888
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
19889
 
 
19890
  /* "bzrlib/_dirstate_helpers_pyx.pyx":812
 
19891
 * 
 
19892
 * 
 
19893
 * _encode = binascii.b2a_base64             # <<<<<<<<<<<<<<
 
19894
 * 
 
19895
 * 
 
19896
 */
 
19897
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__binascii); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19898
  __Pyx_GOTREF(__pyx_t_2);
 
19899
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__b2a_base64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19900
  __Pyx_GOTREF(__pyx_t_1);
 
19901
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
19902
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___encode, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19903
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19904
 
 
19905
  /* "bzrlib/_dirstate_helpers_pyx.pyx":835
 
19906
 * 
 
19907
 * 
 
19908
 * def pack_stat(stat_value):             # <<<<<<<<<<<<<<
 
19909
 *     """Convert stat value into a packed representation quickly with pyrex"""
 
19910
 *     return _pack_stat(stat_value)
 
19911
 */
 
19912
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_7pack_stat, NULL, __pyx_n_s_71); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19913
  __Pyx_GOTREF(__pyx_t_1);
 
19914
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pack_stat, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19915
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19916
 
 
19917
  /* "bzrlib/_dirstate_helpers_pyx.pyx":840
 
19918
 * 
 
19919
 * 
 
19920
 * def update_entry(self, entry, abspath, stat_value):             # <<<<<<<<<<<<<<
 
19921
 *     """Update the entry based on what is actually on disk.
 
19922
 * 
 
19923
 */
 
19924
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6bzrlib_21_dirstate_helpers_pyx_8update_entry, NULL, __pyx_n_s_71); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19925
  __Pyx_GOTREF(__pyx_t_1);
 
19926
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__update_entry, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
19927
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
19928
 
 
19929
  /* "bzrlib/_dirstate_helpers_pyx.pyx":985
 
19930
 * cdef object _kind_relocated
 
19931
 * cdef object _kind_tree_reference
 
19932
 * _kind_absent = "absent"             # <<<<<<<<<<<<<<
 
19933
 * _kind_file = "file"
 
19934
 * _kind_directory = "directory"
 
19935
 */
 
19936
  __Pyx_INCREF(((PyObject *)__pyx_n_s__absent));
 
19937
  __Pyx_GOTREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_absent);
 
19938
  __Pyx_DECREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_absent);
 
19939
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__absent));
 
19940
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_absent = ((PyObject *)__pyx_n_s__absent);
 
19941
 
 
19942
  /* "bzrlib/_dirstate_helpers_pyx.pyx":986
 
19943
 * cdef object _kind_tree_reference
 
19944
 * _kind_absent = "absent"
 
19945
 * _kind_file = "file"             # <<<<<<<<<<<<<<
 
19946
 * _kind_directory = "directory"
 
19947
 * _kind_symlink = "symlink"
 
19948
 */
 
19949
  __Pyx_INCREF(((PyObject *)__pyx_n_s__file));
 
19950
  __Pyx_GOTREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_file);
 
19951
  __Pyx_DECREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_file);
 
19952
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__file));
 
19953
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_file = ((PyObject *)__pyx_n_s__file);
 
19954
 
 
19955
  /* "bzrlib/_dirstate_helpers_pyx.pyx":987
 
19956
 * _kind_absent = "absent"
 
19957
 * _kind_file = "file"
 
19958
 * _kind_directory = "directory"             # <<<<<<<<<<<<<<
 
19959
 * _kind_symlink = "symlink"
 
19960
 * _kind_relocated = "relocated"
 
19961
 */
 
19962
  __Pyx_INCREF(((PyObject *)__pyx_n_s__directory));
 
19963
  __Pyx_GOTREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_directory);
 
19964
  __Pyx_DECREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_directory);
 
19965
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__directory));
 
19966
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_directory = ((PyObject *)__pyx_n_s__directory);
 
19967
 
 
19968
  /* "bzrlib/_dirstate_helpers_pyx.pyx":988
 
19969
 * _kind_file = "file"
 
19970
 * _kind_directory = "directory"
 
19971
 * _kind_symlink = "symlink"             # <<<<<<<<<<<<<<
 
19972
 * _kind_relocated = "relocated"
 
19973
 * _kind_tree_reference = "tree-reference"
 
19974
 */
 
19975
  __Pyx_INCREF(((PyObject *)__pyx_n_s__symlink));
 
19976
  __Pyx_GOTREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_symlink);
 
19977
  __Pyx_DECREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_symlink);
 
19978
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__symlink));
 
19979
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_symlink = ((PyObject *)__pyx_n_s__symlink);
 
19980
 
 
19981
  /* "bzrlib/_dirstate_helpers_pyx.pyx":989
 
19982
 * _kind_directory = "directory"
 
19983
 * _kind_symlink = "symlink"
 
19984
 * _kind_relocated = "relocated"             # <<<<<<<<<<<<<<
 
19985
 * _kind_tree_reference = "tree-reference"
 
19986
 * 
 
19987
 */
 
19988
  __Pyx_INCREF(((PyObject *)__pyx_n_s__relocated));
 
19989
  __Pyx_GOTREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_relocated);
 
19990
  __Pyx_DECREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_relocated);
 
19991
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__relocated));
 
19992
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_relocated = ((PyObject *)__pyx_n_s__relocated);
 
19993
 
 
19994
  /* "bzrlib/_dirstate_helpers_pyx.pyx":990
 
19995
 * _kind_symlink = "symlink"
 
19996
 * _kind_relocated = "relocated"
 
19997
 * _kind_tree_reference = "tree-reference"             # <<<<<<<<<<<<<<
 
19998
 * 
 
19999
 * 
 
20000
 */
 
20001
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_37));
 
20002
  __Pyx_GOTREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_tree_reference);
 
20003
  __Pyx_DECREF(__pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_tree_reference);
 
20004
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_37));
 
20005
  __pyx_v_6bzrlib_21_dirstate_helpers_pyx__kind_tree_reference = ((PyObject *)__pyx_kp_s_37);
 
20006
 
 
20007
  /* "bzrlib/_dirstate_helpers_pyx.pyx":1
 
20008
 * # Copyright (C) 2007-2010 Canonical Ltd             # <<<<<<<<<<<<<<
 
20009
 * #
 
20010
 * # This program is free software; you can redistribute it and/or modify
 
20011
 */
 
20012
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
20013
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
 
20014
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
 
20015
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
20016
  goto __pyx_L0;
 
20017
  __pyx_L1_error:;
 
20018
  __Pyx_XDECREF(__pyx_t_1);
 
20019
  __Pyx_XDECREF(__pyx_t_2);
 
20020
  if (__pyx_m) {
 
20021
    __Pyx_AddTraceback("init bzrlib._dirstate_helpers_pyx");
 
20022
    Py_DECREF(__pyx_m); __pyx_m = 0;
 
20023
  } else if (!PyErr_Occurred()) {
 
20024
    PyErr_SetString(PyExc_ImportError, "init bzrlib._dirstate_helpers_pyx");
 
20025
  }
 
20026
  __pyx_L0:;
 
20027
  __Pyx_RefNannyFinishContext();
 
20028
  #if PY_MAJOR_VERSION < 3
 
20029
  return;
 
20030
  #else
 
20031
  return __pyx_m;
 
20032
  #endif
 
20033
}
 
20034
 
 
20035
/* Runtime support code */
 
20036
 
 
20037
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
 
20038
    PyObject *result;
 
20039
    result = PyObject_GetAttr(dict, name);
 
20040
    if (!result)
 
20041
        PyErr_SetObject(PyExc_NameError, name);
 
20042
    return result;
 
20043
}
 
20044
 
 
20045
static void __Pyx_RaiseArgtupleInvalid(
 
20046
    const char* func_name,
 
20047
    int exact,
 
20048
    Py_ssize_t num_min,
 
20049
    Py_ssize_t num_max,
 
20050
    Py_ssize_t num_found)
 
20051
{
 
20052
    Py_ssize_t num_expected;
 
20053
    const char *number, *more_or_less;
 
20054
 
 
20055
    if (num_found < num_min) {
 
20056
        num_expected = num_min;
 
20057
        more_or_less = "at least";
 
20058
    } else {
 
20059
        num_expected = num_max;
 
20060
        more_or_less = "at most";
 
20061
    }
 
20062
    if (exact) {
 
20063
        more_or_less = "exactly";
 
20064
    }
 
20065
    number = (num_expected == 1) ? "" : "s";
 
20066
    PyErr_Format(PyExc_TypeError,
 
20067
        #if PY_VERSION_HEX < 0x02050000
 
20068
            "%s() takes %s %d positional argument%s (%d given)",
 
20069
        #else
 
20070
            "%s() takes %s %zd positional argument%s (%zd given)",
 
20071
        #endif
 
20072
        func_name, more_or_less, num_expected, number, num_found);
 
20073
}
 
20074
 
 
20075
static void __Pyx_RaiseDoubleKeywordsError(
 
20076
    const char* func_name,
 
20077
    PyObject* kw_name)
 
20078
{
 
20079
    PyErr_Format(PyExc_TypeError,
 
20080
        #if PY_MAJOR_VERSION >= 3
 
20081
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
 
20082
        #else
 
20083
        "%s() got multiple values for keyword argument '%s'", func_name,
 
20084
        PyString_AS_STRING(kw_name));
 
20085
        #endif
 
20086
}
 
20087
 
 
20088
static int __Pyx_ParseOptionalKeywords(
 
20089
    PyObject *kwds,
 
20090
    PyObject **argnames[],
 
20091
    PyObject *kwds2,
 
20092
    PyObject *values[],
 
20093
    Py_ssize_t num_pos_args,
 
20094
    const char* function_name)
 
20095
{
 
20096
    PyObject *key = 0, *value = 0;
 
20097
    Py_ssize_t pos = 0;
 
20098
    PyObject*** name;
 
20099
    PyObject*** first_kw_arg = argnames + num_pos_args;
 
20100
 
 
20101
    while (PyDict_Next(kwds, &pos, &key, &value)) {
 
20102
        name = first_kw_arg;
 
20103
        while (*name && (**name != key)) name++;
 
20104
        if (*name) {
 
20105
            values[name-argnames] = value;
 
20106
        } else {
 
20107
            #if PY_MAJOR_VERSION < 3
 
20108
            if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
 
20109
            #else
 
20110
            if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
 
20111
            #endif
 
20112
                goto invalid_keyword_type;
 
20113
            } else {
 
20114
                for (name = first_kw_arg; *name; name++) {
 
20115
                    #if PY_MAJOR_VERSION >= 3
 
20116
                    if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
 
20117
                        PyUnicode_Compare(**name, key) == 0) break;
 
20118
                    #else
 
20119
                    if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
 
20120
                        _PyString_Eq(**name, key)) break;
 
20121
                    #endif
 
20122
                }
 
20123
                if (*name) {
 
20124
                    values[name-argnames] = value;
 
20125
                } else {
 
20126
                    /* unexpected keyword found */
 
20127
                    for (name=argnames; name != first_kw_arg; name++) {
 
20128
                        if (**name == key) goto arg_passed_twice;
 
20129
                        #if PY_MAJOR_VERSION >= 3
 
20130
                        if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
 
20131
                            PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
 
20132
                        #else
 
20133
                        if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
 
20134
                            _PyString_Eq(**name, key)) goto arg_passed_twice;
 
20135
                        #endif
 
20136
                    }
 
20137
                    if (kwds2) {
 
20138
                        if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
 
20139
                    } else {
 
20140
                        goto invalid_keyword;
 
20141
                    }
 
20142
                }
 
20143
            }
 
20144
        }
 
20145
    }
 
20146
    return 0;
 
20147
arg_passed_twice:
 
20148
    __Pyx_RaiseDoubleKeywordsError(function_name, **name);
 
20149
    goto bad;
 
20150
invalid_keyword_type:
 
20151
    PyErr_Format(PyExc_TypeError,
 
20152
        "%s() keywords must be strings", function_name);
 
20153
    goto bad;
 
20154
invalid_keyword:
 
20155
    PyErr_Format(PyExc_TypeError,
 
20156
    #if PY_MAJOR_VERSION < 3
 
20157
        "%s() got an unexpected keyword argument '%s'",
 
20158
        function_name, PyString_AsString(key));
 
20159
    #else
 
20160
        "%s() got an unexpected keyword argument '%U'",
 
20161
        function_name, key);
 
20162
    #endif
 
20163
bad:
 
20164
    return -1;
 
20165
}
 
20166
 
 
20167
static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
 
20168
    PyObject *tmp_type, *tmp_value, *tmp_tb;
 
20169
    PyThreadState *tstate = PyThreadState_GET();
 
20170
 
 
20171
    tmp_type = tstate->curexc_type;
 
20172
    tmp_value = tstate->curexc_value;
 
20173
    tmp_tb = tstate->curexc_traceback;
 
20174
    tstate->curexc_type = type;
 
20175
    tstate->curexc_value = value;
 
20176
    tstate->curexc_traceback = tb;
 
20177
    Py_XDECREF(tmp_type);
 
20178
    Py_XDECREF(tmp_value);
 
20179
    Py_XDECREF(tmp_tb);
 
20180
}
 
20181
 
 
20182
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
 
20183
    PyThreadState *tstate = PyThreadState_GET();
 
20184
    *type = tstate->curexc_type;
 
20185
    *value = tstate->curexc_value;
 
20186
    *tb = tstate->curexc_traceback;
 
20187
 
 
20188
    tstate->curexc_type = 0;
 
20189
    tstate->curexc_value = 0;
 
20190
    tstate->curexc_traceback = 0;
 
20191
}
 
20192
 
 
20193
 
 
20194
#if PY_MAJOR_VERSION < 3
 
20195
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
 
20196
    Py_XINCREF(type);
 
20197
    Py_XINCREF(value);
 
20198
    Py_XINCREF(tb);
 
20199
    /* First, check the traceback argument, replacing None with NULL. */
 
20200
    if (tb == Py_None) {
 
20201
        Py_DECREF(tb);
 
20202
        tb = 0;
 
20203
    }
 
20204
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
 
20205
        PyErr_SetString(PyExc_TypeError,
 
20206
            "raise: arg 3 must be a traceback or None");
 
20207
        goto raise_error;
 
20208
    }
 
20209
    /* Next, replace a missing value with None */
 
20210
    if (value == NULL) {
 
20211
        value = Py_None;
 
20212
        Py_INCREF(value);
 
20213
    }
 
20214
    #if PY_VERSION_HEX < 0x02050000
 
20215
    if (!PyClass_Check(type))
 
20216
    #else
 
20217
    if (!PyType_Check(type))
 
20218
    #endif
 
20219
    {
 
20220
        /* Raising an instance.  The value should be a dummy. */
 
20221
        if (value != Py_None) {
 
20222
            PyErr_SetString(PyExc_TypeError,
 
20223
                "instance exception may not have a separate value");
 
20224
            goto raise_error;
 
20225
        }
 
20226
        /* Normalize to raise <class>, <instance> */
 
20227
        Py_DECREF(value);
 
20228
        value = type;
 
20229
        #if PY_VERSION_HEX < 0x02050000
 
20230
            if (PyInstance_Check(type)) {
 
20231
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
 
20232
                Py_INCREF(type);
 
20233
            }
 
20234
            else {
 
20235
                type = 0;
 
20236
                PyErr_SetString(PyExc_TypeError,
 
20237
                    "raise: exception must be an old-style class or instance");
 
20238
                goto raise_error;
 
20239
            }
 
20240
        #else
 
20241
            type = (PyObject*) Py_TYPE(type);
 
20242
            Py_INCREF(type);
 
20243
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
 
20244
                PyErr_SetString(PyExc_TypeError,
 
20245
                    "raise: exception class must be a subclass of BaseException");
 
20246
                goto raise_error;
 
20247
            }
 
20248
        #endif
 
20249
    }
 
20250
 
 
20251
    __Pyx_ErrRestore(type, value, tb);
 
20252
    return;
 
20253
raise_error:
 
20254
    Py_XDECREF(value);
 
20255
    Py_XDECREF(type);
 
20256
    Py_XDECREF(tb);
 
20257
    return;
 
20258
}
 
20259
 
 
20260
#else /* Python 3+ */
 
20261
 
 
20262
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
 
20263
    if (tb == Py_None) {
 
20264
        tb = 0;
 
20265
    } else if (tb && !PyTraceBack_Check(tb)) {
 
20266
        PyErr_SetString(PyExc_TypeError,
 
20267
            "raise: arg 3 must be a traceback or None");
 
20268
        goto bad;
 
20269
    }
 
20270
    if (value == Py_None)
 
20271
        value = 0;
 
20272
 
 
20273
    if (PyExceptionInstance_Check(type)) {
 
20274
        if (value) {
 
20275
            PyErr_SetString(PyExc_TypeError,
 
20276
                "instance exception may not have a separate value");
 
20277
            goto bad;
 
20278
        }
 
20279
        value = type;
 
20280
        type = (PyObject*) Py_TYPE(value);
 
20281
    } else if (!PyExceptionClass_Check(type)) {
 
20282
        PyErr_SetString(PyExc_TypeError,
 
20283
            "raise: exception class must be a subclass of BaseException");
 
20284
        goto bad;
 
20285
    }
 
20286
 
 
20287
    PyErr_SetObject(type, value);
 
20288
 
 
20289
    if (tb) {
 
20290
        PyThreadState *tstate = PyThreadState_GET();
 
20291
        PyObject* tmp_tb = tstate->curexc_traceback;
 
20292
        if (tb != tmp_tb) {
 
20293
            Py_INCREF(tb);
 
20294
            tstate->curexc_traceback = tb;
 
20295
            Py_XDECREF(tmp_tb);
 
20296
        }
 
20297
    }
 
20298
 
 
20299
bad:
 
20300
    return;
 
20301
}
 
20302
#endif
 
20303
 
 
20304
static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
 
20305
    long q = a / b;
 
20306
    long r = a - q*b;
 
20307
    q -= ((r != 0) & ((r ^ b) < 0));
 
20308
    return q;
 
20309
}
 
20310
 
 
20311
 
 
20312
 
 
20313
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
 
20314
    PyErr_Format(PyExc_ValueError,
 
20315
        #if PY_VERSION_HEX < 0x02050000
 
20316
                 "need more than %d value%s to unpack", (int)index,
 
20317
        #else
 
20318
                 "need more than %zd value%s to unpack", index,
 
20319
        #endif
 
20320
                 (index == 1) ? "" : "s");
 
20321
}
 
20322
 
 
20323
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
 
20324
    PyErr_Format(PyExc_ValueError,
 
20325
        #if PY_VERSION_HEX < 0x02050000
 
20326
            "too many values to unpack (expected %d)", (int)expected);
 
20327
        #else
 
20328
            "too many values to unpack (expected %zd)", expected);
 
20329
        #endif
 
20330
}
 
20331
 
 
20332
static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
 
20333
    PyObject *item;
 
20334
    if (!(item = PyIter_Next(iter))) {
 
20335
        if (!PyErr_Occurred()) {
 
20336
            __Pyx_RaiseNeedMoreValuesError(index);
 
20337
        }
 
20338
    }
 
20339
    return item;
 
20340
}
 
20341
 
 
20342
static int __Pyx_EndUnpack(PyObject *iter, Py_ssize_t expected) {
 
20343
    PyObject *item;
 
20344
    if ((item = PyIter_Next(iter))) {
 
20345
        Py_DECREF(item);
 
20346
        __Pyx_RaiseTooManyValuesError(expected);
 
20347
        return -1;
 
20348
    }
 
20349
    else if (!PyErr_Occurred())
 
20350
        return 0;
 
20351
    else
 
20352
        return -1;
 
20353
}
 
20354
 
 
20355
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
 
20356
    PyObject *local_type, *local_value, *local_tb;
 
20357
    PyObject *tmp_type, *tmp_value, *tmp_tb;
 
20358
    PyThreadState *tstate = PyThreadState_GET();
 
20359
    local_type = tstate->curexc_type;
 
20360
    local_value = tstate->curexc_value;
 
20361
    local_tb = tstate->curexc_traceback;
 
20362
    tstate->curexc_type = 0;
 
20363
    tstate->curexc_value = 0;
 
20364
    tstate->curexc_traceback = 0;
 
20365
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
 
20366
    if (unlikely(tstate->curexc_type))
 
20367
        goto bad;
 
20368
    #if PY_MAJOR_VERSION >= 3
 
20369
    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
 
20370
        goto bad;
 
20371
    #endif
 
20372
    *type = local_type;
 
20373
    *value = local_value;
 
20374
    *tb = local_tb;
 
20375
    Py_INCREF(local_type);
 
20376
    Py_INCREF(local_value);
 
20377
    Py_INCREF(local_tb);
 
20378
    tmp_type = tstate->exc_type;
 
20379
    tmp_value = tstate->exc_value;
 
20380
    tmp_tb = tstate->exc_traceback;
 
20381
    tstate->exc_type = local_type;
 
20382
    tstate->exc_value = local_value;
 
20383
    tstate->exc_traceback = local_tb;
 
20384
    /* Make sure tstate is in a consistent state when we XDECREF
 
20385
       these objects (XDECREF may run arbitrary code). */
 
20386
    Py_XDECREF(tmp_type);
 
20387
    Py_XDECREF(tmp_value);
 
20388
    Py_XDECREF(tmp_tb);
 
20389
    return 0;
 
20390
bad:
 
20391
    *type = 0;
 
20392
    *value = 0;
 
20393
    *tb = 0;
 
20394
    Py_XDECREF(local_type);
 
20395
    Py_XDECREF(local_value);
 
20396
    Py_XDECREF(local_tb);
 
20397
    return -1;
 
20398
}
 
20399
 
 
20400
 
 
20401
 
 
20402
static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
 
20403
    PyThreadState *tstate = PyThreadState_GET();
 
20404
    *type = tstate->exc_type;
 
20405
    *value = tstate->exc_value;
 
20406
    *tb = tstate->exc_traceback;
 
20407
    Py_XINCREF(*type);
 
20408
    Py_XINCREF(*value);
 
20409
    Py_XINCREF(*tb);
 
20410
}
 
20411
 
 
20412
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
 
20413
    PyObject *tmp_type, *tmp_value, *tmp_tb;
 
20414
    PyThreadState *tstate = PyThreadState_GET();
 
20415
    tmp_type = tstate->exc_type;
 
20416
    tmp_value = tstate->exc_value;
 
20417
    tmp_tb = tstate->exc_traceback;
 
20418
    tstate->exc_type = type;
 
20419
    tstate->exc_value = value;
 
20420
    tstate->exc_traceback = tb;
 
20421
    Py_XDECREF(tmp_type);
 
20422
    Py_XDECREF(tmp_value);
 
20423
    Py_XDECREF(tmp_tb);
 
20424
}
 
20425
 
 
20426
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
 
20427
    PyObject *py_import = 0;
 
20428
    PyObject *empty_list = 0;
 
20429
    PyObject *module = 0;
 
20430
    PyObject *global_dict = 0;
 
20431
    PyObject *empty_dict = 0;
 
20432
    PyObject *list;
 
20433
    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
 
20434
    if (!py_import)
 
20435
        goto bad;
 
20436
    if (from_list)
 
20437
        list = from_list;
 
20438
    else {
 
20439
        empty_list = PyList_New(0);
 
20440
        if (!empty_list)
 
20441
            goto bad;
 
20442
        list = empty_list;
 
20443
    }
 
20444
    global_dict = PyModule_GetDict(__pyx_m);
 
20445
    if (!global_dict)
 
20446
        goto bad;
 
20447
    empty_dict = PyDict_New();
 
20448
    if (!empty_dict)
 
20449
        goto bad;
 
20450
    module = PyObject_CallFunctionObjArgs(py_import,
 
20451
        name, global_dict, empty_dict, list, NULL);
 
20452
bad:
 
20453
    Py_XDECREF(empty_list);
 
20454
    Py_XDECREF(py_import);
 
20455
    Py_XDECREF(empty_dict);
 
20456
    return module;
 
20457
}
 
20458
 
 
20459
static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
 
20460
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
 
20461
    const int is_unsigned = neg_one > const_zero;
 
20462
    if (sizeof(unsigned char) < sizeof(long)) {
 
20463
        long val = __Pyx_PyInt_AsLong(x);
 
20464
        if (unlikely(val != (long)(unsigned char)val)) {
 
20465
            if (!unlikely(val == -1 && PyErr_Occurred())) {
 
20466
                PyErr_SetString(PyExc_OverflowError,
 
20467
                    (is_unsigned && unlikely(val < 0)) ?
 
20468
                    "can't convert negative value to unsigned char" :
 
20469
                    "value too large to convert to unsigned char");
 
20470
            }
 
20471
            return (unsigned char)-1;
 
20472
        }
 
20473
        return (unsigned char)val;
 
20474
    }
 
20475
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
 
20476
}
 
20477
 
 
20478
static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
 
20479
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
 
20480
    const int is_unsigned = neg_one > const_zero;
 
20481
    if (sizeof(unsigned short) < sizeof(long)) {
 
20482
        long val = __Pyx_PyInt_AsLong(x);
 
20483
        if (unlikely(val != (long)(unsigned short)val)) {
 
20484
            if (!unlikely(val == -1 && PyErr_Occurred())) {
 
20485
                PyErr_SetString(PyExc_OverflowError,
 
20486
                    (is_unsigned && unlikely(val < 0)) ?
 
20487
                    "can't convert negative value to unsigned short" :
 
20488
                    "value too large to convert to unsigned short");
 
20489
            }
 
20490
            return (unsigned short)-1;
 
20491
        }
 
20492
        return (unsigned short)val;
 
20493
    }
 
20494
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
 
20495
}
 
20496
 
 
20497
static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
 
20498
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
 
20499
    const int is_unsigned = neg_one > const_zero;
 
20500
    if (sizeof(unsigned int) < sizeof(long)) {
 
20501
        long val = __Pyx_PyInt_AsLong(x);
 
20502
        if (unlikely(val != (long)(unsigned int)val)) {
 
20503
            if (!unlikely(val == -1 && PyErr_Occurred())) {
 
20504
                PyErr_SetString(PyExc_OverflowError,
 
20505
                    (is_unsigned && unlikely(val < 0)) ?
 
20506
                    "can't convert negative value to unsigned int" :
 
20507
                    "value too large to convert to unsigned int");
 
20508
            }
 
20509
            return (unsigned int)-1;
 
20510
        }
 
20511
        return (unsigned int)val;
 
20512
    }
 
20513
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
 
20514
}
 
20515
 
 
20516
static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
 
20517
    const char neg_one = (char)-1, const_zero = 0;
 
20518
    const int is_unsigned = neg_one > const_zero;
 
20519
    if (sizeof(char) < sizeof(long)) {
 
20520
        long val = __Pyx_PyInt_AsLong(x);
 
20521
        if (unlikely(val != (long)(char)val)) {
 
20522
            if (!unlikely(val == -1 && PyErr_Occurred())) {
 
20523
                PyErr_SetString(PyExc_OverflowError,
 
20524
                    (is_unsigned && unlikely(val < 0)) ?
 
20525
                    "can't convert negative value to char" :
 
20526
                    "value too large to convert to char");
 
20527
            }
 
20528
            return (char)-1;
 
20529
        }
 
20530
        return (char)val;
 
20531
    }
 
20532
    return (char)__Pyx_PyInt_AsLong(x);
 
20533
}
 
20534
 
 
20535
static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
 
20536
    const short neg_one = (short)-1, const_zero = 0;
 
20537
    const int is_unsigned = neg_one > const_zero;
 
20538
    if (sizeof(short) < sizeof(long)) {
 
20539
        long val = __Pyx_PyInt_AsLong(x);
 
20540
        if (unlikely(val != (long)(short)val)) {
 
20541
            if (!unlikely(val == -1 && PyErr_Occurred())) {
 
20542
                PyErr_SetString(PyExc_OverflowError,
 
20543
                    (is_unsigned && unlikely(val < 0)) ?
 
20544
                    "can't convert negative value to short" :
 
20545
                    "value too large to convert to short");
 
20546
            }
 
20547
            return (short)-1;
 
20548
        }
 
20549
        return (short)val;
 
20550
    }
 
20551
    return (short)__Pyx_PyInt_AsLong(x);
 
20552
}
 
20553
 
 
20554
static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
 
20555
    const int neg_one = (int)-1, const_zero = 0;
 
20556
    const int is_unsigned = neg_one > const_zero;
 
20557
    if (sizeof(int) < sizeof(long)) {
 
20558
        long val = __Pyx_PyInt_AsLong(x);
 
20559
        if (unlikely(val != (long)(int)val)) {
 
20560
            if (!unlikely(val == -1 && PyErr_Occurred())) {
 
20561
                PyErr_SetString(PyExc_OverflowError,
 
20562
                    (is_unsigned && unlikely(val < 0)) ?
 
20563
                    "can't convert negative value to int" :
 
20564
                    "value too large to convert to int");
 
20565
            }
 
20566
            return (int)-1;
 
20567
        }
 
20568
        return (int)val;
 
20569
    }
 
20570
    return (int)__Pyx_PyInt_AsLong(x);
 
20571
}
 
20572
 
 
20573
static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
 
20574
    const signed char neg_one = (signed char)-1, const_zero = 0;
 
20575
    const int is_unsigned = neg_one > const_zero;
 
20576
    if (sizeof(signed char) < sizeof(long)) {
 
20577
        long val = __Pyx_PyInt_AsLong(x);
 
20578
        if (unlikely(val != (long)(signed char)val)) {
 
20579
            if (!unlikely(val == -1 && PyErr_Occurred())) {
 
20580
                PyErr_SetString(PyExc_OverflowError,
 
20581
                    (is_unsigned && unlikely(val < 0)) ?
 
20582
                    "can't convert negative value to signed char" :
 
20583
                    "value too large to convert to signed char");
 
20584
            }
 
20585
            return (signed char)-1;
 
20586
        }
 
20587
        return (signed char)val;
 
20588
    }
 
20589
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
 
20590
}
 
20591
 
 
20592
static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
 
20593
    const signed short neg_one = (signed short)-1, const_zero = 0;
 
20594
    const int is_unsigned = neg_one > const_zero;
 
20595
    if (sizeof(signed short) < sizeof(long)) {
 
20596
        long val = __Pyx_PyInt_AsLong(x);
 
20597
        if (unlikely(val != (long)(signed short)val)) {
 
20598
            if (!unlikely(val == -1 && PyErr_Occurred())) {
 
20599
                PyErr_SetString(PyExc_OverflowError,
 
20600
                    (is_unsigned && unlikely(val < 0)) ?
 
20601
                    "can't convert negative value to signed short" :
 
20602
                    "value too large to convert to signed short");
 
20603
            }
 
20604
            return (signed short)-1;
 
20605
        }
 
20606
        return (signed short)val;
 
20607
    }
 
20608
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
 
20609
}
 
20610
 
 
20611
static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
 
20612
    const signed int neg_one = (signed int)-1, const_zero = 0;
 
20613
    const int is_unsigned = neg_one > const_zero;
 
20614
    if (sizeof(signed int) < sizeof(long)) {
 
20615
        long val = __Pyx_PyInt_AsLong(x);
 
20616
        if (unlikely(val != (long)(signed int)val)) {
 
20617
            if (!unlikely(val == -1 && PyErr_Occurred())) {
 
20618
                PyErr_SetString(PyExc_OverflowError,
 
20619
                    (is_unsigned && unlikely(val < 0)) ?
 
20620
                    "can't convert negative value to signed int" :
 
20621
                    "value too large to convert to signed int");
 
20622
            }
 
20623
            return (signed int)-1;
 
20624
        }
 
20625
        return (signed int)val;
 
20626
    }
 
20627
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
 
20628
}
 
20629
 
 
20630
static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
 
20631
    const int neg_one = (int)-1, const_zero = 0;
 
20632
    const int is_unsigned = neg_one > const_zero;
 
20633
    if (sizeof(int) < sizeof(long)) {
 
20634
        long val = __Pyx_PyInt_AsLong(x);
 
20635
        if (unlikely(val != (long)(int)val)) {
 
20636
            if (!unlikely(val == -1 && PyErr_Occurred())) {
 
20637
                PyErr_SetString(PyExc_OverflowError,
 
20638
                    (is_unsigned && unlikely(val < 0)) ?
 
20639
                    "can't convert negative value to int" :
 
20640
                    "value too large to convert to int");
 
20641
            }
 
20642
            return (int)-1;
 
20643
        }
 
20644
        return (int)val;
 
20645
    }
 
20646
    return (int)__Pyx_PyInt_AsLong(x);
 
20647
}
 
20648
 
 
20649
static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
 
20650
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
 
20651
    const int is_unsigned = neg_one > const_zero;
 
20652
#if PY_VERSION_HEX < 0x03000000
 
20653
    if (likely(PyInt_Check(x))) {
 
20654
        long val = PyInt_AS_LONG(x);
 
20655
        if (is_unsigned && unlikely(val < 0)) {
 
20656
            PyErr_SetString(PyExc_OverflowError,
 
20657
                            "can't convert negative value to unsigned long");
 
20658
            return (unsigned long)-1;
 
20659
        }
 
20660
        return (unsigned long)val;
 
20661
    } else
 
20662
#endif
 
20663
    if (likely(PyLong_Check(x))) {
 
20664
        if (is_unsigned) {
 
20665
            if (unlikely(Py_SIZE(x) < 0)) {
 
20666
                PyErr_SetString(PyExc_OverflowError,
 
20667
                                "can't convert negative value to unsigned long");
 
20668
                return (unsigned long)-1;
 
20669
            }
 
20670
            return PyLong_AsUnsignedLong(x);
 
20671
        } else {
 
20672
            return PyLong_AsLong(x);
 
20673
        }
 
20674
    } else {
 
20675
        unsigned long val;
 
20676
        PyObject *tmp = __Pyx_PyNumber_Int(x);
 
20677
        if (!tmp) return (unsigned long)-1;
 
20678
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
 
20679
        Py_DECREF(tmp);
 
20680
        return val;
 
20681
    }
 
20682
}
 
20683
 
 
20684
static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
 
20685
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
 
20686
    const int is_unsigned = neg_one > const_zero;
 
20687
#if PY_VERSION_HEX < 0x03000000
 
20688
    if (likely(PyInt_Check(x))) {
 
20689
        long val = PyInt_AS_LONG(x);
 
20690
        if (is_unsigned && unlikely(val < 0)) {
 
20691
            PyErr_SetString(PyExc_OverflowError,
 
20692
                            "can't convert negative value to unsigned PY_LONG_LONG");
 
20693
            return (unsigned PY_LONG_LONG)-1;
 
20694
        }
 
20695
        return (unsigned PY_LONG_LONG)val;
 
20696
    } else
 
20697
#endif
 
20698
    if (likely(PyLong_Check(x))) {
 
20699
        if (is_unsigned) {
 
20700
            if (unlikely(Py_SIZE(x) < 0)) {
 
20701
                PyErr_SetString(PyExc_OverflowError,
 
20702
                                "can't convert negative value to unsigned PY_LONG_LONG");
 
20703
                return (unsigned PY_LONG_LONG)-1;
 
20704
            }
 
20705
            return PyLong_AsUnsignedLongLong(x);
 
20706
        } else {
 
20707
            return PyLong_AsLongLong(x);
 
20708
        }
 
20709
    } else {
 
20710
        unsigned PY_LONG_LONG val;
 
20711
        PyObject *tmp = __Pyx_PyNumber_Int(x);
 
20712
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
 
20713
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
 
20714
        Py_DECREF(tmp);
 
20715
        return val;
 
20716
    }
 
20717
}
 
20718
 
 
20719
static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
 
20720
    const long neg_one = (long)-1, const_zero = 0;
 
20721
    const int is_unsigned = neg_one > const_zero;
 
20722
#if PY_VERSION_HEX < 0x03000000
 
20723
    if (likely(PyInt_Check(x))) {
 
20724
        long val = PyInt_AS_LONG(x);
 
20725
        if (is_unsigned && unlikely(val < 0)) {
 
20726
            PyErr_SetString(PyExc_OverflowError,
 
20727
                            "can't convert negative value to long");
 
20728
            return (long)-1;
 
20729
        }
 
20730
        return (long)val;
 
20731
    } else
 
20732
#endif
 
20733
    if (likely(PyLong_Check(x))) {
 
20734
        if (is_unsigned) {
 
20735
            if (unlikely(Py_SIZE(x) < 0)) {
 
20736
                PyErr_SetString(PyExc_OverflowError,
 
20737
                                "can't convert negative value to long");
 
20738
                return (long)-1;
 
20739
            }
 
20740
            return PyLong_AsUnsignedLong(x);
 
20741
        } else {
 
20742
            return PyLong_AsLong(x);
 
20743
        }
 
20744
    } else {
 
20745
        long val;
 
20746
        PyObject *tmp = __Pyx_PyNumber_Int(x);
 
20747
        if (!tmp) return (long)-1;
 
20748
        val = __Pyx_PyInt_AsLong(tmp);
 
20749
        Py_DECREF(tmp);
 
20750
        return val;
 
20751
    }
 
20752
}
 
20753
 
 
20754
static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
 
20755
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
 
20756
    const int is_unsigned = neg_one > const_zero;
 
20757
#if PY_VERSION_HEX < 0x03000000
 
20758
    if (likely(PyInt_Check(x))) {
 
20759
        long val = PyInt_AS_LONG(x);
 
20760
        if (is_unsigned && unlikely(val < 0)) {
 
20761
            PyErr_SetString(PyExc_OverflowError,
 
20762
                            "can't convert negative value to PY_LONG_LONG");
 
20763
            return (PY_LONG_LONG)-1;
 
20764
        }
 
20765
        return (PY_LONG_LONG)val;
 
20766
    } else
 
20767
#endif
 
20768
    if (likely(PyLong_Check(x))) {
 
20769
        if (is_unsigned) {
 
20770
            if (unlikely(Py_SIZE(x) < 0)) {
 
20771
                PyErr_SetString(PyExc_OverflowError,
 
20772
                                "can't convert negative value to PY_LONG_LONG");
 
20773
                return (PY_LONG_LONG)-1;
 
20774
            }
 
20775
            return PyLong_AsUnsignedLongLong(x);
 
20776
        } else {
 
20777
            return PyLong_AsLongLong(x);
 
20778
        }
 
20779
    } else {
 
20780
        PY_LONG_LONG val;
 
20781
        PyObject *tmp = __Pyx_PyNumber_Int(x);
 
20782
        if (!tmp) return (PY_LONG_LONG)-1;
 
20783
        val = __Pyx_PyInt_AsLongLong(tmp);
 
20784
        Py_DECREF(tmp);
 
20785
        return val;
 
20786
    }
 
20787
}
 
20788
 
 
20789
static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
 
20790
    const signed long neg_one = (signed long)-1, const_zero = 0;
 
20791
    const int is_unsigned = neg_one > const_zero;
 
20792
#if PY_VERSION_HEX < 0x03000000
 
20793
    if (likely(PyInt_Check(x))) {
 
20794
        long val = PyInt_AS_LONG(x);
 
20795
        if (is_unsigned && unlikely(val < 0)) {
 
20796
            PyErr_SetString(PyExc_OverflowError,
 
20797
                            "can't convert negative value to signed long");
 
20798
            return (signed long)-1;
 
20799
        }
 
20800
        return (signed long)val;
 
20801
    } else
 
20802
#endif
 
20803
    if (likely(PyLong_Check(x))) {
 
20804
        if (is_unsigned) {
 
20805
            if (unlikely(Py_SIZE(x) < 0)) {
 
20806
                PyErr_SetString(PyExc_OverflowError,
 
20807
                                "can't convert negative value to signed long");
 
20808
                return (signed long)-1;
 
20809
            }
 
20810
            return PyLong_AsUnsignedLong(x);
 
20811
        } else {
 
20812
            return PyLong_AsLong(x);
 
20813
        }
 
20814
    } else {
 
20815
        signed long val;
 
20816
        PyObject *tmp = __Pyx_PyNumber_Int(x);
 
20817
        if (!tmp) return (signed long)-1;
 
20818
        val = __Pyx_PyInt_AsSignedLong(tmp);
 
20819
        Py_DECREF(tmp);
 
20820
        return val;
 
20821
    }
 
20822
}
 
20823
 
 
20824
static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
 
20825
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
 
20826
    const int is_unsigned = neg_one > const_zero;
 
20827
#if PY_VERSION_HEX < 0x03000000
 
20828
    if (likely(PyInt_Check(x))) {
 
20829
        long val = PyInt_AS_LONG(x);
 
20830
        if (is_unsigned && unlikely(val < 0)) {
 
20831
            PyErr_SetString(PyExc_OverflowError,
 
20832
                            "can't convert negative value to signed PY_LONG_LONG");
 
20833
            return (signed PY_LONG_LONG)-1;
 
20834
        }
 
20835
        return (signed PY_LONG_LONG)val;
 
20836
    } else
 
20837
#endif
 
20838
    if (likely(PyLong_Check(x))) {
 
20839
        if (is_unsigned) {
 
20840
            if (unlikely(Py_SIZE(x) < 0)) {
 
20841
                PyErr_SetString(PyExc_OverflowError,
 
20842
                                "can't convert negative value to signed PY_LONG_LONG");
 
20843
                return (signed PY_LONG_LONG)-1;
 
20844
            }
 
20845
            return PyLong_AsUnsignedLongLong(x);
 
20846
        } else {
 
20847
            return PyLong_AsLongLong(x);
 
20848
        }
 
20849
    } else {
 
20850
        signed PY_LONG_LONG val;
 
20851
        PyObject *tmp = __Pyx_PyNumber_Int(x);
 
20852
        if (!tmp) return (signed PY_LONG_LONG)-1;
 
20853
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
 
20854
        Py_DECREF(tmp);
 
20855
        return val;
 
20856
    }
 
20857
}
 
20858
 
 
20859
static void __Pyx_WriteUnraisable(const char *name) {
 
20860
    PyObject *old_exc, *old_val, *old_tb;
 
20861
    PyObject *ctx;
 
20862
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
 
20863
    #if PY_MAJOR_VERSION < 3
 
20864
    ctx = PyString_FromString(name);
 
20865
    #else
 
20866
    ctx = PyUnicode_FromString(name);
 
20867
    #endif
 
20868
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
 
20869
    if (!ctx) {
 
20870
        PyErr_WriteUnraisable(Py_None);
 
20871
    } else {
 
20872
        PyErr_WriteUnraisable(ctx);
 
20873
        Py_DECREF(ctx);
 
20874
    }
 
20875
}
 
20876
 
 
20877
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
 
20878
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
 
20879
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
 
20880
#else
 
20881
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
 
20882
#endif
 
20883
    if (!ob)
 
20884
        goto bad;
 
20885
    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
 
20886
        goto bad;
 
20887
    Py_DECREF(ob);
 
20888
    return 0;
 
20889
bad:
 
20890
    Py_XDECREF(ob);
 
20891
    return -1;
 
20892
}
 
20893
 
 
20894
#ifndef __PYX_HAVE_RT_ImportType
 
20895
#define __PYX_HAVE_RT_ImportType
 
20896
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
 
20897
    long size, int strict)
 
20898
{
 
20899
    PyObject *py_module = 0;
 
20900
    PyObject *result = 0;
 
20901
    PyObject *py_name = 0;
 
20902
    char warning[200];
 
20903
 
 
20904
    py_module = __Pyx_ImportModule(module_name);
 
20905
    if (!py_module)
 
20906
        goto bad;
 
20907
    #if PY_MAJOR_VERSION < 3
 
20908
    py_name = PyString_FromString(class_name);
 
20909
    #else
 
20910
    py_name = PyUnicode_FromString(class_name);
 
20911
    #endif
 
20912
    if (!py_name)
 
20913
        goto bad;
 
20914
    result = PyObject_GetAttr(py_module, py_name);
 
20915
    Py_DECREF(py_name);
 
20916
    py_name = 0;
 
20917
    Py_DECREF(py_module);
 
20918
    py_module = 0;
 
20919
    if (!result)
 
20920
        goto bad;
 
20921
    if (!PyType_Check(result)) {
 
20922
        PyErr_Format(PyExc_TypeError,
 
20923
            "%s.%s is not a type object",
 
20924
            module_name, class_name);
 
20925
        goto bad;
 
20926
    }
 
20927
    if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) {
 
20928
        PyOS_snprintf(warning, sizeof(warning),
 
20929
            "%s.%s size changed, may indicate binary incompatibility",
 
20930
            module_name, class_name);
 
20931
        #if PY_VERSION_HEX < 0x02050000
 
20932
        PyErr_Warn(NULL, warning);
 
20933
        #else
 
20934
        PyErr_WarnEx(NULL, warning, 0);
 
20935
        #endif
 
20936
    }
 
20937
    else if (((PyTypeObject *)result)->tp_basicsize != size) {
 
20938
        PyErr_Format(PyExc_ValueError,
 
20939
            "%s.%s has the wrong size, try recompiling",
 
20940
            module_name, class_name);
 
20941
        goto bad;
 
20942
    }
 
20943
    return (PyTypeObject *)result;
 
20944
bad:
 
20945
    Py_XDECREF(py_module);
 
20946
    Py_XDECREF(result);
 
20947
    return 0;
 
20948
}
 
20949
#endif
 
20950
 
 
20951
#ifndef __PYX_HAVE_RT_ImportModule
 
20952
#define __PYX_HAVE_RT_ImportModule
 
20953
static PyObject *__Pyx_ImportModule(const char *name) {
 
20954
    PyObject *py_name = 0;
 
20955
    PyObject *py_module = 0;
 
20956
 
 
20957
    #if PY_MAJOR_VERSION < 3
 
20958
    py_name = PyString_FromString(name);
 
20959
    #else
 
20960
    py_name = PyUnicode_FromString(name);
 
20961
    #endif
 
20962
    if (!py_name)
 
20963
        goto bad;
 
20964
    py_module = PyImport_Import(py_name);
 
20965
    Py_DECREF(py_name);
 
20966
    return py_module;
 
20967
bad:
 
20968
    Py_XDECREF(py_name);
 
20969
    return 0;
 
20970
}
 
20971
#endif
 
20972
 
 
20973
#include "compile.h"
 
20974
#include "frameobject.h"
 
20975
#include "traceback.h"
 
20976
 
 
20977
static void __Pyx_AddTraceback(const char *funcname) {
 
20978
    PyObject *py_srcfile = 0;
 
20979
    PyObject *py_funcname = 0;
 
20980
    PyObject *py_globals = 0;
 
20981
    PyCodeObject *py_code = 0;
 
20982
    PyFrameObject *py_frame = 0;
 
20983
 
 
20984
    #if PY_MAJOR_VERSION < 3
 
20985
    py_srcfile = PyString_FromString(__pyx_filename);
 
20986
    #else
 
20987
    py_srcfile = PyUnicode_FromString(__pyx_filename);
 
20988
    #endif
 
20989
    if (!py_srcfile) goto bad;
 
20990
    if (__pyx_clineno) {
 
20991
        #if PY_MAJOR_VERSION < 3
 
20992
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
 
20993
        #else
 
20994
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
 
20995
        #endif
 
20996
    }
 
20997
    else {
 
20998
        #if PY_MAJOR_VERSION < 3
 
20999
        py_funcname = PyString_FromString(funcname);
 
21000
        #else
 
21001
        py_funcname = PyUnicode_FromString(funcname);
 
21002
        #endif
 
21003
    }
 
21004
    if (!py_funcname) goto bad;
 
21005
    py_globals = PyModule_GetDict(__pyx_m);
 
21006
    if (!py_globals) goto bad;
 
21007
    py_code = PyCode_New(
 
21008
        0,            /*int argcount,*/
 
21009
        #if PY_MAJOR_VERSION >= 3
 
21010
        0,            /*int kwonlyargcount,*/
 
21011
        #endif
 
21012
        0,            /*int nlocals,*/
 
21013
        0,            /*int stacksize,*/
 
21014
        0,            /*int flags,*/
 
21015
        __pyx_empty_bytes, /*PyObject *code,*/
 
21016
        __pyx_empty_tuple,  /*PyObject *consts,*/
 
21017
        __pyx_empty_tuple,  /*PyObject *names,*/
 
21018
        __pyx_empty_tuple,  /*PyObject *varnames,*/
 
21019
        __pyx_empty_tuple,  /*PyObject *freevars,*/
 
21020
        __pyx_empty_tuple,  /*PyObject *cellvars,*/
 
21021
        py_srcfile,   /*PyObject *filename,*/
 
21022
        py_funcname,  /*PyObject *name,*/
 
21023
        __pyx_lineno,   /*int firstlineno,*/
 
21024
        __pyx_empty_bytes  /*PyObject *lnotab*/
 
21025
    );
 
21026
    if (!py_code) goto bad;
 
21027
    py_frame = PyFrame_New(
 
21028
        PyThreadState_GET(), /*PyThreadState *tstate,*/
 
21029
        py_code,             /*PyCodeObject *code,*/
 
21030
        py_globals,          /*PyObject *globals,*/
 
21031
        0                    /*PyObject *locals*/
 
21032
    );
 
21033
    if (!py_frame) goto bad;
 
21034
    py_frame->f_lineno = __pyx_lineno;
 
21035
    PyTraceBack_Here(py_frame);
 
21036
bad:
 
21037
    Py_XDECREF(py_srcfile);
 
21038
    Py_XDECREF(py_funcname);
 
21039
    Py_XDECREF(py_code);
 
21040
    Py_XDECREF(py_frame);
 
21041
}
 
21042
 
 
21043
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
 
21044
    while (t->p) {
 
21045
        #if PY_MAJOR_VERSION < 3
 
21046
        if (t->is_unicode) {
 
21047
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
 
21048
        } else if (t->intern) {
 
21049
            *t->p = PyString_InternFromString(t->s);
 
21050
        } else {
 
21051
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
 
21052
        }
 
21053
        #else  /* Python 3+ has unicode identifiers */
 
21054
        if (t->is_unicode | t->is_str) {
 
21055
            if (t->intern) {
 
21056
                *t->p = PyUnicode_InternFromString(t->s);
 
21057
            } else if (t->encoding) {
 
21058
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
 
21059
            } else {
 
21060
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
 
21061
            }
 
21062
        } else {
 
21063
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
 
21064
        }
 
21065
        #endif
 
21066
        if (!*t->p)
 
21067
            return -1;
 
21068
        ++t;
 
21069
    }
 
21070
    return 0;
 
21071
}
 
21072
 
 
21073
/* Type Conversion Functions */
 
21074
 
 
21075
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
 
21076
   int is_true = x == Py_True;
 
21077
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
 
21078
   else return PyObject_IsTrue(x);
 
21079
}
 
21080
 
 
21081
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
 
21082
  PyNumberMethods *m;
 
21083
  const char *name = NULL;
 
21084
  PyObject *res = NULL;
 
21085
#if PY_VERSION_HEX < 0x03000000
 
21086
  if (PyInt_Check(x) || PyLong_Check(x))
 
21087
#else
 
21088
  if (PyLong_Check(x))
 
21089
#endif
 
21090
    return Py_INCREF(x), x;
 
21091
  m = Py_TYPE(x)->tp_as_number;
 
21092
#if PY_VERSION_HEX < 0x03000000
 
21093
  if (m && m->nb_int) {
 
21094
    name = "int";
 
21095
    res = PyNumber_Int(x);
 
21096
  }
 
21097
  else if (m && m->nb_long) {
 
21098
    name = "long";
 
21099
    res = PyNumber_Long(x);
 
21100
  }
 
21101
#else
 
21102
  if (m && m->nb_int) {
 
21103
    name = "int";
 
21104
    res = PyNumber_Long(x);
 
21105
  }
 
21106
#endif
 
21107
  if (res) {
 
21108
#if PY_VERSION_HEX < 0x03000000
 
21109
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
 
21110
#else
 
21111
    if (!PyLong_Check(res)) {
 
21112
#endif
 
21113
      PyErr_Format(PyExc_TypeError,
 
21114
                   "__%s__ returned non-%s (type %.200s)",
 
21115
                   name, name, Py_TYPE(res)->tp_name);
 
21116
      Py_DECREF(res);
 
21117
      return NULL;
 
21118
    }
 
21119
  }
 
21120
  else if (!PyErr_Occurred()) {
 
21121
    PyErr_SetString(PyExc_TypeError,
 
21122
                    "an integer is required");
 
21123
  }
 
21124
  return res;
 
21125
}
 
21126
 
 
21127
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
 
21128
  Py_ssize_t ival;
 
21129
  PyObject* x = PyNumber_Index(b);
 
21130
  if (!x) return -1;
 
21131
  ival = PyInt_AsSsize_t(x);
 
21132
  Py_DECREF(x);
 
21133
  return ival;
 
21134
}
 
21135
 
 
21136
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
 
21137
#if PY_VERSION_HEX < 0x02050000
 
21138
   if (ival <= LONG_MAX)
 
21139
       return PyInt_FromLong((long)ival);
 
21140
   else {
 
21141
       unsigned char *bytes = (unsigned char *) &ival;
 
21142
       int one = 1; int little = (int)*(unsigned char*)&one;
 
21143
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
 
21144
   }
 
21145
#else
 
21146
   return PyInt_FromSize_t(ival);
 
21147
#endif
 
21148
}
 
21149
 
 
21150
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
 
21151
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
 
21152
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
 
21153
       return (size_t)-1;
 
21154
   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
 
21155
       PyErr_SetString(PyExc_OverflowError,
 
21156
                       "value too large to convert to size_t");
 
21157
       return (size_t)-1;
 
21158
   }
 
21159
   return (size_t)val;
 
21160
}
 
21161
 
 
21162
 
 
21163
#endif /* Py_PYTHON_H */