Patchwork [1,of,3,V2] dirstate._walkexplicit: indicate root as '.', not ''

login
register
mail settings
Submitter Siddharth Agarwal
Date March 30, 2015, 6:36 a.m.
Message ID <6cd9f346c8c947a0aad2.1427697371@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8371/
State Accepted
Headers show

Comments

Siddharth Agarwal - March 30, 2015, 6:36 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1427696845 25200
#      Sun Mar 29 23:27:25 2015 -0700
# Node ID 6cd9f346c8c947a0aad24d1742a91683a939bfec
# Parent  efa094701a05d58d505c3b0c3b3c73dba4e51e97
dirstate._walkexplicit: indicate root as '.', not ''

'.' is the canonical way to represent the root, and it's apparently the only
transformation that normpath makes.

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -629,7 +629,7 @@ 
             j += 1
 
         if not files or '.' in files:
-            files = ['']
+            files = ['.']
         results = dict.fromkeys(subrepos)
         results['.hg'] = None