Jump to content

Understanding Swarm URL syntax


  • Please log in to reply
1 reply to this topic

#1 Jayanth S Vasisht

Jayanth S Vasisht

    Advanced Member

  • Members
  • PipPipPip
  • 35 posts

Posted 09 July 2018 - 12:29 PM

I am trying to build up Swarm URLs to access specific parts of a depot similar to P4Web. My other intention is to also replace P4Web completely with Swarm. I came across this page describing the Swarm URL syntax: https://community.pe...s/article/13217. However, I cannot understand what these mean...for example

/changes?(/(?P<path>.*))? (changes)

What does the
mean here? Should I be replacing the ?P with something or use it verbatim?

My goal is to build up a swarm URL to a specific depot path which should show a range of changelists.

#2 P4Dale


    Advanced Member

  • Staff
  • 50 posts

Posted 11 July 2018 - 09:01 AM

Hello Jayanth,

Swarm has a simple but smart URL redirect built in. If you was to have a depot path of "//depot/projectX/main/src/" and you want to only see the files under this path you can build a URL like:


This will redirect you to: http://Swarm/files/d...jectX/main/src/

This then has a commits tab for the user to click.

That said if you really don't want the user to have to click the button you have two options:

1. Build a URL like above but include #commits to the end of the request:


This will redirect you to http://Swarm/files/d...main/src#comits

This looks strange though as you have "files" instead of "changes" as the URL path.

2. Just build the URL directly as you know you only want the commits like this:


This will give you the commits only list for the given path.

Please do let me know if you have any other questions around this topic.


Swarm Dev.

Also tagged with one or more of these keywords: swarm

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users