[PATCH 1 of 2] convert: improve some comments and messages for p4
Frank Kingswood
frank at kingswood-consulting.co.uk
Mon Feb 23 06:51:20 CST 2009
# HG changeset patch
# User Frank Kingswood <frank at kingswood-consulting.co.uk>
# Date 1235393325 0
# Node ID 2ecdf26af674526c0b77a9cfe9cdb8297f585487
# Parent d602f5013d174fb5c1c82d0e1711ea2b0e9e7e20
convert: improve some comments and messages for p4
diff -r d602f5013d17 -r 2ecdf26af674 hgext/convert/__init__.py
--- a/hgext/convert/__init__.py Thu Feb 19 22:28:48 2009 +0000
+++ b/hgext/convert/__init__.py Mon Feb 23 12:48:45 2009 +0000
@@ -176,12 +176,11 @@
branches and integrations. It will set a tag on the final changeset
referencing the Perforce changelist number.
- Source history can be retrieved starting at a specific revision,
- instead of being integrally converted. Only single branch
- conversions are supported.
+ It is possible to limit the amount of source history to be converted
+ by specifying an initial Perforce revision.
--config convert.p4.startrev=0 (perforce changelist number)
- specify start Perforce revision.
+ specify initial Perforce revision.
Mercurial Destination
diff -r d602f5013d17 -r 2ecdf26af674 hgext/convert/p4.py
--- a/hgext/convert/p4.py Thu Feb 19 22:28:48 2009 +0000
+++ b/hgext/convert/p4.py Mon Feb 23 12:48:45 2009 +0000
@@ -1,5 +1,5 @@
#
-# Mercurial import from Perforce.
+# Perforce source for convert extension.
#
# Copyright 2009, Frank Kingswood <frank at kingswood-consulting.co.uk>
#
@@ -50,7 +50,7 @@
self.p4changes[c] = True
def _parse(self, ui, path):
- "Prepare list of P4 filenames and revisions for import"
+ "Prepare list of P4 filenames and revisions to import"
ui.status(_('reading p4 views\n'))
# read client spec or view
@@ -67,7 +67,7 @@
views = {}
for x in clientspec:
if x.startswith("View"):
- sview,cview = clientspec[x].split()
+ sview, cview = clientspec[x].split()
self._parse_view(sview)
if sview.endswith("...") and cview.endswith("..."):
sview = sview[:-3]
@@ -80,7 +80,7 @@
self.p4changes = [x for x in self.p4changes]
self.p4changes.sort(key = int)
- # prepare a list to check depot filenames to make local view
+ # list with depot pathnames, longest first
vieworder = [x for x in views]
vieworder.sort(key = lambda x:-len(x))
@@ -91,7 +91,7 @@
(not self.rev or int(x)<=int(self.rev)))]
# now read the full changelists to get the list of file revisions
- ui.status(_('collect p4 changelists\n'))
+ ui.status(_('collecting p4 changelists\n'))
lastid = None
for id in self.p4changes:
cmd = "p4 -G describe %s" % id
More information about the Mercurial-devel
mailing list