Mercurial > hg
comparison mercurial/cext/dirs.c @ 42343:d8e55c0c642c
util: make util.dirs() and util.finddirs() include root directory (API)
This changes the behavior of test-origbackup-conflict.t so it no
longer errors out when the backup path points to an existing
file. Instead, it replaces the file by a directory. That seems
reasonable to me.
Differential Revision: https://phab.mercurial-scm.org/D6403
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 16 May 2017 11:00:38 -0700 |
parents | b90e8da190da |
children | 2a0774e9d2a8 |
comparison
equal
deleted
inserted
replaced
42342:448486e12c13 | 42343:d8e55c0c642c |
---|---|
40 while (pos != -1) { | 40 while (pos != -1) { |
41 if (path[pos] == '/') | 41 if (path[pos] == '/') |
42 break; | 42 break; |
43 pos -= 1; | 43 pos -= 1; |
44 } | 44 } |
45 if (pos == -1) { | |
46 return 0; | |
47 } | |
45 | 48 |
46 return pos; | 49 return pos; |
47 } | 50 } |
48 | 51 |
49 static int _addpath(PyObject *dirs, PyObject *path) | 52 static int _addpath(PyObject *dirs, PyObject *path) |