##// END OF EJS Templates
add: add back forgotten files even when not matching exactly (BC)...
Martin von Zweigbergk -
r23258:10697f29 default
parent child Browse files
Show More
@@ -1982,9 +1982,9 b' def add(ui, repo, match, dryrun, listsub'
1982 abort, warn = scmutil.checkportabilityalert(ui)
1982 abort, warn = scmutil.checkportabilityalert(ui)
1983 if abort or warn:
1983 if abort or warn:
1984 cca = scmutil.casecollisionauditor(ui, abort, repo.dirstate)
1984 cca = scmutil.casecollisionauditor(ui, abort, repo.dirstate)
1985 for f in repo.walk(match):
1985 for f in wctx.walk(match):
1986 exact = match.exact(f)
1986 exact = match.exact(f)
1987 if exact or not explicitonly and f not in repo.dirstate:
1987 if exact or not explicitonly and f not in wctx:
1988 if cca:
1988 if cca:
1989 cca(f)
1989 cca(f)
1990 names.append(f)
1990 names.append(f)
@@ -126,6 +126,19 b' Issue683: peculiarity with hg revert of '
126 M a
126 M a
127 ? a.orig
127 ? a.orig
128
128
129 Forgotten file can be added back (as either clean or modified)
130
131 $ hg forget b
132 $ hg add b
133 $ hg st -A b
134 C b
135 $ hg forget b
136 $ echo modified > b
137 $ hg add b
138 $ hg st -A b
139 M b
140 $ hg revert -qC b
141
129 $ hg add c && echo "unexpected addition of missing file"
142 $ hg add c && echo "unexpected addition of missing file"
130 c: * (glob)
143 c: * (glob)
131 [1]
144 [1]
General Comments 0
You need to be logged in to leave comments. Login now