[PATCH 2 of 6 DEFAULT] remove: extract repo[None] into wctx variable

David M. Carr david at carrclan.us
Sat Jan 14 09:00:17 CST 2012


# HG changeset patch
# User David M. Carr  <david at carrclan.us>
# Date 1326505577 18000
# Node ID 50fc86bcc87699ea2b0e4eaa745300c413724069
# Parent  670ebd709125c14cc6e91f6eb5c59b09297e9f1e
remove: extract repo[None] into wctx variable

This change has no functional impact, but allows for later changes to
more cleanly access the the repository.

diff -r 670ebd709125 -r 50fc86bcc876 mercurial/commands.py
--- a/mercurial/commands.py	Fri Jan 13 19:56:05 2012 -0500
+++ b/mercurial/commands.py	Fri Jan 13 20:46:17 2012 -0500
@@ -4522,7 +4522,8 @@
     if not pats and not after:
         raise util.Abort(_('no files specified'))
 
-    m = scmutil.match(repo[None], pats, opts)
+    wctx = repo[None]
+    m = scmutil.match(wctx, pats, opts)
     s = repo.status(match=m, clean=True)
     modified, added, deleted, clean = s[0], s[1], s[3], s[6]
 
@@ -4566,7 +4567,7 @@
                 except OSError, inst:
                     if inst.errno != errno.ENOENT:
                         raise
-        repo[None].forget(list)
+        wctx.forget(list)
     finally:
         wlock.release()
 


More information about the Mercurial-devel mailing list