代码之家  ›  专栏  ›  技术社区  ›  user2181871

获取特定时期内的n个最新变更列表

  •  2
  • user2181871  · 技术社区  · 12 年前

    我希望在这段时间内得到最新的20个变更单。如何修改选项?

    这对我来说非常重要,因为我将从performce提供的数据中收集一些统计数据。这是我的代码:

    string deppath1 = "//obms/...";
    P4Command cm1 = new P4Command(ps, "changes", true, String.Format("{0}", deppath1));
     Options opchanges = new Options();
    opchanges.Add("2012/04/01", "now");
     P4CommandResult results1 = cm1.Run(opchanges);
    if (results1 != null)
    Console.WriteLine("ggh");
    TaggedObjectList listfiledown1 = new TaggedObjectList();
    listfiledown1 = (results1.TaggedOutput);
    
    foreach (TaggedObject obj in listfiledown1)
     {
       foreach (String s in obj.Keys)
        {
            String value = "n/a";
            obj.TryGetValue(s, out value);
            Console.WriteLine(s+""+value);
            Console.WriteLine("********");
        }
     }
    
    2 回复  |  直到 12 年前
        1
  •  3
  •   gasroot    12 年前
     opchanges.Add("  -l 20  edk -s    submitted   2010/04/01", "now");
    
        2
  •  0
  •   gasroot    12 年前
    opchanges.Add("-m n -u edk -s submitted 2010/04/01", "now");
    

    n您需要的更改数量。