Mercurial > hg
comparison hgext/record.py @ 6760:4faaa0535ea7
status: clean up all users for unknown files
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 27 Jun 2008 13:43:29 -0500 |
parents | 41eb20cc1c02 |
children | c8c9ce0ed3ee |
comparison
equal
deleted
inserted
replaced
6759:9d2ab50803e9 | 6760:4faaa0535ea7 |
---|---|
403 left in place, so the user can continue his work. | 403 left in place, so the user can continue his work. |
404 """ | 404 """ |
405 if match.files(): | 405 if match.files(): |
406 changes = None | 406 changes = None |
407 else: | 407 else: |
408 changes = repo.status(match=match)[:5] | 408 changes = repo.status(match=match)[:3] |
409 modified, added, removed = changes[:3] | 409 modified, added, removed = changes |
410 match = cmdutil.matchfiles(repo, modified + added + removed) | 410 match = cmdutil.matchfiles(repo, modified + added + removed) |
411 diffopts = mdiff.diffopts(git=True, nodates=True) | 411 diffopts = mdiff.diffopts(git=True, nodates=True) |
412 fp = cStringIO.StringIO() | 412 fp = cStringIO.StringIO() |
413 patch.diff(repo, repo.dirstate.parents()[0], match=match, | 413 patch.diff(repo, repo.dirstate.parents()[0], match=match, |
414 changes=changes, opts=diffopts, fp=fp) | 414 changes=changes, opts=diffopts, fp=fp) |
429 ui.status(_('no changes to record\n')) | 429 ui.status(_('no changes to record\n')) |
430 return 0 | 430 return 0 |
431 | 431 |
432 if changes is None: | 432 if changes is None: |
433 match = cmdutil.matchfiles(repo, newfiles) | 433 match = cmdutil.matchfiles(repo, newfiles) |
434 changes = repo.status(match=match)[:5] | 434 changes = repo.status(match=match) |
435 modified = dict.fromkeys(changes[0]) | 435 modified = dict.fromkeys(changes[0]) |
436 | 436 |
437 # 2. backup changed files, so we can restore them in the end | 437 # 2. backup changed files, so we can restore them in the end |
438 backups = {} | 438 backups = {} |
439 backupdir = repo.join('record-backups') | 439 backupdir = repo.join('record-backups') |