[Python-checkins] devguide: Add a FAQ about splitting files. (original) (raw)
ezio.melotti python-checkins at python.org
Tue Mar 29 21:42:10 CEST 2011
- Previous message: [Python-checkins] devguide: Add a table of contents to the FAQ.
- Next message: [Python-checkins] cpython (2.5): Issue 22663: fix redirect vulnerability in urllib/urllib2.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
http://hg.python.org/devguide/rev/2903907665c1 changeset: 406:2903907665c1 user: Ezio Melotti date: Tue Mar 29 22:42:03 2011 +0300 summary: Add a FAQ about splitting files.
files: faq.rst | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/faq.rst b/faq.rst --- a/faq.rst +++ b/faq.rst @@ -382,6 +382,24 @@ the file(s) to your local repository.
+What's the best way to split a file into several files?
+-------------------------------------------------------------------------------
+
+To split a file into several files (e.g. a module converted to a package or a
+long doc file divided in two separate documents) use hg copy
::
+
hg copy module.rst module2.rst
+and then remove the parts that are not necessary from
module.rst
and +module2.rst
. This allows Mercurial to know that the content of +module2.rst
used to be inmodule.rst
, and will make subsequent merges +easier. If necessary, you can also usehg copy
several times.+If you simply create
module2.rst
, add it withhg add
, and copy part of +the content frommodule.rst
, Mercurial won't know that the two file are +related... _hg-commit:
How do I commit a change to a file?
-- Repository URL: http://hg.python.org/devguide
- Previous message: [Python-checkins] devguide: Add a table of contents to the FAQ.
- Next message: [Python-checkins] cpython (2.5): Issue 22663: fix redirect vulnerability in urllib/urllib2.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]