monotone

View issue-31.diff

1#
2# old_revision [3fdbae2f1a2277e919238fb62b72455dcfd3acc0]
3#
4# patch "src/work.cc"
5# from [7973e15b907a675216583f414415738a14f4da00]
6# to [e9d009615ab424478cbc1cd04ec1af771164687b]
7#
8============================================================
9--- src/work.cc7973e15b907a675216583f414415738a14f4da00
10+++ src/work.cce9d009615ab424478cbc1cd04ec1af771164687b
11@@ -1490,6 +1490,25 @@ simulated_working_tree::drop_detached_no
12 conflicting_paths.insert(i->second / j->first);
13 }
14 }
15+ else if (is_file_t(node))
16+ {
17+ map<node_id, file_path>::const_iterator i = nid_map.find(nid);
18+ I(i != nid_map.end());
19+ const_file_t file = downcast_to_file_t(node);
20+
21+ data tmp;
22+ file_id fid;
23+ read_data(i->second, tmp);
24+ calculate_ident(file_data(tmp), fid);
25+ if (fid != file->content)
26+ {
27+ W(F("cannot drop file '%s' with local changes") % i->second);
28+ conflicts++;
29+ conflicting_paths.insert(i->second);
30+ }
31+ }
32+ else
33+ I(false);
34 }
35
36 node_id

Archive Download this file

Attachment to issue 31

Created: 12 years 11 months ago by Thomas Keller

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status