Mercurial > hg
view tests/test-histedit-outgoing.t @ 19651:902c646019ad
dirstate.status: don't ignore symlink placeholders in the normal set
On Windows, there are two ways symlinks can manifest themselves:
1. As placeholders: text files containing the symlink's target. This is what
usually happens with fresh clones on Windows.
2. With their dereferenced contents. This happens with clones accessed over NFS
or Samba.
In order to handle case 2, ca6cebd8734e made dirstate.status ignore all symlink
placeholders on Windows. It doesn't ignore symlinks in the lookup set, though,
since those don't have the link bit set. This is problematic because it
violates the invariant that `hg status` with every file in the normal set
produces the same output as `hg status` with every file in the lookup set.
With this change, symlink placeholders in the normal set are no longer ignored.
We instead rely on code in localrepo.status that uses heuristics to look for
suspect placeholders.
An upcoming patch will test this out by no longer adding files written in the
last second of an update to the lookup set.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Sat, 31 Aug 2013 10:20:15 -0700 |
parents | 0023a6e49268 |
children | 44d7bfe08c14 |
line wrap: on
line source
$ cat >> $HGRCPATH <<EOF > [extensions] > graphlog= > histedit= > EOF $ initrepos () > { > hg init r > cd r > for x in a b c ; do > echo $x > $x > hg add $x > hg ci -m $x > done > cd .. > hg clone r r2 | grep -v updating > cd r2 > for x in d e f ; do > echo $x > $x > hg add $x > hg ci -m $x > done > cd .. > hg init r3 > cd r3 > for x in g h i ; do > echo $x > $x > hg add $x > hg ci -m $x > done > cd .. > } $ initrepos 3 files updated, 0 files merged, 0 files removed, 0 files unresolved show the edit commands offered by outgoing $ cd r2 $ HGEDITOR=cat hg histedit --outgoing ../r | grep -v comparing | grep -v searching pick 055a42cdd887 3 d pick e860deea161a 4 e pick 652413bf663e 5 f # Edit history between 055a42cdd887 and 652413bf663e # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # f, fold = use commit, but fold into previous commit (combines N and N-1) # d, drop = remove commit from history # m, mess = edit message without changing commit content # 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd .. show the error from unrelated repos $ cd r3 $ HGEDITOR=cat hg histedit --outgoing ../r | grep -v comparing | grep -v searching abort: repository is unrelated [1] $ cd .. show the error from unrelated repos $ cd r3 $ HGEDITOR=cat hg histedit --force --outgoing ../r comparing with ../r searching for changes warning: repository is unrelated pick 2a4042b45417 0 g pick 68c46b4927ce 1 h pick 51281e65ba79 2 i # Edit history between 2a4042b45417 and 51281e65ba79 # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # f, fold = use commit, but fold into previous commit (combines N and N-1) # d, drop = remove commit from history # m, mess = edit message without changing commit content # 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd .. test sensitivity to branch in URL: $ cd r2 $ hg -q update 2 $ hg -q branch foo $ hg commit -m 'create foo branch' $ HGEDITOR=cat hg histedit --outgoing '../r#foo' | grep -v comparing | grep -v searching pick f26599ee3441 6 create foo branch # Edit history between f26599ee3441 and f26599ee3441 # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # f, fold = use commit, but fold into previous commit (combines N and N-1) # d, drop = remove commit from history # m, mess = edit message without changing commit content # 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd ..