From 43b82bd9c3a5ad597bbfc0c12a519d4053df01b8 Mon Sep 17 00:00:00 2001 From: Pete Wyckoff Date: Wed, 11 Jan 2012 18:31:06 -0500 Subject: git-p4: only a single ... wildcard is supported Catch the case where a ... exists at the end, and also elsehwere. Reported-by: Gary Gibbons Signed-off-by: Pete Wyckoff Signed-off-by: Junio C Hamano --- contrib/fast-import/git-p4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 3e1aa276c..20208bfbc 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -1207,8 +1207,8 @@ class View(object): die("Can't handle * wildcards in view: %s" % self.path) triple_dot_index = self.path.find("...") if triple_dot_index >= 0: - if not self.path.endswith("..."): - die("Can handle ... wildcard only at end of path: %s" % + if triple_dot_index != len(self.path) - 3: + die("Can handle only single ... wildcard, at end: %s" % self.path) self.ends_triple_dot = True -- cgit v1.2.1 From 329afb8e976b2605bbc92a6ac8ef63f9a6c98ef1 Mon Sep 17 00:00:00 2001 From: Pete Wyckoff Date: Wed, 11 Jan 2012 18:31:07 -0500 Subject: git-p4: fix verbose comment typo Signed-off-by: Pete Wyckoff Signed-off-by: Junio C Hamano --- contrib/fast-import/git-p4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 20208bfbc..e267f3115 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -1263,7 +1263,7 @@ class View(object): if self.exclude: c = "-" return "View.Mapping: %s%s -> %s" % \ - (c, self.depot_side, self.client_side) + (c, self.depot_side.path, self.client_side.path) def map_depot_to_client(self, depot_path): """Calculate the client path if using this mapping on the -- cgit v1.2.1 From 6ee9a9993fcbe5dae356013c51cfed1e39eeaf01 Mon Sep 17 00:00:00 2001 From: Pete Wyckoff Date: Wed, 11 Jan 2012 18:31:08 -0500 Subject: git-p4: clarify comment Signed-off-by: Pete Wyckoff Signed-off-by: Junio C Hamano --- contrib/fast-import/git-p4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index e267f3115..e11e15bad 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -1363,7 +1363,8 @@ class View(object): else: # This mapping matched; no need to search any further. # But, the mapping could be rejected if the client path - # has already been claimed by an earlier mapping. + # has already been claimed by an earlier mapping (i.e. + # one later in the list, which we are walking backwards). already_mapped_in_client = False for f in paths_filled: # this is View.Path.match -- cgit v1.2.1