##// END OF EJS Templates
fileset: don't abort when running copied() on a revision with a removed file...
Matt Harbison -
r35968:7b2b82f8 stable
parent child Browse files
Show More
@@ -464,9 +464,10 b' def copied(mctx, x):'
464 getargs(x, 0, 0, _("copied takes no arguments"))
464 getargs(x, 0, 0, _("copied takes no arguments"))
465 s = []
465 s = []
466 for f in mctx.subset:
466 for f in mctx.subset:
467 p = mctx.ctx[f].parents()
467 if f in mctx.ctx:
468 if p and p[0].path() != f:
468 p = mctx.ctx[f].parents()
469 s.append(f)
469 if p and p[0].path() != f:
470 s.append(f)
470 return s
471 return s
471
472
472 @predicate('revs(revs, pattern)')
473 @predicate('revs(revs, pattern)')
@@ -249,6 +249,8 b' Test files properties'
249 Test merge states
249 Test merge states
250
250
251 $ hg ci -m manychanges
251 $ hg ci -m manychanges
252 $ hg file -r . 'set:copied() & modified()'
253 [1]
252 $ hg up -C 0
254 $ hg up -C 0
253 * files updated, 0 files merged, * files removed, 0 files unresolved (glob)
255 * files updated, 0 files merged, * files removed, 0 files unresolved (glob)
254 $ echo c >> b2
256 $ echo c >> b2
General Comments 0
You need to be logged in to leave comments. Login now