Re: [PATCH 4/8] git-p4: accommodate new move/delete type in p4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 5, 2011 at 11:52 PM, Pete Wyckoff <pw@xxxxxxxx> wrote:
> Change 562d53f (2010-11-21) recognized the new move/delete type
> for git-p4 sync, but it can also show up in an initial clone and
> labels output. ÂInstead of replicating this in three places,
> hoist the definition somewhere global.
>
> Signed-off-by: Pete Wyckoff <pw@xxxxxxxx>

Acked-By: Tor Arvid Lund <torarvid@xxxxxxxxx>

> ---
> Âcontrib/fast-import/git-p4 | Â 12 +++++++-----
> Â1 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
> index d2ba215..db19b17 100755
> --- a/contrib/fast-import/git-p4
> +++ b/contrib/fast-import/git-p4
> @@ -834,6 +834,8 @@ class P4Submit(Command):
> Â Â Â Â return True
>
> Âclass P4Sync(Command):
> + Â Âdelete_actions = ( "delete", "move/delete", "purge" )
> +
> Â Â def __init__(self):
> Â Â Â Â Command.__init__(self)
> Â Â Â Â self.options = [
> @@ -1038,10 +1040,10 @@ class P4Sync(Command):
>
> Â Â Â Â Â Â if includeFile:
> Â Â Â Â Â Â Â Â filesForCommit.append(f)
> - Â Â Â Â Â Â Â Âif f['action'] not in ('delete', 'move/delete', 'purge'):
> - Â Â Â Â Â Â Â Â Â ÂfilesToRead.append(f)
> - Â Â Â Â Â Â Â Âelse:
> + Â Â Â Â Â Â Â Âif f['action'] in self.delete_actions:
> Â Â Â Â Â Â Â Â Â Â filesToDelete.append(f)
> + Â Â Â Â Â Â Â Âelse:
> + Â Â Â Â Â Â Â Â Â ÂfilesToRead.append(f)
>
> Â Â Â Â # deleted files...
> Â Â Â Â for f in filesToDelete:
> @@ -1127,7 +1129,7 @@ class P4Sync(Command):
>
> Â Â Â Â Â Â Â Â cleanedFiles = {}
> Â Â Â Â Â Â Â Â for info in files:
> - Â Â Â Â Â Â Â Â Â Âif info["action"] in ("delete", "purge"):
> + Â Â Â Â Â Â Â Â Â Âif info["action"] in self.delete_actions:
> Â Â Â Â Â Â Â Â Â Â Â Â continue
> Â Â Â Â Â Â Â Â Â Â cleanedFiles[info["depotFile"]] = info["rev"]
>
> @@ -1453,7 +1455,7 @@ class P4Sync(Command):
> Â Â Â Â Â Â if change > newestRevision:
> Â Â Â Â Â Â Â Â newestRevision = change
>
> - Â Â Â Â Â Âif info["action"] in ("delete", "purge"):
> + Â Â Â Â Â Âif info["action"] in self.delete_actions:
> Â Â Â Â Â Â Â Â # don't increase the file cnt, otherwise details["depotFile123"] will have gaps!
> Â Â Â Â Â Â Â Â #fileCnt = fileCnt + 1
> Â Â Â Â Â Â Â Â continue
> --
> 1.7.2.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]