[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] RCS repositories
From: |
Andrew McGuinness |
Subject: |
[Monotone-devel] RCS repositories |
Date: |
Sat, 23 Apr 2005 12:04:06 +0000 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20050325) |
I'm having a play with monotone, and had a go at importing a small
RCS repository with the cvs_import command.
It worked (after upgrading to today's head from 0.18), but because
we're using RCS (really!), all the files are in RCS/ subdirectories.
A small change to rcs_import.cc fixes this.
It doesn't handle our (proprietary) approach to file deletions, but
that's not a general case, so I won't bother.
#
# patch "ChangeLog"
# from [501f140e9335c16d7459bfa98e179e902ec232a5]
# to [824d72123403a7497c022758bbb849729737ee9b]
#
# patch "rcs_import.cc"
# from [60f5ef2fcd089c3f6bde86d3dcca879dabe58d5b]
# to [a24a1affcbc7677cce632ecf0efaf8ce2b37c1c9]
#
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,7 @@
+2005-04-23 Andrew McGuinness <address@hidden>
+
+ * rcs_import.cc (set_filename): ignore "RCS/" in rcs file paths.
+
2005-04-22 Nathaniel Smith <address@hidden>
* manifest.cc (build_restricted_manifest_map): Fixup after merge
--- rcs_import.cc
+++ rcs_import.cc
@@ -785,9 +785,14 @@
ss.resize(ss.size() - 2);
// remove Attic/ if present
std::string::size_type last_slash=ss.rfind('/');
- if (last_slash!=std::string::npos && last_slash>=5
- && ss.substr(last_slash-5,6)=="Attic/")
- ss.erase(last_slash-5,6);
+ if (last_slash!=std::string::npos ) {
+ if ( last_slash>=5
+ && ss.substr(last_slash-5,6)=="Attic/")
+ ss.erase(last_slash-5,6);
+ else if ( last_slash>=3
+ && ss.substr(last_slash-3,4)=="RCS/")
+ ss.erase(last_slash-3,4);
+ }
curr_file = file_path(ss);
}
- [Monotone-devel] RCS repositories,
Andrew McGuinness <=